bfg-common 1.4.255 → 1.4.257
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 +2 -2
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/End.vue +32 -38
- package/components/common/pages/scheduledTasks/modals/common/frequency/interval/Interval.vue +2 -1
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/StartOn.vue +45 -32
- package/package.json +1 -1
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
|
|
20
20
|
<common-pages-scheduled-tasks-modals-common-frequency-start-on
|
|
21
21
|
v-if="showTimeInterval"
|
|
22
|
-
v-model="model
|
|
22
|
+
v-model="model"
|
|
23
23
|
/>
|
|
24
24
|
|
|
25
25
|
<common-pages-scheduled-tasks-modals-common-frequency-end
|
|
26
26
|
v-if="showTimeInterval"
|
|
27
|
-
v-model="model
|
|
27
|
+
v-model="model"
|
|
28
28
|
/>
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
@@ -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"
|
|
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>
|
|
@@ -93,10 +88,9 @@ watch(currentDateLocal, (newValue) => {
|
|
|
93
88
|
}
|
|
94
89
|
}
|
|
95
90
|
}
|
|
96
|
-
.
|
|
97
|
-
&
|
|
98
|
-
|
|
99
|
-
margin-left: 15px;
|
|
91
|
+
.tooltip {
|
|
92
|
+
& > .tooltip-content {
|
|
93
|
+
width: 200px;
|
|
100
94
|
}
|
|
101
95
|
}
|
|
102
96
|
</style>
|
|
@@ -4,48 +4,62 @@
|
|
|
4
4
|
{{ localization.scheduledTasks.startOn }}
|
|
5
5
|
</label>
|
|
6
6
|
|
|
7
|
-
<
|
|
7
|
+
<label
|
|
8
|
+
for="frequency-start-on-date"
|
|
9
|
+
class="tooltip tooltip-validation tooltip-xs tooltip-top-left"
|
|
10
|
+
:class="schedulerStartOnErrorText && 'invalid'"
|
|
11
|
+
>
|
|
8
12
|
<input
|
|
9
13
|
id="frequency-start-on-date"
|
|
10
|
-
v-model.lazy="
|
|
14
|
+
v-model.lazy="modelFrequencyLocal.frg_start_on_time"
|
|
11
15
|
data-id="frequency-start-on-date-input"
|
|
12
|
-
|
|
13
|
-
type="text"
|
|
16
|
+
type="datetime-local"
|
|
14
17
|
/>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</div>
|
|
18
|
+
|
|
19
|
+
<span class="tooltip-content">
|
|
20
|
+
{{ schedulerStartOnErrorText }}
|
|
21
|
+
</span>
|
|
22
|
+
</label>
|
|
21
23
|
</div>
|
|
22
24
|
</template>
|
|
23
25
|
|
|
24
26
|
<script lang="ts" setup>
|
|
25
27
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
28
|
+
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
26
29
|
|
|
27
|
-
const
|
|
30
|
+
const modelFrequencyLocal = defineModel<UI_I_ScheduleNewTasksForm>({
|
|
31
|
+
required: true,
|
|
32
|
+
})
|
|
28
33
|
|
|
29
34
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
30
|
-
const { $
|
|
31
|
-
|
|
32
|
-
const calendarDefaultDate = ref<number>(new Date().getTime())
|
|
33
|
-
const currentDateLocal = ref<string>('')
|
|
35
|
+
// const { $formattedDate, $isDate, $getUnixByDate }: any = useNuxtApp()
|
|
34
36
|
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
modelTimeLocal.value = val // milliseconds
|
|
40
|
-
|
|
41
|
-
currentDateLocal.value = $formattedDate(new Date(val), 'MM.dd.yyyy, hh:mm')
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
watch(currentDateLocal, (newValue) => {
|
|
45
|
-
$isDate(newValue) &&
|
|
46
|
-
(calendarDefaultDate.value = modelTimeLocal.value =
|
|
47
|
-
$getUnixByDate(newValue))
|
|
37
|
+
const schedulerStartOnErrorText = computed<string>(() => {
|
|
38
|
+
return !modelFrequencyLocal.value.frg_start_on_time
|
|
39
|
+
? localization.value.common.fieldRequired
|
|
40
|
+
: ''
|
|
48
41
|
})
|
|
42
|
+
watch(
|
|
43
|
+
schedulerStartOnErrorText,
|
|
44
|
+
(newValue: string) => {
|
|
45
|
+
modelFrequencyLocal.value.isValid = !!newValue
|
|
46
|
+
},
|
|
47
|
+
{ immediate: true }
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
// const onUpdateDateTo = (val: number): void => {
|
|
51
|
+
// if (!val) return
|
|
52
|
+
//
|
|
53
|
+
// modelTimeLocal.value = val // milliseconds
|
|
54
|
+
//
|
|
55
|
+
// currentDateLocal.value = $formattedDate(new Date(val), 'MM.dd.yyyy, hh:mm')
|
|
56
|
+
// }
|
|
57
|
+
//
|
|
58
|
+
// watch(currentDateLocal, (newValue) => {
|
|
59
|
+
// $isDate(newValue) &&
|
|
60
|
+
// (calendarDefaultDate.value = modelTimeLocal.value =
|
|
61
|
+
// $getUnixByDate(newValue))
|
|
62
|
+
// })
|
|
49
63
|
</script>
|
|
50
64
|
|
|
51
65
|
<style lang="scss" scoped>
|
|
@@ -62,10 +76,9 @@ watch(currentDateLocal, (newValue) => {
|
|
|
62
76
|
}
|
|
63
77
|
}
|
|
64
78
|
}
|
|
65
|
-
.
|
|
66
|
-
&
|
|
67
|
-
|
|
68
|
-
margin-left: 15px;
|
|
79
|
+
.tooltip {
|
|
80
|
+
& > .tooltip-content {
|
|
81
|
+
width: 200px;
|
|
69
82
|
}
|
|
70
83
|
}
|
|
71
84
|
</style>
|