@tap-payments/auth-jsconnect 2.0.45 → 2.0.46
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 +47 -2
- package/build/@types/app.js +22 -0
- package/build/@types/form.d.ts +19 -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/entity.d.ts +3 -3
- package/build/api/index.d.ts +8 -3
- package/build/api/individual.d.ts +54 -4
- package/build/api/individual.js +9 -1
- package/build/api/user.d.ts +6 -0
- package/build/api/user.js +9 -1
- package/build/app/settings.js +11 -8
- package/build/assets/locales/ar.json +28 -2
- package/build/assets/locales/en.json +28 -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 +19 -13
- package/build/features/app/brand/brandStore.d.ts +2 -0
- package/build/features/app/brand/brandStore.js +69 -49
- package/build/features/app/business/businessStore.js +3 -3
- package/build/features/app/connect/connectStore.js +6 -6
- package/build/features/app/connectExpress/connectExpressStore.js +15 -9
- package/build/features/app/entity/entityStore.d.ts +2 -0
- package/build/features/app/entity/entityStore.js +5 -3
- package/build/features/app/individual/individualStore.d.ts +93 -4
- package/build/features/app/individual/individualStore.js +613 -129
- package/build/features/app/password/passwordStore.js +2 -2
- package/build/features/app/tax/taxStore.js +30 -29
- package/build/features/bank/Bank.js +2 -2
- package/build/features/bank/screens/BankDetails/BankDetails.js +8 -7
- package/build/features/bank/screens/BankDetails/BankName.js +13 -10
- package/build/features/bank/screens/BankDetails/BankStatement.js +8 -2
- package/build/features/bank/screens/BankDetails/Beneficiary.js +12 -13
- package/build/features/bank/screens/BankDetails/IBAN.js +14 -10
- package/build/features/bank/screens/BankDetails/validation.d.ts +14 -14
- package/build/features/bank/screens/BankDetails/validation.js +34 -15
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/Brand.js +2 -2
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +3 -3
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +8 -6
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -2
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +2 -2
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +9 -6
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +10 -7
- package/build/features/brand/screens/BrandActivities/validation.d.ts +7 -7
- package/build/features/brand/screens/BrandActivities/validation.js +26 -15
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +11 -4
- package/build/features/brand/screens/BrandInfo/BrandName.js +13 -12
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +21 -9
- package/build/features/brand/screens/BrandInfo/validation.d.ts +7 -7
- package/build/features/brand/screens/BrandInfo/validation.js +46 -36
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/business/Business.js +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +3 -3
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +2 -1
- 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/connect/Connect.js +2 -2
- package/build/features/connect/screens/Merchant/BrandList.js +4 -4
- package/build/features/connect/screens/Merchant/BrandName.js +6 -5
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connectExpress/ConnectExpress.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +5 -5
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +23 -3
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -3
- package/build/features/entity/Entity.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/EntityName/LicenseCertificate.js +9 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/featuresScreens.js +10 -0
- package/build/features/individual/Individual.js +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +48 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +6 -1
- 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/SignatureFile.js +8 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +25 -23
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +19 -25
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +10 -0
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +31 -0
- package/build/features/individual/screens/IndividualList/Email.d.ts +6 -0
- package/build/features/individual/screens/IndividualList/Email.js +48 -0
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
- package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.js +143 -0
- package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
- package/build/features/individual/screens/IndividualList/UserList.js +186 -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/IndividualList/validation.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/validation.js +39 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +8 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +109 -0
- package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.d.ts → IndividualPersonalInfo/BirthCountry.d.ts} +2 -2
- package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/BirthCountry.js} +14 -24
- 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 +50 -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 +139 -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/individual/screens/Verify/Verify.js +10 -17
- package/build/features/password/Password.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/Button.js +11 -0
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
- package/build/features/shared/Button/FlowsButtons.js +5 -5
- package/build/features/shared/Button/ListButton.d.ts +18 -0
- package/build/features/shared/Button/ListButton.js +125 -0
- package/build/features/shared/Button/index.d.ts +2 -1
- package/build/features/shared/Button/index.js +2 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +2 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +2 -2
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
- package/build/features/shared/SalesChannels/SalesChannel.js +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +8 -6
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +6 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +33 -11
- package/build/features/signIn/SignIn.js +2 -2
- package/build/features/tax/Tax.js +2 -2
- 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/TaxDocument.js +8 -2
- 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/array.d.ts +1 -0
- package/build/utils/array.js +10 -2
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +6 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +7 -1
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/html.d.ts +1 -1
- package/build/utils/html.js +4 -1
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/string.d.ts +15 -2
- package/build/utils/string.js +37 -3
- package/build/utils/validation.d.ts +1 -0
- package/build/utils/validation.js +3 -0
- package/package.json +129 -129
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +0 -46
- 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
|
@@ -391,5 +391,32 @@
|
|
|
391
391
|
"prepare_data_title": "Preparing your data",
|
|
392
392
|
"prepare_data_description": "This might take a moment...",
|
|
393
393
|
"oops": "Oops",
|
|
394
|
-
"file_upload_at_least_one": "please upload at least one file"
|
|
394
|
+
"file_upload_at_least_one": "please upload at least one file",
|
|
395
|
+
"company_individuals": "Company Individuals",
|
|
396
|
+
"company_individuals_add_or_request_details": "Add or request details for authorized signatories",
|
|
397
|
+
"add_details": "Add details",
|
|
398
|
+
"request_details_by_email": "Request details by email",
|
|
399
|
+
"back": "Back",
|
|
400
|
+
"company_individuals_details": "Company individuals details ({{count}})",
|
|
401
|
+
"type_user": "User",
|
|
402
|
+
"type_share_holder": "Share holder",
|
|
403
|
+
"type_board_member": "Board member",
|
|
404
|
+
"individual_gender_title": "Gender",
|
|
405
|
+
"gender_male": "Male",
|
|
406
|
+
"gender_female": "Female",
|
|
407
|
+
"issued_country_label": "Issued Country",
|
|
408
|
+
"choose_issued_country": "- Please select -",
|
|
409
|
+
"enter_expiry_date": "Expiry Date",
|
|
410
|
+
"place_of_birth_country_label": "Place of Birth County",
|
|
411
|
+
"choose_place_of_birth_country": "- Please select -",
|
|
412
|
+
"place_birth_city_label": "Place of Birth City",
|
|
413
|
+
"choose_place_birth_city": "- Please select -",
|
|
414
|
+
"nationality_label": "Nationality",
|
|
415
|
+
"choose_nationality": "- Please select -",
|
|
416
|
+
"share_count_label": "Share Count",
|
|
417
|
+
"share_count_hint": "0",
|
|
418
|
+
"share_value_label": "Share Value ({{currency}})",
|
|
419
|
+
"share_value_hint": "0000",
|
|
420
|
+
"brand": "Brand",
|
|
421
|
+
"try_again": "Try again"
|
|
395
422
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ListProps } from '@mui/material/List';
|
|
3
3
|
import { ListItemProps } from '@mui/material/ListItem';
|
|
4
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
5
|
export interface SimpleListProps<T> extends ListProps {
|
|
5
6
|
list: Array<T>;
|
|
6
7
|
listItemProps?: ListItemProps;
|
|
@@ -8,6 +9,7 @@ export interface SimpleListProps<T> extends ListProps {
|
|
|
8
9
|
renderItem: (item: T, idx: number) => React.ReactElement;
|
|
9
10
|
searchKeyPath?: string;
|
|
10
11
|
searchValuePath?: string[];
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
11
13
|
}
|
|
12
14
|
declare function SimpleList<T>({ list, listItemProps, onSelectItem, renderItem, children, searchKeyPath, searchValuePath, ...rest }: SimpleListProps<T>): JSX.Element;
|
|
13
15
|
declare namespace SimpleList {
|
package/build/constants/api.d.ts
CHANGED
package/build/constants/api.js
CHANGED
|
@@ -3,6 +3,7 @@ var PRODUCTION_BASE_URL = 'https://connect-mw.tap.company/middleware';
|
|
|
3
3
|
var DEV_BASE_URL = 'https://connect-mw.dev.tap.company/middleware';
|
|
4
4
|
var API_BUSINESS_COUNTRIES = 'https://godata.sandbox.tap.company/api/v1/business/country/list';
|
|
5
5
|
var API_COUNTRIES = 'https://utilities.tap.company/api/v1/country/list';
|
|
6
|
+
var CITIES_PATH = '/country/state/city/list';
|
|
6
7
|
var IP_PATH = '/ip';
|
|
7
8
|
var OPERATOR_PATH = '/operator';
|
|
8
9
|
var AUTH_PATH = '/auth';
|
|
@@ -91,5 +92,6 @@ export var ENDPOINT_PATHS = {
|
|
|
91
92
|
DOCUMENT: DOCUMENT_PATH,
|
|
92
93
|
CREATE_AUTH_NID: CREATE_AUTH_NID_PATH,
|
|
93
94
|
SEGMENTS_PATH: SEGMENTS_PATH,
|
|
94
|
-
TEAM_SIZE_PATH: TEAM_SIZE_PATH
|
|
95
|
+
TEAM_SIZE_PATH: TEAM_SIZE_PATH,
|
|
96
|
+
CITIES: CITIES_PATH
|
|
95
97
|
};
|
package/build/constants/app.d.ts
CHANGED
package/build/constants/app.js
CHANGED
|
@@ -241,39 +241,51 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
241
241
|
export var INDIVIDUAL_SCREENS_NAVIGATION = [
|
|
242
242
|
{
|
|
243
243
|
name: 'INDIVIDUAL_VERIFY_STEP',
|
|
244
|
-
next: ['
|
|
244
|
+
next: ['INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP', 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', 'INDIVIDUAL_LIST_STEP'],
|
|
245
245
|
prev: '',
|
|
246
246
|
order: 1
|
|
247
247
|
},
|
|
248
|
+
{
|
|
249
|
+
name: 'INDIVIDUAL_LIST_STEP',
|
|
250
|
+
next: ['INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP', 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'],
|
|
251
|
+
prev: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
252
|
+
order: 1
|
|
253
|
+
},
|
|
248
254
|
{
|
|
249
255
|
name: 'INDIVIDUAL_LOADING_DATA_STEP',
|
|
250
|
-
next: ['
|
|
256
|
+
next: ['INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP', 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', 'INDIVIDUAL_LIST_STEP'],
|
|
251
257
|
prev: '',
|
|
252
258
|
order: 1
|
|
253
259
|
},
|
|
260
|
+
{
|
|
261
|
+
name: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
|
|
262
|
+
next: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
263
|
+
prev: 'INDIVIDUAL_LIST_STEP',
|
|
264
|
+
order: 2
|
|
265
|
+
},
|
|
254
266
|
{
|
|
255
267
|
name: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
256
268
|
next: 'INDIVIDUAL_SUCCESS_STEP',
|
|
257
|
-
prev: '
|
|
258
|
-
order:
|
|
269
|
+
prev: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
|
|
270
|
+
order: 3
|
|
259
271
|
},
|
|
260
272
|
{
|
|
261
273
|
name: 'INDIVIDUAL_SUCCESS_STEP',
|
|
262
274
|
next: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
263
275
|
prev: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
264
|
-
order:
|
|
276
|
+
order: 4
|
|
265
277
|
},
|
|
266
278
|
{
|
|
267
279
|
name: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
268
280
|
next: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS',
|
|
269
281
|
prev: '',
|
|
270
|
-
order:
|
|
282
|
+
order: 5
|
|
271
283
|
},
|
|
272
284
|
{
|
|
273
285
|
name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS',
|
|
274
286
|
next: '',
|
|
275
287
|
prev: '',
|
|
276
|
-
order:
|
|
288
|
+
order: 6
|
|
277
289
|
}
|
|
278
290
|
];
|
|
279
291
|
export var PASSWORD_SCREENS_NAVIGATION = [
|
|
@@ -615,6 +627,7 @@ export var TAX_STEP_NAMES = {
|
|
|
615
627
|
};
|
|
616
628
|
export var INDIVIDUAl_STEP_NAMES = {
|
|
617
629
|
PHONE_AUTH: 'individual_phone_auth',
|
|
630
|
+
INDIVIDUAl_PERSONAL_INFO: 'individual_personal_info',
|
|
618
631
|
INDIVIDUAl_INFO: 'individual_info',
|
|
619
632
|
INDIVIDUAl_SUCCESS: 'individual_completed'
|
|
620
633
|
};
|
|
@@ -44,6 +44,10 @@ export declare const ICONS_NAMES: {
|
|
|
44
44
|
MOBILE_IMAGE: string;
|
|
45
45
|
WHITE_ARROW: string;
|
|
46
46
|
BLACK_ARROW: string;
|
|
47
|
+
BLUE_ARROW: string;
|
|
48
|
+
REQUEST_EMAIL: string;
|
|
49
|
+
REQUEST_EMAIL_GREEN: string;
|
|
50
|
+
ADD_DETAIL: string;
|
|
47
51
|
SUCCESS: string;
|
|
48
52
|
UNFINISHED: string;
|
|
49
53
|
ABSHER_LOGO: string;
|
|
@@ -44,6 +44,10 @@ export var ICONS_NAMES = {
|
|
|
44
44
|
MOBILE_IMAGE: 'https://image.shutterstock.com/image-vector/smartphone-icon-logo-260nw-767440327.jpg',
|
|
45
45
|
WHITE_ARROW: 'https://tap-connecet.b-cdn.net/imgs/whiteArrow.svg',
|
|
46
46
|
BLACK_ARROW: 'https://dash.b-cdn.net/icons/menu/arrow_right_icon.svg',
|
|
47
|
+
BLUE_ARROW: 'https://dash.b-cdn.net/icons/menu/blue_arrow_next.svg',
|
|
48
|
+
REQUEST_EMAIL: 'https://dash.b-cdn.net/icons/menu/request_email.svg',
|
|
49
|
+
REQUEST_EMAIL_GREEN: 'https://dash.b-cdn.net/icons/menu/request_email_green.svg',
|
|
50
|
+
ADD_DETAIL: 'https://dash.b-cdn.net/icons/menu/add_detail.svg',
|
|
47
51
|
SUCCESS: 'https://dash.b-cdn.net/icons/menu/image.png',
|
|
48
52
|
UNFINISHED: 'https://dash.b-cdn.net/icons/menu/not-finished.png',
|
|
49
53
|
ABSHER_LOGO: 'https://dash.b-cdn.net/icons/menu/Absher.svg',
|
|
@@ -48,7 +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';
|
|
51
|
+
import { FieldType, FlowsTypes } from '../../../@types';
|
|
52
52
|
import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
53
53
|
import { BANK_STEP_NAMES } from '../../../constants';
|
|
54
54
|
export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_a, thunkApi) {
|
|
@@ -106,6 +106,7 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_
|
|
|
106
106
|
name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names,
|
|
107
107
|
contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
|
|
108
108
|
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
109
|
+
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
109
110
|
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []
|
|
110
111
|
},
|
|
111
112
|
token: token
|
|
@@ -173,27 +174,32 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBankEntityInfo', fun
|
|
|
173
174
|
case 1:
|
|
174
175
|
data = _c.sent();
|
|
175
176
|
return [2, {
|
|
176
|
-
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, business: data === null || data === void 0 ? void 0 : data.business, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
|
|
177
|
+
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, business: data === null || data === void 0 ? void 0 : data.business, 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 })
|
|
177
178
|
}];
|
|
178
179
|
}
|
|
179
180
|
});
|
|
180
181
|
}); });
|
|
181
182
|
export var createBankAccount = createAsyncThunk('createBankAccount', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
182
|
-
var _a, settings, bank, iban, beneficiaryName, bankName, bankStatementId, confirmPolicy, requestBody, data;
|
|
183
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
|
184
|
-
return __generator(this, function (
|
|
185
|
-
switch (
|
|
183
|
+
var _a, settings, bank, iban, beneficiaryName, bankName, bankStatementId, confirmPolicy, bank_account, isIBANEditable, isBeneficiaryNameEditable, isBankNameEditable, isBankStatementIdEditable, requestBody, data;
|
|
184
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
185
|
+
return __generator(this, function (_o) {
|
|
186
|
+
switch (_o.label) {
|
|
186
187
|
case 0:
|
|
187
188
|
_a = thunkApi.getState(), settings = _a.settings, bank = _a.bank;
|
|
188
189
|
iban = params.iban, beneficiaryName = params.beneficiaryName, bankName = params.bankName, bankStatementId = params.bankStatementId, confirmPolicy = params.confirmPolicy;
|
|
190
|
+
bank_account = (bank.data.verify.responseBody || {}).bank_account;
|
|
191
|
+
isIBANEditable = ((_b = bank_account === null || bank_account === void 0 ? void 0 : bank_account.data_status) === null || _b === void 0 ? void 0 : _b.iban) === FieldType.EDITABLE;
|
|
192
|
+
isBeneficiaryNameEditable = ((_c = bank_account === null || bank_account === void 0 ? void 0 : bank_account.data_status) === null || _c === void 0 ? void 0 : _c.beneficiary_name) === FieldType.EDITABLE;
|
|
193
|
+
isBankNameEditable = ((_d = bank_account === null || bank_account === void 0 ? void 0 : bank_account.data_status) === null || _d === void 0 ? void 0 : _d.bank_name) === FieldType.EDITABLE;
|
|
194
|
+
isBankStatementIdEditable = ((_e = bank_account === null || bank_account === void 0 ? void 0 : bank_account.data_status) === null || _e === void 0 ? void 0 : _e.bank_statement_file_id) === FieldType.EDITABLE;
|
|
189
195
|
requestBody = {
|
|
190
|
-
wallet_id: (
|
|
196
|
+
wallet_id: (_k = (_j = (_h = (_g = (_f = bank.data.verify.responseBody) === null || _f === void 0 ? void 0 : _f.business) === null || _g === void 0 ? void 0 : _g.entity) === null || _h === void 0 ? void 0 : _h.merchant) === null || _j === void 0 ? void 0 : _j.wallet) === null || _k === void 0 ? void 0 : _k.id,
|
|
191
197
|
bank_account: {
|
|
192
|
-
iban: iban,
|
|
193
|
-
beneficiary_name: beneficiaryName,
|
|
194
|
-
bank_name: bankName,
|
|
198
|
+
iban: isIBANEditable ? iban : undefined,
|
|
199
|
+
beneficiary_name: isBeneficiaryNameEditable ? beneficiaryName : undefined,
|
|
200
|
+
bank_name: isBankNameEditable ? bankName : undefined,
|
|
195
201
|
is_acknowledged: confirmPolicy,
|
|
196
|
-
document: (bankStatementId || []).length > 0
|
|
202
|
+
document: isBankStatementIdEditable && (bankStatementId || []).length > 0
|
|
197
203
|
? {
|
|
198
204
|
type: 'bank_statement',
|
|
199
205
|
files: bankStatementId || []
|
|
@@ -205,10 +211,10 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (p
|
|
|
205
211
|
};
|
|
206
212
|
return [4, API.entityService.createBankAccount(requestBody)];
|
|
207
213
|
case 1:
|
|
208
|
-
data = (
|
|
214
|
+
data = (_o.sent()).data;
|
|
209
215
|
if (!data.errors) {
|
|
210
216
|
thunkApi.dispatch(handleNextScreenStep());
|
|
211
|
-
(
|
|
217
|
+
(_m = (_l = settings.data.appConfig).onStepCompleted) === null || _m === void 0 ? void 0 : _m.call(_l, settings.data.activeScreen.name, requestBody);
|
|
212
218
|
}
|
|
213
219
|
return [2, { data: data, formData: params }];
|
|
214
220
|
}
|
|
@@ -15,6 +15,7 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
15
15
|
merchant: any;
|
|
16
16
|
name: any;
|
|
17
17
|
contact: any;
|
|
18
|
+
individuals: any;
|
|
18
19
|
flows: any;
|
|
19
20
|
};
|
|
20
21
|
salesChannels: any;
|
|
@@ -53,6 +54,7 @@ export declare const verifyBrandLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
53
54
|
merchant: any;
|
|
54
55
|
name: any;
|
|
55
56
|
contact: any;
|
|
57
|
+
individuals: any;
|
|
56
58
|
flows: any;
|
|
57
59
|
};
|
|
58
60
|
salesChannels: any;
|
|
@@ -48,7 +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';
|
|
51
|
+
import { FieldType, FlowsTypes } from '../../../@types';
|
|
52
52
|
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
53
53
|
import { BRAND_STEP_NAMES } from '../../../constants';
|
|
54
54
|
import { isKW, isSA, isTwitter, isWebsite, sleep } from '../../../utils';
|
|
@@ -113,6 +113,7 @@ export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (
|
|
|
113
113
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
114
114
|
name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names,
|
|
115
115
|
contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact,
|
|
116
|
+
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
116
117
|
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []
|
|
117
118
|
},
|
|
118
119
|
salesChannels: salesChannels,
|
|
@@ -192,6 +193,7 @@ export var verifyBrandLeadOTP = createAsyncThunk('verifyBrandLeadOTP', function
|
|
|
192
193
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
193
194
|
name: (_f = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _f === void 0 ? void 0 : _f.names,
|
|
194
195
|
contact: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.contact,
|
|
196
|
+
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
195
197
|
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []
|
|
196
198
|
},
|
|
197
199
|
salesChannels: salesChannels,
|
|
@@ -211,7 +213,7 @@ export var retrieveBoardDetails = createAsyncThunk('brandRetrieveBrandInfo', fun
|
|
|
211
213
|
case 1:
|
|
212
214
|
data = _c.sent();
|
|
213
215
|
return [2, {
|
|
214
|
-
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 })
|
|
216
|
+
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 })
|
|
215
217
|
}];
|
|
216
218
|
}
|
|
217
219
|
});
|
|
@@ -242,13 +244,19 @@ export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailabi
|
|
|
242
244
|
});
|
|
243
245
|
});
|
|
244
246
|
export var updateBrand = createAsyncThunk('brandUpdateBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
245
|
-
var _a, settings, brand, id, getAddress, channel_services, requestBody, brandData, activities, activityList;
|
|
246
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
|
247
|
-
return __generator(this, function (
|
|
248
|
-
switch (
|
|
247
|
+
var _a, settings, brand, responseBody, id, isNameEditable, isChannelServicesEditable, salesChannels, brandName, segment, teamSize, segmentId, teamSizeId, getAddress, channel_services, requestBody, brandData, activities, activityList;
|
|
248
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
249
|
+
return __generator(this, function (_k) {
|
|
250
|
+
switch (_k.label) {
|
|
249
251
|
case 0:
|
|
250
252
|
_a = thunkApi.getState(), settings = _a.settings, brand = _a.brand;
|
|
251
|
-
|
|
253
|
+
responseBody = brand.data.verify.responseBody;
|
|
254
|
+
id = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand) === null || _b === void 0 ? void 0 : _b.id;
|
|
255
|
+
isNameEditable = ((_d = (_c = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand) === null || _c === void 0 ? void 0 : _c.data_status) === null || _d === void 0 ? void 0 : _d.name) === FieldType.EDITABLE;
|
|
256
|
+
isChannelServicesEditable = ((_f = (_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand) === null || _e === void 0 ? void 0 : _e.data_status) === null || _f === void 0 ? void 0 : _f.channel_services) === FieldType.EDITABLE;
|
|
257
|
+
salesChannels = params.salesChannels, brandName = params.brandName, segment = params.segment, teamSize = params.teamSize;
|
|
258
|
+
segmentId = segment && { id: segment.id };
|
|
259
|
+
teamSizeId = teamSize && { id: teamSize.id };
|
|
252
260
|
getAddress = function (value, isTwitter, isWeb) {
|
|
253
261
|
if (isTwitter)
|
|
254
262
|
return '@' + value;
|
|
@@ -256,41 +264,43 @@ export var updateBrand = createAsyncThunk('brandUpdateBrand', function (params,
|
|
|
256
264
|
return 'https://' + value;
|
|
257
265
|
return value;
|
|
258
266
|
};
|
|
259
|
-
channel_services =
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
channel_services = isChannelServicesEditable
|
|
268
|
+
? salesChannels.map(function (channel) {
|
|
269
|
+
var _a;
|
|
270
|
+
return {
|
|
271
|
+
id: channel.id,
|
|
272
|
+
address: getAddress(channel.address || '', isTwitter(channel.code), isWebsite(channel.code)),
|
|
273
|
+
sub: (_a = channel.sub) === null || _a === void 0 ? void 0 : _a.map(function (sub) {
|
|
274
|
+
return { id: sub.id, address: getAddress(sub.address || '', isTwitter(sub.code), isWebsite(sub.code)) };
|
|
275
|
+
})
|
|
276
|
+
};
|
|
277
|
+
})
|
|
278
|
+
: undefined;
|
|
269
279
|
requestBody = {
|
|
270
280
|
id: id,
|
|
271
|
-
name:
|
|
272
|
-
segment: { type:
|
|
281
|
+
name: isNameEditable ? { en: brandName, ar: brandName } : undefined,
|
|
282
|
+
segment: { type: segmentId, team: teamSizeId },
|
|
273
283
|
channel_services: channel_services
|
|
274
284
|
};
|
|
275
285
|
return [4, API.brandService.updateBrandInfo(requestBody)];
|
|
276
286
|
case 1:
|
|
277
|
-
brandData = (
|
|
278
|
-
activities = (((
|
|
287
|
+
brandData = (_k.sent()).data;
|
|
288
|
+
activities = (((_g = brand.data.verify.responseBody) === null || _g === void 0 ? void 0 : _g.entity) || {}).activities;
|
|
279
289
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
280
290
|
case 2:
|
|
281
|
-
|
|
291
|
+
_k.sent();
|
|
282
292
|
if (activities) {
|
|
283
293
|
brandData = __assign(__assign({}, brandData), { brand_activities: activities || {} });
|
|
284
294
|
}
|
|
285
295
|
if (!!activities) return [3, 4];
|
|
286
296
|
return [4, API.dataService.getActivities()];
|
|
287
297
|
case 3:
|
|
288
|
-
activityList = (
|
|
298
|
+
activityList = (_k.sent()).list;
|
|
289
299
|
brandData = __assign(__assign({}, brandData), { brand_activities: activityList || {} });
|
|
290
|
-
|
|
300
|
+
_k.label = 4;
|
|
291
301
|
case 4:
|
|
292
302
|
thunkApi.dispatch(handleNextScreenStep());
|
|
293
|
-
(
|
|
303
|
+
(_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, id);
|
|
294
304
|
return [2, { data: __assign({}, brandData), formData: params }];
|
|
295
305
|
}
|
|
296
306
|
});
|
|
@@ -307,22 +317,29 @@ export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function
|
|
|
307
317
|
});
|
|
308
318
|
}); });
|
|
309
319
|
export var updateBrandActivities = createAsyncThunk('brandUpdateBrandActivities', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
310
|
-
var _a, settings, brand, id, customerLocation, customerBase, sales, stepName, requestBody, brandData;
|
|
311
|
-
var _b, _c, _d, _e, _f, _g;
|
|
312
|
-
return __generator(this, function (
|
|
313
|
-
switch (
|
|
320
|
+
var _a, settings, brand, brandResponse, id, isActivitiesEditable, isCustomerLocationEditable, isSalesRangeEditable, activities, customerLocations, expectedCustomer, expectedSale, customerLocation, customerBase, sales, stepName, requestBody, brandData;
|
|
321
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
322
|
+
return __generator(this, function (_j) {
|
|
323
|
+
switch (_j.label) {
|
|
314
324
|
case 0:
|
|
315
325
|
_a = thunkApi.getState(), settings = _a.settings, brand = _a.brand;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
326
|
+
brandResponse = (brand.data.verify.responseBody || {}).brand;
|
|
327
|
+
id = brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.id;
|
|
328
|
+
isActivitiesEditable = ((_b = brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.data_status) === null || _b === void 0 ? void 0 : _b.activities) === FieldType.EDITABLE;
|
|
329
|
+
isCustomerLocationEditable = ((_d = (_c = brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.data_status) === null || _c === void 0 ? void 0 : _c.customer_base) === null || _d === void 0 ? void 0 : _d.location) === FieldType.EDITABLE;
|
|
330
|
+
isSalesRangeEditable = ((_f = (_e = brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.data_status) === null || _e === void 0 ? void 0 : _e.operations) === null || _f === void 0 ? void 0 : _f.sales_range) === FieldType.EDITABLE;
|
|
331
|
+
activities = params.activities, customerLocations = params.customerLocations, expectedCustomer = params.expectedCustomer, expectedSale = params.expectedSale;
|
|
332
|
+
customerLocation = isCustomerLocationEditable
|
|
333
|
+
? customerLocations.map(function (location) { return ({
|
|
334
|
+
id: location === null || location === void 0 ? void 0 : location.id
|
|
335
|
+
}); })
|
|
336
|
+
: undefined;
|
|
337
|
+
customerBase = { id: (expectedCustomer === null || expectedCustomer === void 0 ? void 0 : expectedCustomer.id) || '', period: 'monthly', locations: customerLocation };
|
|
338
|
+
sales = isSalesRangeEditable ? { id: (expectedSale === null || expectedSale === void 0 ? void 0 : expectedSale.id) || '', period: 'monthly' } : undefined;
|
|
322
339
|
stepName = BRAND_STEP_NAMES.BRAND_ACTIVITIES;
|
|
323
340
|
requestBody = {
|
|
324
341
|
id: id,
|
|
325
|
-
activities:
|
|
342
|
+
activities: isActivitiesEditable ? activities : undefined,
|
|
326
343
|
operations: {
|
|
327
344
|
customer_base: customerBase,
|
|
328
345
|
sales: sales
|
|
@@ -332,12 +349,12 @@ export var updateBrandActivities = createAsyncThunk('brandUpdateBrandActivities'
|
|
|
332
349
|
};
|
|
333
350
|
return [4, API.brandService.updateBrandInfo(requestBody)];
|
|
334
351
|
case 1:
|
|
335
|
-
brandData = (
|
|
352
|
+
brandData = (_j.sent()).data;
|
|
336
353
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
337
354
|
case 2:
|
|
338
|
-
|
|
355
|
+
_j.sent();
|
|
339
356
|
thunkApi.dispatch(handleNextScreenStep());
|
|
340
|
-
(
|
|
357
|
+
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, id);
|
|
341
358
|
return [2, { data: __assign({}, brandData), formData: params }];
|
|
342
359
|
}
|
|
343
360
|
});
|
|
@@ -461,12 +478,12 @@ export var brandSlice = createSlice({
|
|
|
461
478
|
var brand = boardResponse.brand, entity = boardResponse.entity;
|
|
462
479
|
state.data.brandData.brandName = (_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en;
|
|
463
480
|
var selectedSegment = (_b = segmentsList === null || segmentsList === void 0 ? void 0 : segmentsList.filter(function (segment) {
|
|
464
|
-
var _a;
|
|
465
|
-
return segment.id === ((_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.type);
|
|
481
|
+
var _a, _b;
|
|
482
|
+
return segment.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.id);
|
|
466
483
|
})) === null || _b === void 0 ? void 0 : _b[0];
|
|
467
484
|
var selectedTeamSize = (_c = teamSizeList === null || teamSizeList === void 0 ? void 0 : teamSizeList.filter(function (team) {
|
|
468
|
-
var _a;
|
|
469
|
-
return team.id === ((_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.team);
|
|
485
|
+
var _a, _b;
|
|
486
|
+
return team.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.team) === null || _b === void 0 ? void 0 : _b.id);
|
|
470
487
|
})) === null || _c === void 0 ? void 0 : _c[0];
|
|
471
488
|
(_d = brand === null || brand === void 0 ? void 0 : brand.terms) === null || _d === void 0 ? void 0 : _d.forEach(function (element) {
|
|
472
489
|
if ((element === null || element === void 0 ? void 0 : element.term) === 'general') {
|
|
@@ -481,6 +498,7 @@ export var brandSlice = createSlice({
|
|
|
481
498
|
});
|
|
482
499
|
state.data.brandData.segment = selectedSegment;
|
|
483
500
|
state.data.brandData.teamSize = selectedTeamSize;
|
|
501
|
+
state.data.brandData.salesChannels = (brand === null || brand === void 0 ? void 0 : brand.channel_services) || [];
|
|
484
502
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id, channel_list: (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.list) || [], salesChannels: brand === null || brand === void 0 ? void 0 : brand.channel_services, activities: entity === null || entity === void 0 ? void 0 : entity.activities, segmentsList: segmentsList, teamSizeList: teamSizeList });
|
|
485
503
|
state.data.verify.token = token;
|
|
486
504
|
})
|
|
@@ -513,15 +531,16 @@ export var brandSlice = createSlice({
|
|
|
513
531
|
state.data.otpData.responseBody = data;
|
|
514
532
|
state.data.brandData.brandName = (_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en;
|
|
515
533
|
var selectedSegment = (_b = segmentsList === null || segmentsList === void 0 ? void 0 : segmentsList.filter(function (segment) {
|
|
516
|
-
var _a;
|
|
517
|
-
return segment.id === ((_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.type);
|
|
534
|
+
var _a, _b;
|
|
535
|
+
return segment.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.id);
|
|
518
536
|
})) === null || _b === void 0 ? void 0 : _b[0];
|
|
519
537
|
var selectedTeamSize = (_c = teamSizeList === null || teamSizeList === void 0 ? void 0 : teamSizeList.filter(function (team) {
|
|
520
|
-
var _a;
|
|
521
|
-
return team.id === ((_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.team);
|
|
538
|
+
var _a, _b;
|
|
539
|
+
return team.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.team) === null || _b === void 0 ? void 0 : _b.id);
|
|
522
540
|
})) === null || _c === void 0 ? void 0 : _c[0];
|
|
523
541
|
state.data.brandData.segment = selectedSegment;
|
|
524
542
|
state.data.brandData.teamSize = selectedTeamSize;
|
|
543
|
+
state.data.brandData.salesChannels = (brand === null || brand === void 0 ? void 0 : brand.channel_services) || [];
|
|
525
544
|
(_d = brand === null || brand === void 0 ? void 0 : brand.terms) === null || _d === void 0 ? void 0 : _d.forEach(function (element) {
|
|
526
545
|
if ((element === null || element === void 0 ? void 0 : element.term) === 'general') {
|
|
527
546
|
state.data.brandActivities.termAndConditionChecked = element.agree;
|
|
@@ -559,13 +578,14 @@ export var brandSlice = createSlice({
|
|
|
559
578
|
.addCase(updateBrand.fulfilled, function (state, action) {
|
|
560
579
|
state.loading = false;
|
|
561
580
|
state.error = null;
|
|
562
|
-
var
|
|
581
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
563
582
|
var brand = (state.data.verify.responseBody || {}).brand;
|
|
564
583
|
var activities = data.brand_activities;
|
|
565
584
|
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
566
585
|
var activities = (brand || {}).activities;
|
|
567
586
|
return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return activity.id === value.id; });
|
|
568
587
|
});
|
|
588
|
+
state.data.brandData = formData;
|
|
569
589
|
state.data.brandActivities.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
|
|
570
590
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { activities: data === null || data === void 0 ? void 0 : data.brand_activities });
|
|
571
591
|
})
|
|
@@ -577,7 +597,7 @@ export var brandSlice = createSlice({
|
|
|
577
597
|
state.loading = true;
|
|
578
598
|
state.error = null;
|
|
579
599
|
})
|
|
580
|
-
.addCase(updateBrandActivities.fulfilled, function (state
|
|
600
|
+
.addCase(updateBrandActivities.fulfilled, function (state) {
|
|
581
601
|
state.loading = false;
|
|
582
602
|
state.error = null;
|
|
583
603
|
})
|
|
@@ -57,7 +57,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
59
|
import API from '../../../api';
|
|
60
|
-
import { BusinessType, FlowsTypes } from '../../../@types';
|
|
60
|
+
import { BusinessType, FlowsTypes, DocumentPurpose } from '../../../@types';
|
|
61
61
|
import { BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
62
62
|
import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep, isKW, isSA, dateFormat } from '../../../utils';
|
|
63
63
|
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
@@ -435,7 +435,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
435
435
|
case 1:
|
|
436
436
|
data = _c.sent();
|
|
437
437
|
return [2, {
|
|
438
|
-
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 })
|
|
438
|
+
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, individuals: data === null || data === void 0 ? void 0 : data.individuals })
|
|
439
439
|
}];
|
|
440
440
|
}
|
|
441
441
|
});
|
|
@@ -528,7 +528,7 @@ export var uploadArticle = createAsyncThunk('businessUploadArticle', function (_
|
|
|
528
528
|
uploadPayload = {
|
|
529
529
|
file_link_create: true,
|
|
530
530
|
title: file === null || file === void 0 ? void 0 : file.name,
|
|
531
|
-
purpose:
|
|
531
|
+
purpose: DocumentPurpose.ARTICLE_ASSOCIATION,
|
|
532
532
|
type: type,
|
|
533
533
|
file: file
|
|
534
534
|
};
|
|
@@ -455,7 +455,7 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
455
455
|
brandReqBody_1 = {
|
|
456
456
|
id: (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id) || '',
|
|
457
457
|
channel_services: channel_services,
|
|
458
|
-
segment: { type: ((_b = params.segment) === null || _b === void 0 ? void 0 : _b.id) || '', team: ((_c = params.teamSize) === null || _c === void 0 ? void 0 : _c.id) || '' },
|
|
458
|
+
segment: { type: { id: ((_b = params.segment) === null || _b === void 0 ? void 0 : _b.id) || '' }, team: { id: ((_c = params.teamSize) === null || _c === void 0 ? void 0 : _c.id) || '' } },
|
|
459
459
|
step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO
|
|
460
460
|
};
|
|
461
461
|
return [4, API.brandService.updateBrandInfo(brandReqBody_1)];
|
|
@@ -491,7 +491,7 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
491
491
|
channel_services: channel_services,
|
|
492
492
|
term: ['general'],
|
|
493
493
|
step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO,
|
|
494
|
-
segment: { type: ((_g = params.segment) === null || _g === void 0 ? void 0 : _g.id) || '', team: ((_h = params.teamSize) === null || _h === void 0 ? void 0 : _h.id) || '' }
|
|
494
|
+
segment: { type: { id: ((_g = params.segment) === null || _g === void 0 ? void 0 : _g.id) || '' }, team: { id: ((_h = params.teamSize) === null || _h === void 0 ? void 0 : _h.id) || '' } }
|
|
495
495
|
};
|
|
496
496
|
return [4, API.brandService.updateBrandInfo(brandReqBody)];
|
|
497
497
|
case 6:
|
|
@@ -834,14 +834,14 @@ export var connectSlice = createSlice({
|
|
|
834
834
|
var selectedBrand = ((_b = (_a = state.data.brandData) === null || _a === void 0 ? void 0 : _a.responseBody) === null || _b === void 0 ? void 0 : _b.brand_list[0]) || leadResponse.brand;
|
|
835
835
|
state.data.brandData.brandName = (_c = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.name) === null || _c === void 0 ? void 0 : _c.en;
|
|
836
836
|
state.data.brandData.segment = rest.segments_list.find(function (_a) {
|
|
837
|
-
var _b;
|
|
837
|
+
var _b, _c;
|
|
838
838
|
var id = _a.id;
|
|
839
|
-
return ((_b = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _b === void 0 ? void 0 : _b.type) === id;
|
|
839
|
+
return ((_c = (_b = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.id) === id;
|
|
840
840
|
});
|
|
841
841
|
state.data.brandData.teamSize = rest.team_size_list.find(function (_a) {
|
|
842
|
-
var _b;
|
|
842
|
+
var _b, _c;
|
|
843
843
|
var id = _a.id;
|
|
844
|
-
return ((_b = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _b === void 0 ? void 0 : _b.team) === id;
|
|
844
|
+
return ((_c = (_b = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id) === id;
|
|
845
845
|
});
|
|
846
846
|
state.data.individualData = formData;
|
|
847
847
|
state.data.individualData.responseBody = rest;
|