bfg-common 1.4.253 → 1.4.254

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,7 +7,7 @@
7
7
 
8
8
  <common-pages-scheduled-tasks-modals-common-frequency-interval
9
9
  v-if="showTimeInterval"
10
- v-model="model.frg_interval"
10
+ v-model="model"
11
11
  :type="props.type"
12
12
  />
13
13
 
@@ -11,7 +11,7 @@
11
11
  >
12
12
  <input
13
13
  id="frequency-time-interval"
14
- v-model="modelIntervalLocal"
14
+ v-model="modelFrequencyLocal.frg_interval"
15
15
  data-id="frequency-time-interval-input"
16
16
  type="text"
17
17
  @input="onInitTimeIntervalValidation"
@@ -31,6 +31,7 @@
31
31
 
32
32
  <script lang="ts" setup>
33
33
  import type { UI_I_Localization } from '~/lib/models/interfaces'
34
+ import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
34
35
  import {
35
36
  defineIntervalSuffixLabelFunc,
36
37
  validateField,
@@ -39,7 +40,9 @@ import {
39
40
  const props = defineProps<{
40
41
  type: string
41
42
  }>()
42
- const modelIntervalLocal = defineModel<string>({ required: true })
43
+ const modelFrequencyLocal = defineModel<UI_I_ScheduleNewTasksForm>({
44
+ required: true,
45
+ })
43
46
 
44
47
  const localization = computed<UI_I_Localization>(() => useLocal())
45
48
 
@@ -51,8 +54,18 @@ const onInitTimeIntervalValidation = (): void => {
51
54
  const timeIntervalErrorText = computed<string>(() => {
52
55
  if (!isInitTimeIntervalValidation.value) return ''
53
56
 
54
- return validateField(localization.value, modelIntervalLocal.value)
57
+ return validateField(
58
+ localization.value,
59
+ modelFrequencyLocal.value.frg_interval
60
+ )
55
61
  })
62
+ watch(
63
+ timeIntervalErrorText,
64
+ (newValue: string) => {
65
+ modelFrequencyLocal.value.isValid = !!newValue
66
+ },
67
+ { immediate: true }
68
+ )
56
69
 
57
70
  const intervalSuffixLabel = computed(() => {
58
71
  const lang = useLocalStorage('lang')
@@ -60,7 +73,7 @@ const intervalSuffixLabel = computed(() => {
60
73
  return defineIntervalSuffixLabelFunc(
61
74
  localization.value,
62
75
  props.type,
63
- modelIntervalLocal.value,
76
+ modelFrequencyLocal.value.frg_interval,
64
77
  lang
65
78
  )
66
79
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.253",
4
+ "version": "1.4.254",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",