feat: scope select user to active branch only

This commit is contained in:
Methapon2001 2024-12-10 15:54:01 +07:00
parent db12f4f75e
commit 682d6cdae8
2 changed files with 12 additions and 17 deletions

View file

@ -48,6 +48,7 @@ watch(responsibleUserLocal, (lhs, rhs) => {
:params="{ :params="{
userType: 'MESSENGER', userType: 'MESSENGER',
responsibleDistrictId: responsibleUserLocal ? districtId : undefined, responsibleDistrictId: responsibleUserLocal ? districtId : undefined,
activeBranchOnly: true,
}" }"
:readonly :readonly
:label="$t('general.select', { msg: $t('personnel.MESSENGER') })" :label="$t('general.select', { msg: $t('personnel.MESSENGER') })"

View file

@ -198,8 +198,7 @@ const useUserStore = defineStore('api-user', () => {
}); });
} }
async function fetchList( async function fetchList(opts?: {
opts?: {
page?: number; page?: number;
pageSize?: number; pageSize?: number;
zipCode?: string; zipCode?: string;
@ -208,13 +207,8 @@ const useUserStore = defineStore('api-user', () => {
userType?: string; userType?: string;
status?: Status; status?: Status;
responsibleDistrictId?: string; responsibleDistrictId?: string;
}, activeBranchOnly?: boolean;
flow?: { }) {
sessionId?: string;
refTransactionId?: string;
transactionId?: string;
},
) {
const res = await api.get<Pagination<User[]>>(`/user`, { params: opts }); const res = await api.get<Pagination<User[]>>(`/user`, { params: opts });
if (res && res.status === 200) { if (res && res.status === 200) {