@tap-payments/auth-jsconnect 2.4.70-test → 2.4.72-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.
Files changed (50) hide show
  1. package/build/@types/app.d.ts +1 -0
  2. package/build/@types/form.d.ts +5 -3
  3. package/build/assets/locales/ar.json +3 -3
  4. package/build/constants/app.d.ts +2 -0
  5. package/build/constants/app.js +23 -9
  6. package/build/features/app/brand/brandStore.d.ts +19 -9
  7. package/build/features/app/brand/brandStore.js +141 -126
  8. package/build/features/app/connect/connectStore.d.ts +15 -1
  9. package/build/features/app/connect/connectStore.js +146 -83
  10. package/build/features/brand/screens/BrandInfo/BrandInfo.js +14 -51
  11. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +1 -2
  12. package/build/features/brand/screens/BrandInfo/BrandLogo.js +2 -14
  13. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +1 -2
  14. package/build/features/brand/screens/BrandInfo/BrandName.js +2 -3
  15. package/build/features/brand/screens/BrandInfo/validation.d.ts +0 -12
  16. package/build/features/brand/screens/BrandInfo/validation.js +0 -4
  17. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +5 -0
  18. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +102 -0
  19. package/build/features/brand/screens/BrandSegmentInfo/index.d.ts +2 -0
  20. package/build/features/brand/screens/BrandSegmentInfo/index.js +2 -0
  21. package/build/features/brand/screens/BrandSegmentInfo/validation.d.ts +17 -0
  22. package/build/features/brand/screens/BrandSegmentInfo/validation.js +9 -0
  23. package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +5 -0
  24. package/build/features/connect/screens/BrandSegment/BrandSegment.js +84 -0
  25. package/build/features/connect/screens/{Merchant → BrandSegment}/SegmentLocations.js +1 -1
  26. package/build/features/connect/screens/{Merchant → BrandSegment}/SegmentProfits.js +1 -1
  27. package/build/features/connect/screens/{Merchant → BrandSegment}/SegmentTechs.js +1 -1
  28. package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.js +1 -1
  29. package/build/features/connect/screens/BrandSegment/index.d.ts +3 -0
  30. package/build/features/connect/screens/BrandSegment/index.js +2 -0
  31. package/build/features/connect/screens/BrandSegment/validation.d.ts +17 -0
  32. package/build/features/connect/screens/BrandSegment/validation.js +9 -0
  33. package/build/features/connect/screens/Merchant/BrandList.js +2 -25
  34. package/build/features/connect/screens/Merchant/Merchant.js +4 -25
  35. package/build/features/connect/screens/Merchant/validation.d.ts +0 -12
  36. package/build/features/connect/screens/Merchant/validation.js +0 -8
  37. package/build/features/featuresScreens.js +10 -0
  38. package/package.json +1 -1
  39. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/SegmentLocations.d.ts +0 -0
  40. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/SegmentLocations.js +0 -0
  41. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/SegmentProfits.d.ts +0 -0
  42. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/SegmentProfits.js +0 -0
  43. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/SegmentTechs.d.ts +0 -0
  44. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/SegmentTechs.js +0 -0
  45. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.d.ts +0 -0
  46. /package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.js +0 -0
  47. /package/build/features/connect/screens/{Merchant → BrandSegment}/SegmentLocations.d.ts +0 -0
  48. /package/build/features/connect/screens/{Merchant → BrandSegment}/SegmentProfits.d.ts +0 -0
  49. /package/build/features/connect/screens/{Merchant → BrandSegment}/SegmentTechs.d.ts +0 -0
  50. /package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.d.ts +0 -0
@@ -363,17 +363,17 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
363
363
  });
364
364
  }); });
365
365
  export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
366
- var _a, settings, connect, lead_id, phoneCountry, payload, leadResponse, _b, segmentLocation, segmentProfit, segmentTech, err_3, teamSize, err_4, brand;
367
- var _c, _d, _e, _f, _g;
368
- return __generator(this, function (_h) {
369
- switch (_h.label) {
366
+ var _a, settings, connect, lead_id, phoneCountry, payload, leadResponse, brand;
367
+ var _b, _c, _d, _e, _f;
368
+ return __generator(this, function (_g) {
369
+ switch (_g.label) {
370
370
  case 0:
371
371
  _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
372
372
  lead_id = (connect.data.otpData.responseBody || {}).lead_id;
373
- phoneCountry = (_d = (_c = params.countryCode) === null || _c === void 0 ? void 0 : _c.idd_prefix) === null || _d === void 0 ? void 0 : _d.toString();
373
+ phoneCountry = (_c = (_b = params.countryCode) === null || _b === void 0 ? void 0 : _b.idd_prefix) === null || _c === void 0 ? void 0 : _c.toString();
374
374
  payload = {
375
375
  id: lead_id || '',
376
- country_code: (_e = settings.data.businessCountry) === null || _e === void 0 ? void 0 : _e.iso2,
376
+ country_code: (_d = settings.data.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2,
377
377
  name: getIndividualName(params.name),
378
378
  contact: __assign({ email: params.email }, (params.mobile && { phone: { country_code: phoneCountry, number: params.mobile } })),
379
379
  step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL,
@@ -381,39 +381,15 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
381
381
  };
382
382
  return [4, API.leadService.updateLead(payload)];
383
383
  case 1:
384
- leadResponse = _h.sent();
385
- _h.label = 2;
386
- case 2:
387
- _h.trys.push([2, 4, , 5]);
388
- return [4, thunkApi.dispatch(retrieveSegmentDataList()).unwrap()];
389
- case 3:
390
- _b = _h.sent(), segmentLocation = _b.segmentLocation, segmentProfit = _b.segmentProfit, segmentTech = _b.segmentTech;
391
- leadResponse.segment_location_list = segmentLocation;
392
- leadResponse.segment_profit_list = segmentProfit;
393
- leadResponse.segment_tech_list = segmentTech;
394
- return [3, 5];
395
- case 4:
396
- err_3 = _h.sent();
397
- return [3, 5];
398
- case 5:
399
- _h.trys.push([5, 7, , 8]);
400
- return [4, API.dataService.getTeamSize({ page: 0 })];
401
- case 6:
402
- teamSize = _h.sent();
403
- leadResponse.team_size_list = teamSize.list;
404
- return [3, 8];
405
- case 7:
406
- err_4 = _h.sent();
407
- return [3, 8];
408
- case 8:
409
- if (!leadResponse.brand) return [3, 10];
384
+ leadResponse = _g.sent();
385
+ if (!leadResponse.brand) return [3, 3];
410
386
  return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
411
- case 9:
412
- brand = (_h.sent()).brand;
387
+ case 2:
388
+ brand = (_g.sent()).brand;
413
389
  leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
414
- _h.label = 10;
415
- case 10:
416
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
390
+ _g.label = 3;
391
+ case 3:
392
+ (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
417
393
  thunkApi.dispatch(handleNextScreenStep());
418
394
  return [2, { leadResponse: leadResponse, formData: params }];
419
395
  }
@@ -444,15 +420,15 @@ export var retrieveSegmentDataList = createAsyncThunk('connectRetrieveSegmentDat
444
420
  });
445
421
  }); });
446
422
  export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
447
- var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, segmentLocation, segmentProfit, segmentTech, teamSize, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, brandNameBody, payload, lead, brandReqBody, brand;
448
- var _b, _c, _d, _e, _f;
449
- return __generator(this, function (_g) {
450
- switch (_g.label) {
423
+ var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, _b, segmentLocation, segmentProfit, segmentTech, err_3, teamSize, err_4, brandNameBody, payload, lead, brandReqBody, brand, _c, segmentLocation, segmentProfit, segmentTech, err_5, teamSize, err_6;
424
+ var _d, _e, _f, _g, _h;
425
+ return __generator(this, function (_j) {
426
+ switch (_j.label) {
451
427
  case 0:
452
428
  _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
453
429
  responseBody = connect.data.otpData.responseBody;
454
430
  leadBrandId = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand_id;
455
- isNewBrand = params.isNewBrand, brandName = params.brandName, salesChannels = params.salesChannels, selectedBrandItem = params.selectedBrandItem, brandLogoId = params.brandLogoId, segmentLocation = params.segmentLocation, segmentProfit = params.segmentProfit, segmentTech = params.segmentTech, teamSize = params.teamSize, termAndConditionChecked = params.termAndConditionChecked;
431
+ isNewBrand = params.isNewBrand, brandName = params.brandName, salesChannels = params.salesChannels, selectedBrandItem = params.selectedBrandItem, brandLogoId = params.brandLogoId, termAndConditionChecked = params.termAndConditionChecked;
456
432
  getAddress = function (value, isTwitter, isWeb) {
457
433
  if (isTwitter)
458
434
  return '@' + value;
@@ -470,7 +446,7 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
470
446
  })
471
447
  };
472
448
  });
473
- if (!!isNewBrand) return [3, 4];
449
+ if (!!isNewBrand) return [3, 11];
474
450
  if (!(leadBrandId !== (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id))) return [3, 2];
475
451
  payload_1 = {
476
452
  brand: {
@@ -481,24 +457,46 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
481
457
  };
482
458
  return [4, API.leadService.updateLead(payload_1)];
483
459
  case 1:
484
- _g.sent();
485
- _g.label = 2;
460
+ _j.sent();
461
+ _j.label = 2;
486
462
  case 2:
487
463
  brandReqBody_1 = {
488
464
  id: (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id) || '',
489
465
  channel_services: channel_services,
490
466
  term: ['general'],
491
- segment: __assign(__assign(__assign(__assign({}, ((segmentLocation === null || segmentLocation === void 0 ? void 0 : segmentLocation.id) && { location_type: { id: segmentLocation.id } })), ((segmentProfit === null || segmentProfit === void 0 ? void 0 : segmentProfit.id) && { profit_type: { id: segmentProfit.id } })), ((segmentTech === null || segmentTech === void 0 ? void 0 : segmentTech.id) && { tech_type: { id: segmentTech.id } })), { team: { id: (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) || '' } }),
492
467
  step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO
493
468
  };
494
469
  return [4, API.brandService.updateBrandInfo(brandReqBody_1)];
495
470
  case 3:
496
- brand_1 = _g.sent();
497
- thunkApi.dispatch(updateLeadSuccess());
498
- thunkApi.dispatch(handleNextScreenStep());
499
- (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
500
- return [2, { response: brand_1, formData: params }];
471
+ brand_1 = _j.sent();
472
+ _j.label = 4;
501
473
  case 4:
474
+ _j.trys.push([4, 6, , 7]);
475
+ return [4, thunkApi.dispatch(retrieveSegmentDataList()).unwrap()];
476
+ case 5:
477
+ _b = _j.sent(), segmentLocation = _b.segmentLocation, segmentProfit = _b.segmentProfit, segmentTech = _b.segmentTech;
478
+ brand_1.segment_location_list = segmentLocation;
479
+ brand_1.segment_profit_list = segmentProfit;
480
+ brand_1.segment_tech_list = segmentTech;
481
+ return [3, 7];
482
+ case 6:
483
+ err_3 = _j.sent();
484
+ return [3, 7];
485
+ case 7:
486
+ _j.trys.push([7, 9, , 10]);
487
+ return [4, API.dataService.getTeamSize({ page: 0 })];
488
+ case 8:
489
+ teamSize = _j.sent();
490
+ brand_1.team_size_list = teamSize.list;
491
+ return [3, 10];
492
+ case 9:
493
+ err_4 = _j.sent();
494
+ return [3, 10];
495
+ case 10:
496
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
497
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
498
+ return [2, { response: brand_1, formData: params }];
499
+ case 11:
502
500
  brandNameBody = {
503
501
  id: '',
504
502
  name: {
@@ -514,25 +512,72 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
514
512
  encryption_contract: ['brand.name.en', 'brand.name.ar', 'brand.name.zh']
515
513
  };
516
514
  return [4, API.leadService.updateLead(payload)];
517
- case 5:
518
- lead = _g.sent();
515
+ case 12:
516
+ lead = _j.sent();
519
517
  if (!lead.brand) {
520
518
  console.error('Internal server error: brand is not created');
521
519
  throw new Error('Internal server error');
522
520
  }
523
521
  brandReqBody = {
524
- id: ((_d = lead.brand) === null || _d === void 0 ? void 0 : _d.id) || '',
522
+ id: ((_f = lead.brand) === null || _f === void 0 ? void 0 : _f.id) || '',
525
523
  channel_services: channel_services,
526
524
  term: ['general'],
527
- step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO,
525
+ step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO
526
+ };
527
+ return [4, API.brandService.updateBrandInfo(brandReqBody)];
528
+ case 13:
529
+ brand = _j.sent();
530
+ _j.label = 14;
531
+ case 14:
532
+ _j.trys.push([14, 16, , 17]);
533
+ return [4, thunkApi.dispatch(retrieveSegmentDataList()).unwrap()];
534
+ case 15:
535
+ _c = _j.sent(), segmentLocation = _c.segmentLocation, segmentProfit = _c.segmentProfit, segmentTech = _c.segmentTech;
536
+ brand.segment_location_list = segmentLocation;
537
+ brand.segment_profit_list = segmentProfit;
538
+ brand.segment_tech_list = segmentTech;
539
+ return [3, 17];
540
+ case 16:
541
+ err_5 = _j.sent();
542
+ return [3, 17];
543
+ case 17:
544
+ _j.trys.push([17, 19, , 20]);
545
+ return [4, API.dataService.getTeamSize({ page: 0 })];
546
+ case 18:
547
+ teamSize = _j.sent();
548
+ brand.team_size_list = teamSize.list;
549
+ return [3, 20];
550
+ case 19:
551
+ err_6 = _j.sent();
552
+ return [3, 20];
553
+ case 20:
554
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
555
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, params);
556
+ return [2, { response: brand, formData: params }];
557
+ }
558
+ });
559
+ }); });
560
+ export var updateLeadBrandSegment = createAsyncThunk('updateLeadBrandSegment', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
561
+ var _a, settings, connect, responseBody, leadBrandId, segmentLocation, segmentProfit, segmentTech, teamSize, brandReqBody, brand;
562
+ var _b, _c, _d;
563
+ return __generator(this, function (_e) {
564
+ switch (_e.label) {
565
+ case 0:
566
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
567
+ responseBody = connect.data.brandData.responseBody;
568
+ leadBrandId = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand) === null || _b === void 0 ? void 0 : _b.id;
569
+ segmentLocation = params.segmentLocation, segmentProfit = params.segmentProfit, segmentTech = params.segmentTech, teamSize = params.teamSize;
570
+ brandReqBody = {
571
+ id: leadBrandId || '',
572
+ step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_SEGMENT_INFO,
528
573
  segment: __assign(__assign(__assign(__assign({}, ((segmentLocation === null || segmentLocation === void 0 ? void 0 : segmentLocation.id) && { location_type: { id: segmentLocation.id } })), ((segmentProfit === null || segmentProfit === void 0 ? void 0 : segmentProfit.id) && { profit_type: { id: segmentProfit.id } })), ((segmentTech === null || segmentTech === void 0 ? void 0 : segmentTech.id) && { tech_type: { id: segmentTech.id } })), { team: { id: (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) || '' } })
529
574
  };
530
575
  return [4, API.brandService.updateBrandInfo(brandReqBody)];
531
- case 6:
532
- brand = _g.sent();
576
+ case 1:
577
+ brand = _e.sent();
533
578
  thunkApi.dispatch(updateLeadSuccess());
534
579
  thunkApi.dispatch(handleNextScreenStep());
535
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
580
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
536
581
  return [2, { response: brand, formData: params }];
537
582
  }
538
583
  });
@@ -642,15 +687,17 @@ var initialState = {
642
687
  brandData: {
643
688
  brandName: '',
644
689
  salesChannels: [],
645
- segmentLocation: undefined,
646
- segmentProfit: undefined,
647
- segmentTech: undefined,
648
- teamSize: undefined,
649
690
  termAndConditionChecked: false,
650
691
  selectedBrandItem: {},
651
692
  responseBody: {
652
693
  brand_list: []
653
694
  }
695
+ },
696
+ brandSegmentData: {
697
+ segmentLocation: undefined,
698
+ segmentProfit: undefined,
699
+ segmentTech: undefined,
700
+ teamSize: undefined
654
701
  }
655
702
  }
656
703
  };
@@ -853,10 +900,10 @@ export var connectSlice = createSlice({
853
900
  state.error = action.error.message;
854
901
  })
855
902
  .addCase(updateLeadIndividual.fulfilled, function (state, action) {
856
- var _a, _b, _c, _d, _e, _f;
903
+ var _a, _b, _c;
857
904
  state.loading = false;
858
905
  state.error = null;
859
- var _g = action.payload, formData = _g.formData, leadResponse = _g.leadResponse;
906
+ var _d = action.payload, formData = _d.formData, leadResponse = _d.leadResponse;
860
907
  var brand = leadResponse.brand, rest = __rest(leadResponse, ["brand"]);
861
908
  if (brand) {
862
909
  var channel_services = brand.channel_services, terms = brand.terms;
@@ -869,23 +916,6 @@ export var connectSlice = createSlice({
869
916
  }
870
917
  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;
871
918
  state.data.brandData.brandName = (_c = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.name) === null || _c === void 0 ? void 0 : _c.en;
872
- state.data.brandData.segmentLocation = (_d = rest.segment_location_list) === null || _d === void 0 ? void 0 : _d.find(function (location) {
873
- var _a, _b;
874
- return location.id === ((_b = (_a = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _a === void 0 ? void 0 : _a.location_type) === null || _b === void 0 ? void 0 : _b.id);
875
- });
876
- state.data.brandData.segmentProfit = (_e = rest.segment_profit_list) === null || _e === void 0 ? void 0 : _e.find(function (profit) {
877
- var _a, _b;
878
- return profit.id === ((_b = (_a = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _a === void 0 ? void 0 : _a.profit_type) === null || _b === void 0 ? void 0 : _b.id);
879
- });
880
- state.data.brandData.segmentTech = (_f = rest.segment_tech_list) === null || _f === void 0 ? void 0 : _f.find(function (tech) {
881
- var _a, _b;
882
- return tech.id === ((_b = (_a = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _a === void 0 ? void 0 : _a.tech_type) === null || _b === void 0 ? void 0 : _b.id);
883
- });
884
- state.data.brandData.teamSize = rest.team_size_list.find(function (_a) {
885
- var _b, _c;
886
- var id = _a.id;
887
- 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;
888
- });
889
919
  state.data.individualData = formData;
890
920
  state.data.individualData.responseBody = rest;
891
921
  })
@@ -913,8 +943,26 @@ export var connectSlice = createSlice({
913
943
  state.loading = false;
914
944
  state.error = null;
915
945
  var _a = action.payload, formData = _a.formData, response = _a.response;
916
- state.data.brandData = formData;
917
- state.data.brandData.responseBody = response;
946
+ var _b = response || {}, segment_location_list = _b.segment_location_list, segment_profit_list = _b.segment_profit_list, segment_tech_list = _b.segment_tech_list, team_size_list = _b.team_size_list, brand = _b.brand;
947
+ state.data.brandSegmentData.segmentLocation = segment_location_list === null || segment_location_list === void 0 ? void 0 : segment_location_list.find(function (location) {
948
+ var _a, _b;
949
+ return location.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.location_type) === null || _b === void 0 ? void 0 : _b.id);
950
+ });
951
+ state.data.brandSegmentData.segmentProfit = segment_profit_list === null || segment_profit_list === void 0 ? void 0 : segment_profit_list.find(function (profit) {
952
+ var _a, _b;
953
+ return profit.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.profit_type) === null || _b === void 0 ? void 0 : _b.id);
954
+ });
955
+ state.data.brandSegmentData.segmentTech = segment_tech_list === null || segment_tech_list === void 0 ? void 0 : segment_tech_list.find(function (tech) {
956
+ var _a, _b;
957
+ return tech.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.tech_type) === null || _b === void 0 ? void 0 : _b.id);
958
+ });
959
+ state.data.brandSegmentData.teamSize = team_size_list === null || team_size_list === void 0 ? void 0 : team_size_list.find(function (_a) {
960
+ var _b, _c;
961
+ var id = _a.id;
962
+ return ((_c = (_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id) === id;
963
+ });
964
+ state.data.brandData = __assign(__assign({}, formData), { responseBody: __assign(__assign({}, state.data.brandData.responseBody), { brand: brand }) });
965
+ state.data.brandSegmentData.responseBody = { segment_location_list: segment_location_list, segment_profit_list: segment_profit_list, segment_tech_list: segment_tech_list, team_size_list: team_size_list };
918
966
  })
919
967
  .addCase(updateLeadBrand.pending, function (state) {
920
968
  state.loading = true;
@@ -923,6 +971,21 @@ export var connectSlice = createSlice({
923
971
  .addCase(updateLeadBrand.rejected, function (state, action) {
924
972
  state.loading = false;
925
973
  state.error = action.error.message;
974
+ })
975
+ .addCase(updateLeadBrandSegment.fulfilled, function (state, action) {
976
+ state.loading = false;
977
+ state.error = null;
978
+ var _a = action.payload, formData = _a.formData, response = _a.response;
979
+ state.data.brandSegmentData = formData;
980
+ state.data.brandSegmentData.responseBody = __assign(__assign({}, state.data.brandSegmentData.responseBody), response);
981
+ })
982
+ .addCase(updateLeadBrandSegment.pending, function (state) {
983
+ state.loading = true;
984
+ state.error = null;
985
+ })
986
+ .addCase(updateLeadBrandSegment.rejected, function (state, action) {
987
+ state.loading = false;
988
+ state.error = action.error.message;
926
989
  })
927
990
  .addCase(checkEmailAvailability.fulfilled, function (state, action) {
928
991
  var _a;
@@ -10,57 +10,39 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { ScreenContainer } from '../../../shared/Containers';
14
13
  import React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
15
  import { FormProvider, useForm } from 'react-hook-form';
16
- import Form from '../../../../components/Form';
17
16
  import { styled } from '@mui/material/styles';
18
17
  import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
18
+ import { handlePrevScreenStep } from '../../../../app/settings';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
- import { BrandValidationSchema } from './validation';
20
+ import Form from '../../../../components/Form';
21
+ import { mapSalesChannel } from '../../../../utils';
21
22
  import Button from '../../../shared/Button';
22
- import { handlePrevScreenStep } from '../../../../app/settings';
23
23
  import { clearError, brandSelector, updateBrand, retrieveBoardStatus } from '../../../app/brand/brandStore';
24
- import { useTranslation } from 'react-i18next';
25
- import TeamSize from '../../../brand/screens/BrandInfo/TeamSize';
26
- import Collapse from '../../../../components/Collapse';
27
- import { mapSalesChannel } from '../../../../utils';
24
+ import { ScreenContainer } from '../../../shared/Containers';
28
25
  import BrandName from './BrandName';
29
26
  import SalesChannels from './SalesChannels';
30
27
  import BrandLogo from './BrandLogo';
31
- import SegmentLocations from './SegmentLocations';
32
- import SegmentProfits from './SegmentProfits';
33
- import SegmentTechs from './SegmentTechs';
28
+ import { BrandValidationSchema } from './validation';
34
29
  var FormStyled = styled(Form)(function () { return ({
35
30
  display: 'flex',
36
31
  flexDirection: 'column'
37
32
  }); });
38
- var ListType;
39
- (function (ListType) {
40
- ListType["TeamSizeList"] = "TeamSizeList";
41
- ListType["SegmentLocationList"] = "SegmentLocationList";
42
- ListType["SegmentProfitList"] = "SegmentProfitList";
43
- ListType["SegmentTechList"] = "SegmentTechList";
44
- })(ListType || (ListType = {}));
45
33
  var BrandInfo = function (_a) {
46
- var _b, _c, _d, _e, _f, _g, _h, _j;
47
- var _k = React.useState(), listActive = _k[0], setListActive = _k[1];
48
- var _l = React.useState(false), brandNameChecking = _l[0], setBrandNameChecking = _l[1];
34
+ var _b = React.useState(false), brandNameChecking = _b[0], setBrandNameChecking = _b[1];
49
35
  var dispatch = useAppDispatch();
50
36
  var t = useTranslation().t;
51
37
  var isAr = useLanguage().isAr;
52
- var _m = useAppSelector(brandSelector), data = _m.data, loading = _m.loading, error = _m.error, uploadingBrandLogo = _m.uploadingBrandLogo;
53
- var _o = data.brandData, brandName = _o.brandName, segmentLocation = _o.segmentLocation, segmentProfit = _o.segmentProfit, segmentTech = _o.segmentTech, teamSize = _o.teamSize, salesChannels = _o.salesChannels, brandLogoId = _o.brandLogoId, responseBody = _o.responseBody;
54
- var _p = data.verify.responseBody || {}, brand = _p.brand, flows = _p.flows;
55
- var _q = brand || {}, logo_details = _q.logo_details, data_status = _q.data_status, data_verification = _q.data_verification, name = _q.name, resSegment = _q.segment;
38
+ var _c = useAppSelector(brandSelector), data = _c.data, loading = _c.loading, error = _c.error, uploadingBrandLogo = _c.uploadingBrandLogo;
39
+ var _d = data.brandData, brandName = _d.brandName, salesChannels = _d.salesChannels, brandLogoId = _d.brandLogoId, responseBody = _d.responseBody;
40
+ var _e = data.verify.responseBody || {}, brand = _e.brand, flows = _e.flows;
41
+ var _f = brand || {}, logo_details = _f.logo_details, data_status = _f.data_status, data_verification = _f.data_verification, name = _f.name;
56
42
  var methods = useForm({
57
43
  resolver: yupResolver(BrandValidationSchema()),
58
44
  defaultValues: {
59
45
  brandName: brandName,
60
- segmentLocation: segmentLocation,
61
- segmentProfit: segmentProfit,
62
- segmentTech: segmentTech,
63
- teamSize: teamSize,
64
46
  salesChannels: salesChannels,
65
47
  brandLogoId: brandLogoId
66
48
  },
@@ -70,23 +52,11 @@ var BrandInfo = function (_a) {
70
52
  useSetFromDefaultValues(methods, data.brandData, true);
71
53
  var defaultBrandLogoFile = React.useMemo(function () { return logo_details && __assign(__assign({}, logo_details), { docId: '' }); }, [logo_details]);
72
54
  var originalReadOnly = useFormReadOnly(methods, { brandLogoId: defaultBrandLogoFile });
73
- var noneEditable = useDataNoneEditable(data_status, [
74
- 'name.en',
75
- 'name.ar',
76
- 'segment.location_type',
77
- 'segment.profit_type',
78
- 'segment.tech_type',
79
- 'segment.teams',
80
- 'channel_services'
81
- ]);
55
+ var noneEditable = useDataNoneEditable(data_status, ['name.en', 'name.ar', 'channel_services', 'logo']);
82
56
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
83
- var dataVerified = useDataVerified(data_verification, ['logo', 'name.en', 'name.ar', 'segment.teams', 'segment.type']);
57
+ var dataVerified = useDataVerified(data_verification, ['logo', 'name.en', 'name.ar']);
84
58
  var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
85
59
  var isBrandNameVerified = dataVerified['name.en'] && dataVerified['name.ar'] && ((name === null || name === void 0 ? void 0 : name.en) === watch('brandName') || (name === null || name === void 0 ? void 0 : name.ar) === watch('brandName'));
86
- var isSegmentLocationVerified = dataVerified['segment.location_type'] && ((_b = resSegment === null || resSegment === void 0 ? void 0 : resSegment.location_type) === null || _b === void 0 ? void 0 : _b.id) === ((_c = watch('segmentLocation')) === null || _c === void 0 ? void 0 : _c.id);
87
- var isSegmentProfitVerified = dataVerified['segment.profit_type'] && ((_d = resSegment === null || resSegment === void 0 ? void 0 : resSegment.profit_type) === null || _d === void 0 ? void 0 : _d.id) === ((_e = watch('segmentProfit')) === null || _e === void 0 ? void 0 : _e.id);
88
- var isSegmentTechVerified = dataVerified['segment.tech_type'] && ((_f = resSegment === null || resSegment === void 0 ? void 0 : resSegment.tech_type) === null || _f === void 0 ? void 0 : _f.id) === ((_g = watch('segmentTech')) === null || _g === void 0 ? void 0 : _g.id);
89
- var isTeamSizeVerified = dataVerified['segment.teams'] && ((_h = resSegment === null || resSegment === void 0 ? void 0 : resSegment.team) === null || _h === void 0 ? void 0 : _h.id) === ((_j = watch('teamSize')) === null || _j === void 0 ? void 0 : _j.id);
90
60
  var onSubmit = function (data) {
91
61
  dispatch(updateBrand(getFelids(data)));
92
62
  };
@@ -111,13 +81,6 @@ var BrandInfo = function (_a) {
111
81
  }, [responseBody]);
112
82
  var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
113
83
  var disabled = brandErrChecks || brandNameChecking || uploadingBrandLogo;
114
- var handleMenuClick = function (flag) {
115
- setListActive(flag);
116
- };
117
- var isSegmentLocationListActive = listActive === ListType.SegmentLocationList;
118
- var isSegmentProfitListActive = listActive === ListType.SegmentProfitList;
119
- var isSegmentTechListActive = listActive === ListType.SegmentTechList;
120
- var isTeamSizeListActive = listActive === ListType.TeamSizeList;
121
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, { readOnly: readOnly['brandName'] || (noneEditable['name.en'] && noneEditable['name.ar']), show: !listActive, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking, isVerified: isBrandNameVerified }), _jsx(BrandLogo, { defaultFile: defaultBrandLogoFile, readOnly: readOnly['brandLogoId'], show: !listActive, isVerified: dataVerified['logo'] }), _jsx(SegmentLocations, { readOnly: readOnly['segmentLocation'], show: !isTeamSizeListActive && !isSegmentProfitListActive && !isSegmentTechListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentLocationList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isSegmentLocationVerified }), _jsx(SegmentProfits, { readOnly: readOnly['segmentProfit'], show: !isTeamSizeListActive && !isSegmentLocationListActive && !isSegmentTechListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentProfitList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isSegmentProfitVerified }), _jsx(SegmentTechs, { readOnly: readOnly['segmentTech'], show: !isTeamSizeListActive && !isSegmentLocationListActive && !isSegmentProfitListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentTechList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isSegmentTechVerified }), _jsx(TeamSize, { readOnly: readOnly['teamSize'] || noneEditable['segment.teams'], show: !isSegmentLocationListActive && !isSegmentProfitListActive && !isSegmentTechListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isTeamSizeVerified }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(SalesChannels, { readOnly: readOnly['salesChannels'] || noneEditable['channel_services'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') }))] }))] })) })) }));
84
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, { readOnly: readOnly['brandName'] || (noneEditable['name.en'] && noneEditable['name.ar']), brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking, isVerified: isBrandNameVerified }), _jsx(BrandLogo, { defaultFile: defaultBrandLogoFile, readOnly: readOnly['brandLogoId'], isVerified: dataVerified['logo'] }), _jsx(SalesChannels, { readOnly: readOnly['salesChannels'] || noneEditable['channel_services'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') }))] })) })) }));
122
85
  };
123
86
  export default BrandInfo;
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { FileDetails } from '../../../../@types';
3
3
  type BrandLogoProps = {
4
- show: boolean;
5
4
  readOnly?: boolean;
6
5
  defaultFile?: FileDetails;
7
6
  isVerified?: boolean;
8
7
  };
9
- declare const BrandLogo: ({ show, readOnly, defaultFile, isVerified }: BrandLogoProps) => JSX.Element;
8
+ declare const BrandLogo: ({ readOnly, defaultFile, isVerified }: BrandLogoProps) => JSX.Element;
10
9
  export default BrandLogo;
@@ -1,14 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx } from "react/jsx-runtime";
13
2
  import { useTranslation } from 'react-i18next';
14
3
  import { useController, useFormContext } from 'react-hook-form';
@@ -16,7 +5,6 @@ import { styled } from '@mui/material/styles';
16
5
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
17
6
  import { DocumentPurpose } from '../../../../@types';
18
7
  import { FileRemoveType, VALID_FILE_FORMATS_FOR_IMAGE } from '../../../../constants';
19
- import Collapse from '../../../../components/Collapse';
20
8
  import { ScreenContainer } from '../../../shared/Containers';
21
9
  import { UploadWrapper } from '../../../shared/UploadFile';
22
10
  import { brandSelector, uploadingBrandLogoStatus, clearBrandLogo, clearError } from '../../../app/brand/brandStore';
@@ -28,7 +16,7 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
28
16
  });
29
17
  var BrandLogo = function (_a) {
30
18
  var _b;
31
- var show = _a.show, readOnly = _a.readOnly, defaultFile = _a.defaultFile, isVerified = _a.isVerified;
19
+ var readOnly = _a.readOnly, defaultFile = _a.defaultFile, isVerified = _a.isVerified;
32
20
  var t = useTranslation().t;
33
21
  var control = useFormContext().control;
34
22
  var brandLogoIdControl = useController({ name: 'brandLogoId', control: control });
@@ -48,6 +36,6 @@ var BrandLogo = function (_a) {
48
36
  dispatch(clearBrandLogo());
49
37
  brandLogoIdControl.field.onChange(undefined);
50
38
  };
51
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadWrapper, { id: 'brandLogoId', readOnly: readOnly, fileRemoveType: FileRemoveType.BRAND_LOGO_FILE_ID, control: control, label: t('title_brand_logo'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('description_brand_logo'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleBrandLogoChange, isSubmitting: loading, onDeleteFile: handleReset, defaultFile: defaultFile, purpose: DocumentPurpose.BRAND_LOGO, validFileFormats: VALID_FILE_FORMATS_FOR_IMAGE, fileUploadingStatus: function (uploading) { return dispatch(uploadingBrandLogoStatus(uploading)); }, isVerified: isVerified && !id }) }) })));
39
+ return (_jsx(FeatureStyled, { children: _jsx(UploadWrapper, { id: 'brandLogoId', readOnly: readOnly, fileRemoveType: FileRemoveType.BRAND_LOGO_FILE_ID, control: control, label: t('title_brand_logo'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('description_brand_logo'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleBrandLogoChange, isSubmitting: loading, onDeleteFile: handleReset, defaultFile: defaultFile, purpose: DocumentPurpose.BRAND_LOGO, validFileFormats: VALID_FILE_FORMATS_FOR_IMAGE, fileUploadingStatus: function (uploading) { return dispatch(uploadingBrandLogoStatus(uploading)); }, isVerified: isVerified && !id }) }));
52
40
  };
53
41
  export default BrandLogo;
@@ -1,10 +1,9 @@
1
1
  import * as React from 'react';
2
2
  interface BrandNameProps {
3
- show: boolean;
4
3
  fetchingBrandName: (flag: boolean) => void;
5
4
  brandNameChecking: boolean;
6
5
  readOnly?: boolean;
7
6
  isVerified?: boolean;
8
7
  }
9
- declare const _default: React.MemoExoticComponent<({ show, brandNameChecking, fetchingBrandName, readOnly, isVerified }: BrandNameProps) => JSX.Element>;
8
+ declare const _default: React.MemoExoticComponent<({ brandNameChecking, fetchingBrandName, readOnly, isVerified }: BrandNameProps) => JSX.Element>;
10
9
  export default _default;
@@ -58,7 +58,6 @@ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
58
58
  import { FieldType } from '../../../../@types';
59
59
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
60
60
  import Tooltip from '../../../../components/Tooltip';
61
- import Collapse from '../../../../components/Collapse';
62
61
  import Text from '../../../../components/Text';
63
62
  import Input from '../../../shared/Input';
64
63
  import { ScreenContainer } from '../../../shared/Containers';
@@ -97,7 +96,7 @@ var InfoIconStyled = styled(InfoIcon)(function (_a) {
97
96
  var cancelToken = null;
98
97
  var BrandName = function (_a) {
99
98
  var _b, _c;
100
- var show = _a.show, brandNameChecking = _a.brandNameChecking, fetchingBrandName = _a.fetchingBrandName, readOnly = _a.readOnly, isVerified = _a.isVerified;
99
+ var brandNameChecking = _a.brandNameChecking, fetchingBrandName = _a.fetchingBrandName, readOnly = _a.readOnly, isVerified = _a.isVerified;
101
100
  var dispatch = useAppDispatch();
102
101
  var _d = React.useState(false), isHovered = _d[0], setIsHovered = _d[1];
103
102
  var t = useTranslation().t;
@@ -136,6 +135,6 @@ var BrandName = function (_a) {
136
135
  var clearBrandName = function () {
137
136
  brandControl.field.onChange('');
138
137
  };
139
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { readOnly: readOnly, onChange: handleBrandNameChange, value: brandNameValue || '', disabled: isNonEditable, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, isVerified: isVerified, error: error, onClear: clearBrandName }) })] })) })));
138
+ return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { readOnly: readOnly, onChange: handleBrandNameChange, value: brandNameValue || '', disabled: isNonEditable, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, isVerified: isVerified, error: error, onClear: clearBrandName }) })] })));
140
139
  };
141
140
  export default React.memo(BrandName);
@@ -1,10 +1,6 @@
1
1
  import * as yup from 'yup';
2
2
  export declare const BrandValidationSchema: () => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
3
  brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
- segmentLocation: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
5
- segmentProfit: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
6
- segmentTech: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
7
- teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
8
4
  salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
9
5
  id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
10
6
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -16,10 +12,6 @@ export declare const BrandValidationSchema: () => yup.ObjectSchema<import("yup/l
16
12
  }>>[] | undefined>;
17
13
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
18
14
  brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
19
- segmentLocation: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
20
- segmentProfit: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
21
- segmentTech: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
22
- teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
23
15
  salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
16
  id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
25
17
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -31,10 +23,6 @@ export declare const BrandValidationSchema: () => yup.ObjectSchema<import("yup/l
31
23
  }>>[] | undefined>;
32
24
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
33
25
  brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
34
- segmentLocation: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
35
- segmentProfit: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
36
- segmentTech: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
37
- teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
38
26
  salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
39
27
  id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
40
28
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -83,10 +83,6 @@ export var BrandValidationSchema = function () {
83
83
  }
84
84
  })
85
85
  .required('enter_brand_name_english_chars_numbers_space'),
86
- segmentLocation: yup.object().required('alert_choose_segment_location'),
87
- segmentProfit: yup.object().required('alert_choose_segment_profit'),
88
- segmentTech: yup.object().required('alert_choose_segment_tech'),
89
- teamSize: yup.object().required('alert_choose_teamSize'),
90
86
  salesChannels: yup
91
87
  .array()
92
88
  .min(1, 'choose_atleast_one_channel')
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface BrandProps {
3
+ }
4
+ declare const BrandInfo: ({}: BrandProps) => JSX.Element;
5
+ export default BrandInfo;