@dative-gpi/foundation-shared-components 1.0.176 → 1.0.177-fs-timeline
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,6 +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
53
|
|
|
53
54
|
import FSPeriodicMonthlyField from "./FSPeriodicMonthlyField.vue";
|
|
54
55
|
import FSPeriodicWeeklyField from "./FSPeriodicWeeklyField.vue";
|
|
@@ -93,20 +94,6 @@ export default defineComponent({
|
|
|
93
94
|
|
|
94
95
|
const selectedPeriod = ref("daily");
|
|
95
96
|
|
|
96
|
-
const getPeriod = (value: string) => {
|
|
97
|
-
const cronArray = value.split(" ");
|
|
98
|
-
if (cronArray[3] !== "*") {
|
|
99
|
-
return "yearly";
|
|
100
|
-
}
|
|
101
|
-
else if(!cronArray[2].includes("*") || cronArray[2].includes("-")) {
|
|
102
|
-
return "monthly";
|
|
103
|
-
}
|
|
104
|
-
else if(cronArray[4] !== "*") {
|
|
105
|
-
return "weekly";
|
|
106
|
-
}
|
|
107
|
-
return "daily";
|
|
108
|
-
};
|
|
109
|
-
|
|
110
97
|
watch(() => selectedPeriod.value, () => {
|
|
111
98
|
if (getPeriod(props.modelValue) === selectedPeriod.value) {
|
|
112
99
|
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.
|
|
4
|
+
"version": "1.0.177-fs-timeline",
|
|
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.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.177-fs-timeline",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.177-fs-timeline"
|
|
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": "
|
|
38
|
+
"gitHead": "ecf016c94ab3d60998e8361c2cdec40a76822b16"
|
|
39
39
|
}
|
package/tools/timeRangeTools.ts
CHANGED
|
@@ -122,4 +122,18 @@ export const dayLabel = (day: Days | number): string => {
|
|
|
122
122
|
default:
|
|
123
123
|
return $tr("ui.common.all-days", "All days");
|
|
124
124
|
}
|
|
125
|
-
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const getPeriod = (value: string) => {
|
|
128
|
+
const cronArray = value.split(" ");
|
|
129
|
+
if (cronArray[3] !== "*") {
|
|
130
|
+
return $tr("ui.common.yearly", "Yearly");
|
|
131
|
+
}
|
|
132
|
+
else if (!cronArray[2].includes("*") || cronArray[2].includes("-")) {
|
|
133
|
+
return $tr("ui.common.monthly", "Monthly");
|
|
134
|
+
}
|
|
135
|
+
else if (cronArray[4] !== "*") {
|
|
136
|
+
return $tr("ui.common.weekly", "Weekly");
|
|
137
|
+
}
|
|
138
|
+
return $tr("ui.common.daily", "Daily");
|
|
139
|
+
};
|