@dative-gpi/foundation-shared-components 1.0.177-fs-timeline → 1.0.177-periodic

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.
@@ -49,7 +49,7 @@
49
49
  import { ref, defineComponent, type PropType, watch } from "vue";
50
50
 
51
51
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui";
52
- import { getPeriod } from "@dative-gpi/foundation-shared-components/tools";
52
+ import { getCronPeriod } from "@dative-gpi/foundation-shared-components/tools";
53
53
 
54
54
  import FSPeriodicMonthlyField from "./FSPeriodicMonthlyField.vue";
55
55
  import FSPeriodicWeeklyField from "./FSPeriodicWeeklyField.vue";
@@ -95,7 +95,7 @@ export default defineComponent({
95
95
  const selectedPeriod = ref("daily");
96
96
 
97
97
  watch(() => selectedPeriod.value, () => {
98
- if (getPeriod(props.modelValue) === selectedPeriod.value) {
98
+ if (getCronPeriod(props.modelValue) === selectedPeriod.value) {
99
99
  return;
100
100
  }
101
101
  const period = availablePeriod.find((item) => item.value === selectedPeriod.value);
@@ -106,7 +106,7 @@ export default defineComponent({
106
106
  });
107
107
 
108
108
  watch(() => props.modelValue, () => {
109
- selectedPeriod.value = getPeriod(props.modelValue);
109
+ selectedPeriod.value = getCronPeriod(props.modelValue);
110
110
  }, { immediate: true });
111
111
 
112
112
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.177-fs-timeline",
4
+ "version": "1.0.177-periodic",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.177-fs-timeline",
14
- "@dative-gpi/foundation-shared-services": "1.0.177-fs-timeline"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.177-periodic",
14
+ "@dative-gpi/foundation-shared-services": "1.0.177-periodic"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "ecf016c94ab3d60998e8361c2cdec40a76822b16"
38
+ "gitHead": "a7f43250181390d553680d1606d8c3f306b412aa"
39
39
  }
@@ -124,16 +124,16 @@ export const dayLabel = (day: Days | number): string => {
124
124
  }
125
125
  }
126
126
 
127
- export const getPeriod = (value: string) => {
127
+ export const getCronPeriod = (value: string) => {
128
128
  const cronArray = value.split(" ");
129
129
  if (cronArray[3] !== "*") {
130
- return $tr("ui.common.yearly", "Yearly");
130
+ return "yearly";
131
131
  }
132
132
  else if (!cronArray[2].includes("*") || cronArray[2].includes("-")) {
133
- return $tr("ui.common.monthly", "Monthly");
133
+ return "monthly";
134
134
  }
135
135
  else if (cronArray[4] !== "*") {
136
- return $tr("ui.common.weekly", "Weekly");
136
+ return "weekly";
137
137
  }
138
- return $tr("ui.common.daily", "Daily");
138
+ return "daily";
139
139
  };