@dative-gpi/foundation-shared-components 1.0.177-periodic → 1.0.177-timeline2
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.
|
@@ -95,7 +95,7 @@ export default defineComponent({
|
|
|
95
95
|
const selectedPeriod = ref("daily");
|
|
96
96
|
|
|
97
97
|
watch(() => selectedPeriod.value, () => {
|
|
98
|
-
if (getCronPeriod(props.modelValue) === selectedPeriod.value) {
|
|
98
|
+
if (getCronPeriod(props.modelValue).value === 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 = getCronPeriod(props.modelValue);
|
|
109
|
+
selectedPeriod.value = getCronPeriod(props.modelValue).value;
|
|
110
110
|
}, { immediate: true });
|
|
111
111
|
|
|
112
112
|
return {
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
<v-timeline-item
|
|
3
3
|
v-bind="$attrs"
|
|
4
4
|
>
|
|
5
|
+
<template
|
|
6
|
+
v-slot:opposite
|
|
7
|
+
>
|
|
8
|
+
<slot
|
|
9
|
+
name="opposite"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
<template
|
|
13
|
+
v-slot:icon
|
|
14
|
+
>
|
|
15
|
+
<slot
|
|
16
|
+
name="icon"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
5
19
|
<slot/>
|
|
6
20
|
</v-timeline-item>
|
|
7
21
|
</template>
|
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-
|
|
4
|
+
"version": "1.0.177-timeline2",
|
|
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-
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.177-
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.177-timeline2",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.177-timeline2"
|
|
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": "948034a5a03e6e20133b3ff2583a3901d9d558b3"
|
|
39
39
|
}
|
package/tools/timeRangeTools.ts
CHANGED
|
@@ -124,16 +124,24 @@ export const dayLabel = (day: Days | number): string => {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
export const getCronPeriod = (value: string) => {
|
|
127
|
+
export const getCronPeriod = (value: string): { label: string, value: string } => {
|
|
128
128
|
const cronArray = value.split(" ");
|
|
129
129
|
if (cronArray[3] !== "*") {
|
|
130
|
-
return
|
|
130
|
+
return {
|
|
131
|
+
label: $tr("ui.common.yearly", "Yearly"), value: "yearly"
|
|
132
|
+
};
|
|
131
133
|
}
|
|
132
134
|
else if (!cronArray[2].includes("*") || cronArray[2].includes("-")) {
|
|
133
|
-
return
|
|
135
|
+
return {
|
|
136
|
+
label: $tr("ui.common.monthly", "Monthly"), value: "monthly"
|
|
137
|
+
};
|
|
134
138
|
}
|
|
135
139
|
else if (cronArray[4] !== "*") {
|
|
136
|
-
return
|
|
140
|
+
return {
|
|
141
|
+
label: $tr("ui.common.weekly", "Weekly"), value: "weekly"
|
|
142
|
+
};
|
|
137
143
|
}
|
|
138
|
-
return
|
|
139
|
-
|
|
144
|
+
return {
|
|
145
|
+
label: $tr("ui.common.daily", "Daily"), value: "daily"
|
|
146
|
+
};
|
|
147
|
+
}
|