fix: 02 view detail branch
This commit is contained in:
parent
dc4fa20d52
commit
9e1c4f6736
1 changed files with 2 additions and 3 deletions
|
|
@ -268,7 +268,7 @@ async function openDialog(
|
|||
}
|
||||
}
|
||||
}
|
||||
if (userStore.userOption.hqOpts.length !== 0) {
|
||||
if (userStore.userOption.hqOpts.length !== 0 && !id) {
|
||||
hqId.value = userStore.userOption.hqOpts[0].value;
|
||||
}
|
||||
if (userStore.userOption.hqOpts.length === 0) {
|
||||
|
|
@ -468,7 +468,6 @@ async function assignFormData(idEdit: string) {
|
|||
if (foundUser) {
|
||||
currentUser.value = foundUser;
|
||||
infoPersonId.value = currentUser.value.id;
|
||||
|
||||
formData.value = {
|
||||
branchId: foundUser.branch[0]?.id,
|
||||
provinceId: foundUser.provinceId,
|
||||
|
|
@ -515,7 +514,7 @@ async function assignFormData(idEdit: string) {
|
|||
: (statusToggle.value = false);
|
||||
userId.value = foundUser.id;
|
||||
|
||||
if (foundUser.branch[0]) {
|
||||
if (foundUser.branch) {
|
||||
if (foundUser.branch[0].isHeadOffice) {
|
||||
hqId.value = foundUser.branch[0].id as string;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue