bfg-common 1.5.921 → 1.5.923
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/assets/localization/local_be.json +4 -16
- package/assets/localization/local_en.json +4 -16
- package/assets/localization/local_hy.json +4 -16
- package/assets/localization/local_kk.json +4 -16
- package/assets/localization/local_ru.json +4 -16
- package/assets/localization/local_zh.json +4 -16
- package/components/common/pages/scheduledTasks/lib/models/interfaces.ts +0 -6
- package/components/common/pages/scheduledTasks/modals/common/frequency/Frequency.vue +42 -46
- package/components/common/pages/scheduledTasks/modals/common/frequency/afterStartup/AfterStartup.vue +48 -15
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/End.vue +69 -15
- package/components/common/pages/scheduledTasks/modals/common/frequency/interval/Interval.vue +53 -19
- package/components/common/pages/scheduledTasks/modals/common/frequency/lib/utils.ts +1 -1
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/On.vue +168 -28
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/lib/config/options.ts +0 -17
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/SelectWeek.vue +28 -17
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/lib/config/weekOptions.ts +50 -20
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/StartOn.vue +51 -15
- package/components/common/pages/scheduledTasks/modals/common/{taskForm/Old.vue → newTaskForm/NewTaskForm.vue} +69 -12
- package/components/common/pages/scheduledTasks/table/Table.vue +81 -27
- package/components/common/pages/scheduledTasks/table/expandDetails/ExpandDetails.vue +2 -2
- package/components/common/pages/scheduledTasks/table/expandDetails/New.vue +17 -48
- package/components/common/pages/scheduledTasks/table/expandDetails/Old.vue +3 -1
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/HistoryRun.vue +54 -16
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{old/lib → lib}/config/historyRunsTable.ts +4 -4
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{old/lib → lib}/config/tableKeys.ts +1 -1
- package/components/common/pages/scheduledTasks/table/expandDetails/lib/config/expandDetails.ts +5 -7
- package/components/common/pages/scheduledTasks/table/{old/lib → lib}/config/scheduledTasksTable.ts +9 -13
- package/components/common/pages/scheduledTasks/table/lib/config/schedulerStatus.ts +4 -0
- package/components/common/pages/scheduledTasks/table/{old/lib → lib}/config/tableKeys.ts +1 -1
- package/components/common/pages/scheduledTasks/table/lib/models/interfaces.ts +11 -0
- package/package.json +1 -1
- package/components/common/pages/scheduledTasks/modals/common/frequency/afterStartup/New.vue +0 -43
- package/components/common/pages/scheduledTasks/modals/common/frequency/afterStartup/Old.vue +0 -65
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/New.vue +0 -73
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/Old.vue +0 -112
- package/components/common/pages/scheduledTasks/modals/common/frequency/interval/New.vue +0 -49
- package/components/common/pages/scheduledTasks/modals/common/frequency/interval/Old.vue +0 -68
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/New.vue +0 -137
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/Old.vue +0 -234
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/New.vue +0 -66
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/Old.vue +0 -44
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/New.vue +0 -46
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/Old.vue +0 -77
- package/components/common/pages/scheduledTasks/modals/common/taskForm/New.vue +0 -194
- package/components/common/pages/scheduledTasks/modals/common/taskForm/TaskForm.vue +0 -129
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/New.vue +0 -147
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/lib/config/historyRunsTable.ts +0 -161
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/old/Old.vue +0 -68
- package/components/common/pages/scheduledTasks/table/expandDetails/lib/models/interfaces.ts +0 -8
- package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +0 -4
- package/components/common/pages/scheduledTasks/table/new/New.vue +0 -320
- package/components/common/pages/scheduledTasks/table/new/lib/config/scheduledTasksTable.ts +0 -218
- package/components/common/pages/scheduledTasks/table/new/lib/models/enums.ts +0 -14
- package/components/common/pages/scheduledTasks/table/old/Old.vue +0 -93
- /package/components/common/pages/scheduledTasks/modals/common/{taskForm → newTaskForm}/lib/models/interfaces.ts +0 -0
- /package/components/common/pages/scheduledTasks/modals/common/{taskForm → newTaskForm}/lib/utils.ts +0 -0
- /package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{old/lib → lib}/models/types.ts +0 -0
- /package/components/common/pages/scheduledTasks/table/{old/lib → lib}/models/types.ts +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="after-startup clr-col-6 pl-0">
|
|
3
|
-
<span class="after-startup__prefix">
|
|
4
|
-
{{ localization.scheduledTasks.with }}
|
|
5
|
-
</span>
|
|
6
|
-
|
|
7
|
-
<label
|
|
8
|
-
:class="props.timeIntervalErrorText && 'invalid'"
|
|
9
|
-
for="minute-delay-field"
|
|
10
|
-
class="tooltip tooltip-validation tooltip-xs tooltip-top-left"
|
|
11
|
-
>
|
|
12
|
-
<input
|
|
13
|
-
id="minute-delay-field"
|
|
14
|
-
v-model="afterStartupModel"
|
|
15
|
-
data-id="edit-lockout-policy-time-interval-input"
|
|
16
|
-
type="text"
|
|
17
|
-
@input="onInitValidation"
|
|
18
|
-
@blur="onInitValidation"
|
|
19
|
-
/>
|
|
20
|
-
|
|
21
|
-
<span class="tooltip-content">
|
|
22
|
-
{{ props.timeIntervalErrorText }}
|
|
23
|
-
</span>
|
|
24
|
-
</label>
|
|
25
|
-
|
|
26
|
-
<span class="after-startup__suffix">
|
|
27
|
-
{{ localization.scheduledTasks.minuteDelay }}
|
|
28
|
-
</span>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script lang="ts" setup>
|
|
33
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
34
|
-
|
|
35
|
-
const afterStartupModel = defineModel<number>({ required: true })
|
|
36
|
-
const props = defineProps<{
|
|
37
|
-
timeIntervalErrorText: string
|
|
38
|
-
}>()
|
|
39
|
-
const emits = defineEmits<{
|
|
40
|
-
(event: 'init-validation'): void
|
|
41
|
-
}>()
|
|
42
|
-
|
|
43
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
44
|
-
|
|
45
|
-
const onInitValidation = (): void => emits('init-validation')
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style lang="scss" scoped>
|
|
49
|
-
@import 'bfg-common/assets/scss/common/mixins.scss';
|
|
50
|
-
.after-startup {
|
|
51
|
-
@include flex($align: center);
|
|
52
|
-
margin-top: 10px;
|
|
53
|
-
&__suffix {
|
|
54
|
-
white-space: nowrap;
|
|
55
|
-
}
|
|
56
|
-
.tooltip {
|
|
57
|
-
& > .tooltip-content {
|
|
58
|
-
width: 200px;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
input {
|
|
62
|
-
width: 70px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
</style>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="frequency-end-time">
|
|
3
|
-
<h2>{{ localization.scheduledTasks.end }}</h2>
|
|
4
|
-
<div class="frequency-end-time__radios">
|
|
5
|
-
<ui-radio
|
|
6
|
-
v-for="(option, key) in props.endOptions"
|
|
7
|
-
:key="key"
|
|
8
|
-
v-model="endTimeModeLocal"
|
|
9
|
-
:label="option.label"
|
|
10
|
-
:test-id="option.testId"
|
|
11
|
-
:value="option.value"
|
|
12
|
-
size="md"
|
|
13
|
-
>
|
|
14
|
-
</ui-radio>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<ui-input-with-datepicker
|
|
18
|
-
v-if="endTimeModeLocal === 'on'"
|
|
19
|
-
id="frequency-end-date"
|
|
20
|
-
v-model="modelFrequencyLocal.frg_end_time"
|
|
21
|
-
:format="datepickerFormat"
|
|
22
|
-
test-id="frequency-end-date-input"
|
|
23
|
-
time-format="12"
|
|
24
|
-
:error="''"
|
|
25
|
-
:error-timepicker="''"
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script lang="ts" setup>
|
|
31
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
32
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
33
|
-
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
34
|
-
import { getUiDatepickerFormatByLanguage } from '~/lib/utils/date'
|
|
35
|
-
|
|
36
|
-
const modelFrequencyLocal = defineModel<UI_I_ScheduleNewTasksForm>({
|
|
37
|
-
required: true,
|
|
38
|
-
})
|
|
39
|
-
const endTimeModeLocal = defineModel<'never' | 'on'>('selectedEndMode', {
|
|
40
|
-
required: true,
|
|
41
|
-
})
|
|
42
|
-
const props = defineProps<{
|
|
43
|
-
endOptions: UI_I_SelectInputItem[]
|
|
44
|
-
type: string
|
|
45
|
-
}>()
|
|
46
|
-
|
|
47
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
48
|
-
|
|
49
|
-
const datepickerFormat = computed<string>(
|
|
50
|
-
() => getUiDatepickerFormatByLanguage('en_US') // TODO из пропс должен приходить язык
|
|
51
|
-
)
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<style lang="scss" scoped>
|
|
55
|
-
.frequency-end-time {
|
|
56
|
-
grid-column: span 2;
|
|
57
|
-
&__radios {
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
column-gap: 32px;
|
|
61
|
-
margin-bottom: 12px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
h2 {
|
|
65
|
-
font-family: 'Inter', sans-serif;
|
|
66
|
-
color: var(--title-form-first-color);
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
line-height: 18px;
|
|
70
|
-
margin-bottom: 12px;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</style>
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="end-time">
|
|
3
|
-
<common-select-input
|
|
4
|
-
v-model="endTimeModeLocal"
|
|
5
|
-
:label="localization.scheduledTasks.end"
|
|
6
|
-
:data="props.endOptions"
|
|
7
|
-
:class="[
|
|
8
|
-
'end-time__select-input',
|
|
9
|
-
endTimeModeLocal === 'on' && 'enabled',
|
|
10
|
-
]"
|
|
11
|
-
test-id="frequency-ent-time"
|
|
12
|
-
>
|
|
13
|
-
<template #options>
|
|
14
|
-
<label
|
|
15
|
-
v-if="endTimeModeLocal === 'on'"
|
|
16
|
-
:class="[
|
|
17
|
-
'tooltip tooltip-validation tooltip-xs tooltip-top-left frequency-end-date',
|
|
18
|
-
schedulerEndDateErrorText && 'invalid',
|
|
19
|
-
]"
|
|
20
|
-
for="frequency-end-date"
|
|
21
|
-
>
|
|
22
|
-
<input
|
|
23
|
-
id="frequency-end-date"
|
|
24
|
-
v-model.lazy="modelFrequencyLocal.frg_end_time"
|
|
25
|
-
data-id="frequency-end-date-input"
|
|
26
|
-
type="datetime-local"
|
|
27
|
-
/>
|
|
28
|
-
|
|
29
|
-
<span class="tooltip-content">
|
|
30
|
-
{{ schedulerEndDateErrorText }}
|
|
31
|
-
</span>
|
|
32
|
-
</label>
|
|
33
|
-
</template>
|
|
34
|
-
</common-select-input>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script lang="ts" setup>
|
|
39
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
40
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
41
|
-
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
42
|
-
import { validateDate } from '~/components/common/pages/scheduledTasks/modals/common/frequency/lib/utils'
|
|
43
|
-
|
|
44
|
-
const modelFrequencyLocal = defineModel<UI_I_ScheduleNewTasksForm>({
|
|
45
|
-
required: true,
|
|
46
|
-
})
|
|
47
|
-
const endTimeModeLocal = defineModel<'never' | 'on'>('selectedEndMode', {
|
|
48
|
-
required: true,
|
|
49
|
-
})
|
|
50
|
-
const props = defineProps<{
|
|
51
|
-
endOptions: UI_I_SelectInputItem[]
|
|
52
|
-
type: string
|
|
53
|
-
}>()
|
|
54
|
-
|
|
55
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
56
|
-
// const { $store, $formattedDate, $isDate, $getUnixByDate }: any = useNuxtApp()
|
|
57
|
-
|
|
58
|
-
const schedulerEndDateErrorText = computed<string>(() => {
|
|
59
|
-
const { frg_end_time, frg_start_on_time } = modelFrequencyLocal.value
|
|
60
|
-
return !frg_end_time
|
|
61
|
-
? localization.value.common.fieldRequired
|
|
62
|
-
: validateDate(
|
|
63
|
-
localization.value,
|
|
64
|
-
frg_end_time,
|
|
65
|
-
frg_start_on_time,
|
|
66
|
-
props.type
|
|
67
|
-
)
|
|
68
|
-
})
|
|
69
|
-
watch(
|
|
70
|
-
[schedulerEndDateErrorText, endTimeModeLocal],
|
|
71
|
-
([newValue1, newValue2]: [string, 'never' | 'on']) => {
|
|
72
|
-
modelFrequencyLocal.value.isValid =
|
|
73
|
-
newValue2 === 'never' ? false : !!newValue1
|
|
74
|
-
|
|
75
|
-
newValue2 === 'never' && (modelFrequencyLocal.value.frg_end_time = '')
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
</script>
|
|
79
|
-
|
|
80
|
-
<style lang="scss" scoped>
|
|
81
|
-
@import 'bfg-common/assets/scss/common/mixins.scss';
|
|
82
|
-
.end-time {
|
|
83
|
-
margin-top: 10px;
|
|
84
|
-
&__select-input {
|
|
85
|
-
&.enabled {
|
|
86
|
-
row-gap: 15px;
|
|
87
|
-
&.clr-flex-row {
|
|
88
|
-
flex-direction: column !important;
|
|
89
|
-
align-items: flex-start;
|
|
90
|
-
}
|
|
91
|
-
:deep(.select-input__inner) {
|
|
92
|
-
flex-direction: row;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:deep(.select-input__label) {
|
|
97
|
-
font-weight: 400;
|
|
98
|
-
}
|
|
99
|
-
:deep(.select) {
|
|
100
|
-
max-width: max-content !important;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
.frequency-end-date {
|
|
104
|
-
margin-left: 15px;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
.tooltip {
|
|
108
|
-
& > .tooltip-content {
|
|
109
|
-
width: 200px;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
</style>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="frequency-interval">
|
|
3
|
-
<h2>{{ localization.scheduledTasks.repeatEvery }}</h2>
|
|
4
|
-
<ui-input
|
|
5
|
-
id="frequency-time-interval"
|
|
6
|
-
v-model="intervalModel"
|
|
7
|
-
:error="props.timeIntervalErrorText"
|
|
8
|
-
:placeholder="localization.common.value"
|
|
9
|
-
test-id="frequency-time-interval-input"
|
|
10
|
-
autocomplete="off"
|
|
11
|
-
@input="onInitValidation"
|
|
12
|
-
>
|
|
13
|
-
<template #icon>
|
|
14
|
-
<span>
|
|
15
|
-
{{ props.intervalSuffixLabel }}
|
|
16
|
-
</span>
|
|
17
|
-
</template>
|
|
18
|
-
</ui-input>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script lang="ts" setup>
|
|
23
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
24
|
-
|
|
25
|
-
const intervalModel = defineModel<number>({ required: true })
|
|
26
|
-
const props = defineProps<{
|
|
27
|
-
timeIntervalErrorText: string
|
|
28
|
-
intervalSuffixLabel: string
|
|
29
|
-
}>()
|
|
30
|
-
const emits = defineEmits<{
|
|
31
|
-
(event: 'init-validation'): void
|
|
32
|
-
}>()
|
|
33
|
-
|
|
34
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
35
|
-
|
|
36
|
-
const onInitValidation = (): void => emits('init-validation')
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<style lang="scss" scoped>
|
|
40
|
-
.frequency-interval {
|
|
41
|
-
h2 {
|
|
42
|
-
font-family: 'Inter', sans-serif;
|
|
43
|
-
color: var(--title-form-first-color);
|
|
44
|
-
font-size: 14px;
|
|
45
|
-
font-weight: 500;
|
|
46
|
-
margin-bottom: 12px;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="interval clr-col-6 pl-0">
|
|
3
|
-
<span class="interval__prefix">
|
|
4
|
-
{{ localization.scheduledTasks.repeatEvery }}
|
|
5
|
-
</span>
|
|
6
|
-
|
|
7
|
-
<label
|
|
8
|
-
:class="[
|
|
9
|
-
'tooltip tooltip-validation tooltip-xs tooltip-top-left',
|
|
10
|
-
props.timeIntervalErrorText && 'invalid',
|
|
11
|
-
]"
|
|
12
|
-
for="frequency-time-interval"
|
|
13
|
-
>
|
|
14
|
-
<input
|
|
15
|
-
id="frequency-time-interval"
|
|
16
|
-
v-model="intervalModel"
|
|
17
|
-
data-id="frequency-time-interval-input"
|
|
18
|
-
type="text"
|
|
19
|
-
@input="onInitValidation"
|
|
20
|
-
@blur="onInitValidation"
|
|
21
|
-
/>
|
|
22
|
-
|
|
23
|
-
<span class="tooltip-content">
|
|
24
|
-
{{ props.timeIntervalErrorText }}
|
|
25
|
-
</span>
|
|
26
|
-
</label>
|
|
27
|
-
|
|
28
|
-
<span class="interval__suffix">
|
|
29
|
-
{{ props.intervalSuffixLabel }}
|
|
30
|
-
</span>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script lang="ts" setup>
|
|
35
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
36
|
-
|
|
37
|
-
const intervalModel = defineModel<number>({ required: true })
|
|
38
|
-
const props = defineProps<{
|
|
39
|
-
timeIntervalErrorText: string
|
|
40
|
-
intervalSuffixLabel: string
|
|
41
|
-
}>()
|
|
42
|
-
const emits = defineEmits<{
|
|
43
|
-
(event: 'init-validation'): void
|
|
44
|
-
}>()
|
|
45
|
-
|
|
46
|
-
const onInitValidation = (): void => emits('init-validation')
|
|
47
|
-
|
|
48
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<style lang="scss" scoped>
|
|
52
|
-
@import 'bfg-common/assets/scss/common/mixins.scss';
|
|
53
|
-
.interval {
|
|
54
|
-
@include flex($align: center);
|
|
55
|
-
margin-top: 10px;
|
|
56
|
-
&__prefix {
|
|
57
|
-
white-space: nowrap;
|
|
58
|
-
}
|
|
59
|
-
.tooltip {
|
|
60
|
-
& > .tooltip-content {
|
|
61
|
-
width: 10rem;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
input {
|
|
65
|
-
width: 70px;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="frequency-on-date">
|
|
3
|
-
<h2>{{ localization.common.on }}</h2>
|
|
4
|
-
|
|
5
|
-
<common-pages-scheduled-tasks-modals-common-frequency-on-select-week
|
|
6
|
-
v-if="props.type === 'week'"
|
|
7
|
-
v-model="scheduledTaskFormLocal"
|
|
8
|
-
/>
|
|
9
|
-
|
|
10
|
-
<div v-if="props.type === 'month'" class="frequency-monthly-days">
|
|
11
|
-
<div class="frequency-on-date__radios">
|
|
12
|
-
<ui-radio
|
|
13
|
-
v-for="(option, key) in props.frequencyMonthlyMode"
|
|
14
|
-
:key="key"
|
|
15
|
-
v-model="scheduledTaskFormLocal.frg_monthly_mode"
|
|
16
|
-
:label="option.label"
|
|
17
|
-
:test-id="option.testId"
|
|
18
|
-
:value="option.value"
|
|
19
|
-
size="md"
|
|
20
|
-
>
|
|
21
|
-
</ui-radio>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<ui-input
|
|
25
|
-
v-if="scheduledTaskFormLocal.frg_monthly_mode === 'day'"
|
|
26
|
-
id="frequency-monthly-by-day"
|
|
27
|
-
v-model="scheduledTaskFormLocal.frg_monthly_day"
|
|
28
|
-
:error="props.timeIntervalErrorText"
|
|
29
|
-
:placeholder="localization.scheduledTasks.day"
|
|
30
|
-
test-id="frequency-monthly-by-day-field"
|
|
31
|
-
autocomplete="off"
|
|
32
|
-
type="number"
|
|
33
|
-
@input="onInitValidation"
|
|
34
|
-
></ui-input>
|
|
35
|
-
|
|
36
|
-
<div
|
|
37
|
-
v-if="scheduledTaskFormLocal.frg_monthly_mode === 'week'"
|
|
38
|
-
class="frequency-monthly-days__week"
|
|
39
|
-
>
|
|
40
|
-
<ui-select
|
|
41
|
-
v-model="scheduledTaskFormLocal.frq_ordinal_number"
|
|
42
|
-
:items="frequencyOrdinalNumberLocal"
|
|
43
|
-
test-id="frequency-monthly-ordinary-day"
|
|
44
|
-
:placeholder="localization.scheduledTasks.selectPosition"
|
|
45
|
-
size="md"
|
|
46
|
-
select-width="100%"
|
|
47
|
-
/>
|
|
48
|
-
<ui-select
|
|
49
|
-
v-model="scheduledTaskFormLocal.frq_week_day"
|
|
50
|
-
:items="frequencyWeeksDaysLocal"
|
|
51
|
-
test-id="frequency-monthly-week-day"
|
|
52
|
-
:placeholder="localization.scheduledTasks.selectDay"
|
|
53
|
-
size="md"
|
|
54
|
-
select-width="100%"
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<ui-input-with-datepicker
|
|
60
|
-
v-if="props.type === 'once'"
|
|
61
|
-
id="frequency-on-date"
|
|
62
|
-
v-model="scheduledTaskFormLocal.frg_on_time"
|
|
63
|
-
:format="datepickerFormat"
|
|
64
|
-
test-id="frequency-on-date-input"
|
|
65
|
-
time-format="12"
|
|
66
|
-
:error="''"
|
|
67
|
-
:error-timepicker="''"
|
|
68
|
-
/>
|
|
69
|
-
</div>
|
|
70
|
-
</template>
|
|
71
|
-
|
|
72
|
-
<script lang="ts" setup>
|
|
73
|
-
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
74
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
75
|
-
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
76
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
77
|
-
import { getUiDatepickerFormatByLanguage } from '~/lib/utils/date'
|
|
78
|
-
|
|
79
|
-
const scheduledTaskFormLocal = defineModel<UI_I_ScheduleNewTasksForm>({
|
|
80
|
-
required: true,
|
|
81
|
-
})
|
|
82
|
-
const props = defineProps<{
|
|
83
|
-
type: string
|
|
84
|
-
frequencyMonthlyMode: UI_I_SelectInputItem[]
|
|
85
|
-
frequencyOnOrdinalNumber: UI_I_SelectInputItem[]
|
|
86
|
-
frequencyOnWeeksDays: UI_I_SelectInputItem[]
|
|
87
|
-
}>()
|
|
88
|
-
|
|
89
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
90
|
-
|
|
91
|
-
const datepickerFormat = computed<string>(
|
|
92
|
-
() => getUiDatepickerFormatByLanguage('en_US') // TODO из пропс должен приходить язык
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
const frequencyOrdinalNumberLocal = computed<UI_I_Dropdown[]>(() =>
|
|
96
|
-
props.frequencyOnOrdinalNumber.map((item: UI_I_SelectInputItem) => ({
|
|
97
|
-
...item,
|
|
98
|
-
text: item.label,
|
|
99
|
-
}))
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
const frequencyWeeksDaysLocal = computed<UI_I_Dropdown[]>(() =>
|
|
103
|
-
props.frequencyOnWeeksDays.map((item: UI_I_SelectInputItem) => ({
|
|
104
|
-
...item,
|
|
105
|
-
text: item.label,
|
|
106
|
-
}))
|
|
107
|
-
)
|
|
108
|
-
</script>
|
|
109
|
-
|
|
110
|
-
<style lang="scss" scoped>
|
|
111
|
-
.frequency-on-date {
|
|
112
|
-
grid-column: span 2;
|
|
113
|
-
|
|
114
|
-
&__radios {
|
|
115
|
-
display: flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
column-gap: 32px;
|
|
118
|
-
margin-bottom: 12px;
|
|
119
|
-
}
|
|
120
|
-
h2 {
|
|
121
|
-
font-family: 'Inter', sans-serif;
|
|
122
|
-
color: var(--title-form-first-color);
|
|
123
|
-
font-size: 14px;
|
|
124
|
-
font-weight: 500;
|
|
125
|
-
line-height: 18px;
|
|
126
|
-
margin-bottom: 12px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.frequency-monthly-days {
|
|
130
|
-
&__week {
|
|
131
|
-
display: grid;
|
|
132
|
-
grid-template-columns: repeat(2, 1fr);
|
|
133
|
-
column-gap: 16px;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
</style>
|