gotrip-fx-transaction-form 1.0.88 → 1.0.90

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 (26) hide show
  1. package/index.js +2643 -2635
  2. package/package.json +1 -1
  3. package/types/components/AddDepartment/AddDepartmentForm.d.ts +3 -1
  4. package/types/components/AddTenant/AddTenantForm.d.ts +1 -1
  5. package/types/components/Dashboard/DailyTransactionChart.d.ts +2 -2
  6. package/types/components/Dashboard/TotalCommissionCard.d.ts +2 -2
  7. package/types/components/Dashboard/TotalTransactionCard.d.ts +2 -2
  8. package/types/components/Dashboard/TransactionByStatusChart.d.ts +2 -2
  9. package/types/components/Department/AddDepartmentMemberForm.d.ts +3 -1
  10. package/types/components/Department/DepartmentCard.d.ts +2 -1
  11. package/types/components/ImageReader/ButtonActions.d.ts +2 -1
  12. package/types/components/ImageReader/ImageReaderHistories.d.ts +1 -0
  13. package/types/components/Modal/AddDepartmentMemberModal.d.ts +2 -1
  14. package/types/components/Modal/AddDepartmentModal.d.ts +3 -0
  15. package/types/constants/api-urls.d.ts +3 -0
  16. package/types/hooks/useDepartmentList.d.ts +2 -0
  17. package/types/hooks/useTransactionList.d.ts +3 -1
  18. package/types/hooks/useUploadFile.d.ts +6 -0
  19. package/types/pages/admin/tenant-feature-settings/TenantFeatureSettings.d.ts +1 -0
  20. package/types/pages/admin/tenant-feature-settings/index.d.ts +1 -0
  21. package/types/pages/agency/department-detail/AddDepartmentMember.d.ts +3 -1
  22. package/types/pages/agency/department-list/AddDepartment.d.ts +3 -1
  23. package/types/pages/agency/tracsaction-list/TransactionList.d.ts +3 -3
  24. package/types/pages/partner/department-detail/AddDepartmentMember.d.ts +3 -1
  25. package/types/types/request.dto.d.ts +1 -1
  26. package/types/types/response.dto.d.ts +22 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -1,7 +1,9 @@
1
+ import { EDepartmentType } from '../../types/response.dto';
1
2
  type AddDepartmentFormProps = {
3
+ type?: EDepartmentType;
2
4
  parentId?: number | null;
3
5
  onSubmitSuccess: () => void;
4
6
  onClose: () => void;
5
7
  };
6
- export declare const AddDepartmentForm: ({ parentId, onClose, onSubmitSuccess, }: AddDepartmentFormProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const AddDepartmentForm: ({ type, parentId, onClose, onSubmitSuccess, }: AddDepartmentFormProps) => import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -1,5 +1,5 @@
1
1
  type AddTenantFormProps = {
2
- onSubmitSuccess: () => void;
2
+ onSubmitSuccess: (tenantId: string) => void;
3
3
  onClose: () => void;
4
4
  };
5
5
  export declare const AddTenantForm: ({ onSubmitSuccess, onClose }: AddTenantFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  type DailyTransactionChartProps = {
2
2
  title: string;
3
- fromDate: string;
4
- toDate: string;
3
+ fromDate: string | null;
4
+ toDate: string | null;
5
5
  bookerId?: number | null;
6
6
  };
7
7
  export declare const DailyTransactionChart: ({ fromDate, toDate, title, bookerId, }: DailyTransactionChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  interface TotalCommissionCardProps {
3
3
  label: string;
4
- startDate: string;
5
- endDate: string;
4
+ startDate: string | null;
5
+ endDate: string | null;
6
6
  bookerId?: number | null;
7
7
  }
8
8
  declare const TotalCommissionCard: React.FC<TotalCommissionCardProps>;
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  interface TotalTransactionCardProps {
3
3
  label: string;
4
- startDate: string;
5
- endDate: string;
4
+ startDate: string | null;
5
+ endDate: string | null;
6
6
  bookerId?: number | null;
7
7
  }
8
8
  declare const TotalTransactionCard: React.FC<TotalTransactionCardProps>;
@@ -1,7 +1,7 @@
1
1
  type TransactionByStatusChartProps = {
2
2
  title: string;
3
- fromDate: string;
4
- toDate: string;
3
+ fromDate: string | null;
4
+ toDate: string | null;
5
5
  bookerId?: number | null;
6
6
  };
7
7
  export declare const TransactionByStatusChart: ({ fromDate, toDate, title, bookerId, }: TransactionByStatusChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,15 @@
1
+ import { EDepartmentType } from '../../types/response.dto';
1
2
  type AddDepartmentFormProps = {
2
3
  onSubmitSuccess: () => void;
3
4
  onClose: () => void;
4
5
  joinedMemberIds?: number[];
5
6
  departmentId?: number | null;
7
+ departmentType: EDepartmentType;
6
8
  onChange?: (value: Array<{
7
9
  userId: number;
8
10
  roleId: number;
9
11
  }>) => void;
10
12
  subForm?: boolean;
11
13
  };
12
- export declare const AddDepartmentMemberForm: ({ onClose, onSubmitSuccess, departmentId, joinedMemberIds, onChange, subForm, }: AddDepartmentFormProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const AddDepartmentMemberForm: ({ onClose, onSubmitSuccess, departmentId, departmentType, joinedMemberIds, onChange, subForm, }: AddDepartmentFormProps) => import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -1,8 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { IRole } from '../../types/response.dto';
2
+ import { EDepartmentType, IRole } from '../../types/response.dto';
3
3
  export interface Department {
4
4
  id: number;
5
5
  name: string;
6
+ type: EDepartmentType;
6
7
  address: string;
7
8
  parentId?: number;
8
9
  publicId: string;
@@ -1,9 +1,10 @@
1
1
  type Props = {
2
2
  onSubmit: () => void;
3
3
  isLoading: boolean;
4
+ saveResult: () => void;
4
5
  exportToExcel: () => void;
5
6
  deleteSelectedImages: () => void;
6
7
  onDeleteAll: () => void;
7
8
  };
8
- export declare const ButtonActions: ({ onSubmit, isLoading, exportToExcel, deleteSelectedImages, onDeleteAll, }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ButtonActions: ({ onSubmit, isLoading, saveResult, exportToExcel, deleteSelectedImages, onDeleteAll, }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -0,0 +1 @@
1
+ export declare const ImageReaderHistories: () => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { EDepartmentType } from '../../types/response.dto';
2
3
  type AddDepartmentMemberModalProps = {
3
4
  joinedMemberIds?: number[];
4
5
  onSubmitSuccess: () => void;
@@ -9,7 +10,7 @@ type AddDepartmentMemberModalProps = {
9
10
  title: string;
10
11
  };
11
12
  export interface AddDepartmentMemberModalRef {
12
- open: (departmentId: number | null) => void;
13
+ open: (departmentId: number | null, departmentType: EDepartmentType) => void;
13
14
  close: () => void;
14
15
  isOpen: boolean;
15
16
  }
@@ -1,5 +1,7 @@
1
1
  import { default as React } from 'react';
2
+ import { EDepartmentType } from '../../types/response.dto';
2
3
  type AddDepartmentModalProps = {
4
+ type: EDepartmentType;
3
5
  onSubmitSuccess: () => void;
4
6
  children?: React.ReactElement<{
5
7
  onClick?: (e: React.MouseEvent) => void;
@@ -8,6 +10,7 @@ type AddDepartmentModalProps = {
8
10
  title: string;
9
11
  };
10
12
  export interface AddDepartmentModalRef {
13
+ type: EDepartmentType;
11
14
  open: (parentId: number | null) => void;
12
15
  close: () => void;
13
16
  isOpen: boolean;
@@ -38,6 +38,7 @@ export declare const ApiUrls: {
38
38
  };
39
39
  currency: {
40
40
  list: (bankCode?: string) => string;
41
+ codes: string;
41
42
  };
42
43
  bank: {
43
44
  list: string;
@@ -51,6 +52,8 @@ export declare const ApiUrls: {
51
52
  image: {
52
53
  extractFlightTicket: string;
53
54
  uploadIdentityDocuments: string;
55
+ saveReaderHistory: string;
56
+ getReaderHistories: string;
54
57
  };
55
58
  bid: {
56
59
  list: string;
@@ -1,10 +1,12 @@
1
1
  import { Department, DepartmentMember } from '../components/Department/DepartmentCard';
2
2
  export declare const useDepartmentList: () => {
3
3
  departments: Department[];
4
+ agentDepartments: Department[];
4
5
  selectedDepartment: Department | null;
5
6
  departmentMembers: DepartmentMember[];
6
7
  loading: boolean;
7
8
  fetchDepartments: () => Promise<void>;
9
+ fetchAgentDepartments: () => Promise<void>;
8
10
  fetchDeparmentDetails: (id: number) => Promise<void>;
9
11
  updateDepartment: (id: number, data: Partial<Department>) => Promise<void>;
10
12
  };
@@ -3,8 +3,10 @@ import { GetTransactionListReqDto } from '../types/request.dto';
3
3
  type Props = {
4
4
  defaultLimit?: number;
5
5
  defaultFilter?: GetTransactionListReqDto | null;
6
+ startDate?: string | null;
7
+ endDate?: string | null;
6
8
  };
7
- export declare const useTransactionList: ({ defaultLimit, defaultFilter }: Props) => {
9
+ export declare const useTransactionList: ({ defaultLimit, defaultFilter, startDate, endDate, }: Props) => {
8
10
  transactions: ITransaction[];
9
11
  currencies: string[];
10
12
  banks: ITenant[];
@@ -0,0 +1,6 @@
1
+ import { SignedUrl } from '../types/response.dto';
2
+ export declare const useUploadFile: () => {
3
+ isLoading: boolean;
4
+ getSignedUrl: (filePath: string, fileType: string) => Promise<SignedUrl>;
5
+ uploadFile: (file: File) => Promise<string>;
6
+ };
@@ -0,0 +1 @@
1
+ export declare const TenantFeatureSettings: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { TenantFeatureSettings } from './TenantFeatureSettings';
@@ -1,8 +1,10 @@
1
+ import { EDepartmentType } from '../../../types/response.dto';
1
2
  type AddDepartmentMemberProps = {
2
3
  parentId?: number | null;
3
4
  departmentId: number;
5
+ departmentType: EDepartmentType;
4
6
  joinedMemberIds?: number[];
5
7
  onSubmitSuccess: () => void;
6
8
  };
7
- export declare const AddDepartmentMember: ({ parentId, onSubmitSuccess, joinedMemberIds, departmentId, }: AddDepartmentMemberProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const AddDepartmentMember: ({ parentId, onSubmitSuccess, joinedMemberIds, departmentId, departmentType, }: AddDepartmentMemberProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -1,5 +1,7 @@
1
+ import { EDepartmentType } from '../../../types/response.dto';
1
2
  type AddDepartmentProps = {
3
+ type: EDepartmentType;
2
4
  onSubmitSuccess: () => void;
3
5
  };
4
- export declare const AddDepartment: ({ onSubmitSuccess }: AddDepartmentProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const AddDepartment: ({ type, onSubmitSuccess, }: AddDepartmentProps) => import("react/jsx-runtime").JSX.Element;
5
7
  export {};
@@ -2,8 +2,8 @@ type Props = {
2
2
  showLayout?: boolean;
3
3
  hideAddButton?: boolean;
4
4
  defaultLimit?: number;
5
- fromDate?: string;
6
- startDate?: string;
5
+ endDate?: string | null;
6
+ startDate?: string | null;
7
7
  };
8
- export declare const TransactionList: ({ showLayout, hideAddButton, defaultLimit, fromDate, startDate, }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const TransactionList: ({ showLayout, hideAddButton, defaultLimit, endDate, startDate, }: Props) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,8 +1,10 @@
1
+ import { EDepartmentType } from '../../../types/response.dto';
1
2
  type AddDepartmentMemberProps = {
2
3
  parentId?: number | null;
3
4
  departmentId: number;
5
+ departmentType: EDepartmentType;
4
6
  joinedMemberIds?: number[];
5
7
  onSubmitSuccess: () => void;
6
8
  };
7
- export declare const AddDepartmentMember: ({ parentId, onSubmitSuccess, joinedMemberIds, departmentId, }: AddDepartmentMemberProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const AddDepartmentMember: ({ parentId, onSubmitSuccess, joinedMemberIds, departmentId, departmentType, }: AddDepartmentMemberProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -15,8 +15,8 @@ export type GetTransactionListReqDto = {
15
15
  exchangeCurrencyCode?: string;
16
16
  currencyCode?: string;
17
17
  groupPublicId?: string;
18
- fromDate?: string;
19
18
  startDate?: string;
19
+ endDate?: string;
20
20
  };
21
21
  export type GetESimPackageListReqDto = {
22
22
  page?: number;
@@ -154,14 +154,25 @@ export interface IBankWorkingHours {
154
154
  saturday: {
155
155
  from: string;
156
156
  to: string;
157
+ enabled?: boolean;
157
158
  };
158
159
  sunday: {
159
160
  from: string;
160
161
  to: string;
162
+ enabled?: boolean;
161
163
  };
162
164
  }
163
165
  export interface ITravelAgencyTenantSettings {
164
- [key: string]: any;
166
+ availableServices: {
167
+ fx: boolean;
168
+ esimOutbound: boolean;
169
+ esimInbound: boolean;
170
+ };
171
+ fx: {
172
+ useCases: EUseCaseses[];
173
+ };
174
+ esimOutbound: Record<string, any>;
175
+ esimInbound: Record<string, any>;
165
176
  }
166
177
  export interface IBankTenantSettings {
167
178
  availableCurrencies: string[];
@@ -169,7 +180,7 @@ export interface IBankTenantSettings {
169
180
  availableAPI: {
170
181
  [key in EUseCaseses]: boolean;
171
182
  };
172
- workingTime: IBankWorkingHours;
183
+ workingTime?: IBankWorkingHours;
173
184
  }
174
185
  export type ITenant = {
175
186
  id: number;
@@ -227,6 +238,9 @@ export type Currency = {
227
238
  code: string;
228
239
  bankCurrencies: BankCurrency[];
229
240
  };
241
+ export type CurrencyCodeResponse = {
242
+ code: string;
243
+ }[];
230
244
  export type SignedUrl = {
231
245
  url: string;
232
246
  expiresAt: string;
@@ -238,6 +252,7 @@ export declare enum EBidStatus {
238
252
  }
239
253
  export type IDepartment = {
240
254
  id: number;
255
+ type: EDepartmentType;
241
256
  publicId: string;
242
257
  name: string;
243
258
  parentId?: number;
@@ -348,6 +363,7 @@ export type ESimPackage = {
348
363
  validityPeriod: number;
349
364
  countries: string[];
350
365
  price: number;
366
+ retailPrice?: number;
351
367
  };
352
368
  export declare enum EBalanceHistoryType {
353
369
  DEPOSIT = "DEPOSIT",// nạp tiền
@@ -364,4 +380,8 @@ export type ExchangeRateHistoryItem = {
364
380
  export type ExchangeRateHistoryResponse = {
365
381
  [key: string]: ExchangeRateHistoryItem[];
366
382
  };
383
+ export declare enum EDepartmentType {
384
+ DEPARTMENT = "department",
385
+ AGENT = "agent"
386
+ }
367
387
  export {};