gotrip-fx-transaction-form 1.0.36 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +13653 -13434
  3. package/package.json +1 -1
  4. package/types/components/AddDepartment/AddDepartmentForm.d.ts +6 -0
  5. package/types/components/AddRole/AddRoleForm.d.ts +6 -0
  6. package/types/components/AddTenant/AddTenantForm.d.ts +6 -0
  7. package/types/components/AddTenant/TenantSelectionInput.d.ts +9 -0
  8. package/types/components/AddTenant/TenantTypeSelectionInput.d.ts +6 -0
  9. package/types/components/AddUser/AddMemberForm.d.ts +6 -0
  10. package/types/components/AddUser/AddUserForm.d.ts +6 -0
  11. package/types/components/Department/AddDepartmentMemberForm.d.ts +13 -0
  12. package/types/components/Department/DepartmentCard.d.ts +22 -0
  13. package/types/components/MemberList/SearchTextInput.d.ts +9 -0
  14. package/types/components/PermissionList/PermissionList.d.ts +8 -0
  15. package/types/components/TenantTypeBadge/TenantTypeBadge.d.ts +4 -0
  16. package/types/components/TransactionList/BankSelectionInput.d.ts +2 -2
  17. package/types/components/UpdateTenant/UpdateTenantForm.d.ts +7 -0
  18. package/types/components/UpdateUser/ResetPasswordForm.d.ts +7 -0
  19. package/types/components/UpdateUser/UpdateMemberForm.d.ts +7 -0
  20. package/types/components/UpdateUser/UpdateUserForm.d.ts +7 -0
  21. package/types/components/UserFilter/UserFilter.d.ts +18 -0
  22. package/types/components/ui/spinner-loading.d.ts +6 -0
  23. package/types/constants/api-urls.d.ts +30 -0
  24. package/types/constants/business-codes.d.ts +14 -1
  25. package/types/constants/index.d.ts +1 -0
  26. package/types/constants/tenant.d.ts +5 -0
  27. package/types/design-systems/Button/Button.d.ts +3 -2
  28. package/types/design-systems/Dialog/Dialog.d.ts +11 -0
  29. package/types/hooks/useDepartmentList.d.ts +9 -0
  30. package/types/hooks/useImportBookers.d.ts +18 -18
  31. package/types/hooks/useImportMembers.d.ts +113 -0
  32. package/types/hooks/useMemberList.d.ts +17 -0
  33. package/types/hooks/usePermissionList.d.ts +11 -0
  34. package/types/hooks/useRoleList.d.ts +14 -0
  35. package/types/hooks/useTenantList.d.ts +7 -0
  36. package/types/hooks/useTransactionList.d.ts +2 -2
  37. package/types/hooks/useUserList.d.ts +3 -0
  38. package/types/main.d.ts +0 -1
  39. package/types/pages/admin/add-tenant/AddTenant.d.ts +5 -0
  40. package/types/pages/admin/add-user/AddUser.d.ts +5 -0
  41. package/types/pages/admin/tenant-list/TenantList.d.ts +5 -0
  42. package/types/pages/partner/add-member/AddMember.d.ts +5 -0
  43. package/types/pages/partner/add-member/ImportMember.d.ts +1 -0
  44. package/types/pages/partner/department-detail/AddDepartmentMember.d.ts +8 -0
  45. package/types/pages/partner/department-detail/DepartmentDetail.d.ts +1 -0
  46. package/types/pages/partner/department-list/AddDepartment.d.ts +5 -0
  47. package/types/pages/partner/department-list/DepartmentList.d.ts +2 -0
  48. package/types/pages/partner/role-list/AddRole.d.ts +5 -0
  49. package/types/pages/partner/role-list/RoleList.d.ts +2 -0
  50. package/types/store/useAuthStore.d.ts +5 -0
  51. package/types/types/enum.d.ts +6 -0
  52. package/types/types/response.dto.d.ts +51 -8
  53. package/types/types/user.d.ts +36 -0
  54. package/types/util/formatter.d.ts +1 -0
  55. package/types/util/permission.util.d.ts +14 -0
  56. package/types/hooks/{transanactions → transactions}/useEducation.hook.d.ts +7 -7
  57. package/types/hooks/{transanactions → transactions}/useImmigration.hook.d.ts +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -0,0 +1,6 @@
1
+ type AddDepartmentFormProps = {
2
+ onSubmitSuccess: () => void;
3
+ onClose: () => void;
4
+ };
5
+ export declare const AddDepartmentForm: ({ onClose, onSubmitSuccess }: AddDepartmentFormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ type AddRoleFormProps = {
2
+ onSubmitSuccess: () => void;
3
+ onClose: () => void;
4
+ };
5
+ export declare const AddRoleForm: ({ onClose, onSubmitSuccess }: AddRoleFormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ type AddTenantFormProps = {
2
+ onSubmitSuccess: () => void;
3
+ onClose: () => void;
4
+ };
5
+ export declare const AddTenantForm: ({ onSubmitSuccess, onClose }: AddTenantFormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ITenant } from '../../types/response.dto';
2
+ type Props = {
3
+ tenants: ITenant[];
4
+ value?: string;
5
+ disabled?: boolean;
6
+ onSelectTenant: (v: string) => void;
7
+ };
8
+ export declare const TenantSelectionInput: ({ tenants, value, onSelectTenant, disabled, }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ value?: string;
3
+ onSelectTenantType: (v: string) => void;
4
+ };
5
+ export declare const TenantTypeSelectionInput: ({ value, onSelectTenantType }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ type AddMemberFormProps = {
2
+ onSubmitSuccess: () => void;
3
+ onClose: () => void;
4
+ };
5
+ export declare const AddMemberForm: ({ onClose, onSubmitSuccess }: AddMemberFormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ type AddUserFormProps = {
2
+ onSubmitSuccess: () => void;
3
+ onClose: () => void;
4
+ };
5
+ export declare const AddUserForm: ({ onClose, onSubmitSuccess }: AddUserFormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ type AddDepartmentFormProps = {
2
+ onSubmitSuccess: () => void;
3
+ onClose: () => void;
4
+ joinedMemberIds?: number[];
5
+ departmentId?: number | null;
6
+ onChange?: (value: Array<{
7
+ userId: number;
8
+ roleId: number;
9
+ }>) => void;
10
+ subForm?: boolean;
11
+ };
12
+ export declare const AddDepartmentMemberForm: ({ onClose, onSubmitSuccess, departmentId, joinedMemberIds, onChange, subForm, }: AddDepartmentFormProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { IRole } from '../../types/response.dto';
3
+ export interface Department {
4
+ id: string;
5
+ name: string;
6
+ address: string;
7
+ parentId?: number;
8
+ capacity: number;
9
+ users: DepartmentMember[];
10
+ }
11
+ export interface DepartmentMember {
12
+ id: number;
13
+ firstName: string;
14
+ lastName: string;
15
+ email: string;
16
+ roles?: IRole[];
17
+ }
18
+ interface Props {
19
+ department: Department;
20
+ }
21
+ declare const DepartmentCard: React.FC<Props>;
22
+ export default DepartmentCard;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface SearchTextInputProps {
3
+ value: string;
4
+ onChange: (newValue: string) => void;
5
+ placeholder?: string;
6
+ debounceTime?: number;
7
+ }
8
+ declare const SearchTextInput: React.FC<SearchTextInputProps>;
9
+ export default SearchTextInput;
@@ -0,0 +1,8 @@
1
+ import { ETenantType } from '../../types/enum';
2
+ interface PermissionListProps {
3
+ tenantType: ETenantType;
4
+ roleId: number;
5
+ roleName: string;
6
+ }
7
+ export declare const PermissionList: (props: PermissionListProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ETenantType } from '../../types/enum';
2
+ export declare const TenantTypeBadge: ({ type }: {
3
+ type: ETenantType;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { IBank } from '../../types/response.dto';
1
+ import { ITenant } from '../../types/response.dto';
2
2
  type Props = {
3
- banks: IBank[];
3
+ banks: ITenant[];
4
4
  onSelectBank: (v: string) => void;
5
5
  };
6
6
  export declare const BankSelectionInput: ({ banks, onSelectBank }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ type UpdateTenantFormProps = {
2
+ tenantId: number;
3
+ onSubmitSuccess: () => void;
4
+ onClose: () => void;
5
+ };
6
+ export declare const UpdateTenantForm: ({ tenantId, onSubmitSuccess, onClose }: UpdateTenantFormProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ type ResetPasswordFormProps = {
2
+ userId: number;
3
+ onSubmitSuccess: () => void;
4
+ onClose: () => void;
5
+ };
6
+ export declare const ResetPasswordForm: ({ userId, onSubmitSuccess, onClose }: ResetPasswordFormProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ type UpdateMemberFormProps = {
2
+ memberId: number;
3
+ onSubmitSuccess: () => void;
4
+ onClose: () => void;
5
+ };
6
+ export declare const UpdateMemberForm: ({ memberId, onSubmitSuccess, onClose }: UpdateMemberFormProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ type UpdateUserFormProps = {
2
+ userId: number;
3
+ onSubmitSuccess: () => void;
4
+ onClose: () => void;
5
+ };
6
+ export declare const UpdateUserForm: ({ userId, onSubmitSuccess, onClose }: UpdateUserFormProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,18 @@
1
+ interface UserFilterProps {
2
+ onFilterChange: (filters: {
3
+ status?: string;
4
+ tenantId?: string;
5
+ emailOrName?: string;
6
+ phone?: string;
7
+ }) => void;
8
+ tenants?: Array<{
9
+ id: number;
10
+ name: string;
11
+ }>;
12
+ statusOptions?: Array<{
13
+ value: string;
14
+ label: string;
15
+ }>;
16
+ }
17
+ export declare const UserFilter: ({ onFilterChange, tenants, statusOptions, }: UserFilterProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface LoadingProps {
3
+ loading: boolean;
4
+ }
5
+ declare const SpinnerLoading: React.FC<LoadingProps>;
6
+ export default SpinnerLoading;
@@ -22,6 +22,14 @@ export declare const ApiUrls: {
22
22
  updateCustomerInfo: string;
23
23
  updateTicketInfo: string;
24
24
  };
25
+ role: {
26
+ list: string;
27
+ create: string;
28
+ delete: string;
29
+ permissions: string;
30
+ rolePermissions: string;
31
+ updateRolePermissions: string;
32
+ };
25
33
  currency: {
26
34
  list: string;
27
35
  };
@@ -40,6 +48,12 @@ export declare const ApiUrls: {
40
48
  bid: {
41
49
  list: string;
42
50
  };
51
+ department: {
52
+ list: string;
53
+ details: string;
54
+ create: string;
55
+ addMembers: string;
56
+ };
43
57
  userHandlers: {
44
58
  userProfile: string;
45
59
  changePassword: string;
@@ -53,6 +67,15 @@ export declare const ApiUrls: {
53
67
  getCommissionRate: string;
54
68
  updateCommissionRate: string;
55
69
  getBookersOfSupervisor: string;
70
+ memberList: string;
71
+ createMember: string;
72
+ createManyMember: string;
73
+ getMember: string;
74
+ updateMember: string;
75
+ createUser: string;
76
+ getUser: string;
77
+ updateUser: string;
78
+ resetPassword: string;
56
79
  impersonateToken: string;
57
80
  };
58
81
  dashboardHandlers: {
@@ -62,4 +85,11 @@ export declare const ApiUrls: {
62
85
  getTransactionCountByStatus: string;
63
86
  getTransactionCountByDate: string;
64
87
  };
88
+ tenantHandlers: {
89
+ list: string;
90
+ create: string;
91
+ getTenant: string;
92
+ updateTenant: string;
93
+ removeTenant: string;
94
+ };
65
95
  };
@@ -14,5 +14,18 @@ export declare enum BusinessCodes {
14
14
  USER_NOT_ACTIVE = "B_011",
15
15
  TOKEN_INVALID_OR_EXPIRED = "B_013",
16
16
  TOKEN_VERIFY_CONFIRMED = "B_014",
17
- CUSTOMER_NO_BANK_ACCOUNT = "B_015"
17
+ CUSTOMER_NO_BANK_ACCOUNT = "B_015",
18
+ TENANT_NOT_FOUND = "B_100",
19
+ TENANT_ALREADY_EXISTS = "B_101",
20
+ TENANT_NOT_ACTIVE = "B_102",
21
+ COMPANY_NAME_REQUIRED = "B_103",
22
+ CUSTOMER_NOT_FOUND = "B_016",
23
+ TICKET_NOT_FOUND = "B_017",
24
+ ROLE_NOT_FOUND = "B_118",
25
+ ROLE_ALREADY_EXISTS = "B_119",
26
+ DEPARTMENT_NOT_FOUND = "B_020",
27
+ DEPARTMENT_ALREADY_EXISTS = "B_021",
28
+ DEPARTMENT_MEMBER_NOT_FOUND = "B_022",
29
+ DEPARTMENT_MEMBER_ALREADY_EXISTS = "B_023",
30
+ USER_ALREADY_IN_DEPARTMENT = "B_024"
18
31
  }
@@ -5,3 +5,4 @@ export declare const FILE_TYPES: {
5
5
  export declare const FILE_MAX_SIZE: number;
6
6
  export declare const FILE_MAX_FILES = 5;
7
7
  export declare const FILE_ACCEPT: string[];
8
+ export declare const PARTNER_ADMIN_ROLE_NAME = "partner_admin";
@@ -0,0 +1,5 @@
1
+ import { ETenantType } from '../types/enum';
2
+ export declare const tenantTypeOptions: {
3
+ label: string;
4
+ value: ETenantType;
5
+ }[];
@@ -2,13 +2,14 @@ interface Props {
2
2
  children: React.ReactNode;
3
3
  type?: 'button' | 'submit' | 'reset';
4
4
  className?: string;
5
- onClick?: () => void;
5
+ onClick?: (e?: any) => void;
6
6
  disabled?: boolean;
7
7
  loading?: boolean;
8
8
  size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
9
9
  title?: string;
10
10
  variant?: 'solid' | 'subtle' | 'surface' | 'outline' | 'ghost' | 'plain';
11
11
  colorPalette?: 'blue' | 'green' | 'red' | 'yellow' | 'purple' | 'gray';
12
+ borderRadius?: string | null;
12
13
  }
13
- export declare const GTButton: ({ children, type, className, onClick, disabled, loading, size, title, variant, colorPalette, }: Props) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const GTButton: ({ children, type, className, onClick, disabled, loading, size, title, variant, colorPalette, borderRadius, }: Props) => import("react/jsx-runtime").JSX.Element;
14
15
  export {};
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ interface GTDialogProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ children: React.ReactNode;
6
+ title?: React.ReactNode;
7
+ footer?: React.ReactNode;
8
+ size?: 'sm' | 'md' | 'lg' | 'xl';
9
+ }
10
+ declare const GTDialog: React.FC<GTDialogProps>;
11
+ export default GTDialog;
@@ -0,0 +1,9 @@
1
+ import { Department, DepartmentMember } from '../components/Department/DepartmentCard';
2
+ export declare const useDepartmentList: () => {
3
+ departments: Department[];
4
+ selectedDepartment: Department | null;
5
+ departmentMembers: DepartmentMember[];
6
+ loading: boolean;
7
+ fetchDepartments: () => Promise<void>;
8
+ fetchDeparmentDetails: (id: number) => Promise<void>;
9
+ };
@@ -5,10 +5,10 @@ declare const groupOfBookerSchema: yup.ObjectSchema<{
5
5
  uuid?: string | undefined;
6
6
  status: string;
7
7
  phone: string;
8
- lastName: string;
9
8
  email: string;
10
- password: string;
11
9
  firstName: string;
10
+ lastName: string;
11
+ password: string;
12
12
  }[] | undefined;
13
13
  }, yup.AnyObject, {
14
14
  bookers: "";
@@ -23,10 +23,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
23
23
  uuid?: string | undefined;
24
24
  status: string;
25
25
  phone: string;
26
- lastName: string;
27
26
  email: string;
28
- password: string;
29
27
  firstName: string;
28
+ lastName: string;
29
+ password: string;
30
30
  }[] | undefined;
31
31
  }>;
32
32
  handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
@@ -34,10 +34,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
34
34
  uuid?: string | undefined;
35
35
  status: string;
36
36
  phone: string;
37
- lastName: string;
38
37
  email: string;
39
- password: string;
40
38
  firstName: string;
39
+ lastName: string;
40
+ password: string;
41
41
  }[] | undefined;
42
42
  }, undefined>;
43
43
  errors: import('react-hook-form').FieldErrors<{
@@ -45,10 +45,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
45
45
  uuid?: string | undefined;
46
46
  status: string;
47
47
  phone: string;
48
- lastName: string;
49
48
  email: string;
50
- password: string;
51
49
  firstName: string;
50
+ lastName: string;
51
+ password: string;
52
52
  }[] | undefined;
53
53
  }>;
54
54
  getValues: import('react-hook-form').UseFormGetValues<{
@@ -56,10 +56,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
56
56
  uuid?: string | undefined;
57
57
  status: string;
58
58
  phone: string;
59
- lastName: string;
60
59
  email: string;
61
- password: string;
62
60
  firstName: string;
61
+ lastName: string;
62
+ password: string;
63
63
  }[] | undefined;
64
64
  }>;
65
65
  setValue: import('react-hook-form').UseFormSetValue<{
@@ -67,10 +67,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
67
67
  uuid?: string | undefined;
68
68
  status: string;
69
69
  phone: string;
70
- lastName: string;
71
70
  email: string;
72
- password: string;
73
71
  firstName: string;
72
+ lastName: string;
73
+ password: string;
74
74
  }[] | undefined;
75
75
  }>;
76
76
  watch: import('react-hook-form').UseFormWatch<{
@@ -78,10 +78,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
78
78
  uuid?: string | undefined;
79
79
  status: string;
80
80
  phone: string;
81
- lastName: string;
82
81
  email: string;
83
- password: string;
84
82
  firstName: string;
83
+ lastName: string;
84
+ password: string;
85
85
  }[] | undefined;
86
86
  }>;
87
87
  trigger: import('react-hook-form').UseFormTrigger<{
@@ -89,10 +89,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
89
89
  uuid?: string | undefined;
90
90
  status: string;
91
91
  phone: string;
92
- lastName: string;
93
92
  email: string;
94
- password: string;
95
93
  firstName: string;
94
+ lastName: string;
95
+ password: string;
96
96
  }[] | undefined;
97
97
  }>;
98
98
  reset: import('react-hook-form').UseFormReset<{
@@ -100,10 +100,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
100
100
  uuid?: string | undefined;
101
101
  status: string;
102
102
  phone: string;
103
- lastName: string;
104
103
  email: string;
105
- password: string;
106
104
  firstName: string;
105
+ lastName: string;
106
+ password: string;
107
107
  }[] | undefined;
108
108
  }>;
109
109
  onSubmit: (data: yup.InferType<typeof groupOfBookerSchema>) => Promise<void>;
@@ -0,0 +1,113 @@
1
+ import { ChangeEvent } from 'react';
2
+ import * as yup from 'yup';
3
+ declare const groupOfMemberSchema: yup.ObjectSchema<{
4
+ members: {
5
+ uuid?: string | undefined;
6
+ status: string;
7
+ phone: string;
8
+ email: string;
9
+ firstName: string;
10
+ lastName: string;
11
+ password: string;
12
+ }[] | undefined;
13
+ }, yup.AnyObject, {
14
+ members: "";
15
+ }, "">;
16
+ export declare const useImportMembers: (onFinish: () => void) => {
17
+ isLoading: boolean;
18
+ file: File | null;
19
+ inputFileRef: import('react').RefObject<HTMLInputElement>;
20
+ onSelectFile: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
21
+ register: import('react-hook-form').UseFormRegister<{
22
+ members?: {
23
+ uuid?: string | undefined;
24
+ status: string;
25
+ phone: string;
26
+ email: string;
27
+ firstName: string;
28
+ lastName: string;
29
+ password: string;
30
+ }[] | undefined;
31
+ }>;
32
+ handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
33
+ members?: {
34
+ uuid?: string | undefined;
35
+ status: string;
36
+ phone: string;
37
+ email: string;
38
+ firstName: string;
39
+ lastName: string;
40
+ password: string;
41
+ }[] | undefined;
42
+ }, undefined>;
43
+ errors: import('react-hook-form').FieldErrors<{
44
+ members?: {
45
+ uuid?: string | undefined;
46
+ status: string;
47
+ phone: string;
48
+ email: string;
49
+ firstName: string;
50
+ lastName: string;
51
+ password: string;
52
+ }[] | undefined;
53
+ }>;
54
+ getValues: import('react-hook-form').UseFormGetValues<{
55
+ members?: {
56
+ uuid?: string | undefined;
57
+ status: string;
58
+ phone: string;
59
+ email: string;
60
+ firstName: string;
61
+ lastName: string;
62
+ password: string;
63
+ }[] | undefined;
64
+ }>;
65
+ setValue: import('react-hook-form').UseFormSetValue<{
66
+ members?: {
67
+ uuid?: string | undefined;
68
+ status: string;
69
+ phone: string;
70
+ email: string;
71
+ firstName: string;
72
+ lastName: string;
73
+ password: string;
74
+ }[] | undefined;
75
+ }>;
76
+ watch: import('react-hook-form').UseFormWatch<{
77
+ members?: {
78
+ uuid?: string | undefined;
79
+ status: string;
80
+ phone: string;
81
+ email: string;
82
+ firstName: string;
83
+ lastName: string;
84
+ password: string;
85
+ }[] | undefined;
86
+ }>;
87
+ trigger: import('react-hook-form').UseFormTrigger<{
88
+ members?: {
89
+ uuid?: string | undefined;
90
+ status: string;
91
+ phone: string;
92
+ email: string;
93
+ firstName: string;
94
+ lastName: string;
95
+ password: string;
96
+ }[] | undefined;
97
+ }>;
98
+ reset: import('react-hook-form').UseFormReset<{
99
+ members?: {
100
+ uuid?: string | undefined;
101
+ status: string;
102
+ phone: string;
103
+ email: string;
104
+ firstName: string;
105
+ lastName: string;
106
+ password: string;
107
+ }[] | undefined;
108
+ }>;
109
+ onSubmit: (data: yup.InferType<typeof groupOfMemberSchema>) => Promise<void>;
110
+ addMember: () => void;
111
+ removeMember: (index: number) => void;
112
+ };
113
+ export {};
@@ -0,0 +1,17 @@
1
+ import { IUser } from '../types/response.dto';
2
+ export declare const useMemberList: ({ defaultPage, defaultLimit, }?: {
3
+ defaultPage?: number;
4
+ defaultLimit?: number;
5
+ }) => {
6
+ members: IUser[];
7
+ total: number;
8
+ loading: boolean;
9
+ page: number;
10
+ limit: number;
11
+ refetchData: () => void;
12
+ setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
13
+ setLimit: (limit: number) => void;
14
+ setFilter: import('react').Dispatch<import('react').SetStateAction<{
15
+ [key: string]: string;
16
+ }>>;
17
+ };
@@ -0,0 +1,11 @@
1
+ import { IPermission } from '../types/response.dto';
2
+ export declare const usePermissionList: () => {
3
+ selectedPermissions: IPermission[];
4
+ permissions: IPermission[];
5
+ isLoading: boolean;
6
+ refetchAllPermissions: () => void;
7
+ refetchRolePermissions: (roleId: number) => void;
8
+ addPermission: (permission: IPermission) => Promise<void>;
9
+ removePermission: (permissionId: number) => Promise<void>;
10
+ updateRolePermissions: (roleId: number) => Promise<void>;
11
+ };
@@ -0,0 +1,14 @@
1
+ import { IRole } from '../types/response.dto';
2
+ export declare const useRoleList: () => {
3
+ roles: IRole[];
4
+ selectedRole: IRole | null;
5
+ loading: boolean;
6
+ selectRole: (role: IRole) => void;
7
+ refetchRoles: () => void;
8
+ removeRole: (roleId: number) => Promise<void>;
9
+ roleCollections: import('@zag-js/collection').ListCollection<{
10
+ label: string;
11
+ value: string;
12
+ disabled: boolean;
13
+ }>;
14
+ };
@@ -0,0 +1,7 @@
1
+ import { ITenant } from '../types/response.dto';
2
+ export declare const useTenantList: () => {
3
+ tenants: ITenant[];
4
+ loading: boolean;
5
+ refetchData: () => void;
6
+ removeTenant: (tenantId: number) => Promise<void>;
7
+ };
@@ -1,4 +1,4 @@
1
- import { Currency, IBank, ITransaction } from '../types/response.dto';
1
+ import { Currency, ITenant, ITransaction } from '../types/response.dto';
2
2
  import { GetTransactionListReqDto } from '../types/request.dto';
3
3
  type Props = {
4
4
  defaultLimit?: number;
@@ -7,7 +7,7 @@ type Props = {
7
7
  export declare const useTransactionList: ({ defaultLimit, defaultFilter }: Props) => {
8
8
  transactions: ITransaction[];
9
9
  currencies: Currency[];
10
- banks: IBank[];
10
+ banks: ITenant[];
11
11
  total: number;
12
12
  loading: boolean;
13
13
  page: number;
@@ -9,5 +9,8 @@ export declare const useUserList: () => {
9
9
  approveUser: (user: IUser) => Promise<void>;
10
10
  setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
11
11
  setLimit: (limit: number) => void;
12
+ setFilter: import('react').Dispatch<import('react').SetStateAction<{
13
+ [key: string]: string;
14
+ }>>;
12
15
  impersonate: (user: IUser) => Promise<void>;
13
16
  };
package/types/main.d.ts CHANGED
@@ -1 +0,0 @@
1
- export {};
@@ -0,0 +1,5 @@
1
+ type AddTenantProps = {
2
+ onSubmitSuccess: () => void;
3
+ };
4
+ export declare const AddTenant: ({ onSubmitSuccess }: AddTenantProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ type AddUserProps = {
2
+ onSubmitSuccess: () => void;
3
+ };
4
+ export declare const AddUser: ({ onSubmitSuccess }: AddUserProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};