bfg-common 1.4.239 → 1.4.241
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/newTaskForm/NewTaskForm.vue +6 -37
- package/components/common/pages/scheduledTasks/modals/common/newTaskForm/lib/models/interfaces.ts +0 -6
- package/package.json +1 -1
- package/public/spice-console/application/agent.js +4 -1
- package/public/spice-console-minify/run.min.js +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
<input
|
|
14
14
|
id="schedule-task-name-field"
|
|
15
|
-
v-model="
|
|
15
|
+
v-model="model.task_name"
|
|
16
16
|
data-id="schedule-task-name-field"
|
|
17
17
|
type="text"
|
|
18
18
|
class="clr-input"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
<textarea
|
|
34
34
|
id="description"
|
|
35
|
-
v-model="
|
|
35
|
+
v-model="model.description"
|
|
36
36
|
data-id="admin-create-user-description-field"
|
|
37
37
|
rows="3"
|
|
38
38
|
class="clr-col-md-8"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</label>
|
|
71
71
|
|
|
72
72
|
<textarea
|
|
73
|
-
v-model="
|
|
73
|
+
v-model="model.ntfn_target"
|
|
74
74
|
data-id="schedule-task-email-completion-field"
|
|
75
75
|
placeholder="example1@email.com,example2@email.com"
|
|
76
76
|
rows="3"
|
|
@@ -84,12 +84,8 @@
|
|
|
84
84
|
<script lang="ts" setup>
|
|
85
85
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
86
86
|
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
87
|
-
import type { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
|
|
88
87
|
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
89
|
-
import type {
|
|
90
|
-
UI_I_ScheduledTasksForm,
|
|
91
|
-
UI_I_InitialValidationFields,
|
|
92
|
-
} from '~/components/common/pages/scheduledTasks/modals/common/newTaskForm/lib/models/interfaces'
|
|
88
|
+
import type { UI_I_InitialValidationFields } from '~/components/common/pages/scheduledTasks/modals/common/newTaskForm/lib/models/interfaces'
|
|
93
89
|
import { frequencyMethodFunc } from '~/components/common/pages/scheduledTasks/modals/common/frequency/lib/config/frequencyOptions'
|
|
94
90
|
|
|
95
91
|
const props = defineProps<{
|
|
@@ -99,43 +95,16 @@ const model = defineModel<UI_I_ScheduleNewTasksForm>({ required: true })
|
|
|
99
95
|
|
|
100
96
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
101
97
|
|
|
102
|
-
const { $validation }: any = useNuxtApp()
|
|
103
|
-
const validation = $validation.call({})
|
|
104
|
-
|
|
105
|
-
const defaultForm: UI_I_ScheduledTasksForm = {
|
|
106
|
-
taskName: {
|
|
107
|
-
value: model.value.task_name,
|
|
108
|
-
validations: [
|
|
109
|
-
{ value: 'required', errorText: localization.value.common.fieldRequired },
|
|
110
|
-
],
|
|
111
|
-
},
|
|
112
|
-
description: {
|
|
113
|
-
value: model.value.description,
|
|
114
|
-
validations: [],
|
|
115
|
-
},
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const form = ref<UI_I_ScheduledTasksForm>(useDeepCopy(defaultForm))
|
|
119
|
-
const validForm = ref<UI_I_ValidationTouchResult | null>(null)
|
|
120
|
-
|
|
121
|
-
const setForm = (): void => {
|
|
122
|
-
form.value = useDeepCopy(defaultForm)
|
|
123
|
-
validation.setForm(form)
|
|
124
|
-
}
|
|
125
|
-
setForm()
|
|
126
|
-
|
|
127
98
|
const initValidationFields = ref<UI_I_InitialValidationFields>({
|
|
128
99
|
taskName: false,
|
|
129
100
|
})
|
|
130
101
|
const onInitValidation = (types: string[]): void => {
|
|
131
102
|
types.forEach((type) => (initValidationFields.value[type] = true))
|
|
132
|
-
validForm.value = validation.touch()
|
|
133
|
-
|
|
134
|
-
model.value.task_name = form.value.taskName.value // Временно
|
|
135
103
|
}
|
|
136
104
|
const userNameErrorText = computed<string>(() => {
|
|
137
105
|
if (!initValidationFields.value.taskName) return ''
|
|
138
|
-
|
|
106
|
+
|
|
107
|
+
return !model.value.task_name ? localization.value.common.fieldRequired : ''
|
|
139
108
|
})
|
|
140
109
|
|
|
141
110
|
const frequencyMethodOptions = computed<UI_I_SelectInputItem[]>(() =>
|
package/components/common/pages/scheduledTasks/modals/common/newTaskForm/lib/models/interfaces.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type { UI_I_Validation } from '~/lib/models/plugins/validation/interfaces'
|
|
2
|
-
|
|
3
|
-
export interface UI_I_ScheduledTasksForm {
|
|
4
|
-
taskName: UI_I_Validation
|
|
5
|
-
description: UI_I_Validation
|
|
6
|
-
}
|
|
7
1
|
export interface UI_I_InitialValidationFields {
|
|
8
2
|
taskName: boolean
|
|
9
3
|
}
|
package/package.json
CHANGED