From e6cf757d4ae6396dfc908f2c32c9af62ed4b5ee7 Mon Sep 17 00:00:00 2001 From: Saeid Date: Sun, 19 Jul 2020 20:47:31 +0430 Subject: [PATCH 1/8] fix: cron --- resources/js/Global/utils/date/cron.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/js/Global/utils/date/cron.js b/resources/js/Global/utils/date/cron.js index d17ad1b..c0366af 100644 --- a/resources/js/Global/utils/date/cron.js +++ b/resources/js/Global/utils/date/cron.js @@ -10,9 +10,8 @@ export default class Cron { dateToCron() { if (this.date !== '' && this.time !== '') { let date = new Date(this.date + 'T'+ this.time); - console.log(this.date, date, date.getMonth(), date.getDay()); return { - cron: `${date.getMinutes()} ${date.getHours()} ${date.getDate()} ${date.getMonth()} *`, + cron: `${date.getMinutes()} ${date.getHours()} ${date.getDate()} ${date.getMonth() + 1 } *`, year: date.getFullYear() } } @@ -21,7 +20,7 @@ export default class Cron { cronToDate() { let cronArray = this.cron.split(' '); - const month = (parseInt(cronArray[3]) + 1) > 9 ? parseInt(cronArray[3]) + 1 : '0' + (parseInt(cronArray[3]) + 1).toString(); + const month = (parseInt(cronArray[3])) > 9 ? parseInt(cronArray[3]) : '0' + (parseInt(cronArray[3])).toString(); const day = cronArray[2].length < 2 ? '0' + cronArray[2] : cronArray[2]; const hour = cronArray[1].length < 2 ? '0'+cronArray[1] : cronArray[1]; const minute = cronArray[0].length < 2 ? '0'+cronArray[0] : cronArray[0]; From 703b3754a4c159f0c767bcdea43628ad489c1a12 Mon Sep 17 00:00:00 2001 From: Saeid Date: Mon, 20 Jul 2020 20:15:34 +0430 Subject: [PATCH 2/8] feat: add minute in date --- .idea/vcs.xml | 7 +++++++ resources/js/Global/utils/date/date.js | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 7517431..41f31b8 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,6 +2,13 @@ + + + + + + + diff --git a/resources/js/Global/utils/date/date.js b/resources/js/Global/utils/date/date.js index 669a491..f1bf4fe 100644 --- a/resources/js/Global/utils/date/date.js +++ b/resources/js/Global/utils/date/date.js @@ -11,6 +11,9 @@ const formatToYMD = function (date = null, split = "-" ) { if (day.length < 2) day = `0${day}`; return [year, month, day].join(split); -} +}; +const addMinutes = function (date, minutes) { + return new Date(date.getTime() + minutes*60000); +}; -export {formatToYMD}; \ No newline at end of file +export {formatToYMD, addMinutes}; From 53b8e60b8e90a28bd47adbae26aff8848bdcb47d Mon Sep 17 00:00:00 2001 From: farid saravi Date: Mon, 20 Jul 2020 21:18:54 +0430 Subject: [PATCH 3/8] fix: change today command run in every minute --- app/Console/Kernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 789bbe6..b29a22f 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -25,7 +25,7 @@ class Kernel extends ConsoleKernel protected function schedule(Schedule $schedule) { $schedule->command('today:schedule')->daily(); - $schedule->command('today:run')->everyFiveMinutes(); + $schedule->command('today:run')->everyMinute(); } /** From 0527421f015468e022ce7ec8c7b10b2af0ec9f8f Mon Sep 17 00:00:00 2001 From: Saeid Date: Thu, 23 Jul 2020 11:42:08 +0430 Subject: [PATCH 4/8] feat: add multiple in readio group --- .../Global/components/Inputs/RadioGroup.vue | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/resources/js/Global/components/Inputs/RadioGroup.vue b/resources/js/Global/components/Inputs/RadioGroup.vue index 2d8acb1..82d2454 100644 --- a/resources/js/Global/components/Inputs/RadioGroup.vue +++ b/resources/js/Global/components/Inputs/RadioGroup.vue @@ -1,7 +1,7 @@