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