@tap-payments/auth-jsconnect 2.1.75-test → 2.1.77-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/build/@types/app.d.ts +24 -0
- package/build/@types/app.js +13 -0
- package/build/@types/form.d.ts +15 -1
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/user.d.ts +141 -0
- package/build/@types/user.js +1 -0
- package/build/api/board.d.ts +16 -0
- package/build/api/board.js +10 -1
- package/build/api/country.d.ts +4 -0
- package/build/api/country.js +9 -1
- package/build/api/index.d.ts +8 -3
- package/build/api/individual.d.ts +43 -1
- package/build/api/individual.js +9 -1
- package/build/api/user.d.ts +6 -0
- package/build/api/user.js +9 -1
- package/build/assets/locales/ar.json +22 -2
- package/build/assets/locales/en.json +22 -1
- package/build/components/SimpleList/SimpleList.d.ts +2 -0
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +3 -1
- package/build/constants/app.d.ts +1 -0
- package/build/constants/app.js +20 -7
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/features/app/bank/bankStore.d.ts +1 -0
- package/build/features/app/bank/bankStore.js +2 -1
- package/build/features/app/brand/brandStore.d.ts +2 -0
- package/build/features/app/brand/brandStore.js +3 -1
- package/build/features/app/business/businessStore.js +1 -1
- package/build/features/app/entity/entityStore.d.ts +2 -0
- package/build/features/app/entity/entityStore.js +3 -1
- package/build/features/app/individual/individualStore.d.ts +28 -3
- package/build/features/app/individual/individualStore.js +466 -118
- package/build/features/app/password/passwordStore.js +2 -2
- package/build/features/app/tax/taxStore.js +30 -29
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +3 -3
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +2 -2
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +3 -3
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +3 -3
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +3 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/featuresScreens.js +10 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +43 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +3 -13
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +9 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +11 -17
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +12 -16
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +9 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +35 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +41 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +20 -17
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +18 -25
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
- package/build/features/individual/screens/IndividualList/IndividualList.js +59 -0
- package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
- package/build/features/individual/screens/IndividualList/UserList.js +138 -0
- package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualList/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +8 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +90 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +82 -0
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +7 -0
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +50 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +7 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +49 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +34 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +81 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +48 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +126 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +88 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +145 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +52 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +88 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/shared/Address/Address.d.ts +6 -1
- package/build/features/shared/Address/Address.js +40 -30
- package/build/features/shared/Address/CountryList.d.ts +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +1 -1
- package/build/features/shared/Address/InputText.d.ts +2 -1
- package/build/features/shared/Address/InputText.js +2 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
- package/build/features/shared/Button/FlowsButtons.js +2 -2
- package/build/features/shared/Button/ListButton.d.ts +17 -0
- package/build/features/shared/Button/ListButton.js +107 -0
- package/build/features/shared/Button/index.d.ts +2 -1
- package/build/features/shared/Button/index.js +2 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +6 -4
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -1
- package/build/features/tax/screens/TaxDetails/VATId.js +8 -3
- package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -4
- package/build/features/tax/screens/TaxDetails/validation.js +10 -5
- package/build/utils/string.d.ts +3 -2
- package/build/utils/string.js +16 -3
- package/package.json +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
- package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
- package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
- package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
- package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
|
@@ -93,7 +93,7 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
|
|
|
93
93
|
_e.label = 5;
|
|
94
94
|
case 5: return [2, {
|
|
95
95
|
data: data,
|
|
96
|
-
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names, contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
96
|
+
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names, contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
97
97
|
token: token
|
|
98
98
|
}];
|
|
99
99
|
}
|
|
@@ -125,7 +125,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrievePasswordBoardDetails
|
|
|
125
125
|
case 1:
|
|
126
126
|
data = _c.sent();
|
|
127
127
|
return [2, {
|
|
128
|
-
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
|
|
128
|
+
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, individuals: data === null || data === void 0 ? void 0 : data.individuals, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
|
|
129
129
|
}];
|
|
130
130
|
}
|
|
131
131
|
});
|
|
@@ -48,8 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
|
-
import { FlowsTypes } from '../../../@types';
|
|
52
|
-
import { hasKey } from '../../../utils';
|
|
51
|
+
import { FieldType, FlowsTypes } from '../../../@types';
|
|
53
52
|
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2 } from '../../../app/settings';
|
|
54
53
|
import { TAX_STEP_NAMES } from '../../../constants';
|
|
55
54
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
|
|
@@ -97,7 +96,7 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
97
96
|
}
|
|
98
97
|
return [2, {
|
|
99
98
|
data: data,
|
|
100
|
-
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
99
|
+
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
101
100
|
token: token
|
|
102
101
|
}];
|
|
103
102
|
}
|
|
@@ -133,10 +132,10 @@ export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', functi
|
|
|
133
132
|
});
|
|
134
133
|
}); });
|
|
135
134
|
export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
136
|
-
var _a, tax, settings, responseBody, payload, data,
|
|
137
|
-
var _b, _c, _d, _e, _f;
|
|
138
|
-
return __generator(this, function (
|
|
139
|
-
switch (
|
|
135
|
+
var _a, tax, settings, responseBody, payload, data, flows, hasTaxCompleted;
|
|
136
|
+
var _b, _c, _d, _e, _f, _g;
|
|
137
|
+
return __generator(this, function (_h) {
|
|
138
|
+
switch (_h.label) {
|
|
140
139
|
case 0:
|
|
141
140
|
_a = thunkApi.getState(), tax = _a.tax, settings = _a.settings;
|
|
142
141
|
responseBody = tax.data.verify.responseBody;
|
|
@@ -149,43 +148,45 @@ export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (par
|
|
|
149
148
|
};
|
|
150
149
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
151
150
|
case 1:
|
|
152
|
-
data = (
|
|
151
|
+
data = (_h.sent()).data;
|
|
153
152
|
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
154
153
|
throw new Error(data.errors[0].description);
|
|
155
154
|
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
|
|
156
|
-
|
|
157
|
-
hasTaxCompleted =
|
|
155
|
+
flows = (responseBody || {}).flows;
|
|
156
|
+
hasTaxCompleted = ((_f = flows === null || flows === void 0 ? void 0 : flows.find(function (flow) { return flow.name === 'tax'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
|
|
158
157
|
if (!hasTaxCompleted) return [3, 3];
|
|
159
|
-
return [4, thunkApi.dispatch(retrieveEntityInfo((
|
|
158
|
+
return [4, thunkApi.dispatch(retrieveEntityInfo((_g = responseBody === null || responseBody === void 0 ? void 0 : responseBody.entity) === null || _g === void 0 ? void 0 : _g.id))];
|
|
160
159
|
case 2:
|
|
161
|
-
|
|
160
|
+
_h.sent();
|
|
162
161
|
thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
163
162
|
return [3, 4];
|
|
164
163
|
case 3:
|
|
165
164
|
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
166
|
-
|
|
165
|
+
_h.label = 4;
|
|
167
166
|
case 4: return [2, { data: data, formData: params }];
|
|
168
167
|
}
|
|
169
168
|
});
|
|
170
169
|
}); });
|
|
171
170
|
export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
172
|
-
var _a, settings, tax, entityId, requestBody, data, documentBody, _b;
|
|
173
|
-
var _c, _d, _e, _f
|
|
174
|
-
return __generator(this, function (
|
|
175
|
-
switch (
|
|
171
|
+
var _a, settings, tax, entity, entityId, isTaxNumberEditable, requestBody, data, documentBody, _b;
|
|
172
|
+
var _c, _d, _e, _f;
|
|
173
|
+
return __generator(this, function (_g) {
|
|
174
|
+
switch (_g.label) {
|
|
176
175
|
case 0:
|
|
177
176
|
_a = thunkApi.getState(), settings = _a.settings, tax = _a.tax;
|
|
178
|
-
|
|
177
|
+
entity = (tax.data.verify.responseBody || {}).entity;
|
|
178
|
+
entityId = entity === null || entity === void 0 ? void 0 : entity.id;
|
|
179
|
+
isTaxNumberEditable = ((_c = entity === null || entity === void 0 ? void 0 : entity.data_status) === null || _c === void 0 ? void 0 : _c.tax_number) === FieldType.EDITABLE;
|
|
179
180
|
requestBody = {
|
|
180
181
|
id: entityId,
|
|
181
|
-
vat_id: params.vatId,
|
|
182
|
+
vat_id: isTaxNumberEditable ? params.vatId : undefined,
|
|
182
183
|
step_name: TAX_STEP_NAMES.TAX_INFO,
|
|
183
184
|
is_vat_acknowledged: params.confirmPolicy
|
|
184
185
|
};
|
|
185
186
|
return [4, API.entityService.updateEntityInfo(requestBody)];
|
|
186
187
|
case 1:
|
|
187
|
-
data = (
|
|
188
|
-
if ((
|
|
188
|
+
data = (_g.sent()).data;
|
|
189
|
+
if ((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length)
|
|
189
190
|
throw new Error(data.errors[0].description);
|
|
190
191
|
if (!((params.documentId || []).length > 0)) return [3, 3];
|
|
191
192
|
documentBody = {
|
|
@@ -199,11 +200,11 @@ export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (params, t
|
|
|
199
200
|
_b = data;
|
|
200
201
|
return [4, API.entityService.updateDocumentInfo(documentBody)];
|
|
201
202
|
case 2:
|
|
202
|
-
_b.documentData =
|
|
203
|
-
|
|
203
|
+
_b.documentData = _g.sent();
|
|
204
|
+
_g.label = 3;
|
|
204
205
|
case 3:
|
|
205
206
|
thunkApi.dispatch(handleNextScreenStep());
|
|
206
|
-
(
|
|
207
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
|
|
207
208
|
return [2, { data: data, formData: params }];
|
|
208
209
|
}
|
|
209
210
|
});
|
|
@@ -235,7 +236,7 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
|
|
|
235
236
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
236
237
|
thunkApi.dispatch(handleNextScreenStep());
|
|
237
238
|
return [2, {
|
|
238
|
-
response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
239
|
+
response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
239
240
|
formData: params
|
|
240
241
|
}];
|
|
241
242
|
}
|
|
@@ -282,8 +283,8 @@ export var taxSlice = createSlice({
|
|
|
282
283
|
state.error = null;
|
|
283
284
|
state.customLoading = false;
|
|
284
285
|
var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse;
|
|
285
|
-
var user = boardResponse.user, bank_account = boardResponse.bank_account, vatID = boardResponse.vatID, merchant = boardResponse.merchant;
|
|
286
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, name: user === null || user === void 0 ? void 0 : user.names, bank_account: bank_account, vatID: vatID, merchant: merchant });
|
|
286
|
+
var user = boardResponse.user, bank_account = boardResponse.bank_account, vatID = boardResponse.vatID, merchant = boardResponse.merchant, individuals = boardResponse.individuals;
|
|
287
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, name: user === null || user === void 0 ? void 0 : user.names, bank_account: bank_account, vatID: vatID, merchant: merchant, individuals: individuals });
|
|
287
288
|
state.data.verify.token = token;
|
|
288
289
|
state.data.taxData.vatId = vatID;
|
|
289
290
|
})
|
|
@@ -373,8 +374,8 @@ export var taxSlice = createSlice({
|
|
|
373
374
|
state.error = description;
|
|
374
375
|
return;
|
|
375
376
|
}
|
|
376
|
-
var flows = response.flows, steps = response.steps, user = response.user, bank_account = response.bank_account, vatID = response.vatID, merchant = response.merchant;
|
|
377
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps, bank_account: bank_account, name: user === null || user === void 0 ? void 0 : user.names, vatID: vatID, merchant: merchant });
|
|
377
|
+
var flows = response.flows, steps = response.steps, user = response.user, bank_account = response.bank_account, vatID = response.vatID, merchant = response.merchant, individuals = response.individuals;
|
|
378
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps, bank_account: bank_account, name: user === null || user === void 0 ? void 0 : user.names, vatID: vatID, merchant: merchant, individuals: individuals });
|
|
378
379
|
})
|
|
379
380
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
380
381
|
state.loading = true;
|
|
@@ -16,7 +16,7 @@ import { bankSelector } from '../../../app/bank/bankStore';
|
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
17
|
var SuccessWithFlowButtons = function () {
|
|
18
18
|
var data = useAppSelector(bankSelector).data;
|
|
19
|
-
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name;
|
|
20
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, flows: flows || [] }));
|
|
19
|
+
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
|
|
20
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [] }));
|
|
21
21
|
};
|
|
22
22
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
20
20
|
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
23
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
23
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
24
24
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
25
25
|
htmlColor?: string | undefined;
|
|
26
26
|
inheritViewBox?: boolean | undefined;
|
|
@@ -34,7 +34,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
|
|
|
34
34
|
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
37
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
37
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
38
38
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
39
39
|
htmlColor?: string | undefined;
|
|
40
40
|
inheritViewBox?: boolean | undefined;
|
|
@@ -56,7 +56,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
56
56
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
57
57
|
children?: React.ReactNode;
|
|
58
58
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
59
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
59
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
60
60
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
61
61
|
htmlColor?: string | undefined;
|
|
62
62
|
inheritViewBox?: boolean | undefined;
|
|
@@ -48,7 +48,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
|
|
|
48
48
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
49
49
|
children?: React.ReactNode;
|
|
50
50
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
51
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
51
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
52
52
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
53
53
|
htmlColor?: string | undefined;
|
|
54
54
|
inheritViewBox?: boolean | undefined;
|
|
@@ -62,7 +62,7 @@ export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<
|
|
|
62
62
|
export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
|
|
63
63
|
children?: React.ReactNode;
|
|
64
64
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
65
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
65
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
66
66
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
67
67
|
htmlColor?: string | undefined;
|
|
68
68
|
inheritViewBox?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ import { brandSelector } from '../../../app/brand/brandStore';
|
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
17
|
var SuccessWithFlowButtons = function () {
|
|
18
18
|
var data = useAppSelector(brandSelector).data;
|
|
19
|
-
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name;
|
|
20
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, flows: flows || [] }));
|
|
19
|
+
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
|
|
20
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [] }));
|
|
21
21
|
};
|
|
22
22
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
20
20
|
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
23
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
23
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
24
24
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
25
25
|
htmlColor?: string | undefined;
|
|
26
26
|
inheritViewBox?: boolean | undefined;
|
|
@@ -34,7 +34,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
|
|
|
34
34
|
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
37
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
37
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
38
38
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
39
39
|
htmlColor?: string | undefined;
|
|
40
40
|
inheritViewBox?: boolean | undefined;
|
|
@@ -56,7 +56,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
56
56
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
57
57
|
children?: React.ReactNode;
|
|
58
58
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
59
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
59
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
60
60
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
61
61
|
htmlColor?: string | undefined;
|
|
62
62
|
inheritViewBox?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
5
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
5
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
6
6
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
7
7
|
htmlColor?: string | undefined;
|
|
8
8
|
inheritViewBox?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
|
16
16
|
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
19
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
19
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
20
20
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
21
21
|
htmlColor?: string | undefined;
|
|
22
22
|
inheritViewBox?: boolean | undefined;
|
|
@@ -48,7 +48,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
|
|
|
48
48
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
49
49
|
children?: React.ReactNode;
|
|
50
50
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
51
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
51
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
52
52
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
53
53
|
htmlColor?: string | undefined;
|
|
54
54
|
inheritViewBox?: boolean | undefined;
|
|
@@ -62,7 +62,7 @@ export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<
|
|
|
62
62
|
export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
|
|
63
63
|
children?: React.ReactNode;
|
|
64
64
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
65
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
65
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
66
66
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
67
67
|
htmlColor?: string | undefined;
|
|
68
68
|
inheritViewBox?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ import { businessSelector } from '../../../app/business/businessStore';
|
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
17
|
var SuccessWithFlowButtons = function () {
|
|
18
18
|
var data = useAppSelector(businessSelector).data;
|
|
19
|
-
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name;
|
|
20
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, flows: flows || [] }));
|
|
19
|
+
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
|
|
20
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [] }));
|
|
21
21
|
};
|
|
22
22
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
5
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
5
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
6
6
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
7
7
|
htmlColor?: string | undefined;
|
|
8
8
|
inheritViewBox?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
|
16
16
|
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
19
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
19
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
20
20
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
21
21
|
htmlColor?: string | undefined;
|
|
22
22
|
inheritViewBox?: boolean | undefined;
|
package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js
CHANGED
|
@@ -19,7 +19,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
19
19
|
var data = useAppSelector(connectExpressSelector).data;
|
|
20
20
|
var _a = data.responseData || {}, boardData = _a.boardData, leadData = _a.leadData, boardInfo = _a.boardInfo;
|
|
21
21
|
var _b = leadData || {}, brand = _b.brand, entity = _b.entity, name = _b.name;
|
|
22
|
-
var _c = boardData || {}, business = _c.business, merchant = _c.merchant, bank = _c.bank_account, user = _c.user;
|
|
22
|
+
var _c = boardData || {}, business = _c.business, merchant = _c.merchant, bank = _c.bank_account, user = _c.user, individuals = _c.individuals;
|
|
23
23
|
var flows = (boardInfo || {}).info;
|
|
24
24
|
var boardInfoId = boardInfo === null || boardInfo === void 0 ? void 0 : boardInfo.id;
|
|
25
25
|
var boardId = boardData === null || boardData === void 0 ? void 0 : boardData.id;
|
|
@@ -27,6 +27,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
27
27
|
var name = _a.name;
|
|
28
28
|
return name !== FlowsTypes.PASSWORD;
|
|
29
29
|
}); }, [flows]);
|
|
30
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, user: __assign({ names: { en: name } }, user) }));
|
|
30
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, individuals: individuals, user: __assign({ names: { en: name } }, user) }));
|
|
31
31
|
};
|
|
32
32
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
20
20
|
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
23
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
23
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
24
24
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
25
25
|
htmlColor?: string | undefined;
|
|
26
26
|
inheritViewBox?: boolean | undefined;
|
|
@@ -34,7 +34,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
|
|
|
34
34
|
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
37
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
37
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
38
38
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
39
39
|
htmlColor?: string | undefined;
|
|
40
40
|
inheritViewBox?: boolean | undefined;
|
|
@@ -56,7 +56,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
56
56
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
57
57
|
children?: React.ReactNode;
|
|
58
58
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
59
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
59
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
60
60
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
61
61
|
htmlColor?: string | undefined;
|
|
62
62
|
inheritViewBox?: boolean | undefined;
|
|
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
20
20
|
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
23
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
23
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
24
24
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
25
25
|
htmlColor?: string | undefined;
|
|
26
26
|
inheritViewBox?: boolean | undefined;
|
|
@@ -34,7 +34,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
|
|
|
34
34
|
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
37
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
37
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
38
38
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
39
39
|
htmlColor?: string | undefined;
|
|
40
40
|
inheritViewBox?: boolean | undefined;
|
|
@@ -56,7 +56,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
56
56
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
57
57
|
children?: React.ReactNode;
|
|
58
58
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
59
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
59
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
60
60
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
61
61
|
htmlColor?: string | undefined;
|
|
62
62
|
inheritViewBox?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ import { entitySelector } from '../../../app/entity/entityStore';
|
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
17
|
var SuccessWithFlowButtons = function () {
|
|
18
18
|
var data = useAppSelector(entitySelector).data;
|
|
19
|
-
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name;
|
|
20
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, flows: flows || [] }));
|
|
19
|
+
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
|
|
20
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [] }));
|
|
21
21
|
};
|
|
22
22
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -38,6 +38,8 @@ import SuccessPasswordPage from './password/screens/Success';
|
|
|
38
38
|
import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
|
|
39
39
|
import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
|
|
40
40
|
import IndividualVerifyPage from './individual/screens/Verify';
|
|
41
|
+
import IndividualListPage from './individual/screens/IndividualList';
|
|
42
|
+
import IndividualPersonalInfo from './individual/screens/IndividualPersonalInfo';
|
|
41
43
|
import AdditionalIndividualInfoPage from './individual/screens/AdditionalIndividualInfo';
|
|
42
44
|
import SuccessOwnerPage from './individual/screens/Success';
|
|
43
45
|
import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
|
|
@@ -234,6 +236,14 @@ export var individualFeatureScreens = [
|
|
|
234
236
|
name: 'INDIVIDUAL_LOADING_DATA_STEP',
|
|
235
237
|
element: IndividualDataLoadingPage
|
|
236
238
|
},
|
|
239
|
+
{
|
|
240
|
+
name: 'INDIVIDUAL_LIST_STEP',
|
|
241
|
+
element: IndividualListPage
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
|
|
245
|
+
element: IndividualPersonalInfo
|
|
246
|
+
},
|
|
237
247
|
{
|
|
238
248
|
name: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
239
249
|
element: AdditionalIndividualInfoPage
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
export declare const RoleTextStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
+
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
6
|
+
gutterBottom?: boolean | undefined;
|
|
7
|
+
noWrap?: boolean | undefined;
|
|
8
|
+
paragraph?: boolean | undefined;
|
|
9
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
10
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
11
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
12
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
13
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
2
15
|
export interface AdditionalIndividualInfoProps {
|
|
3
16
|
}
|
|
4
17
|
declare const _default: React.MemoExoticComponent<{
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -13,15 +13,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
15
15
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
16
|
-
import Box from '@mui/material/Box';
|
|
17
16
|
import { useTranslation } from 'react-i18next';
|
|
18
|
-
import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
19
17
|
import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
|
|
18
|
+
import Box from '@mui/material/Box';
|
|
19
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
20
|
+
import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage } from '../../../../hooks';
|
|
21
|
+
import { IndividualType } from '../../../../@types';
|
|
20
22
|
import Form from '../../../../components/Form';
|
|
21
23
|
import Collapse from '../../../../components/Collapse';
|
|
24
|
+
import Text from '../../../../components/Text';
|
|
25
|
+
import { individualSelector, updateIndividualInfo } from '../../../app/individual/individualStore';
|
|
22
26
|
import Button from '../../../shared/Button';
|
|
23
27
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
|
-
import { useLanguage } from '../../../../hooks';
|
|
25
28
|
import PEPSwitch from './PEPSwitch';
|
|
26
29
|
import { IndividualInfoValidationSchema } from './validation';
|
|
27
30
|
import InfluencerSwitch from './InfluencerSwitch';
|
|
@@ -29,10 +32,19 @@ import MonthlyIncome from './MonthlyIncome';
|
|
|
29
32
|
import EmployerName from './EmployerName';
|
|
30
33
|
import EmployerLocation from './EmployerLocation';
|
|
31
34
|
import SourceOfIncome from './SourceOfIncome';
|
|
32
|
-
import { individualSelector, updateIndividualInfo } from '../../../app/individual/individualStore';
|
|
33
35
|
import Occupation from './Occupation';
|
|
34
36
|
import CivilIDFile from './CivilIDFile';
|
|
35
37
|
import SignatureFile from './SignatureFile';
|
|
38
|
+
import ShareCount from './ShareCount';
|
|
39
|
+
import ShareValue from './ShareValue';
|
|
40
|
+
var TextBoxStyled = styled(Box)(function (_a) {
|
|
41
|
+
var theme = _a.theme;
|
|
42
|
+
return (__assign(__assign({ display: 'flex', justifyContent: 'center', flexDirection: 'row', padding: theme.spacing(1.8, 2.5, 1.8, 2.5) }, theme.typography.body1), { lineHeight: theme.spacing(2.5), color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium }));
|
|
43
|
+
});
|
|
44
|
+
export var RoleTextStyled = styled(Text)(function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return (__assign(__assign({}, theme.typography.body1), { display: 'inline', paddingInlineStart: theme.spacing(1.5), color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }));
|
|
47
|
+
});
|
|
36
48
|
var ListType;
|
|
37
49
|
(function (ListType) {
|
|
38
50
|
ListType["SourceOfIncomeList"] = "SourceOfIncomeList";
|
|
@@ -47,10 +59,12 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
47
59
|
var _b = useAppSelector(individualSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
48
60
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
49
61
|
var countries = settingsData.countries;
|
|
50
|
-
var
|
|
62
|
+
var verify = data.verify;
|
|
63
|
+
var user = (verify.responseBody || {}).user;
|
|
64
|
+
var isAuthorizedUser = user === null || user === void 0 ? void 0 : user.is_authorized;
|
|
51
65
|
var _c = data.individualData, occupation = _c.occupation, sourceIncome = _c.sourceIncome, monthlyIncome = _c.monthlyIncome, employerName = _c.employerName, employerLocation = _c.employerLocation, isPEP = _c.isPEP, isInfluencer = _c.isInfluencer, civilID = _c.civilID, signatureFileId = _c.signatureFileId, civilIDUploading = _c.civilIDUploading, signatureFileUploading = _c.signatureFileUploading;
|
|
52
66
|
var methods = useForm({
|
|
53
|
-
resolver: yupResolver(IndividualInfoValidationSchema),
|
|
67
|
+
resolver: yupResolver(IndividualInfoValidationSchema(isAuthorizedUser, user === null || user === void 0 ? void 0 : user.type, user === null || user === void 0 ? void 0 : user.data_status)),
|
|
54
68
|
defaultValues: {
|
|
55
69
|
occupation: occupation,
|
|
56
70
|
sourceIncome: sourceIncome,
|
|
@@ -80,17 +94,38 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
80
94
|
dispatch(updateIndividualInfo(data));
|
|
81
95
|
};
|
|
82
96
|
var onBack = function () {
|
|
83
|
-
dispatch(handleCurrentActiveScreen('
|
|
97
|
+
dispatch(handleCurrentActiveScreen('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
84
98
|
};
|
|
85
99
|
var handleMenuClick = function (flag) {
|
|
86
100
|
setListActive(flag);
|
|
87
101
|
};
|
|
102
|
+
var getUserName = function () {
|
|
103
|
+
var _a, _b, _c, _d;
|
|
104
|
+
var name = isAr ? (_b = (_a = user === null || user === void 0 ? void 0 : user.names) === null || _a === void 0 ? void 0 : _a.ar) === null || _b === void 0 ? void 0 : _b.first : (_d = (_c = user === null || user === void 0 ? void 0 : user.names) === null || _c === void 0 ? void 0 : _c.en) === null || _d === void 0 ? void 0 : _d.first;
|
|
105
|
+
return name;
|
|
106
|
+
};
|
|
107
|
+
var getUserRole = function () {
|
|
108
|
+
var _a, _b, _c, _d, _e;
|
|
109
|
+
if ((((_a = user === null || user === void 0 ? void 0 : user.role) === null || _a === void 0 ? void 0 : _a.length) || 0) > 0)
|
|
110
|
+
return isAr ? (_c = (_b = user.role[0]) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.ar : (_e = (_d = user.role[0]) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.en;
|
|
111
|
+
if ((user === null || user === void 0 ? void 0 : user.type) === IndividualType.SHARE_HOLDER)
|
|
112
|
+
return t('type_share_holder');
|
|
113
|
+
if ((user === null || user === void 0 ? void 0 : user.type) === IndividualType.BOARD_MEMBER)
|
|
114
|
+
return t('type_board_member');
|
|
115
|
+
return t('type_user');
|
|
116
|
+
};
|
|
117
|
+
var showSignatureFile = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BUYER;
|
|
118
|
+
var showOccupationFile = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BUYER;
|
|
119
|
+
var showSourceOfIncome = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BUYER;
|
|
120
|
+
var showIsPEP = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BOARD_MEMBER;
|
|
121
|
+
var showIsInfluencer = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BOARD_MEMBER;
|
|
122
|
+
var showShares = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.SHARE_HOLDER;
|
|
88
123
|
var isSourceOfIncomeListActive = listActive === ListType.SourceOfIncomeList;
|
|
89
124
|
var isEmployerLocationListActive = listActive === ListType.EmployerLocationList;
|
|
90
125
|
var isMonthlyIncomeListActive = listActive === ListType.MonthlyIncomeList;
|
|
91
126
|
var isOccupationListActive = listActive === ListType.OccupationList;
|
|
92
127
|
var disabled = !methods.formState.isValid || civilIDUploading || signatureFileUploading;
|
|
93
|
-
return (
|
|
128
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !listActive && !!(user === null || user === void 0 ? void 0 : user.is_authorized), timeout: 500 }, { children: _jsxs(TextBoxStyled, { children: [getUserName() || '', _jsx(RoleTextStyled, { children: getUserRole() || '' })] }) })), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Occupation, { onListOpen: function () { return handleMenuClick(ListType.OccupationList); }, onListClose: function () { return handleMenuClick(); }, show: showOccupationFile && !isEmployerLocationListActive && !isMonthlyIncomeListActive && !isSourceOfIncomeListActive }), _jsx(SourceOfIncome, { onListOpen: function () { return handleMenuClick(ListType.SourceOfIncomeList); }, onListClose: function () { return handleMenuClick(); }, show: showSourceOfIncome && !isEmployerLocationListActive && !isMonthlyIncomeListActive && !isOccupationListActive }), _jsx(MonthlyIncome, { show: showSourceOfIncome && !isEmployerLocationListActive && !isSourceOfIncomeListActive && !isOccupationListActive, onListOpen: function () { return handleMenuClick(ListType.MonthlyIncomeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ShareCount, { show: !listActive && showShares }), _jsx(ShareValue, { show: !listActive && showShares }), _jsx(EmployerName, { show: false }), _jsx(EmployerLocation, { show: false, countries: countries, onListOpen: function () { return handleMenuClick(ListType.EmployerLocationList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: [_jsx(CivilIDFile, {}), _jsx(SignatureFile, { show: (user === null || user === void 0 ? void 0 : user.is_authorized) && showSignatureFile })] })), _jsx(PEPSwitch, { show: showIsPEP && !listActive }), _jsx(InfluencerSwitch, { show: showIsInfluencer && !listActive })] }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) }))] }));
|
|
94
129
|
};
|
|
95
130
|
export default React.memo(AdditionalIndividualInfo);
|
|
96
131
|
AdditionalIndividualInfo.defaultProps = {};
|