กำหนดสิทธิ์ => บทบาทที่เลือกไปแล้วไม่แสดง
This commit is contained in:
parent
3628fe11f4
commit
c97bbc7a78
2 changed files with 17 additions and 6 deletions
|
|
@ -79,6 +79,12 @@ function fetchListRoles() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
const findRole = data.find(
|
||||||
|
(e: Roles) => e.id === props.dataPosMaster.authRoleId
|
||||||
|
);
|
||||||
|
if (findRole) {
|
||||||
|
selected.value.push(findRole);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -100,13 +106,14 @@ function onSubmit() {
|
||||||
authRoleId: arrayId[0],
|
authRoleId: arrayId[0],
|
||||||
posMasterId: props.dataPosMaster.id,
|
posMasterId: props.dataPosMaster.id,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
closeDialog();
|
await props.fetchDataTable(
|
||||||
props.fetchDataTable(
|
|
||||||
reqMaster.value.id,
|
reqMaster.value.id,
|
||||||
reqMaster.value.revisionId,
|
reqMaster.value.revisionId,
|
||||||
reqMaster.value.type
|
reqMaster.value.type
|
||||||
);
|
);
|
||||||
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
await closeDialog();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -321,9 +321,13 @@ function onDeleteRole(id: string) {
|
||||||
authRoleId: "",
|
authRoleId: "",
|
||||||
posMasterId: id,
|
posMasterId: id,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
fetchDataTable(reqMaster.id, reqMaster.revisionId, reqMaster.type);
|
await fetchDataTable(
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
reqMaster.id,
|
||||||
|
reqMaster.revisionId,
|
||||||
|
reqMaster.type
|
||||||
|
);
|
||||||
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue