Merge pull request 'hotfix cau #218919 accountPrivileges fix' (!694) from hotfix218919-accountPrivilegesFix into master
gitea/salix-front/pipeline/head This commit looks good
Details
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:
commit
1ba66bcba2
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
@ -12,16 +12,21 @@ const route = useRoute();
|
||||||
|
|
||||||
const rolesOptions = ref([]);
|
const rolesOptions = ref([]);
|
||||||
const formModelRef = ref();
|
const formModelRef = ref();
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
() => formModelRef.value.reset()
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="VnRoles" auto-load @on-fetch="(data) => (rolesOptions = data)" />
|
<FetchData url="VnRoles" auto-load @on-fetch="(data) => (rolesOptions = data)" />
|
||||||
<FormModel
|
<FormModel
|
||||||
ref="formModelRef"
|
ref="formModelRef"
|
||||||
model="AccountPrivileges"
|
model="AccountPrivileges"
|
||||||
:url="`VnUsers/${route.params.id}/privileges`"
|
url="VnUsers/preview"
|
||||||
:url-create="`VnUsers/${route.params.id}/privileges`"
|
:filter="{ where: { id: route.params.id } }"
|
||||||
|
:url-update="`VnUsers/${route.params.id}`"
|
||||||
|
:id="route.params.id"
|
||||||
auto-load
|
auto-load
|
||||||
@on-data-saved="formModelRef.fetch()"
|
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<div class="q-gutter-y-sm">
|
<div class="q-gutter-y-sm">
|
||||||
|
|
Loading…
Reference in New Issue