@bjsdistribution/dms-client-return 0.1.45-prod → 0.1.46-prod
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/dms-client-return.cjs.development.js +4 -23
- 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 +4 -23
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-view/fakedata.ts +12 -3
- package/src/components/order-view/general-information/dropdowns/Print.tsx +8 -29
|
@@ -16427,39 +16427,20 @@ function Print() {
|
|
|
16427
16427
|
});
|
|
16428
16428
|
var menuItems = {
|
|
16429
16429
|
items: filteredOptions == null ? void 0 : filteredOptions.map(function (option) {
|
|
16430
|
-
|
|
16430
|
+
// const disabled = isOptionDisabled(option.value);
|
|
16431
16431
|
return {
|
|
16432
16432
|
key: option.value,
|
|
16433
|
-
disabled: disabled,
|
|
16434
16433
|
label: React.createElement("div", {
|
|
16435
16434
|
onClick: function onClick(e) {
|
|
16436
16435
|
e.stopPropagation();
|
|
16437
|
-
if (!disabled) {
|
|
16438
|
-
|
|
16439
|
-
}
|
|
16440
|
-
},
|
|
16441
|
-
style: {
|
|
16442
|
-
color: disabled ? '#bfbfbf' : undefined,
|
|
16443
|
-
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
16436
|
+
// if (!disabled) {
|
|
16437
|
+
handleSelectChange(option);
|
|
16438
|
+
// }
|
|
16444
16439
|
}
|
|
16445
16440
|
}, option.label)
|
|
16446
16441
|
};
|
|
16447
16442
|
})
|
|
16448
16443
|
};
|
|
16449
|
-
var optionToLabelKey = {
|
|
16450
|
-
proofofdelivery: 'deliver',
|
|
16451
|
-
returnlabels: 'return',
|
|
16452
|
-
returncovernote: 'collect'
|
|
16453
|
-
};
|
|
16454
|
-
var isOptionDisabled = function isOptionDisabled(optionValue) {
|
|
16455
|
-
var labels = orderDetails == null ? void 0 : orderDetails.labels;
|
|
16456
|
-
// If labels not loaded yet → disable all
|
|
16457
|
-
if (!labels) return true;
|
|
16458
|
-
var labelKey = optionToLabelKey[optionValue];
|
|
16459
|
-
// If option does not require a label → always enabled
|
|
16460
|
-
if (!labelKey) return false;
|
|
16461
|
-
return labels[labelKey] !== true;
|
|
16462
|
-
};
|
|
16463
16444
|
return React.createElement(Container$1k, null, React.createElement(Dropdown, {
|
|
16464
16445
|
menu: menuItems,
|
|
16465
16446
|
trigger: ['hover']
|