@bjsdistribution/dms-client-return 0.0.53 → 0.0.54

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.
@@ -3118,7 +3118,7 @@ function useGetEventNotes() {
3118
3118
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3119
3119
  while (1) switch (_context.prev = _context.next) {
3120
3120
  case 0:
3121
- endpoint = getBaseEndpoint() + "events/get/event_information/"; // setLoading(true);
3121
+ endpoint = getBaseEndpoint() + "/events/get/event_information/"; // setLoading(true);
3122
3122
  _context.prev = 1;
3123
3123
  headers = {
3124
3124
  accept: 'application/json',
@@ -9442,19 +9442,24 @@ var displayValueOrNA = function displayValueOrNA(value) {
9442
9442
 
9443
9443
  var optionsPrint = [{
9444
9444
  icon: 'runSheet',
9445
- label: 'Print Runsheet'
9445
+ label: 'Print Runsheet',
9446
+ type: 'runsheet_url'
9446
9447
  }, {
9447
9448
  icon: 'loadSheet',
9448
- label: 'Print Loadsheet'
9449
+ label: 'Print Loadsheet',
9450
+ type: 'loadsheet_url'
9449
9451
  }, {
9450
9452
  icon: 'deliveryLables',
9451
- label: 'Print Delivery Labels'
9453
+ label: 'Print Delivery Labels',
9454
+ type: 'delivery_label_url'
9452
9455
  }, {
9453
9456
  icon: 'customerLables',
9454
- label: 'Print Customer Labels'
9457
+ label: 'Print Customer Labels',
9458
+ type: 'customer_label_url'
9455
9459
  }, {
9456
9460
  icon: 'collectionLables',
9457
- label: 'Print Collection Labels'
9461
+ label: 'Print Return Labels',
9462
+ type: 'return_label_url'
9458
9463
  }];
9459
9464
  var optionsForReturnPrint = [{
9460
9465
  icon: 'deliveryLables',
@@ -10334,25 +10339,24 @@ function LoadIcon() {
10334
10339
  var _templateObject$1_, _templateObject2$1v;
10335
10340
  var PrintDropDown = function PrintDropDown(_ref) {
10336
10341
  var legacyProductId = _ref.legacyProductId;
10337
- var downloadFiles = function downloadFiles(label) {
10338
- var url = legacyProductId == null ? void 0 : legacyProductId[label.replace('Print ', '').toLowerCase().replace(' ', '_') + "_url"];
10342
+ var downloadFiles = function downloadFiles(type) {
10343
+ var url;
10344
+ if (type) {
10345
+ url = legacyProductId[type];
10346
+ }
10339
10347
  if (url) {
10340
10348
  window.open(url, '_blank');
10341
10349
  } else {
10342
- console.log('URL not available for', label);
10350
+ console.log('URL not available for', type);
10343
10351
  }
10344
10352
  };
10345
- var isOptionDisabled = function isOptionDisabled(label) {
10346
- var url = legacyProductId == null ? void 0 : legacyProductId[label.replace('Print ', '').toLowerCase().replace(' ', '_') + "_url"];
10347
- return !url;
10348
- };
10349
- return React.createElement(OptionsList$1, null, optionsPrint.map(function (item, index) {
10353
+ return React.createElement(OptionsList$1, null, optionsPrint == null ? void 0 : optionsPrint.map(function (item, index) {
10350
10354
  var IconComponent = PrintIconMap[item.icon];
10351
- var isDisabled = isOptionDisabled(item.label);
10355
+ var isDisabled = !legacyProductId[item.type];
10352
10356
  return React.createElement(OptionsListLi$1, {
10353
10357
  key: index,
10354
10358
  onClick: function onClick() {
10355
- return !isDisabled && downloadFiles(item.label);
10359
+ return !isDisabled && downloadFiles(item.type);
10356
10360
  },
10357
10361
  disabled: isDisabled
10358
10362
  }, IconComponent && React.createElement(IconComponent, null), item.label);
@@ -10677,10 +10681,10 @@ var OrderTable = function OrderTable(_ref) {
10677
10681
  onClick: function onClick() {
10678
10682
  return OpenDropDown(index);
10679
10683
  }
10680
- }, React.createElement(PrinterIcon, null), React.createElement(DownIcon, null), printToogle == index && React.createElement("div", {
10684
+ }, React.createElement(PrinterIcon, null), React.createElement(DownIcon, null), printToogle === index && React.createElement("div", {
10681
10685
  ref: dropdownRef
10682
10686
  }, React.createElement(PrintDropDown, {
10683
- legacyProductId: item.id
10687
+ legacyProductId: item
10684
10688
  })))), React.createElement("li", {
10685
10689
  className: "downloadcontainer"
10686
10690
  }, React.createElement(LoadIcon, null)))));