@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.
- package/dist/components/order-daily-overview/common/fakedata.d.ts +5 -2
- package/dist/dms-client-return.cjs.development.js +22 -18
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +22 -18
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/common/fakedata.tsx +24 -6
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +2 -9
- package/src/components/order-daily-overview/shared/elements/PrintDropDown.tsx +10 -23
- package/src/components/order-view/hooks/useGetEventNotes.tsx +1 -1
|
@@ -26,10 +26,12 @@ export declare const TableData: {
|
|
|
26
26
|
alwaysVisible?: undefined;
|
|
27
27
|
})[];
|
|
28
28
|
}[];
|
|
29
|
-
|
|
29
|
+
interface PrintOption {
|
|
30
30
|
icon: string;
|
|
31
31
|
label: string;
|
|
32
|
-
|
|
32
|
+
type: string;
|
|
33
|
+
}
|
|
34
|
+
export declare const optionsPrint: PrintOption[];
|
|
33
35
|
export declare const optionsForReturnPrint: {
|
|
34
36
|
icon: string;
|
|
35
37
|
label: string;
|
|
@@ -104,3 +106,4 @@ export declare const TableData2: {
|
|
|
104
106
|
};
|
|
105
107
|
}[];
|
|
106
108
|
}[];
|
|
109
|
+
export {};
|
|
@@ -3126,7 +3126,7 @@ function useGetEventNotes() {
|
|
|
3126
3126
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3127
3127
|
while (1) switch (_context.prev = _context.next) {
|
|
3128
3128
|
case 0:
|
|
3129
|
-
endpoint = dmsComponentLibrary.getBaseEndpoint() + "events/get/event_information/"; // setLoading(true);
|
|
3129
|
+
endpoint = dmsComponentLibrary.getBaseEndpoint() + "/events/get/event_information/"; // setLoading(true);
|
|
3130
3130
|
_context.prev = 1;
|
|
3131
3131
|
headers = {
|
|
3132
3132
|
accept: 'application/json',
|
|
@@ -9450,19 +9450,24 @@ var displayValueOrNA = function displayValueOrNA(value) {
|
|
|
9450
9450
|
|
|
9451
9451
|
var optionsPrint = [{
|
|
9452
9452
|
icon: 'runSheet',
|
|
9453
|
-
label: 'Print Runsheet'
|
|
9453
|
+
label: 'Print Runsheet',
|
|
9454
|
+
type: 'runsheet_url'
|
|
9454
9455
|
}, {
|
|
9455
9456
|
icon: 'loadSheet',
|
|
9456
|
-
label: 'Print Loadsheet'
|
|
9457
|
+
label: 'Print Loadsheet',
|
|
9458
|
+
type: 'loadsheet_url'
|
|
9457
9459
|
}, {
|
|
9458
9460
|
icon: 'deliveryLables',
|
|
9459
|
-
label: 'Print Delivery Labels'
|
|
9461
|
+
label: 'Print Delivery Labels',
|
|
9462
|
+
type: 'delivery_label_url'
|
|
9460
9463
|
}, {
|
|
9461
9464
|
icon: 'customerLables',
|
|
9462
|
-
label: 'Print Customer Labels'
|
|
9465
|
+
label: 'Print Customer Labels',
|
|
9466
|
+
type: 'customer_label_url'
|
|
9463
9467
|
}, {
|
|
9464
9468
|
icon: 'collectionLables',
|
|
9465
|
-
label: 'Print
|
|
9469
|
+
label: 'Print Return Labels',
|
|
9470
|
+
type: 'return_label_url'
|
|
9466
9471
|
}];
|
|
9467
9472
|
var optionsForReturnPrint = [{
|
|
9468
9473
|
icon: 'deliveryLables',
|
|
@@ -10342,25 +10347,24 @@ function LoadIcon() {
|
|
|
10342
10347
|
var _templateObject$1_, _templateObject2$1v;
|
|
10343
10348
|
var PrintDropDown = function PrintDropDown(_ref) {
|
|
10344
10349
|
var legacyProductId = _ref.legacyProductId;
|
|
10345
|
-
var downloadFiles = function downloadFiles(
|
|
10346
|
-
var url
|
|
10350
|
+
var downloadFiles = function downloadFiles(type) {
|
|
10351
|
+
var url;
|
|
10352
|
+
if (type) {
|
|
10353
|
+
url = legacyProductId[type];
|
|
10354
|
+
}
|
|
10347
10355
|
if (url) {
|
|
10348
10356
|
window.open(url, '_blank');
|
|
10349
10357
|
} else {
|
|
10350
|
-
console.log('URL not available for',
|
|
10358
|
+
console.log('URL not available for', type);
|
|
10351
10359
|
}
|
|
10352
10360
|
};
|
|
10353
|
-
|
|
10354
|
-
var url = legacyProductId == null ? void 0 : legacyProductId[label.replace('Print ', '').toLowerCase().replace(' ', '_') + "_url"];
|
|
10355
|
-
return !url;
|
|
10356
|
-
};
|
|
10357
|
-
return React__default.createElement(OptionsList$1, null, optionsPrint.map(function (item, index) {
|
|
10361
|
+
return React__default.createElement(OptionsList$1, null, optionsPrint == null ? void 0 : optionsPrint.map(function (item, index) {
|
|
10358
10362
|
var IconComponent = PrintIconMap[item.icon];
|
|
10359
|
-
var isDisabled =
|
|
10363
|
+
var isDisabled = !legacyProductId[item.type];
|
|
10360
10364
|
return React__default.createElement(OptionsListLi$1, {
|
|
10361
10365
|
key: index,
|
|
10362
10366
|
onClick: function onClick() {
|
|
10363
|
-
return !isDisabled && downloadFiles(item.
|
|
10367
|
+
return !isDisabled && downloadFiles(item.type);
|
|
10364
10368
|
},
|
|
10365
10369
|
disabled: isDisabled
|
|
10366
10370
|
}, IconComponent && React__default.createElement(IconComponent, null), item.label);
|
|
@@ -10685,10 +10689,10 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
10685
10689
|
onClick: function onClick() {
|
|
10686
10690
|
return OpenDropDown(index);
|
|
10687
10691
|
}
|
|
10688
|
-
}, React__default.createElement(PrinterIcon, null), React__default.createElement(DownIcon, null), printToogle
|
|
10692
|
+
}, React__default.createElement(PrinterIcon, null), React__default.createElement(DownIcon, null), printToogle === index && React__default.createElement("div", {
|
|
10689
10693
|
ref: dropdownRef
|
|
10690
10694
|
}, React__default.createElement(PrintDropDown, {
|
|
10691
|
-
legacyProductId: item
|
|
10695
|
+
legacyProductId: item
|
|
10692
10696
|
})))), React__default.createElement("li", {
|
|
10693
10697
|
className: "downloadcontainer"
|
|
10694
10698
|
}, React__default.createElement(LoadIcon, null)))));
|