feat: refs #6919 sync account
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-11-18 16:10:04 +01:00
parent 02a1554b21
commit dcd681b656
4 changed files with 9 additions and 12 deletions

View File

@ -49,11 +49,10 @@ onBeforeMount(async () => {
onBeforeRouteUpdate(async (to, from) => {
if (to.params.id !== from.params.id) {
arrayData.store.url = !regex.test(props.url)
? `${props.url}/${to.params.id}`
: props.url.replace(regex, `/${to.params.id}`);
if (props.idInWhere) arrayData.store.filter.where = { id: to.params.id };
else arrayData.store.url = `${props.url}/${to.params.id}`;
await arrayData.fetch({ append: false, updateRouter: false });
await arrayData.fetch({ updateRouter: false });
}
});
</script>

View File

@ -8,13 +8,12 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import AccountFilter from './AccountFilter.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import exprBuilder from './AccountExprBuilder.js';
import filter from './Card/AccountFilter.js';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
const tableRef = ref();
const filter = {
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
};
const columns = computed(() => [
{
align: 'left',

View File

@ -17,6 +17,9 @@ import filter from './AccountFilter.js';
label: $t('account.search'),
info: $t('account.searchInfo'),
exprBuilder,
filter: {
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
},
}"
/>
</template>

View File

@ -7,6 +7,7 @@ import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import { useArrayData } from 'src/composables/useArrayData';
import filter from './AccountFilter.js';
const route = useRoute();
const { t } = useI18n();
@ -21,11 +22,6 @@ const { store } = useArrayData('Account');
const account = ref(store.data);
const entityId = computed(() => $props.id || route.params.id);
const filter = {
where: { id: entityId },
fields: ['id', 'nickname', 'name', 'role'],
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
};
</script>
<template>