bfg-common 1.5.910 → 1.5.912

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.
@@ -7,6 +7,33 @@
7
7
  v-model="scheduledTaskFormLocal"
8
8
  />
9
9
 
10
+ <div 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
+ </div>
36
+
10
37
  <ui-input-with-datepicker
11
38
  v-if="props.type === 'once'"
12
39
  id="frequency-on-date"
@@ -31,6 +58,7 @@ const scheduledTaskFormLocal = defineModel<UI_I_ScheduleNewTasksForm>({
31
58
  })
32
59
  const props = defineProps<{
33
60
  type: string
61
+ frequencyMonthlyMode: UI_I_SelectInputItem[]
34
62
  frequencyOnWeeksDays: UI_I_SelectInputItem[]
35
63
  frequencyOnOrdinalNumber: UI_I_SelectInputItem[]
36
64
  }>()
@@ -45,6 +73,13 @@ const datepickerFormat = computed<string>(
45
73
  <style lang="scss" scoped>
46
74
  .frequency-on-date {
47
75
  grid-column: span 2;
76
+
77
+ &__radios {
78
+ display: flex;
79
+ align-items: center;
80
+ column-gap: 32px;
81
+ margin-bottom: 12px;
82
+ }
48
83
  h2 {
49
84
  font-family: 'Inter', sans-serif;
50
85
  color: var(--title-form-first-color);
@@ -2,6 +2,7 @@
2
2
  <component
3
3
  :is="currentComponent"
4
4
  v-model="model"
5
+ :frequency-monthly-mode="frequencyMonthlyMode"
5
6
  :frequency-on-weeks-days="frequencyOnWeeksDays"
6
7
  :frequency-on-ordinal-number="frequencyOnOrdinalNumber"
7
8
  :type="type"
@@ -14,8 +15,9 @@ import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/
14
15
  import type { UI_I_Localization } from '~/lib/models/interfaces'
15
16
  import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
16
17
  import {
17
- frequencyOnOrdinalNumberFunc,
18
+ frequencyMonthlyModeFunc,
18
19
  frequencyOnWeeksDaysFunc,
20
+ frequencyOnOrdinalNumberFunc,
19
21
  } from '~/components/common/pages/scheduledTasks/modals/common/frequency/on/lib/config/options'
20
22
  import {
21
23
  validateDate,
@@ -38,6 +40,9 @@ const currentComponent = computed(() =>
38
40
  : defineAsyncComponent(() => import('./Old.vue'))
39
41
  )
40
42
 
43
+ const frequencyMonthlyMode = computed<UI_I_SelectInputItem[]>(() => {
44
+ return frequencyMonthlyModeFunc(localization.value)
45
+ })
41
46
  const frequencyOnWeeksDays = computed<UI_I_SelectInputItem[]>(() => {
42
47
  return frequencyOnWeeksDaysFunc(localization.value)
43
48
  })
@@ -1,6 +1,23 @@
1
1
  import type { UI_I_Localization } from '~/lib/models/interfaces'
2
2
  import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
3
3
 
4
+ export const frequencyMonthlyModeFunc = (
5
+ localization: UI_I_Localization
6
+ ): UI_I_SelectInputItem[] => {
7
+ return [
8
+ {
9
+ label: localization.scheduledTasks.day,
10
+ value: 'day',
11
+ testId: 'on-time-monthly-by-day',
12
+ },
13
+ {
14
+ label: localization.scheduledTasks.the,
15
+ value: 'week',
16
+ testId: 'on-time-monthly-by-week',
17
+ },
18
+ ]
19
+ }
20
+
4
21
  export const frequencyOnWeeksDaysFunc = (
5
22
  localization: UI_I_Localization
6
23
  ): UI_I_SelectInputItem[] => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.910",
4
+ "version": "1.5.912",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",