bfg-common 1.4.256 → 1.4.258
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/Frequency.vue +1 -1
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/End.vue +35 -38
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/On.vue +11 -4
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/StartOn.vue +5 -0
- package/package.json +1 -1
|
@@ -9,23 +9,23 @@
|
|
|
9
9
|
:class="selectedFrequencyEndMode === 'on' && 'enabled'"
|
|
10
10
|
>
|
|
11
11
|
<template #options>
|
|
12
|
-
<
|
|
12
|
+
<label
|
|
13
13
|
v-if="selectedFrequencyEndMode === 'on'"
|
|
14
|
-
|
|
14
|
+
for="frequency-end-date"
|
|
15
|
+
class="tooltip tooltip-validation tooltip-xs tooltip-top-left frequency-end-date"
|
|
16
|
+
:class="schedulerEndDateErrorText && 'invalid'"
|
|
15
17
|
>
|
|
16
18
|
<input
|
|
17
|
-
id="
|
|
18
|
-
v-model.lazy="
|
|
19
|
-
data-id="
|
|
20
|
-
|
|
21
|
-
type="text"
|
|
19
|
+
id="frequency-end-date"
|
|
20
|
+
v-model.lazy="modelFrequencyLocal.frg_end_time"
|
|
21
|
+
data-id="frequency-end-date-input"
|
|
22
|
+
type="datetime-local"
|
|
22
23
|
/>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</div>
|
|
24
|
+
|
|
25
|
+
<span class="tooltip-content">
|
|
26
|
+
{{ schedulerEndDateErrorText }}
|
|
27
|
+
</span>
|
|
28
|
+
</label>
|
|
29
29
|
</template>
|
|
30
30
|
</common-select-input>
|
|
31
31
|
</div>
|
|
@@ -34,12 +34,15 @@
|
|
|
34
34
|
<script lang="ts" setup>
|
|
35
35
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
36
36
|
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
37
|
+
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
37
38
|
import { frequencyEndTimeFunc } from '~/components/common/pages/scheduledTasks/modals/common/frequency/end/lib/config/endOptions'
|
|
38
39
|
|
|
39
|
-
const
|
|
40
|
+
const modelFrequencyLocal = defineModel<UI_I_ScheduleNewTasksForm>({
|
|
41
|
+
required: true,
|
|
42
|
+
})
|
|
40
43
|
|
|
41
44
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
42
|
-
const { $store, $formattedDate, $isDate, $getUnixByDate }: any = useNuxtApp()
|
|
45
|
+
// const { $store, $formattedDate, $isDate, $getUnixByDate }: any = useNuxtApp()
|
|
43
46
|
|
|
44
47
|
const frequencyEndTimeOptions = computed<UI_I_SelectInputItem[]>(() =>
|
|
45
48
|
frequencyEndTimeFunc(localization.value)
|
|
@@ -47,26 +50,18 @@ const frequencyEndTimeOptions = computed<UI_I_SelectInputItem[]>(() =>
|
|
|
47
50
|
|
|
48
51
|
const selectedFrequencyEndMode = ref<'never' | 'on'>('never')
|
|
49
52
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const onUpdateDateTo = (milliseconds: number): void => {
|
|
55
|
-
if (!milliseconds) return
|
|
56
|
-
|
|
57
|
-
modelTimeLocal.value = milliseconds
|
|
58
|
-
|
|
59
|
-
currentDateLocal.value = $formattedDate(
|
|
60
|
-
new Date(milliseconds),
|
|
61
|
-
'MM.dd.yyyy, hh:mm'
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
watch(currentDateLocal, (newValue) => {
|
|
66
|
-
$isDate(newValue) &&
|
|
67
|
-
(calendarDefaultDate.value = modelTimeLocal.value =
|
|
68
|
-
$getUnixByDate(newValue))
|
|
53
|
+
const schedulerEndDateErrorText = computed<string>(() => {
|
|
54
|
+
return !modelFrequencyLocal.value.frg_end_time
|
|
55
|
+
? localization.value.common.fieldRequired
|
|
56
|
+
: ''
|
|
69
57
|
})
|
|
58
|
+
watch(
|
|
59
|
+
schedulerEndDateErrorText,
|
|
60
|
+
(newValue: string) => {
|
|
61
|
+
modelFrequencyLocal.value.isValid = !!newValue
|
|
62
|
+
},
|
|
63
|
+
{ immediate: true }
|
|
64
|
+
)
|
|
70
65
|
</script>
|
|
71
66
|
|
|
72
67
|
<style lang="scss" scoped>
|
|
@@ -92,11 +87,13 @@ watch(currentDateLocal, (newValue) => {
|
|
|
92
87
|
max-width: 80px !important;
|
|
93
88
|
}
|
|
94
89
|
}
|
|
95
|
-
|
|
96
|
-
.datepicker {
|
|
97
|
-
&__input-inner {
|
|
98
|
-
@include flex($align: center);
|
|
90
|
+
.frequency-end-date {
|
|
99
91
|
margin-left: 15px;
|
|
100
92
|
}
|
|
101
93
|
}
|
|
94
|
+
.tooltip {
|
|
95
|
+
& > .tooltip-content {
|
|
96
|
+
width: 200px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
102
99
|
</style>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<label
|
|
28
28
|
for="monthly-by-day-field"
|
|
29
29
|
class="tooltip tooltip-validation tooltip-xs tooltip-top-left"
|
|
30
|
-
:class="
|
|
30
|
+
:class="schedulerOnDayErrorText && 'invalid'"
|
|
31
31
|
>
|
|
32
32
|
<input
|
|
33
33
|
id="monthly-by-day-field"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
/>
|
|
42
42
|
|
|
43
43
|
<span class="tooltip-content">
|
|
44
|
-
{{
|
|
44
|
+
{{ schedulerOnDayErrorText }}
|
|
45
45
|
</span>
|
|
46
46
|
</label>
|
|
47
47
|
</div>
|
|
@@ -129,12 +129,19 @@ const isInitTimeIntervalValidation = ref<boolean>(false)
|
|
|
129
129
|
const onInitTimeIntervalValidation = (): void => {
|
|
130
130
|
isInitTimeIntervalValidation.value = true
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const schedulerOnDayErrorText = computed<string>(() => {
|
|
133
133
|
if (!isInitTimeIntervalValidation.value || isDisabledMonthlyDayField.value)
|
|
134
134
|
return ''
|
|
135
135
|
|
|
136
|
-
return validateField(localization.value, model.value.frg_monthly_day)
|
|
136
|
+
return validateField(localization.value, model.value.frg_monthly_day, true)
|
|
137
137
|
})
|
|
138
|
+
watch(
|
|
139
|
+
schedulerOnDayErrorText,
|
|
140
|
+
(newValue: string) => {
|
|
141
|
+
model.value.isValid = !!newValue
|
|
142
|
+
},
|
|
143
|
+
{ immediate: true }
|
|
144
|
+
)
|
|
138
145
|
|
|
139
146
|
const schedulerAtOnceErrorText = computed<string>(() => {
|
|
140
147
|
return !model.value.frg_on_time ? localization.value.common.fieldRequired : ''
|