adminforth 1.4.3-next.27 → 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.
|
@@ -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
|
|