adminforth 1.6.3-next.9 → 1.6.4
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.
- package/dist/spa/src/afcl/ProgressBar.vue +1 -1
- package/dist/spa/src/afcl/Select.vue +1 -1
- package/dist/spa/src/components/CustomDateRangePicker.vue +22 -2
- package/dist/spa/src/components/ResourceListTable.vue +2 -2
- package/dist/spa/src/stores/core.ts +5 -0
- package/dist/spa/src/stores/user.ts +1 -0
- package/package.json +1 -1
|
@@ -42,7 +42,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
42
42
|
const percentage = computed((): number => {
|
|
43
43
|
const min = props.minValue
|
|
44
44
|
const max = props.maxValue
|
|
45
|
-
return Math.
|
|
45
|
+
return Math.floor(((props.currentValue - min) / (max - min)) * 1000) / 10
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
const progressText = computed((): string => {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<label v-if="!$slots.item" :for="item.value">{{ item.label }}</label>
|
|
47
47
|
</div>
|
|
48
48
|
<div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-gray-400 dark:text-gray-300">
|
|
49
|
-
{{ $t('No results found') }}
|
|
49
|
+
{{ options.length ? $t('No results found') : $t('No items here') }}
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
<div v-if="$slots['extra-item']" class="px-4 py-2 dark:text-gray-400">
|
|
@@ -135,11 +135,31 @@ const end = computed(() => {
|
|
|
135
135
|
})
|
|
136
136
|
|
|
137
137
|
function updateFromProps() {
|
|
138
|
-
if (
|
|
138
|
+
if (props.valueStart) {
|
|
139
|
+
const date = dayjs(props.valueStart);
|
|
140
|
+
datepickerStartEl.value.value = date.format('DD MMM YYYY');
|
|
141
|
+
if (date.format('HH:mm') !== '00:00') {
|
|
142
|
+
startTime.value = date.format('HH:mm');
|
|
143
|
+
showTimeInputs.value = true;
|
|
144
|
+
} else {
|
|
145
|
+
startTime.value = '';
|
|
146
|
+
}
|
|
147
|
+
startDate.value = date.toString();
|
|
148
|
+
} else {
|
|
139
149
|
datepickerStartEl.value.value = '';
|
|
140
150
|
startTime.value = '';
|
|
141
151
|
}
|
|
142
|
-
if (
|
|
152
|
+
if (props.valueEnd) {
|
|
153
|
+
const date = dayjs(props.valueEnd);
|
|
154
|
+
datepickerEndEl.value.value = date.format('DD MMM YYYY');
|
|
155
|
+
if (date.format('HH:mm') !== '00:00') {
|
|
156
|
+
endTime.value = date.format('HH:mm');
|
|
157
|
+
showTimeInputs.value = true;
|
|
158
|
+
} else {
|
|
159
|
+
endTime.value = '';
|
|
160
|
+
}
|
|
161
|
+
endDate.value = date.toString();
|
|
162
|
+
} else {
|
|
143
163
|
datepickerEndEl.value.value = '';
|
|
144
164
|
endTime.value = '';
|
|
145
165
|
}
|
|
@@ -398,9 +398,9 @@ function onSortButtonClick(event, field) {
|
|
|
398
398
|
} else {
|
|
399
399
|
const sortField = sort.value[sortIndex];
|
|
400
400
|
if (sortField.direction === 'asc') {
|
|
401
|
-
sort.value
|
|
401
|
+
sort.value = sort.value.map((s) => s.field === field ? {field, direction: 'desc'} : s);
|
|
402
402
|
} else {
|
|
403
|
-
sort.value.
|
|
403
|
+
sort.value = sort.value.filter((s) => s.field !== field);
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
}
|
|
@@ -34,6 +34,10 @@ export const useCoreStore = defineStore('core', () => {
|
|
|
34
34
|
adminUser.value = null;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
async function resetResource() {
|
|
38
|
+
resource.value = null;
|
|
39
|
+
}
|
|
40
|
+
|
|
37
41
|
async function toggleTheme() {
|
|
38
42
|
theme.value = theme.value === 'light' ? 'dark' : 'light';
|
|
39
43
|
if (theme.value === 'light') {
|
|
@@ -224,5 +228,6 @@ export const useCoreStore = defineStore('core', () => {
|
|
|
224
228
|
theme,
|
|
225
229
|
fetchMenuBadges,
|
|
226
230
|
resetAdminUser,
|
|
231
|
+
resetResource,
|
|
227
232
|
}
|
|
228
233
|
})
|