gotrip-fx-transaction-form 1.0.227-dev → 1.0.229-dev

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.227-dev",
3
+ "version": "1.0.229-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -5,6 +5,7 @@ type Props = {
5
5
  agentIdentityFileInputRef: React.RefObject<HTMLInputElement>;
6
6
  isUploadingAgentIdentity: boolean;
7
7
  phoneNotice?: string | null;
8
+ agentNotes?: string[];
8
9
  };
9
- export declare const Agent: ({ errors, register, agentIdentityFileInputRef, isUploadingAgentIdentity, phoneNotice, }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Agent: ({ errors, register, agentIdentityFileInputRef, isUploadingAgentIdentity, phoneNotice, agentNotes, }: Props) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -18,6 +18,7 @@ type Props = {
18
18
  handleSelectTicketAsImage: (files: File[]) => void;
19
19
  isMobileDevices: boolean;
20
20
  hideGDSTicketSearch?: boolean;
21
+ onCountryCodeDesChange?: (code: string) => void;
21
22
  };
22
- export declare const FlightInformation: ({ imageSrc, handleCaptureImage, handleAgentIdentityDocumentUpload, agentIdentityFileInputRef, setIsWebcamOpen, showGetTicketInfo, errors, register, getValues, setValue, trigger, isLoading, getFlightInfo, isVN, fileInputRef, handleSelectTicketAsImage, isMobileDevices, hideGDSTicketSearch, }: Props) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const FlightInformation: ({ imageSrc, handleCaptureImage, handleAgentIdentityDocumentUpload, agentIdentityFileInputRef, setIsWebcamOpen, showGetTicketInfo, errors, register, getValues, setValue, trigger, isLoading, getFlightInfo, isVN, fileInputRef, handleSelectTicketAsImage, isMobileDevices, hideGDSTicketSearch, onCountryCodeDesChange, }: Props) => import("react/jsx-runtime").JSX.Element;
23
24
  export {};
@@ -43,5 +43,6 @@ export declare enum BusinessCodes {
43
43
  SIM_ORDER_CREATION_FAILED = "B_062",
44
44
  SIM_PACKAGE_NOT_FOUND = "B_065",
45
45
  SIM_TRANSACTION_GROUP_NOT_FOUND = "B_064",
46
- BALANCE_INSUFFICIENT = "B_040"
46
+ BALANCE_INSUFFICIENT = "B_040",
47
+ FX_AMOUNT_EXCEEDS_MAX_LIMIT = "B_070"
47
48
  }
@@ -24,7 +24,10 @@ declare const onePersonSchema: yup.ObjectSchema<{
24
24
  amount: undefined;
25
25
  bankDepartmentId: undefined;
26
26
  }, "">;
27
- export declare const useGroupCustomers: (onFinish: () => void) => {
27
+ type UseGroupCustomersOptions = {
28
+ onScrollToAmountError?: () => void;
29
+ };
30
+ export declare const useGroupCustomers: (onFinish: () => void, options?: UseGroupCustomersOptions) => {
28
31
  showAuthorizationLetter: boolean;
29
32
  setShowAuthorizationLetter: import('react').Dispatch<import('react').SetStateAction<boolean>>;
30
33
  onFindFlightInfo: (customer: yup.InferType<typeof onePersonSchema>) => Promise<void>;
@@ -55,11 +58,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
55
58
  idNo?: string | undefined;
56
59
  };
57
60
  agreeTerms: NonNullable<boolean | undefined>;
61
+ countryCodeDes: string;
58
62
  reservationNumber: string;
59
63
  airlineCode: string;
60
64
  airlineName: string;
61
65
  departureDate: string;
62
- countryCodeDes: string;
63
66
  countryNameDes: string;
64
67
  }>;
65
68
  setValue: import('react-hook-form').UseFormSetValue<{
@@ -82,11 +85,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
82
85
  idNo?: string | undefined;
83
86
  };
84
87
  agreeTerms: NonNullable<boolean | undefined>;
88
+ countryCodeDes: string;
85
89
  reservationNumber: string;
86
90
  airlineCode: string;
87
91
  airlineName: string;
88
92
  departureDate: string;
89
- countryCodeDes: string;
90
93
  countryNameDes: string;
91
94
  }>;
92
95
  watch: import('react-hook-form').UseFormWatch<{
@@ -109,11 +112,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
109
112
  idNo?: string | undefined;
110
113
  };
111
114
  agreeTerms: NonNullable<boolean | undefined>;
115
+ countryCodeDes: string;
112
116
  reservationNumber: string;
113
117
  airlineCode: string;
114
118
  airlineName: string;
115
119
  departureDate: string;
116
- countryCodeDes: string;
117
120
  countryNameDes: string;
118
121
  }>;
119
122
  trigger: import('react-hook-form').UseFormTrigger<{
@@ -136,11 +139,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
136
139
  idNo?: string | undefined;
137
140
  };
138
141
  agreeTerms: NonNullable<boolean | undefined>;
142
+ countryCodeDes: string;
139
143
  reservationNumber: string;
140
144
  airlineCode: string;
141
145
  airlineName: string;
142
146
  departureDate: string;
143
- countryCodeDes: string;
144
147
  countryNameDes: string;
145
148
  }>;
146
149
  reset: import('react-hook-form').UseFormReset<{
@@ -163,11 +166,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
163
166
  idNo?: string | undefined;
164
167
  };
165
168
  agreeTerms: NonNullable<boolean | undefined>;
169
+ countryCodeDes: string;
166
170
  reservationNumber: string;
167
171
  airlineCode: string;
168
172
  airlineName: string;
169
173
  departureDate: string;
170
- countryCodeDes: string;
171
174
  countryNameDes: string;
172
175
  }>;
173
176
  onSelectFile: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
@@ -233,11 +236,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
233
236
  idNo?: string | undefined;
234
237
  };
235
238
  agreeTerms: NonNullable<boolean | undefined>;
239
+ countryCodeDes: string;
236
240
  reservationNumber: string;
237
241
  airlineCode: string;
238
242
  airlineName: string;
239
243
  departureDate: string;
240
- countryCodeDes: string;
241
244
  countryNameDes: string;
242
245
  }, undefined>;
243
246
  errors: import('react-hook-form').FieldErrors<{
@@ -260,11 +263,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
260
263
  idNo?: string | undefined;
261
264
  };
262
265
  agreeTerms: NonNullable<boolean | undefined>;
266
+ countryCodeDes: string;
263
267
  reservationNumber: string;
264
268
  airlineCode: string;
265
269
  airlineName: string;
266
270
  departureDate: string;
267
- countryCodeDes: string;
268
271
  countryNameDes: string;
269
272
  }>;
270
273
  register: import('react-hook-form').UseFormRegister<{
@@ -287,11 +290,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
287
290
  idNo?: string | undefined;
288
291
  };
289
292
  agreeTerms: NonNullable<boolean | undefined>;
293
+ countryCodeDes: string;
290
294
  reservationNumber: string;
291
295
  airlineCode: string;
292
296
  airlineName: string;
293
297
  departureDate: string;
294
- countryCodeDes: string;
295
298
  countryNameDes: string;
296
299
  }>;
297
300
  removeCustomer: (index: number) => void;
@@ -33,15 +33,26 @@ export interface IBankFxTravellingMessages {
33
33
  selecting_bank_message?: string | null;
34
34
  singular_form_notes?: string[];
35
35
  currency_notes?: string[];
36
+ currency_notes_by_currency_unit?: Record<string, string[]>;
36
37
  }
37
38
  export interface IBankFxTravellingAgentSetting {
38
39
  enable?: boolean;
40
+ notes?: string[];
39
41
  }
40
42
  export type IBankFxMaxAmount = Record<string, number | null | undefined>;
43
+ /** Single number = same limit for all currencies; object = per-currency limits */
44
+ export type IBankFxMaxAmountByCountryLimit = IBankFxMaxAmount | number | null;
45
+ export interface IBankFxMaxAmountByCountry {
46
+ visa_countries?: string[];
47
+ visa_max_amount?: IBankFxMaxAmountByCountryLimit;
48
+ non_visa_max_amount?: IBankFxMaxAmountByCountryLimit;
49
+ [key: string]: unknown;
50
+ }
41
51
  export interface IBankFxTravellingSetting {
42
52
  minimum_date_before_take_off_date?: number | null;
43
53
  maximum_date_before_take_off_date?: number | null;
44
54
  max_amount?: IBankFxMaxAmount;
55
+ max_amount_by_country?: IBankFxMaxAmountByCountry;
45
56
  agent?: IBankFxTravellingAgentSetting;
46
57
  messages?: IBankFxTravellingMessages;
47
58
  [key: string]: unknown;
@@ -36,6 +36,8 @@ export interface InsuranceQuote {
36
36
  travelType: ETravelType;
37
37
  destination?: string;
38
38
  destinationId?: number;
39
+ provinceFromId?: number;
40
+ provinceToId?: number;
39
41
  basePremium: number;
40
42
  taxAmount: number;
41
43
  totalPremium: number;
@@ -0,0 +1,15 @@
1
+ import { IBankFxTravellingSetting } from '../types/app-settings';
2
+ /**
3
+ * Returns the effective max amount for the given currency and destination country.
4
+ * If max_amount_by_country is set: visa countries use visa_max_amount, else non_visa_max_amount.
5
+ * Falls back to max_amount when max_amount_by_country is not configured or has no value for the currency.
6
+ *
7
+ * CMS config (use alpha2 codes in visa_countries; form sends alpha2):
8
+ * "max_amount_by_country": {
9
+ * "visa_countries": ["US", "GB", "FR", "CN", "JP", "KR"],
10
+ * "visa_max_amount": 10000,
11
+ * "non_visa_max_amount": 2000
12
+ * }
13
+ * Or per-currency: "visa_max_amount": { "USD": 10000, "EUR": 8000 }
14
+ */
15
+ export declare function getEffectiveConfiguredMaxAmount(travellingConfig: IBankFxTravellingSetting | undefined, currencyKey: string, countryCodeDes: string | undefined): number | null | undefined;