bfg-common 1.5.926 → 1.5.928

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.
@@ -22,6 +22,7 @@
22
22
  <common-pages-scheduled-tasks-modals-common-frequency-start-on
23
23
  v-if="showTimeInterval"
24
24
  v-model="model"
25
+ :template-view-mode="props.templateViewMode"
25
26
  />
26
27
 
27
28
  <common-pages-scheduled-tasks-modals-common-frequency-end
@@ -4,29 +4,32 @@
4
4
  :class="props.templateViewMode === 'horizontal' && 'horizontal'"
5
5
  >
6
6
  <h2>{{ localization.scheduledTasks.end }}</h2>
7
- <div class="frequency-end-time__radios">
8
- <ui-radio
9
- v-for="(option, key) in props.endOptions"
10
- :key="key"
11
- v-model="endTimeModeLocal"
12
- :label="option.label"
13
- :test-id="option.testId"
14
- :value="option.value"
15
- size="md"
16
- >
17
- </ui-radio>
18
- </div>
19
7
 
20
- <ui-input-with-datepicker
21
- v-if="endTimeModeLocal === 'on'"
22
- id="frequency-end-date"
23
- v-model="modelFrequencyLocal.frg_end_time"
24
- :format="datepickerFormat"
25
- test-id="frequency-end-date-input"
26
- time-format="12"
27
- :error="''"
28
- :error-timepicker="''"
29
- />
8
+ <div class="w-full">
9
+ <div class="frequency-end-time__radios">
10
+ <ui-radio
11
+ v-for="(option, key) in props.endOptions"
12
+ :key="key"
13
+ v-model="endTimeModeLocal"
14
+ :label="option.label"
15
+ :test-id="option.testId"
16
+ :value="option.value"
17
+ size="md"
18
+ >
19
+ </ui-radio>
20
+ </div>
21
+
22
+ <ui-input-with-datepicker
23
+ v-if="endTimeModeLocal === 'on'"
24
+ id="frequency-end-date"
25
+ v-model="modelFrequencyLocal.frg_end_time"
26
+ :format="datepickerFormat"
27
+ test-id="frequency-end-date-input"
28
+ time-format="12"
29
+ :error="''"
30
+ :error-timepicker="''"
31
+ />
32
+ </div>
30
33
  </div>
31
34
  </template>
32
35
 
@@ -10,7 +10,7 @@
10
10
  v-model="scheduledTaskFormLocal"
11
11
  />
12
12
 
13
- <div v-if="props.type === 'month'" class="frequency-monthly-days">
13
+ <div v-if="props.type === 'month'" class="frequency-monthly-days w-full">
14
14
  <div class="frequency-on-date__radios">
15
15
  <ui-radio
16
16
  v-for="(option, key) in props.frequencyMonthlyMode"
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <div class="frequency-start-on">
2
+ <div
3
+ class="frequency-start-on"
4
+ :class="props.templateViewMode === 'horizontal' && 'horizontal'"
5
+ >
3
6
  <h2>{{ localization.common.start }}</h2>
4
7
  <ui-input-with-datepicker
5
8
  id="frequency-start-on-date"
@@ -17,10 +20,14 @@
17
20
  import type { UI_I_Localization } from '~/lib/models/interfaces'
18
21
  import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
19
22
  import { getUiDatepickerFormatByLanguage } from '~/lib/utils/date'
23
+ import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
20
24
 
21
25
  const modelFrequencyLocal = defineModel<UI_I_ScheduleNewTasksForm>({
22
26
  required: true,
23
27
  })
28
+ const props = defineProps<{
29
+ templateViewMode: 'horizontal' | 'vertical'
30
+ }>()
24
31
 
25
32
  const localization = computed<UI_I_Localization>(() => useLocal())
26
33
 
@@ -42,5 +49,35 @@ const datepickerFormat = computed<string>(
42
49
  line-height: 18px;
43
50
  margin-bottom: 12px;
44
51
  }
52
+
53
+ &.horizontal {
54
+ display: flex;
55
+ flex-direction: row;
56
+ align-items: center;
57
+ column-gap: 16px;
58
+ border-top: 0;
59
+ padding-top: 0;
60
+
61
+ h2 {
62
+ font-family: 'Inter', sans-serif;
63
+ width: 100%;
64
+ max-width: 240px;
65
+ display: flex;
66
+ align-items: center;
67
+ column-gap: 8px;
68
+ color: var(--wizard-content-title);
69
+ font-size: 13px;
70
+ font-weight: 400;
71
+ line-height: 20px;
72
+ margin-bottom: 0;
73
+ white-space: nowrap;
74
+ text-overflow: ellipsis;
75
+ overflow: hidden;
76
+ }
77
+
78
+ :deep(.ui-input-with-datepicker) {
79
+ width: 100%;
80
+ }
81
+ }
45
82
  }
46
83
  </style>
@@ -1,7 +1,9 @@
1
1
  <template>
2
+ <!-- Аргумент (:template-view-mode) используется только для нового интерфейса -->
2
3
  <component
3
4
  :is="currentComponent"
4
5
  v-model="modelFrequencyLocal"
6
+ :template-view-mode="props.templateViewMode"
5
7
  @vue:mounted="onSetDefaultDateTime"
6
8
  />
7
9
  </template>
@@ -14,6 +16,9 @@ import { validateDate } from '~/components/common/pages/scheduledTasks/modals/co
14
16
  const modelFrequencyLocal = defineModel<UI_I_ScheduleNewTasksForm>({
15
17
  required: true,
16
18
  })
19
+ const props = defineProps<{
20
+ templateViewMode: 'horizontal' | 'vertical'
21
+ }>()
17
22
 
18
23
  const localization = computed<UI_I_Localization>(() => useLocal())
19
24
  const { $formattedDatetime }: any = useNuxtApp()
@@ -79,7 +79,7 @@
79
79
  <!-- />-->
80
80
  </div>
81
81
  </div>
82
- <div class="form__row">
82
+ <div class="form__row horizontal">
83
83
  <common-pages-scheduled-tasks-modals-common-frequency
84
84
  v-if="model.frequency"
85
85
  v-model="model"
@@ -366,6 +366,11 @@ const frequencyMethodOptionsLocal = computed<UI_I_Dropdown[]>(() =>
366
366
  &.horizontal {
367
367
  flex-direction: column;
368
368
  align-items: inherit;
369
+ row-gap: 16px;
370
+ & > :deep(div:not(:last-child)) {
371
+ border-bottom: 1px solid var(--wizard-content-line);
372
+ padding-bottom: 16px;
373
+ }
369
374
  }
370
375
 
371
376
  &-title {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.926",
4
+ "version": "1.5.928",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",