adminforth 1.4.3-next.26 → 1.4.3-next.28
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.
|
@@ -160,9 +160,9 @@
|
|
|
160
160
|
</template>
|
|
161
161
|
</AfTooltip>
|
|
162
162
|
|
|
163
|
-
<template v-if="
|
|
163
|
+
<template v-if="customActionsInjection">
|
|
164
164
|
<component
|
|
165
|
-
v-for="c in
|
|
165
|
+
v-for="c in customActionsInjection"
|
|
166
166
|
:is="getCustomComponent(c)"
|
|
167
167
|
:meta="c.meta"
|
|
168
168
|
:resource="coreStore.resource"
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
</div>
|
|
245
245
|
</template>
|
|
246
246
|
|
|
247
|
-
<script setup>
|
|
247
|
+
<script setup lang="ts">
|
|
248
248
|
|
|
249
249
|
|
|
250
250
|
import { computed, onMounted, ref, watch } from 'vue';
|
|
@@ -270,17 +270,17 @@ import AfTooltip from './AfTooltip.vue';
|
|
|
270
270
|
|
|
271
271
|
const coreStore = useCoreStore();
|
|
272
272
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
273
|
+
const props = defineProps<{
|
|
274
|
+
page: number,
|
|
275
|
+
resource: any,
|
|
276
|
+
rows: any[],
|
|
277
|
+
totalRows: number,
|
|
278
|
+
pageSize: number,
|
|
279
|
+
checkboxes: any[],
|
|
280
|
+
sort: any[],
|
|
281
|
+
noRoundings: boolean,
|
|
282
|
+
customActionsInjection: any[],
|
|
283
|
+
}>();
|
|
284
284
|
|
|
285
285
|
// emits, update page
|
|
286
286
|
const emits = defineEmits([
|
|
@@ -12,6 +12,7 @@ export const useCoreStore = defineStore('core', () => {
|
|
|
12
12
|
const config = ref({});
|
|
13
13
|
const record: Ref<any | null> = ref({});
|
|
14
14
|
const resource: Ref<AdminForthResourceCommon | null> = ref(null);
|
|
15
|
+
const userData = ref(null);
|
|
15
16
|
|
|
16
17
|
const resourceColumnsWithFilters = computed(() => {
|
|
17
18
|
if (!resource.value) {
|
|
@@ -52,7 +53,8 @@ export const useCoreStore = defineStore('core', () => {
|
|
|
52
53
|
return acc;
|
|
53
54
|
}, {});
|
|
54
55
|
config.value = resp.config;
|
|
55
|
-
adminUser.value = resp.
|
|
56
|
+
adminUser.value = resp.adminUser;
|
|
57
|
+
userData.value = resp.user;
|
|
56
58
|
console.log('🌍 AdminForth v', resp.version);
|
|
57
59
|
}
|
|
58
60
|
|
|
@@ -130,16 +132,15 @@ export const useCoreStore = defineStore('core', () => {
|
|
|
130
132
|
config.value = {...config.value, ...res};
|
|
131
133
|
}
|
|
132
134
|
|
|
133
|
-
|
|
134
135
|
|
|
135
136
|
const username = computed(() => {
|
|
136
137
|
const usernameField = config.value.usernameField;
|
|
137
|
-
return
|
|
138
|
+
return userData.value && userData.value[usernameField];
|
|
138
139
|
});
|
|
139
140
|
|
|
140
141
|
const userFullname = computed(() => {
|
|
141
142
|
const userFullnameField = config.value.userFullnameField;
|
|
142
|
-
return
|
|
143
|
+
return userData.value && userData.value[userFullnameField];
|
|
143
144
|
})
|
|
144
145
|
|
|
145
146
|
|