@djb25/digit-ui-module-vendor 1.0.69 → 1.0.70

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.
@@ -2385,17 +2385,47 @@ const VendorInbox = props => {
2385
2385
  const getCSVExportData = React.useCallback(function () {
2386
2386
  try {
2387
2387
  let _exit = false;
2388
- function _temp8(_result) {
2388
+ function _temp10(_result) {
2389
2389
  let _exit2 = false;
2390
2390
  if (_exit) return _result;
2391
- const _temp6 = function () {
2391
+ function _temp0(_result2) {
2392
+ let _exit3 = false;
2393
+ if (_exit2) return _result2;
2394
+ const _temp8 = function () {
2395
+ if (props.selectedTab === "VENDOR") {
2396
+ return _catch(function () {
2397
+ var _props$searchParams, _props$searchParams2;
2398
+ return Promise.resolve(Digit.FSMService.vendorSearch(tenantId, {
2399
+ status: "ACTIVE,DISABLED",
2400
+ name: (_props$searchParams = props.searchParams) === null || _props$searchParams === void 0 ? void 0 : _props$searchParams.name,
2401
+ mobileNumber: ((_props$searchParams2 = props.searchParams) === null || _props$searchParams2 === void 0 ? void 0 : _props$searchParams2.mobileNumber) || undefined,
2402
+ limit: 100000,
2403
+ offset: 0
2404
+ })).then(function (response) {
2405
+ const _temp6 = (response === null || response === void 0 ? void 0 : response.vendors) || (response === null || response === void 0 ? void 0 : response.vendor) || [];
2406
+ _exit3 = true;
2407
+ return _temp6;
2408
+ });
2409
+ }, function (e) {
2410
+ console.error(e);
2411
+ const _temp7 = [];
2412
+ _exit3 = true;
2413
+ return _temp7;
2414
+ });
2415
+ }
2416
+ }();
2417
+ return _temp8 && _temp8.then ? _temp8.then(function (_result3) {
2418
+ return _exit3 ? _result3 : tableData;
2419
+ }) : _exit3 ? _temp8 : tableData;
2420
+ }
2421
+ const _temp9 = function () {
2392
2422
  if (props.selectedTab === "SURVEYOR") {
2393
2423
  return _catch(function () {
2394
- var _props$searchParams, _props$searchParams2;
2424
+ var _props$searchParams3, _props$searchParams4;
2395
2425
  return Promise.resolve(Digit.FSMService.surveyorSearch(tenantId, {
2396
2426
  status: "ACTIVE,DISABLED",
2397
- name: (_props$searchParams = props.searchParams) === null || _props$searchParams === void 0 ? void 0 : _props$searchParams.name,
2398
- mobileNumber: ((_props$searchParams2 = props.searchParams) === null || _props$searchParams2 === void 0 ? void 0 : _props$searchParams2.mobileNumber) || undefined,
2427
+ name: (_props$searchParams3 = props.searchParams) === null || _props$searchParams3 === void 0 ? void 0 : _props$searchParams3.name,
2428
+ mobileNumber: ((_props$searchParams4 = props.searchParams) === null || _props$searchParams4 === void 0 ? void 0 : _props$searchParams4.mobileNumber) || undefined,
2399
2429
  limit: 100000,
2400
2430
  offset: 0
2401
2431
  })).then(function (response) {
@@ -2411,18 +2441,16 @@ const VendorInbox = props => {
2411
2441
  });
2412
2442
  }
2413
2443
  }();
2414
- return _temp6 && _temp6.then ? _temp6.then(function (_result2) {
2415
- return _exit2 ? _result2 : tableData;
2416
- }) : _exit2 ? _temp6 : tableData;
2444
+ return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
2417
2445
  }
2418
- const _temp7 = function () {
2446
+ const _temp1 = function () {
2419
2447
  if (props.selectedTab === "SUPERVISOR") {
2420
2448
  return _catch(function () {
2421
- var _props$searchParams3, _props$searchParams4;
2449
+ var _props$searchParams5, _props$searchParams6;
2422
2450
  return Promise.resolve(Digit.FSMService.supervisorSearch(tenantId, {
2423
2451
  status: "ACTIVE,DISABLED",
2424
- name: (_props$searchParams3 = props.searchParams) === null || _props$searchParams3 === void 0 ? void 0 : _props$searchParams3.name,
2425
- mobileNumber: ((_props$searchParams4 = props.searchParams) === null || _props$searchParams4 === void 0 ? void 0 : _props$searchParams4.mobileNumber) || undefined,
2452
+ name: (_props$searchParams5 = props.searchParams) === null || _props$searchParams5 === void 0 ? void 0 : _props$searchParams5.name,
2453
+ mobileNumber: ((_props$searchParams6 = props.searchParams) === null || _props$searchParams6 === void 0 ? void 0 : _props$searchParams6.mobileNumber) || undefined,
2426
2454
  limit: 100000,
2427
2455
  offset: 0
2428
2456
  })).then(function (response) {
@@ -2438,7 +2466,7 @@ const VendorInbox = props => {
2438
2466
  });
2439
2467
  }
2440
2468
  }();
2441
- return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
2469
+ return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(_temp10) : _temp10(_temp1));
2442
2470
  } catch (e) {
2443
2471
  return Promise.reject(e);
2444
2472
  }