adminforth 1.5.5-next.8 → 1.5.6-next.0
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.
|
@@ -150,23 +150,38 @@
|
|
|
150
150
|
</div>
|
|
151
151
|
</template>
|
|
152
152
|
|
|
153
|
-
<script setup>
|
|
153
|
+
<script setup lang="ts">
|
|
154
154
|
import { IconExclamationCircleSolid, IconEyeSlashSolid, IconEyeSolid } from '@iconify-prerendered/vue-flowbite';
|
|
155
155
|
import CustomDatePicker from "@/components/CustomDatePicker.vue";
|
|
156
156
|
import Select from '@/afcl/Select.vue';
|
|
157
157
|
import { getCustomComponent } from '@/utils';
|
|
158
158
|
import { Tooltip } from '@/afcl';
|
|
159
|
+
import { ref, computed, watch, type Ref } from 'vue';
|
|
159
160
|
|
|
160
|
-
|
|
161
|
-
const props = defineProps({
|
|
161
|
+
const props = defineProps<{
|
|
162
162
|
source: 'create' | 'edit',
|
|
163
|
-
group:
|
|
164
|
-
mode:
|
|
165
|
-
validating:
|
|
166
|
-
currentValues:
|
|
167
|
-
unmasked:
|
|
168
|
-
columnError:
|
|
169
|
-
setCurrentValue:
|
|
170
|
-
columnOptions:
|
|
163
|
+
group: any,
|
|
164
|
+
mode: string,
|
|
165
|
+
validating: boolean,
|
|
166
|
+
currentValues: any,
|
|
167
|
+
unmasked: any,
|
|
168
|
+
columnError: (column: any) => string,
|
|
169
|
+
setCurrentValue: (columnName: string, value: any) => void,
|
|
170
|
+
columnOptions: (column: any) => any,
|
|
171
|
+
}>();
|
|
172
|
+
|
|
173
|
+
const emit = defineEmits(['update:customComponentsInValidity', 'update:customComponentsEmptiness']);
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
const customComponentsInValidity: Ref<Record<string, boolean>> = ref({});
|
|
177
|
+
const customComponentsEmptiness: Ref<Record<string, boolean>> = ref({});
|
|
178
|
+
|
|
179
|
+
watch(customComponentsInValidity, (newVal) => {
|
|
180
|
+
emit('update:customComponentsInValidity', newVal);
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
watch(customComponentsEmptiness, (newVal) => {
|
|
184
|
+
emit('update:customComponentsEmptiness', newVal);
|
|
171
185
|
});
|
|
186
|
+
|
|
172
187
|
</script>
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
:validating="validating"
|
|
14
14
|
:columnError="columnError"
|
|
15
15
|
:setCurrentValue="setCurrentValue"
|
|
16
|
+
@update:customComponentsInValidity="(data) => customComponentsInValidity.value = { ...customComponentsInValidity.value, ...data }"
|
|
17
|
+
@update:customComponentsEmptiness="(data) => customComponentsEmptiness.value = { ...customComponentsEmptiness.value, ...data }"
|
|
16
18
|
/>
|
|
17
19
|
</div>
|
|
18
20
|
<div v-else class="flex flex-col gap-4">
|
|
19
|
-
<template v-for="group in groupedColumns" :key="group.groupName"
|
|
21
|
+
<template v-for="group in groupedColumns" :key="group.groupName">
|
|
20
22
|
<GroupsTable
|
|
21
23
|
:source="source"
|
|
22
24
|
:group="group"
|
|
@@ -28,6 +30,8 @@
|
|
|
28
30
|
:validating="validating"
|
|
29
31
|
:columnError="columnError"
|
|
30
32
|
:setCurrentValue="setCurrentValue"
|
|
33
|
+
@update:customComponentsInValidity="(data) => customComponentsInValidity.value = { ...customComponentsInValidity.value, ...data }"
|
|
34
|
+
@update:customComponentsEmptiness="(data) => customComponentsEmptiness.value = { ...customComponentsEmptiness.value, ...data }"
|
|
31
35
|
/>
|
|
32
36
|
</template>
|
|
33
37
|
<div v-if="otherColumns.length > 0">
|
|
@@ -42,6 +46,8 @@
|
|
|
42
46
|
:validating="validating"
|
|
43
47
|
:columnError="columnError"
|
|
44
48
|
:setCurrentValue="setCurrentValue"
|
|
49
|
+
@update:customComponentsInValidity="(data) => customComponentsInValidity.value = { ...customComponentsInValidity.value, ...data }"
|
|
50
|
+
@update:customComponentsEmptiness="(data) => customComponentsEmptiness.value = { ...customComponentsEmptiness.value, ...data }"
|
|
45
51
|
/>
|
|
46
52
|
</div>
|
|
47
53
|
</div>
|
|
@@ -77,7 +83,6 @@ const mode = computed(() => route.name === 'resource-create' ? 'create' : 'edit'
|
|
|
77
83
|
const emit = defineEmits(['update:record', 'update:isValid']);
|
|
78
84
|
|
|
79
85
|
const currentValues = ref(null);
|
|
80
|
-
|
|
81
86
|
const customComponentsInValidity = ref({});
|
|
82
87
|
const customComponentsEmptiness = ref({});
|
|
83
88
|
|