bfg-common 1.5.924 → 1.5.925
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.
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<form class="form" @submit.prevent>
|
|
3
|
-
<section class="
|
|
4
|
-
<div
|
|
3
|
+
<section class="form__section" :class="isHideFormLeftCol && 'vertical'">
|
|
4
|
+
<div
|
|
5
|
+
v-if="isHideFormLeftCol"
|
|
6
|
+
class="flex justify-between column-gap-4 form__target"
|
|
7
|
+
>
|
|
5
8
|
<div class="flex items-center column-gap-2 text-ellipsis">
|
|
6
9
|
<p class="text">{{ localization.common.target }}:</p>
|
|
7
10
|
<span class="icon vsphere-icon-vm"></span>
|
|
@@ -16,73 +19,219 @@
|
|
|
16
19
|
</div>
|
|
17
20
|
</div>
|
|
18
21
|
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class="
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<ui-select
|
|
52
|
-
v-model="model.frequency"
|
|
53
|
-
:items="frequencyMethodOptionsLocal"
|
|
54
|
-
test-id="schedule-task-frequency-select"
|
|
55
|
-
:placeholder="localization.scheduledTasks.selectFrequency"
|
|
56
|
-
size="md"
|
|
57
|
-
select-width="100%"
|
|
58
|
-
class="mt-3"
|
|
59
|
-
/>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<common-pages-scheduled-tasks-modals-common-frequency
|
|
63
|
-
v-if="model.frequency"
|
|
64
|
-
v-model="model"
|
|
65
|
-
:type="model.frequency"
|
|
66
|
-
:template-view-mode="props.templateViewMode"
|
|
22
|
+
<div class="form__row">
|
|
23
|
+
<div v-if="!isHideFormLeftCol" class="form__row-title">
|
|
24
|
+
<span class="text-ellipsis">
|
|
25
|
+
{{ localization.common.name }}
|
|
26
|
+
</span>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="form__row-content">
|
|
29
|
+
<ui-input
|
|
30
|
+
id="schedule-task-name-field"
|
|
31
|
+
v-model="model.task_name"
|
|
32
|
+
:label="localization.common.taskName"
|
|
33
|
+
:error="props.taskNameErrorText"
|
|
34
|
+
test-id="schedule-task-name-field"
|
|
35
|
+
@input="onInitValidation(['taskName'])"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="form__row">
|
|
41
|
+
<div v-if="!isHideFormLeftCol" class="form__row-title">
|
|
42
|
+
<span class="text-ellipsis">
|
|
43
|
+
{{ textareaLabel }}
|
|
44
|
+
</span>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="form__row-content">
|
|
47
|
+
<ui-textarea
|
|
48
|
+
id="description"
|
|
49
|
+
v-model="model.description"
|
|
50
|
+
:label="textareaLabel"
|
|
51
|
+
test-id="schedule-task-description-field"
|
|
52
|
+
height="84"
|
|
53
|
+
class="create-role__description"
|
|
67
54
|
/>
|
|
68
55
|
</div>
|
|
69
56
|
</div>
|
|
70
57
|
|
|
71
|
-
<div class="
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
<div class="form__row">
|
|
59
|
+
<div v-if="!isHideFormLeftCol" class="form__row-title">
|
|
60
|
+
<span class="text-ellipsis">
|
|
61
|
+
{{ localization.scheduledTasks.frequency }}
|
|
62
|
+
</span>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="form__row-content">
|
|
65
|
+
<ui-select
|
|
66
|
+
v-model="model.frequency"
|
|
67
|
+
:items="frequencyMethodOptionsLocal"
|
|
68
|
+
test-id="schedule-task-frequency-select"
|
|
69
|
+
:placeholder="localization.scheduledTasks.selectFrequency"
|
|
70
|
+
size="md"
|
|
71
|
+
select-width="100%"
|
|
72
|
+
/>
|
|
73
|
+
|
|
74
|
+
<!-- <common-pages-scheduled-tasks-modals-common-frequency-->
|
|
75
|
+
<!-- v-if="model.frequency"-->
|
|
76
|
+
<!-- v-model="model"-->
|
|
77
|
+
<!-- :type="model.frequency"-->
|
|
78
|
+
<!-- :template-view-mode="props.templateViewMode"-->
|
|
79
|
+
<!-- />-->
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="form__row">
|
|
83
|
+
<common-pages-scheduled-tasks-modals-common-frequency
|
|
84
|
+
v-if="model.frequency"
|
|
85
|
+
v-model="model"
|
|
86
|
+
:type="model.frequency"
|
|
87
|
+
:template-view-mode="props.templateViewMode"
|
|
80
88
|
/>
|
|
81
89
|
</div>
|
|
90
|
+
|
|
91
|
+
<!-- <div class="form__run">-->
|
|
92
|
+
<!-- <h2>{{ localization.common.run }}</h2>-->
|
|
93
|
+
|
|
94
|
+
<!-- <div-->
|
|
95
|
+
<!-- class="form__run-frequency"-->
|
|
96
|
+
<!-- :class="{-->
|
|
97
|
+
<!-- 'grid-single-col': !model.frequency || model.frequency === 'once',-->
|
|
98
|
+
<!-- }"-->
|
|
99
|
+
<!-- >-->
|
|
100
|
+
<!-- <div>-->
|
|
101
|
+
<!-- <h2 class="frequency">-->
|
|
102
|
+
<!-- {{ localization.scheduledTasks.frequency }}-->
|
|
103
|
+
<!-- </h2>-->
|
|
104
|
+
<!-- <ui-select-->
|
|
105
|
+
<!-- v-model="model.frequency"-->
|
|
106
|
+
<!-- :items="frequencyMethodOptionsLocal"-->
|
|
107
|
+
<!-- test-id="schedule-task-frequency-select"-->
|
|
108
|
+
<!-- :placeholder="localization.scheduledTasks.selectFrequency"-->
|
|
109
|
+
<!-- size="md"-->
|
|
110
|
+
<!-- select-width="100%"-->
|
|
111
|
+
<!-- class="mt-3"-->
|
|
112
|
+
<!-- />-->
|
|
113
|
+
<!-- </div>-->
|
|
114
|
+
|
|
115
|
+
<!-- <common-pages-scheduled-tasks-modals-common-frequency-->
|
|
116
|
+
<!-- v-if="model.frequency"-->
|
|
117
|
+
<!-- v-model="model"-->
|
|
118
|
+
<!-- :type="model.frequency"-->
|
|
119
|
+
<!-- :template-view-mode="props.templateViewMode"-->
|
|
120
|
+
<!-- />-->
|
|
121
|
+
<!-- </div>-->
|
|
122
|
+
<!-- </div>-->
|
|
123
|
+
|
|
124
|
+
<!-- <h2>{{ emailCompletionLabel }}</h2>-->
|
|
125
|
+
<div class="form__row">
|
|
126
|
+
<div v-if="!isHideFormLeftCol" class="form__row-title">
|
|
127
|
+
<span class="text-ellipsis">
|
|
128
|
+
{{ textareaLabel }}
|
|
129
|
+
</span>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="form__row-content">
|
|
132
|
+
<ui-textarea
|
|
133
|
+
id="email-completion"
|
|
134
|
+
v-model="model.ntfn_target"
|
|
135
|
+
placeholder="example1@email.com,example2@email.com"
|
|
136
|
+
test-id="schedule-task-email-completion-field"
|
|
137
|
+
height="84"
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<!-- <div class="form__email"></div>-->
|
|
82
143
|
</section>
|
|
83
144
|
</form>
|
|
84
145
|
</template>
|
|
85
146
|
|
|
147
|
+
<!--<template>-->
|
|
148
|
+
<!-- <form class="form" @submit.prevent>-->
|
|
149
|
+
<!-- <section class="flex flex-direction-column row-gap-6">-->
|
|
150
|
+
<!-- <div-->
|
|
151
|
+
<!-- v-if="isHideFormLeftCol"-->
|
|
152
|
+
<!-- class="flex justify-between column-gap-4 form__target"-->
|
|
153
|
+
<!-- >-->
|
|
154
|
+
<!-- <div class="flex items-center column-gap-2 text-ellipsis">-->
|
|
155
|
+
<!-- <p class="text">{{ localization.common.target }}:</p>-->
|
|
156
|
+
<!-- <span class="icon vsphere-icon-vm"></span>-->
|
|
157
|
+
<!-- <span class="text">{{ props.target }}</span>-->
|
|
158
|
+
<!-- </div>-->
|
|
159
|
+
<!-- <div class="flex items-center column-gap-3">-->
|
|
160
|
+
<!-- <p class="text">{{ localization.common.active }}</p>-->
|
|
161
|
+
<!-- <ui-switch-->
|
|
162
|
+
<!-- v-model="model.toggle"-->
|
|
163
|
+
<!-- test-id="scheduled-task-active-switch-input"-->
|
|
164
|
+
<!-- />-->
|
|
165
|
+
<!-- </div>-->
|
|
166
|
+
<!-- </div>-->
|
|
167
|
+
|
|
168
|
+
<!-- <ui-input-->
|
|
169
|
+
<!-- id="schedule-task-name-field"-->
|
|
170
|
+
<!-- v-model="model.task_name"-->
|
|
171
|
+
<!-- :label="localization.common.taskName"-->
|
|
172
|
+
<!-- :error="props.taskNameErrorText"-->
|
|
173
|
+
<!-- test-id="schedule-task-name-field"-->
|
|
174
|
+
<!-- class="form__user-name"-->
|
|
175
|
+
<!-- @input="onInitValidation(['taskName'])"-->
|
|
176
|
+
<!-- />-->
|
|
177
|
+
|
|
178
|
+
<!-- <ui-textarea-->
|
|
179
|
+
<!-- id="description"-->
|
|
180
|
+
<!-- v-model="model.description"-->
|
|
181
|
+
<!-- :label="textareaLabel"-->
|
|
182
|
+
<!-- test-id="schedule-task-description-field"-->
|
|
183
|
+
<!-- height="84"-->
|
|
184
|
+
<!-- class="form__description"-->
|
|
185
|
+
<!-- />-->
|
|
186
|
+
|
|
187
|
+
<!-- <div class="form__run">-->
|
|
188
|
+
<!-- <h2>{{ localization.common.run }}</h2>-->
|
|
189
|
+
|
|
190
|
+
<!-- <div-->
|
|
191
|
+
<!-- class="form__run-frequency"-->
|
|
192
|
+
<!-- :class="{-->
|
|
193
|
+
<!-- 'grid-single-col': !model.frequency || model.frequency === 'once',-->
|
|
194
|
+
<!-- }"-->
|
|
195
|
+
<!-- >-->
|
|
196
|
+
<!-- <div>-->
|
|
197
|
+
<!-- <h2 class="frequency">-->
|
|
198
|
+
<!-- {{ localization.scheduledTasks.frequency }}-->
|
|
199
|
+
<!-- </h2>-->
|
|
200
|
+
<!-- <ui-select-->
|
|
201
|
+
<!-- v-model="model.frequency"-->
|
|
202
|
+
<!-- :items="frequencyMethodOptionsLocal"-->
|
|
203
|
+
<!-- test-id="schedule-task-frequency-select"-->
|
|
204
|
+
<!-- :placeholder="localization.scheduledTasks.selectFrequency"-->
|
|
205
|
+
<!-- size="md"-->
|
|
206
|
+
<!-- select-width="100%"-->
|
|
207
|
+
<!-- class="mt-3"-->
|
|
208
|
+
<!-- />-->
|
|
209
|
+
<!-- </div>-->
|
|
210
|
+
|
|
211
|
+
<!-- <common-pages-scheduled-tasks-modals-common-frequency-->
|
|
212
|
+
<!-- v-if="model.frequency"-->
|
|
213
|
+
<!-- v-model="model"-->
|
|
214
|
+
<!-- :type="model.frequency"-->
|
|
215
|
+
<!-- :template-view-mode="props.templateViewMode"-->
|
|
216
|
+
<!-- />-->
|
|
217
|
+
<!-- </div>-->
|
|
218
|
+
<!-- </div>-->
|
|
219
|
+
|
|
220
|
+
<!-- <div class="form__email">-->
|
|
221
|
+
<!-- <h2>{{ emailCompletionLabel }}</h2>-->
|
|
222
|
+
<!-- <ui-textarea-->
|
|
223
|
+
<!-- id="email-completion"-->
|
|
224
|
+
<!-- v-model="model.ntfn_target"-->
|
|
225
|
+
<!-- placeholder="example1@email.com,example2@email.com"-->
|
|
226
|
+
<!-- test-id="schedule-task-email-completion-field"-->
|
|
227
|
+
<!-- height="84"-->
|
|
228
|
+
<!-- class="form__description"-->
|
|
229
|
+
<!-- />-->
|
|
230
|
+
<!-- </div>-->
|
|
231
|
+
<!-- </section>-->
|
|
232
|
+
<!-- </form>-->
|
|
233
|
+
<!--</template>-->
|
|
234
|
+
|
|
86
235
|
<script lang="ts" setup>
|
|
87
236
|
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
88
237
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
@@ -104,6 +253,10 @@ const emits = defineEmits<{
|
|
|
104
253
|
|
|
105
254
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
106
255
|
|
|
256
|
+
const isHideFormLeftCol = computed<boolean>(
|
|
257
|
+
() => props.templateViewMode === 'vertical'
|
|
258
|
+
)
|
|
259
|
+
|
|
107
260
|
const onInitValidation = (types: string[]): void => {
|
|
108
261
|
emits('init-validation', types)
|
|
109
262
|
}
|
|
@@ -131,6 +284,15 @@ const frequencyMethodOptionsLocal = computed<UI_I_Dropdown[]>(() =>
|
|
|
131
284
|
|
|
132
285
|
<style lang="scss" scoped>
|
|
133
286
|
.form {
|
|
287
|
+
&__section {
|
|
288
|
+
display: flex;
|
|
289
|
+
flex-direction: column;
|
|
290
|
+
row-gap: 16px;
|
|
291
|
+
&.vertical {
|
|
292
|
+
row-gap: 24px;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
134
296
|
&__target {
|
|
135
297
|
background-color: var(--info-block-bg);
|
|
136
298
|
border-radius: 8px;
|
|
@@ -161,11 +323,11 @@ const frequencyMethodOptionsLocal = computed<UI_I_Dropdown[]>(() =>
|
|
|
161
323
|
}
|
|
162
324
|
}
|
|
163
325
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
326
|
+
//&__run,
|
|
327
|
+
//&__email {
|
|
328
|
+
// border-top: 1px solid var(--horizontal-line);
|
|
329
|
+
// padding-top: 16px;
|
|
330
|
+
//}
|
|
169
331
|
|
|
170
332
|
&__run {
|
|
171
333
|
&-frequency {
|
|
@@ -190,5 +352,47 @@ const frequencyMethodOptionsLocal = computed<UI_I_Dropdown[]>(() =>
|
|
|
190
352
|
margin-bottom: 12px;
|
|
191
353
|
}
|
|
192
354
|
}
|
|
355
|
+
|
|
356
|
+
&__row {
|
|
357
|
+
width: 100%;
|
|
358
|
+
min-height: 36px;
|
|
359
|
+
display: flex;
|
|
360
|
+
align-items: center;
|
|
361
|
+
column-gap: 16px;
|
|
362
|
+
padding-bottom: 16px;
|
|
363
|
+
&:not(:last-child) {
|
|
364
|
+
border-bottom: 1px solid var(--wizard-content-line);
|
|
365
|
+
}
|
|
366
|
+
.edit & {
|
|
367
|
+
border-bottom: none;
|
|
368
|
+
padding-bottom: 0;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
&-title {
|
|
372
|
+
max-width: 240px;
|
|
373
|
+
width: 100%;
|
|
374
|
+
display: flex;
|
|
375
|
+
align-items: center;
|
|
376
|
+
column-gap: 8px;
|
|
377
|
+
color: var(--wizard-content-title);
|
|
378
|
+
font-weight: 400;
|
|
379
|
+
font-size: 13px;
|
|
380
|
+
line-height: 20px;
|
|
381
|
+
white-space: nowrap;
|
|
382
|
+
text-overflow: ellipsis;
|
|
383
|
+
overflow: hidden;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
&-content {
|
|
387
|
+
max-width: 480px;
|
|
388
|
+
width: 100%;
|
|
389
|
+
color: var(--wizard-content-value);
|
|
390
|
+
font-weight: 400;
|
|
391
|
+
font-size: 13px;
|
|
392
|
+
line-height: 20px;
|
|
393
|
+
letter-spacing: 0;
|
|
394
|
+
vertical-align: middle;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
193
397
|
}
|
|
194
398
|
</style>
|