refactor: header isHeadOff

This commit is contained in:
Net 2024-09-02 10:56:29 +07:00
parent cfaf53a70b
commit ecc8009a99

View file

@ -346,8 +346,13 @@ async function openDialog(
modal.value = true;
if (isRoleInclude(['branch_manager'])) {
hqId.value = myBranch.value?.[0].headOfficeId || '';
brId.value = myBranch.value?.[0].id;
hqId.value =
myBranch.value?.[0].isHeadOffice === true
? myBranch.value?.[0].id
: myBranch.value?.[0].headOfficeId || '';
brId.value =
myBranch.value?.[0].isHeadOffice === true ? '' : myBranch.value?.[0].id;
}
} else if (action === 'INFO') {
if (!userData.value) return;