feat: Personnel => Option (type, store)
This commit is contained in:
parent
38089a5312
commit
7d6ae75551
4 changed files with 169 additions and 45 deletions
|
|
@ -27,6 +27,7 @@ export type Branch = {
|
|||
taxNo: string;
|
||||
id: string;
|
||||
code: string;
|
||||
branch: Branch[];
|
||||
};
|
||||
|
||||
export type BranchWithChildren = Branch & { branch: Branch[] };
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ const useUserStore = defineStore('api-user', () => {
|
|||
pageSize?: number;
|
||||
zipCode?: string;
|
||||
query?: string;
|
||||
includeBranch?: boolean;
|
||||
},
|
||||
flow?: {
|
||||
sessionId: string;
|
||||
|
|
@ -139,6 +140,7 @@ const useUserStore = defineStore('api-user', () => {
|
|||
if (opts?.page && opts.page > 0) params.append('page', `${opts.page}`);
|
||||
if (opts?.zipCode) params.append('zipCode', opts.zipCode);
|
||||
if (opts?.query) params.append('query', opts.query);
|
||||
if (opts?.includeBranch) params.append('includeBranch', 'true');
|
||||
|
||||
const query = params.toString();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { District, Province, SubDistrict } from '../address';
|
||||
import { Branch } from '../branch/types';
|
||||
import { Status } from '../types';
|
||||
|
||||
export type User = {
|
||||
|
|
@ -39,6 +40,9 @@ export type User = {
|
|||
id: string;
|
||||
profileImageUrl: string;
|
||||
code: string;
|
||||
birthDate?: Date | null;
|
||||
responsibleArea: string,
|
||||
branch: Branch[]
|
||||
};
|
||||
|
||||
export type UserCreate = {
|
||||
|
|
@ -57,7 +61,7 @@ export type UserCreate = {
|
|||
licenseExpireDate?: Date | null;
|
||||
licenseIssueDate?: Date | null;
|
||||
licenseNo?: string | null;
|
||||
discountCondition?: string;
|
||||
discountCondition?: string | null;
|
||||
retireDate?: Date | null;
|
||||
startDate?: Date | null;
|
||||
registrationNo?: string | null;
|
||||
|
|
@ -92,3 +96,13 @@ export type UserTypeStats = {
|
|||
DELEGATE: number;
|
||||
AGENCY: number;
|
||||
}
|
||||
|
||||
export type UserOption = {
|
||||
hqOpts: Option[]
|
||||
brOpts: Option[]
|
||||
}
|
||||
|
||||
export type Option = {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue