bfg-common 1.4.265 → 1.4.267

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.
@@ -92,11 +92,21 @@ export const validateDate = (
92
92
  const currentDateTime = new Date()
93
93
  const thresholdDate = subMinutes(currentDateTime, 4) // Используем date-fns для вычитания 4 минут
94
94
 
95
- console.log(predefinedDate, 'ssskddjkllalaksjdjkd')
96
-
97
95
  const selectedDate = parseISO(date) // Начало дня выбранной даты theValueLargeThanStartTime
98
96
 
99
- return isBefore(selectedDate, thresholdDate)
100
- ? localization.common.theValueTooSmall
101
- : ''
97
+ const comparisonDate = predefinedDate
98
+ ? parseISO(predefinedDate)
99
+ : thresholdDate
100
+
101
+ if (predefinedDate) {
102
+ if (isBefore(comparisonDate, subMinutes(selectedDate, 1))) {
103
+ return localization.common.theValueLargeThanStartTime
104
+ }
105
+ }
106
+
107
+ if (isBefore(selectedDate, comparisonDate)) {
108
+ return localization.common.theValueTooSmall
109
+ }
110
+
111
+ return ''
102
112
  }
@@ -41,15 +41,15 @@ const tabs = computed<UI_I_SelectWeekDayTab[]>(() =>
41
41
  weekDaysFunc(localization.value, modelWeekDaysLocal.value)
42
42
  )
43
43
 
44
- watch(
45
- tabs,
46
- (newValue: UI_I_SelectWeekDayTab[]) => {
47
- modelWeekDaysLocal.value = newValue
48
- .filter((tab) => tab.isActive)
49
- .map((tab) => tab.value)
50
- },
51
- { immediate: true }
52
- )
44
+ // watch(
45
+ // tabs,
46
+ // (newValue: UI_I_SelectWeekDayTab[]) => {
47
+ // modelWeekDaysLocal.value = newValue
48
+ // .filter((tab) => tab.isActive)
49
+ // .map((tab) => tab.value)
50
+ // },
51
+ // { immediate: true }
52
+ // )
53
53
  </script>
54
54
 
55
55
  <style lang="scss" scoped>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.265",
4
+ "version": "1.4.267",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",