fix: refs #8201 added onDataSaved emi to refetch when cahnges are made
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-12-13 14:20:17 +01:00
parent 1a0789b77f
commit 43c24e0383
2 changed files with 10 additions and 4 deletions

View File

@ -53,7 +53,6 @@ const hasAccount = ref(false);
<AccountDescriptorMenu :has-account="hasAccount" />
</template>
<template #before>
<!-- falla id :id="entityId.value" collection="user" size="160x160" -->
<VnImg :id="entityId" collection="user" resolution="520x520" class="photo">
<template #error>
<div
@ -75,8 +74,8 @@ const hasAccount = ref(false);
<VnLv :label="t('account.card.nickname')" :value="entity.name" />
<VnLv :label="t('account.card.role')" :value="entity.role.name" />
</template>
<template #actions="{ entity }">
<QCardActions class="q-gutter-x-md">
<template #icons="{ entity }">
<QCardActions v-if="accountData" class="q-gutter-x-md">
<QIcon
v-if="!entity.active"
color="primary"
@ -91,7 +90,7 @@ const hasAccount = ref(false);
<QIcon
color="primary"
name="contact_mail"
v-if="entity.hasAccount"
v-if="hasAccount"
flat
round
size="sm"

View File

@ -6,14 +6,20 @@ import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
import { useArrayData } from 'src/composables/useArrayData';
const route = useRoute();
const { t } = useI18n();
const arrayData = useArrayData();
const companySizes = [
{ id: 'small', name: t('globals.small'), size: '1-5' },
{ id: 'medium', name: t('globals.medium'), size: '6-50' },
{ id: 'big', name: t('globals.big'), size: '>50' },
];
const onSave = () => {
arrayData.fetch({});
};
</script>
<template>
<FormModel
@ -22,6 +28,7 @@ const companySizes = [
model="supplier"
auto-load
:clear-store-on-unmount="false"
@on-data-saved="onSave"
>
<template #form="{ data, validate }">
<VnRow>