fix permission edit registry
This commit is contained in:
parent
01e1da066f
commit
4812e671ff
2 changed files with 8 additions and 7 deletions
|
|
@ -47,6 +47,7 @@ async function fetchDataProfile() {
|
|||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
statusCheckEdit.value = data.statusCheckEdit;
|
||||
fetchPromission(data.rootId);
|
||||
dataProfile.value = {
|
||||
fullName: `${data.prefix}${data.firstName} ${data.lastName}`,
|
||||
position: data.position,
|
||||
|
|
@ -62,9 +63,9 @@ async function fetchDataProfile() {
|
|||
});
|
||||
}
|
||||
|
||||
function fetchPromission() {
|
||||
function fetchPromission(rootId: string) {
|
||||
http
|
||||
.get(config.API.profilePermission)
|
||||
.get(config.API.profilePermission(rootId))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
isConfirmEdit.value = data.isEdit;
|
||||
|
|
@ -133,7 +134,7 @@ function onConfirmDone() {
|
|||
onMounted(async () => {
|
||||
try {
|
||||
showLoader();
|
||||
await Promise.all([fetchDataProfile(), fetchPromission()]);
|
||||
await fetchDataProfile();
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue