feat: branch admin
This commit is contained in:
parent
dcdaa17983
commit
5bfab54120
3 changed files with 101 additions and 0 deletions
|
|
@ -36,6 +36,8 @@ import SideMenu from 'components/SideMenu.vue';
|
|||
import ImageUploadDialog from 'components/ImageUploadDialog.vue';
|
||||
import FormBank from 'components/01_branch-management/FormBank.vue';
|
||||
import ToggleButton from 'src/components/button/ToggleButton.vue';
|
||||
import FormBranchAdmin from 'src/components/01_branch-management/FormBranchAdmin.vue';
|
||||
import { User } from 'src/stores/user/types';
|
||||
|
||||
const $q = useQuasar();
|
||||
const { t } = useI18n();
|
||||
|
|
@ -404,6 +406,7 @@ function drawerEdit() {
|
|||
};
|
||||
}
|
||||
|
||||
const currentBranchAdmin = ref<User | null>(null);
|
||||
async function triggerEdit(
|
||||
openFormType: string,
|
||||
id: string,
|
||||
|
|
@ -450,6 +453,15 @@ async function triggerEdit(
|
|||
}
|
||||
}
|
||||
formTypeBranch.value = typeBranch;
|
||||
|
||||
const branchAdmin = await branchStore.getAdmin(id);
|
||||
|
||||
if (!branchAdmin) {
|
||||
currentBranchAdmin.value = null;
|
||||
return;
|
||||
}
|
||||
|
||||
currentBranchAdmin.value = branchAdmin;
|
||||
}
|
||||
|
||||
function triggerDelete(id: string) {
|
||||
|
|
@ -1919,6 +1931,10 @@ watch(currentHq, () => {
|
|||
dense
|
||||
v-model:bank-book-list="formBankBook"
|
||||
/>
|
||||
<FormBranchAdmin
|
||||
id="info-branch-admin-view"
|
||||
:admin="currentBranchAdmin"
|
||||
/>
|
||||
<!-- <FormImage
|
||||
@upload="
|
||||
() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue