@tap-payments/auth-jsconnect 1.0.88 → 1.0.90-test
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/README.md +161 -0
- package/build/api/account.js +1 -1
- package/build/api/auth.js +1 -1
- package/build/api/availabilityServices.d.ts +2 -0
- package/build/api/availabilityServices.js +1 -1
- package/build/api/axios.js +2 -3
- package/build/api/country.js +1 -1
- package/build/api/data.js +1 -1
- package/build/api/entity.js +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/index.d.ts +2 -2
- package/build/api/index.js +2 -2
- package/build/api/individual.js +1 -1
- package/build/api/ip.js +1 -1
- package/build/api/lead.js +1 -1
- package/build/api/operator.js +1 -1
- package/build/app/rootReducer.d.ts +7 -7
- package/build/app/rootReducer.js +7 -7
- package/build/app/settings.d.ts +3 -3
- package/build/app/settings.js +5 -5
- package/build/components/AnimationFlow/Dialog.js +2 -2
- package/build/components/Button/Button.d.ts +6 -1
- package/build/components/Button/Button.js +61 -23
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/Footer/Footer.js +3 -3
- package/build/components/Input/Input.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
- package/build/constants/api.d.ts +3 -1
- package/build/constants/api.js +6 -2
- package/build/constants/app.d.ts +2 -5
- package/build/constants/app.js +2 -5
- package/build/features/Landing/Landing.d.ts +1 -1
- package/build/features/Landing/Landing.js +8 -8
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +6 -6
- package/build/features/app/bank/bankStore.d.ts +2 -2
- package/build/features/app/bank/bankStore.js +38 -28
- package/build/features/app/business/businessStore.d.ts +4 -4
- package/build/features/app/business/businessStore.js +17 -17
- package/build/features/app/connect/connectStore.d.ts +2 -2
- package/build/features/app/connect/connectStore.js +18 -9
- package/build/features/app/individual/individualStore.d.ts +4 -3
- package/build/features/app/individual/individualStore.js +55 -46
- package/build/features/app/landing/landingStore.d.ts +2 -2
- package/build/features/app/landing/landingStore.js +1 -1
- package/build/features/app/password/passwordStore.d.ts +2 -2
- package/build/features/app/password/passwordStore.js +35 -25
- package/build/features/app/tax/taxStore.d.ts +2 -2
- package/build/features/app/tax/taxStore.js +27 -17
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +14 -10
- package/build/features/bank/screens/BankDetails/BankDetails.js +11 -7
- package/build/features/bank/screens/BankDetails/BankName.js +8 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
- package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
- package/build/features/bank/screens/BankDetails/validation.js +1 -1
- package/build/features/bank/screens/Success/Success.js +3 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/bank/screens/Verify/OTPInput.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +9 -9
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +14 -10
- package/build/features/business/screens/Activities/Activities.js +7 -7
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +7 -7
- package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
- package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +6 -6
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
- package/build/features/business/screens/Customers/CustomerLocations.js +8 -8
- package/build/features/business/screens/Customers/Customers.js +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -6
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -7
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
- package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +5 -5
- package/build/features/business/screens/IDBOD/ID.js +6 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
- package/build/features/business/screens/OTP/OTP.js +9 -9
- package/build/features/business/screens/OTP/OTPInput.js +4 -4
- package/build/features/business/screens/Success/Success.js +3 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/business/screens/Verify/OTPInput.js +2 -2
- package/build/features/business/screens/Verify/Verify.js +9 -9
- package/build/features/connect/Connect.d.ts +1 -1
- package/build/features/connect/Connect.js +10 -10
- package/build/features/connect/screens/Individual/Email.js +7 -7
- package/build/features/connect/screens/Individual/Individual.js +9 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
- package/build/features/connect/screens/Individual/Name.js +6 -6
- package/build/features/connect/screens/Individual/validation.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -8
- package/build/features/connect/screens/Merchant/BrandName.js +10 -10
- package/build/features/connect/screens/Merchant/Merchant.js +7 -7
- package/build/features/connect/screens/Merchant/SocialMedia.js +9 -9
- package/build/features/connect/screens/Merchant/TAC.js +7 -7
- package/build/features/connect/screens/Merchant/validation.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +9 -9
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/connect/screens/Mobile/Title.js +2 -2
- package/build/features/connect/screens/NID/DOB.js +5 -5
- package/build/features/connect/screens/NID/IDNumber.js +8 -8
- package/build/features/connect/screens/NID/NID.js +8 -8
- package/build/features/connect/screens/OTP/OTP.js +9 -9
- package/build/features/connect/screens/OTP/OTPInput.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.js +3 -3
- package/build/features/featuresScreens.d.ts +1 -1
- package/build/features/featuresScreens.js +31 -31
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +14 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +10 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
- package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
- package/build/features/individual/screens/Success/Success.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/individual/screens/Verify/OTPInput.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +9 -9
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +14 -10
- package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
- package/build/features/password/screens/CreatePassword/CreatePassword.js +11 -7
- package/build/features/password/screens/CreatePassword/Password.js +6 -6
- package/build/features/password/screens/Success/Success.js +3 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/password/screens/Verify/OTPInput.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +9 -9
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +5 -5
- package/build/features/shared/Background/Background.js +3 -3
- package/build/features/shared/Background/LogoBackground.js +3 -3
- package/build/features/shared/Button/AbsherButton.d.ts +1 -1
- package/build/features/shared/Button/AbsherButton.js +14 -36
- package/build/features/shared/Button/Button.d.ts +1 -1
- package/build/features/shared/Button/Button.js +7 -7
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +15 -51
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.js +45 -45
- package/build/features/shared/Button/MobileButton.d.ts +1 -1
- package/build/features/shared/Button/MobileButton.js +12 -33
- package/build/features/shared/Button/SuccessButton.js +17 -15
- package/build/features/shared/Footer/Footer.js +6 -6
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/OTP/OTP.d.ts +1 -1
- package/build/features/shared/OTP/OTP.js +3 -3
- package/build/features/shared/Search/Search.js +1 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +14 -10
- package/build/features/tax/screens/Success/Success.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -6
- package/build/features/tax/screens/TaxDetails/VATId.js +6 -6
- package/build/features/tax/screens/Verify/OTPInput.js +2 -2
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +13 -3
- package/build/hooks/useAppSelector.d.ts +1 -1
- package/build/hooks/useAppTheme.d.ts +1 -1
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useErrorListener.js +2 -2
- package/build/hooks/useLanguage.js +1 -1
- package/build/hooks/useRedirectionListener.js +1 -1
- package/build/i18n.js +1 -1
- package/build/index.d.ts +7 -7
- package/build/index.js +7 -7
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +10 -0
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +3 -3
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +5 -0
- package/build/utils/rsa.js +1 -1
- package/build/utils/string.d.ts +3 -2
- package/build/utils/string.js +18 -4
- package/package.json +127 -126
- package/build/components/DatePicker/customStyle.css +0 -86
- package/build/index.css +0 -135
|
@@ -47,10 +47,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
-
import API from '
|
|
51
|
-
import { removeRequestHeaders } from '
|
|
52
|
-
import { handleNextScreenStep } from '
|
|
53
|
-
import { defaultCountry, INDIVIDUAl_STEP_NAMES } from '
|
|
50
|
+
import API from '@api';
|
|
51
|
+
import { hasKey, removeRequestHeaders } from '@utils';
|
|
52
|
+
import { handleNextScreenStep } from '@app/settings';
|
|
53
|
+
import { defaultCountry, INDIVIDUAl_STEP_NAMES } from '@constants';
|
|
54
54
|
export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
55
|
var settings, countriesBody, businessCountry;
|
|
56
56
|
return __generator(this, function (_a) {
|
|
@@ -68,9 +68,10 @@ export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi
|
|
|
68
68
|
});
|
|
69
69
|
}); });
|
|
70
70
|
export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
71
|
-
var payload, data, leadResponse;
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
var payload, data, leadResponse, _a, steps, entity, hasTaxCompleted;
|
|
72
|
+
var _b, _c;
|
|
73
|
+
return __generator(this, function (_d) {
|
|
74
|
+
switch (_d.label) {
|
|
74
75
|
case 0:
|
|
75
76
|
payload = {
|
|
76
77
|
service_name: 'tap_email',
|
|
@@ -78,37 +79,45 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
|
|
|
78
79
|
};
|
|
79
80
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
80
81
|
case 1:
|
|
81
|
-
data = (
|
|
82
|
+
data = (_d.sent()).data;
|
|
82
83
|
leadResponse = undefined;
|
|
83
|
-
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3,
|
|
84
|
+
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 6];
|
|
84
85
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
85
86
|
case 2:
|
|
86
|
-
leadResponse =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
case 3:
|
|
87
|
+
leadResponse = _d.sent();
|
|
88
|
+
_a = leadResponse.data, steps = _a.steps, entity = _a.entity;
|
|
89
|
+
hasTaxCompleted = hasKey(steps, INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS);
|
|
90
|
+
if (!hasTaxCompleted) return [3, 4];
|
|
91
|
+
return [4, thunkApi.dispatch(retrieveEntityInfo(entity === null || entity === void 0 ? void 0 : entity.id))];
|
|
92
|
+
case 3:
|
|
93
|
+
_d.sent();
|
|
94
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
95
|
+
return [3, 6];
|
|
96
|
+
case 4:
|
|
97
|
+
if (!(data.step_name === INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO)) return [3, 6];
|
|
98
|
+
return [4, thunkApi.dispatch(retrieveDataList((_c = (_b = leadResponse.data) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.country))];
|
|
99
|
+
case 5:
|
|
100
|
+
_d.sent();
|
|
101
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
|
|
102
|
+
_d.label = 6;
|
|
103
|
+
case 6: return [2, { data: data, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data, token: token }];
|
|
92
104
|
}
|
|
93
105
|
});
|
|
94
106
|
}); });
|
|
95
|
-
export var retrieveDataList = createAsyncThunk('retrieveDataList', function (
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return [4, Promise.all([
|
|
104
|
-
API.dataService.getSourceOfIncome(),
|
|
105
|
-
API.dataService.getMonthlyIncome(code)
|
|
106
|
-
])];
|
|
107
|
+
export var retrieveDataList = createAsyncThunk('retrieveDataList', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
108
|
+
var _a, sourceIncome, monthlyIncome;
|
|
109
|
+
return __generator(this, function (_b) {
|
|
110
|
+
switch (_b.label) {
|
|
111
|
+
case 0: return [4, Promise.all([
|
|
112
|
+
API.dataService.getSourceOfIncome(),
|
|
113
|
+
API.dataService.getMonthlyIncome(countryCode)
|
|
114
|
+
])];
|
|
107
115
|
case 1:
|
|
108
|
-
_a =
|
|
116
|
+
_a = _b.sent(), sourceIncome = _a[0].data, monthlyIncome = _a[1].data;
|
|
109
117
|
return [2, {
|
|
110
118
|
sourceIncome: sourceIncome,
|
|
111
|
-
monthlyIncome: monthlyIncome
|
|
119
|
+
monthlyIncome: monthlyIncome,
|
|
120
|
+
countryCode: countryCode
|
|
112
121
|
}];
|
|
113
122
|
}
|
|
114
123
|
});
|
|
@@ -126,9 +135,9 @@ export var retrieveEntityInfo = createAsyncThunk('retrieveIndividualEntityInfo',
|
|
|
126
135
|
}); });
|
|
127
136
|
export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
128
137
|
var _a, individual, settings, responseBody, payload, data, steps, hasIndividualCompleted;
|
|
129
|
-
var _b, _c, _d, _e;
|
|
130
|
-
return __generator(this, function (
|
|
131
|
-
switch (
|
|
138
|
+
var _b, _c, _d, _e, _f;
|
|
139
|
+
return __generator(this, function (_g) {
|
|
140
|
+
switch (_g.label) {
|
|
132
141
|
case 0:
|
|
133
142
|
_a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
|
|
134
143
|
responseBody = individual.data.verify.responseBody;
|
|
@@ -141,22 +150,22 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
141
150
|
};
|
|
142
151
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
143
152
|
case 1:
|
|
144
|
-
data = (
|
|
153
|
+
data = (_g.sent()).data;
|
|
145
154
|
if (!!data.errors) return [3, 5];
|
|
146
155
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
|
|
147
156
|
steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
|
|
148
|
-
hasIndividualCompleted =
|
|
157
|
+
hasIndividualCompleted = hasKey(steps, INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS);
|
|
149
158
|
if (!hasIndividualCompleted) return [3, 3];
|
|
150
159
|
return [4, thunkApi.dispatch(retrieveEntityInfo((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.entity) === null || _e === void 0 ? void 0 : _e.id))];
|
|
151
160
|
case 2:
|
|
152
|
-
|
|
161
|
+
_g.sent();
|
|
153
162
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
154
163
|
return [3, 5];
|
|
155
|
-
case 3: return [4, thunkApi.dispatch(retrieveDataList())];
|
|
164
|
+
case 3: return [4, thunkApi.dispatch(retrieveDataList((_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.entity) === null || _f === void 0 ? void 0 : _f.country))];
|
|
156
165
|
case 4:
|
|
157
|
-
|
|
166
|
+
_g.sent();
|
|
158
167
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
|
|
159
|
-
|
|
168
|
+
_g.label = 5;
|
|
160
169
|
case 5: return [2, { data: data, formData: __assign({}, params) }];
|
|
161
170
|
}
|
|
162
171
|
});
|
|
@@ -176,7 +185,7 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
176
185
|
actual_income: (_f = params.monthlyIncome) === null || _f === void 0 ? void 0 : _f.id,
|
|
177
186
|
is_relative_PEP: params.isPEP,
|
|
178
187
|
is_influencer: params.isInfluencer,
|
|
179
|
-
encryption_contract: ['employer_name', 'employer_city', 'actual_income'],
|
|
188
|
+
encryption_contract: ['employer_name', 'employer_city', 'actual_income', 'source_income[0]'],
|
|
180
189
|
step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO
|
|
181
190
|
};
|
|
182
191
|
return [4, API.entityService.updateEntityInfo(requestBody)];
|
|
@@ -287,7 +296,7 @@ export var individualSlice = createSlice({
|
|
|
287
296
|
state.error = description;
|
|
288
297
|
return;
|
|
289
298
|
}
|
|
290
|
-
state.data.verify.responseBody = __assign(__assign({}, data), leadData);
|
|
299
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody);
|
|
291
300
|
state.data.verify.token = token;
|
|
292
301
|
})
|
|
293
302
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
@@ -320,10 +329,9 @@ export var individualSlice = createSlice({
|
|
|
320
329
|
state.error = null;
|
|
321
330
|
})
|
|
322
331
|
.addCase(retrieveDataList.fulfilled, function (state, action) {
|
|
323
|
-
var _a, _b;
|
|
324
332
|
state.loading = false;
|
|
325
333
|
state.error = null;
|
|
326
|
-
var
|
|
334
|
+
var _a = action.payload, sourceIncome = _a.sourceIncome, monthlyIncome = _a.monthlyIncome, countryCode = _a.countryCode;
|
|
327
335
|
var data = state.data.individualData.responseBody;
|
|
328
336
|
state.data.individualData.responseBody = __assign(__assign({}, data), { sourceIncomeList: sourceIncome || [], monthlyIncomeList: monthlyIncome || [] });
|
|
329
337
|
var selectedSourceIncome = sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome[0];
|
|
@@ -332,9 +340,9 @@ export var individualSlice = createSlice({
|
|
|
332
340
|
var selectedMonthlyIncome = monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome[2];
|
|
333
341
|
if (!!selectedMonthlyIncome)
|
|
334
342
|
state.data.individualData.monthlyIncome = selectedMonthlyIncome;
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
state.data.individualData.employerLocation =
|
|
343
|
+
if (!!countryCode) {
|
|
344
|
+
var employerLocation = state.data.countries.find(function (country) { return country.iso2 === countryCode; });
|
|
345
|
+
state.data.individualData.employerLocation = employerLocation;
|
|
338
346
|
}
|
|
339
347
|
})
|
|
340
348
|
.addCase(retrieveDataList.rejected, function (state, action) {
|
|
@@ -392,7 +400,8 @@ export var individualSlice = createSlice({
|
|
|
392
400
|
state.error = description;
|
|
393
401
|
return;
|
|
394
402
|
}
|
|
395
|
-
|
|
403
|
+
var flows = response.flows, steps = response.steps;
|
|
404
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps });
|
|
396
405
|
removeRequestHeaders();
|
|
397
406
|
})
|
|
398
407
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { ResponseData, SharedState } from '
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { ResponseData, SharedState } from '@types';
|
|
3
3
|
export declare const verifyAuthToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
token: string;
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
var _a;
|
|
38
38
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
39
|
-
import API from '
|
|
39
|
+
import API from '@api';
|
|
40
40
|
export var verifyAuthToken = createAsyncThunk('verifyAuthToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
41
|
var payload, data;
|
|
42
42
|
return __generator(this, function (_a) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { OTPFormValues, PasswordCreateFormValues, ResponseData, SharedState } from '
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { OTPFormValues, PasswordCreateFormValues, ResponseData, SharedState } from '@types';
|
|
3
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
leadData: any;
|
|
@@ -47,14 +47,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
-
import API from '
|
|
51
|
-
import { removeRequestHeaders } from '
|
|
52
|
-
import { handleNextScreenStep } from '
|
|
53
|
-
import { PASSWORD_STEP_NAMES } from '
|
|
50
|
+
import API from '@api';
|
|
51
|
+
import { hasKey, removeRequestHeaders } from '@utils';
|
|
52
|
+
import { handleNextScreenStep } from '@app/settings';
|
|
53
|
+
import { PASSWORD_STEP_NAMES } from '@constants';
|
|
54
54
|
export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
var payload, data, leadResponse;
|
|
56
|
-
return __generator(this, function (
|
|
57
|
-
switch (
|
|
55
|
+
var payload, data, leadResponse, _a, steps, entity, hasCompleted;
|
|
56
|
+
return __generator(this, function (_b) {
|
|
57
|
+
switch (_b.label) {
|
|
58
58
|
case 0:
|
|
59
59
|
payload = {
|
|
60
60
|
service_name: 'tap_email',
|
|
@@ -62,17 +62,26 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
|
|
|
62
62
|
};
|
|
63
63
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
64
64
|
case 1:
|
|
65
|
-
data = (
|
|
65
|
+
data = (_b.sent()).data;
|
|
66
66
|
leadResponse = undefined;
|
|
67
|
-
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3,
|
|
67
|
+
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 5];
|
|
68
68
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
69
69
|
case 2:
|
|
70
|
-
leadResponse =
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
leadResponse = _b.sent();
|
|
71
|
+
_a = leadResponse.data, steps = _a.steps, entity = _a.entity;
|
|
72
|
+
hasCompleted = hasKey(steps, PASSWORD_STEP_NAMES.PASSWORD_SUCCESS);
|
|
73
|
+
if (!hasCompleted) return [3, 4];
|
|
74
|
+
return [4, thunkApi.dispatch(retrieveEntityInfo(entity === null || entity === void 0 ? void 0 : entity.id))];
|
|
75
|
+
case 3:
|
|
76
|
+
_b.sent();
|
|
77
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
78
|
+
return [3, 5];
|
|
79
|
+
case 4:
|
|
80
|
+
if (data.step_name === PASSWORD_STEP_NAMES.PASSWORD_INFO) {
|
|
81
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
|
|
73
82
|
}
|
|
74
|
-
|
|
75
|
-
case
|
|
83
|
+
_b.label = 5;
|
|
84
|
+
case 5: return [2, { data: data, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data, token: token }];
|
|
76
85
|
}
|
|
77
86
|
});
|
|
78
87
|
}); });
|
|
@@ -88,7 +97,7 @@ export var retrieveEntityInfo = createAsyncThunk('retrievePasswordEntityInfo', f
|
|
|
88
97
|
});
|
|
89
98
|
}); });
|
|
90
99
|
export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
91
|
-
var _a, password, settings, responseBody, payload, data, steps,
|
|
100
|
+
var _a, password, settings, responseBody, payload, data, steps, hasCompleted;
|
|
92
101
|
var _b, _c, _d, _e;
|
|
93
102
|
return __generator(this, function (_f) {
|
|
94
103
|
switch (_f.label) {
|
|
@@ -108,8 +117,8 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
|
|
|
108
117
|
if (!!data.errors) return [3, 4];
|
|
109
118
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
|
|
110
119
|
steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
|
|
111
|
-
|
|
112
|
-
if (!
|
|
120
|
+
hasCompleted = hasKey(steps, PASSWORD_STEP_NAMES.PASSWORD_SUCCESS);
|
|
121
|
+
if (!hasCompleted) return [3, 3];
|
|
113
122
|
return [4, thunkApi.dispatch(retrieveEntityInfo((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.entity) === null || _e === void 0 ? void 0 : _e.id))];
|
|
114
123
|
case 2:
|
|
115
124
|
_f.sent();
|
|
@@ -124,23 +133,23 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
|
|
|
124
133
|
}); });
|
|
125
134
|
export var createPassword = createAsyncThunk('createPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
126
135
|
var _a, settings, password, requestBody, data;
|
|
127
|
-
var _b, _c, _d;
|
|
128
|
-
return __generator(this, function (
|
|
129
|
-
switch (
|
|
136
|
+
var _b, _c, _d, _e;
|
|
137
|
+
return __generator(this, function (_f) {
|
|
138
|
+
switch (_f.label) {
|
|
130
139
|
case 0:
|
|
131
140
|
_a = thunkApi.getState(), settings = _a.settings, password = _a.password;
|
|
132
141
|
requestBody = {
|
|
133
142
|
step_name: PASSWORD_STEP_NAMES.PASSWORD_CREATE,
|
|
134
|
-
signup_token: (_b = password.data.
|
|
143
|
+
signup_token: ((_b = password.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.signup_token) || ((_c = password.data.otpData.responseBody) === null || _c === void 0 ? void 0 : _c.signup_token),
|
|
135
144
|
password: params.password,
|
|
136
145
|
encryption_contract: ['password']
|
|
137
146
|
};
|
|
138
147
|
return [4, API.authService.createPassword(requestBody)];
|
|
139
148
|
case 1:
|
|
140
|
-
data = (
|
|
149
|
+
data = (_f.sent()).data;
|
|
141
150
|
if (!data.errors) {
|
|
142
151
|
thunkApi.dispatch(handleNextScreenStep());
|
|
143
|
-
(
|
|
152
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, requestBody);
|
|
144
153
|
}
|
|
145
154
|
return [2, { data: data, formData: params }];
|
|
146
155
|
}
|
|
@@ -216,7 +225,7 @@ export var passwordSlice = createSlice({
|
|
|
216
225
|
state.error = description;
|
|
217
226
|
return;
|
|
218
227
|
}
|
|
219
|
-
state.data.verify.responseBody = __assign(__assign({}, data), leadData);
|
|
228
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody);
|
|
220
229
|
state.data.verify.token = token;
|
|
221
230
|
})
|
|
222
231
|
.addCase(verifyLeadToken.pending, function (state, action) {
|
|
@@ -299,7 +308,8 @@ export var passwordSlice = createSlice({
|
|
|
299
308
|
state.error = description;
|
|
300
309
|
return;
|
|
301
310
|
}
|
|
302
|
-
|
|
311
|
+
var flows = response.flows, steps = response.steps;
|
|
312
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps });
|
|
303
313
|
removeRequestHeaders();
|
|
304
314
|
})
|
|
305
315
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { OTPFormValues, ResponseData, SharedState, TaxFormValues } from '
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { OTPFormValues, ResponseData, SharedState, TaxFormValues } from '@types';
|
|
3
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
leadData: any;
|
|
@@ -47,14 +47,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
-
import API from '
|
|
51
|
-
import { removeRequestHeaders } from '
|
|
52
|
-
import { handleNextScreenStep } from '
|
|
53
|
-
import { TAX_STEP_NAMES } from '
|
|
50
|
+
import API from '@api';
|
|
51
|
+
import { hasKey, removeRequestHeaders } from '@utils';
|
|
52
|
+
import { handleNextScreenStep } from '@app/settings';
|
|
53
|
+
import { TAX_STEP_NAMES } from '@constants';
|
|
54
54
|
export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
var payload, data, leadResponse;
|
|
56
|
-
return __generator(this, function (
|
|
57
|
-
switch (
|
|
55
|
+
var payload, data, leadResponse, _a, steps, entity, hasTaxCompleted;
|
|
56
|
+
return __generator(this, function (_b) {
|
|
57
|
+
switch (_b.label) {
|
|
58
58
|
case 0:
|
|
59
59
|
payload = {
|
|
60
60
|
service_name: 'tap_email',
|
|
@@ -62,17 +62,26 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
|
|
|
62
62
|
};
|
|
63
63
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
64
64
|
case 1:
|
|
65
|
-
data = (
|
|
65
|
+
data = (_b.sent()).data;
|
|
66
66
|
leadResponse = undefined;
|
|
67
|
-
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3,
|
|
67
|
+
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 5];
|
|
68
68
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
69
69
|
case 2:
|
|
70
|
-
leadResponse =
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
leadResponse = _b.sent();
|
|
71
|
+
_a = leadResponse.data, steps = _a.steps, entity = _a.entity;
|
|
72
|
+
hasTaxCompleted = hasKey(steps, TAX_STEP_NAMES.TAX_SUCCESS);
|
|
73
|
+
if (!hasTaxCompleted) return [3, 4];
|
|
74
|
+
return [4, thunkApi.dispatch(retrieveEntityInfo(entity === null || entity === void 0 ? void 0 : entity.id))];
|
|
75
|
+
case 3:
|
|
76
|
+
_b.sent();
|
|
77
|
+
thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
78
|
+
return [3, 5];
|
|
79
|
+
case 4:
|
|
80
|
+
if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
|
|
81
|
+
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
73
82
|
}
|
|
74
|
-
|
|
75
|
-
case
|
|
83
|
+
_b.label = 5;
|
|
84
|
+
case 5: return [2, { data: data, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data, token: token }];
|
|
76
85
|
}
|
|
77
86
|
});
|
|
78
87
|
}); });
|
|
@@ -108,7 +117,7 @@ export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (par
|
|
|
108
117
|
if (!!data.errors) return [3, 4];
|
|
109
118
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
|
|
110
119
|
steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
|
|
111
|
-
hasTaxCompleted =
|
|
120
|
+
hasTaxCompleted = hasKey(steps, TAX_STEP_NAMES.TAX_SUCCESS);
|
|
112
121
|
if (!hasTaxCompleted) return [3, 3];
|
|
113
122
|
return [4, thunkApi.dispatch(retrieveEntityInfo((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.entity) === null || _e === void 0 ? void 0 : _e.id))];
|
|
114
123
|
case 2:
|
|
@@ -214,7 +223,7 @@ export var taxSlice = createSlice({
|
|
|
214
223
|
state.error = description;
|
|
215
224
|
return;
|
|
216
225
|
}
|
|
217
|
-
state.data.verify.responseBody = __assign(__assign({}, data), leadData);
|
|
226
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody);
|
|
218
227
|
state.data.verify.token = token;
|
|
219
228
|
})
|
|
220
229
|
.addCase(verifyLeadToken.pending, function (state, action) {
|
|
@@ -297,7 +306,8 @@ export var taxSlice = createSlice({
|
|
|
297
306
|
state.error = description;
|
|
298
307
|
return;
|
|
299
308
|
}
|
|
300
|
-
|
|
309
|
+
var flows = response.flows, steps = response.steps;
|
|
310
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps });
|
|
301
311
|
removeRequestHeaders();
|
|
302
312
|
})
|
|
303
313
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
@@ -11,18 +11,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
|
-
import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig } from '
|
|
15
|
-
import { settingsSelector } from '
|
|
16
|
-
import AnimationFlow from '
|
|
17
|
-
import { store } from '
|
|
18
|
-
import { ReduxProvider, ThemeProvider } from '
|
|
19
|
-
import Collapse from '
|
|
20
|
-
import { getParameterByName, reactElement } from '
|
|
21
|
-
import { FeatureContainer } from '
|
|
22
|
-
import { BANK_SCREENS_NAVIGATION } from '
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig } from '@hooks';
|
|
15
|
+
import { handleLanguage, settingsSelector } from '@app/settings';
|
|
16
|
+
import AnimationFlow from '@components/AnimationFlow';
|
|
17
|
+
import { store } from '@app/store';
|
|
18
|
+
import { ReduxProvider, ThemeProvider } from '@components/Providers';
|
|
19
|
+
import Collapse from '@components/Collapse';
|
|
20
|
+
import { getParameterByName, reactElement } from '@utils';
|
|
21
|
+
import { FeatureContainer } from '@features/shared/Containers';
|
|
22
|
+
import { BANK_SCREENS_NAVIGATION } from '@constants';
|
|
23
23
|
import { bankFeatureScreens } from '../featuresScreens';
|
|
24
24
|
import CustomFooter from '../shared/Footer';
|
|
25
|
-
import { bankSelector, verifyLeadToken } from '
|
|
25
|
+
import { bankSelector, verifyLeadToken } from '@features/app/bank/bankStore';
|
|
26
26
|
import Background from '../shared/Background';
|
|
27
27
|
var Bank = memo(function (props) {
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
@@ -34,8 +34,12 @@ var Bank = memo(function (props) {
|
|
|
34
34
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
35
35
|
var verifyToken = function () {
|
|
36
36
|
var token = getParameterByName('token');
|
|
37
|
+
var lang = getParameterByName('lang');
|
|
37
38
|
if (!token)
|
|
38
39
|
throw new Error('Auth token is not found!');
|
|
40
|
+
if (!lang)
|
|
41
|
+
throw new Error('Language is not found!');
|
|
42
|
+
dispatch(handleLanguage(lang));
|
|
39
43
|
dispatch(verifyLeadToken(token));
|
|
40
44
|
};
|
|
41
45
|
useEffect(function () {
|
|
@@ -11,20 +11,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { ScreenContainer } from '
|
|
14
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
15
15
|
import Beneficiary from './Beneficiary';
|
|
16
16
|
import IBAN from './IBAN';
|
|
17
17
|
import BankName from './BankName';
|
|
18
|
-
import Button from '
|
|
19
|
-
import { useAppDispatch, useAppSelector } from '
|
|
18
|
+
import Button from '@features/shared/Button';
|
|
19
|
+
import { useAppDispatch, useAppSelector } from '@hooks';
|
|
20
20
|
import { BankValidation } from './validation';
|
|
21
21
|
import { useTranslation } from 'react-i18next';
|
|
22
22
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
23
23
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
24
|
-
import { useLanguage } from '
|
|
24
|
+
import { useLanguage } from '@hooks';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
|
-
import { bankSelector, createBankAccount } from '
|
|
27
|
-
import Form from '
|
|
26
|
+
import { bankSelector, createBankAccount } from '@features/app/bank/bankStore';
|
|
27
|
+
import Form from '@components/Form';
|
|
28
|
+
import { handleCurrentActiveScreen } from '@app/settings';
|
|
28
29
|
var FormStyled = styled(Form)(function () { return ({
|
|
29
30
|
display: 'flex',
|
|
30
31
|
flexDirection: 'column',
|
|
@@ -50,7 +51,10 @@ var BankDetails = function () {
|
|
|
50
51
|
};
|
|
51
52
|
var t = useTranslation().t;
|
|
52
53
|
var isAr = useLanguage().isAr;
|
|
54
|
+
var onBack = function () {
|
|
55
|
+
dispatch(handleCurrentActiveScreen(''));
|
|
56
|
+
};
|
|
53
57
|
var disabled = ibanChecking || !methods.formState.isValid;
|
|
54
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(ButtonStyled, __assign({
|
|
58
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
55
59
|
};
|
|
56
60
|
export default BankDetails;
|
|
@@ -11,17 +11,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { ScreenContainer } from '
|
|
15
|
-
import Input from '
|
|
14
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
15
|
+
import Input from '@features/shared/Input';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
17
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
18
|
import { styled } from '@mui/material/styles';
|
|
19
|
-
import ClearIcon from '
|
|
20
|
-
import CheckIcon from '
|
|
21
|
-
import { bankSelector } from '
|
|
22
|
-
import { useAppSelector } from '
|
|
23
|
-
import { removeAllOtherThanAlphabetAndSpace } from '
|
|
24
|
-
import Collapse from '
|
|
19
|
+
import ClearIcon from '@features/shared/ClearIcon';
|
|
20
|
+
import CheckIcon from '@features/shared/CheckIcon';
|
|
21
|
+
import { bankSelector } from '@features/app/bank/bankStore';
|
|
22
|
+
import { useAppSelector } from '@hooks';
|
|
23
|
+
import { removeAllOtherThanAlphabetAndSpace } from '@utils';
|
|
24
|
+
import Collapse from '@src/components/Collapse';
|
|
25
25
|
var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
26
26
|
var theme = _a.theme;
|
|
27
27
|
return ({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import Input from '
|
|
3
|
+
import Input from '@features/shared/Input';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { useController, useFormContext } from 'react-hook-form';
|
|
6
6
|
import { styled } from '@mui/material';
|
|
7
|
-
import { removeOnlyNumbers } from '
|
|
8
|
-
import { ScreenContainer } from '
|
|
9
|
-
import { bankSelector } from '
|
|
10
|
-
import { useAppSelector, useLanguage } from '
|
|
11
|
-
import ClearIcon from '
|
|
12
|
-
import CheckIcon from '
|
|
7
|
+
import { removeOnlyNumbers } from '@utils';
|
|
8
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
9
|
+
import { bankSelector } from '@features/app/bank/bankStore';
|
|
10
|
+
import { useAppSelector, useLanguage } from '@hooks';
|
|
11
|
+
import ClearIcon from '@features/shared/ClearIcon';
|
|
12
|
+
import CheckIcon from '@features/shared/CheckIcon';
|
|
13
13
|
var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
14
14
|
var theme = _a.theme;
|
|
15
15
|
return ({
|
|
@@ -36,19 +36,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
38
|
import * as React from 'react';
|
|
39
|
-
import Input from '
|
|
39
|
+
import Input from '@features/shared/Input';
|
|
40
40
|
import { useTranslation } from 'react-i18next';
|
|
41
41
|
import { useController, useFormContext } from 'react-hook-form';
|
|
42
|
-
import { removeAllOtherThanCharsAndNumber } from '
|
|
42
|
+
import { removeAllOtherThanCharsAndNumber } from '@utils';
|
|
43
43
|
import { styled } from '@mui/material';
|
|
44
|
-
import { MAX_IBAN_VALUE } from '
|
|
45
|
-
import { ScreenContainer } from '
|
|
44
|
+
import { MAX_IBAN_VALUE } from '@constants';
|
|
45
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
46
46
|
import { debounce } from 'lodash-es';
|
|
47
|
-
import { checkIbanBank } from '
|
|
48
|
-
import { useAppDispatch } from '
|
|
47
|
+
import { checkIbanBank } from '@features/app/bank/bankStore';
|
|
48
|
+
import { useAppDispatch } from '@hooks';
|
|
49
49
|
import axios from 'axios';
|
|
50
|
-
import ClearIcon from '
|
|
51
|
-
import CheckIcon from '
|
|
50
|
+
import ClearIcon from '@features/shared/ClearIcon';
|
|
51
|
+
import CheckIcon from '@features/shared/CheckIcon';
|
|
52
52
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
53
53
|
var InputStyled = styled(Input)(function () { return ({
|
|
54
54
|
input: {
|