Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m56s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-18 14:07:18 +07:00
commit ff17e7ff1a

View file

@ -25,14 +25,14 @@ const { dialogConfirm, messageError, showLoader, hideLoader, success } =
const roleId = ref<string>(route.params.id.toString()); // id const roleId = ref<string>(route.params.id.toString()); // id
// //
const attrPrivilegeOp = ref<DataOption[]>([ const attrPrivilegeOp = ref<DataOption[]>([
{
id: "ROOT",
name: "มีสิทธิ์เข้าถึงข้อมูลในทุกระดับ", // root
},
{ {
id: "PARENT", id: "PARENT",
name: "มีสิทธิ์เข้าถึงข้อมูลในทุกระดับที่อยู่ภายใต้หน่วยงานของตัวเอง ยกเว้นระดับชั้นบนสุด", // root root name: "มีสิทธิ์เข้าถึงข้อมูลในทุกระดับที่อยู่ภายใต้หน่วยงานของตัวเอง ยกเว้นระดับชั้นบนสุด", // root root
}, },
{
id: "ROOT",
name: "มีสิทธิ์เข้าถึงข้อมูลในทุกระดับ", // root
},
{ {
id: "BROTHER", id: "BROTHER",
name: "มีสิทธิ์เข้าถึงข้อมูลตั้งแต่ระดับชั้นที่สูงกว่าตัวเอง 1 ระดับ", // "" child 1 name: "มีสิทธิ์เข้าถึงข้อมูลตั้งแต่ระดับชั้นที่สูงกว่าตัวเอง 1 ระดับ", // "" child 1
@ -104,7 +104,7 @@ async function fetchDataRole() {
if (item.children.length !== 0) { if (item.children.length !== 0) {
item.children.forEach((q: SystemList) => { item.children.forEach((q: SystemList) => {
const findChil = sysList.find( const findChil = sysList.find(
(e: DataSystem) => e.authSysId === q.id (e: DataSystem) => e.authSysId === q.id,
); );
chil.push({ chil.push({
...q, ...q,
@ -119,7 +119,7 @@ async function fetchDataRole() {
}); });
}); });
const findMainRoot = sysList.find( const findMainRoot = sysList.find(
(e: DataSystem) => e.parentNode === item.id (e: DataSystem) => e.parentNode === item.id,
); );
const arrayChil = chil.filter((a) => a.parentId === item.id); const arrayChil = chil.filter((a) => a.parentId === item.id);
@ -139,7 +139,7 @@ async function fetchDataRole() {
} }
} else { } else {
const findRoot = sysList.find( const findRoot = sysList.find(
(e: DataSystem) => e.authSysId === item.id (e: DataSystem) => e.authSysId === item.id,
); );
root.push({ root.push({
...item, ...item,
@ -172,7 +172,7 @@ function onSubmit() {
dialogConfirm($q, () => { dialogConfirm($q, () => {
showLoader(); showLoader();
const filterList: any = systemLists.value.filter( const filterList: any = systemLists.value.filter(
(e: any) => e.selected === true (e: any) => e.selected === true,
); );
const arrayRoleAttrs = filterList.flatMap((e: any) => { const arrayRoleAttrs = filterList.flatMap((e: any) => {
if (e.children.length === 0) { if (e.children.length === 0) {
@ -192,7 +192,7 @@ function onSubmit() {
(e: any) => (e: any) =>
e.selected === true && e.selected === true &&
e.attrOwnership !== "" && e.attrOwnership !== "" &&
e.attrPrivilege !== "" e.attrPrivilege !== "",
); );
return filterListChil.map((i: any) => ({ return filterListChil.map((i: any) => ({
parentNode: e.id, parentNode: e.id,