bfg-common 1.4.298 → 1.4.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/On.vue +4 -6
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/lib/config/options.ts +12 -12
- package/components/common/pages/scheduledTasks/modals/common/newTaskForm/NewTaskForm.vue +6 -2
- package/components/common/pages/scheduledTasks/modals/lib/config/createScheduledTask.ts +1 -0
- package/components/common/pages/scheduledTasks/modals/lib/models/interfaces.ts +1 -0
- package/package.json +1 -1
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
v-model="model"
|
|
10
10
|
/>
|
|
11
11
|
|
|
12
|
-
<div v-if="props.type === 'month'"
|
|
12
|
+
<div v-if="props.type === 'month'">
|
|
13
13
|
<div class="on-time__radio radio">
|
|
14
14
|
<input
|
|
15
15
|
id="on-time-monthly-by-day"
|
|
16
|
-
v-model="
|
|
16
|
+
v-model="model.frg_monthly_mode"
|
|
17
17
|
data-id="on-time-monthly-by-day"
|
|
18
18
|
type="radio"
|
|
19
19
|
value="day"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<div class="on-time__radio radio">
|
|
50
50
|
<input
|
|
51
51
|
id="on-time-monthly-by-week"
|
|
52
|
-
v-model="
|
|
52
|
+
v-model="model.frg_monthly_mode"
|
|
53
53
|
data-id="on-time-monthly-by-week"
|
|
54
54
|
type="radio"
|
|
55
55
|
value="week"
|
|
@@ -115,8 +115,6 @@ const model = defineModel<UI_I_ScheduleNewTasksForm>({ required: true })
|
|
|
115
115
|
|
|
116
116
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
117
117
|
|
|
118
|
-
const selectedTimeMode = ref<'day' | 'week'>('day')
|
|
119
|
-
|
|
120
118
|
const frequencyOnWeeksDays = computed<UI_I_SelectInputItem[]>(() => {
|
|
121
119
|
return frequencyOnWeeksDaysFunc(localization.value)
|
|
122
120
|
})
|
|
@@ -125,7 +123,7 @@ const frequencyOnOrdinalNumber = computed<UI_I_SelectInputItem[]>(() => {
|
|
|
125
123
|
})
|
|
126
124
|
|
|
127
125
|
const isDisabledMonthlyDayField = computed<boolean>(
|
|
128
|
-
() =>
|
|
126
|
+
() => model.value.frg_monthly_mode === 'week'
|
|
129
127
|
)
|
|
130
128
|
|
|
131
129
|
const isInitTimeIntervalValidation = ref<boolean>(false)
|
package/components/common/pages/scheduledTasks/modals/common/frequency/on/lib/config/options.ts
CHANGED
|
@@ -7,31 +7,31 @@ export const frequencyOnWeeksDaysFunc = (
|
|
|
7
7
|
return [
|
|
8
8
|
{
|
|
9
9
|
label: localization.common.sunday,
|
|
10
|
-
value:
|
|
10
|
+
value: 6,
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
label: localization.common.monday,
|
|
14
|
-
value:
|
|
14
|
+
value: 1,
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
label: localization.common.tuesday,
|
|
18
|
-
value:
|
|
18
|
+
value: 2,
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
label: localization.common.wednesday,
|
|
22
|
-
value:
|
|
22
|
+
value: 3,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
label: localization.common.thursday,
|
|
26
|
-
value:
|
|
26
|
+
value: 4,
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
label: localization.common.friday,
|
|
30
|
-
value:
|
|
30
|
+
value: 5,
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
label: localization.common.saturday,
|
|
34
|
-
value:
|
|
34
|
+
value: 0,
|
|
35
35
|
},
|
|
36
36
|
]
|
|
37
37
|
}
|
|
@@ -42,23 +42,23 @@ export const frequencyOnOrdinalNumberFunc = (
|
|
|
42
42
|
return [
|
|
43
43
|
{
|
|
44
44
|
label: localization.scheduledTasks.first,
|
|
45
|
-
value:
|
|
45
|
+
value: 1,
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
label: localization.scheduledTasks.second,
|
|
49
|
-
value:
|
|
49
|
+
value: 2,
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
label: localization.scheduledTasks.third,
|
|
53
|
-
value:
|
|
53
|
+
value: 3,
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
label: localization.scheduledTasks.fourth,
|
|
57
|
-
value:
|
|
57
|
+
value: 4,
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
label: localization.common.last,
|
|
61
|
-
value:
|
|
61
|
+
value: 5,
|
|
62
62
|
},
|
|
63
63
|
]
|
|
64
64
|
}
|
|
@@ -178,15 +178,19 @@ const generateWeeklyCronExpression = (
|
|
|
178
178
|
const generateMonthlyCronExpression = (
|
|
179
179
|
data: UI_I_ScheduleNewTasksForm
|
|
180
180
|
): string => {
|
|
181
|
-
const { frg_interval, frg_monthly_day } =
|
|
181
|
+
const { frg_interval, frg_monthly_day, frq_week_day, frq_ordinal_number } =
|
|
182
|
+
data
|
|
182
183
|
|
|
183
184
|
const startOn = new Date(data.frg_start_on_time)
|
|
184
185
|
const end = new Date(data.frg_end_time)
|
|
185
186
|
|
|
186
187
|
console.log(startOn, end)
|
|
188
|
+
const month = data.frg_monthly_mode === 'week' ? '*' : frg_monthly_day
|
|
189
|
+
const cronWeekly = `${frq_week_day}#${frq_ordinal_number}`
|
|
190
|
+
const dayOfWeek = data.frg_monthly_mode === 'week' ? cronWeekly : '*'
|
|
187
191
|
|
|
188
192
|
// Генерируем cron-выражение
|
|
189
|
-
return `* * ${
|
|
193
|
+
return `* * ${month} */${frg_interval} ${dayOfWeek}`
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
const generateCronExpression = (
|