Merge pull request 'hotfix cau #218919 accountPrivileges fix' (!694) from hotfix218919-accountPrivilegesFix into master
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #694
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Carlos Satorres 2024-09-10 08:40:02 +00:00
commit 1ba66bcba2
1 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<script setup>
import { ref } from 'vue';
import { ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
@ -12,16 +12,21 @@ const route = useRoute();
const rolesOptions = ref([]);
const formModelRef = ref();
watch(
() => route.params.id,
() => formModelRef.value.reset()
);
</script>
<template>
<FetchData url="VnRoles" auto-load @on-fetch="(data) => (rolesOptions = data)" />
<FormModel
ref="formModelRef"
model="AccountPrivileges"
:url="`VnUsers/${route.params.id}/privileges`"
:url-create="`VnUsers/${route.params.id}/privileges`"
url="VnUsers/preview"
:filter="{ where: { id: route.params.id } }"
:url-update="`VnUsers/${route.params.id}`"
:id="route.params.id"
auto-load
@on-data-saved="formModelRef.fetch()"
>
<template #form="{ data }">
<div class="q-gutter-y-sm">