Balance Overview: Fixed issue if users are not loaded
This commit is contained in:
parent
bda5602e9f
commit
c9d8365def
|
@ -44,10 +44,12 @@ export default defineComponent({
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
void store.dispatch('balance/getBalance');
|
void store.dispatch('balance/getBalance');
|
||||||
|
void store.dispatch('user/getUsers').then(() =>
|
||||||
onRequest({
|
onRequest({
|
||||||
pagination: pagination.value,
|
pagination: pagination.value,
|
||||||
filter: undefined
|
filter: undefined
|
||||||
});
|
})
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const showCancelled = ref(false);
|
const showCancelled = ref(false);
|
||||||
|
@ -138,7 +140,11 @@ export default defineComponent({
|
||||||
name: 'author_id',
|
name: 'author_id',
|
||||||
label: 'Benutzer',
|
label: 'Benutzer',
|
||||||
field: 'author_id',
|
field: 'author_id',
|
||||||
format: (val: string) => store.state.user.users.filter(x => x.userid == val)[0].display_name
|
format: (val: string) => {
|
||||||
|
const user = store.state.user.users.filter(x => x.userid == val);
|
||||||
|
if (user.length > 0) return user[0].display_name;
|
||||||
|
else return val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue