@bjsdistribution/dms-client-return 0.0.85 → 0.0.87
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-view/notification/OrderTemplate.d.ts +3 -0
- package/dist/components/order-view/order-actions/hooks/useFetchSingleReminder.d.ts +2 -0
- package/dist/components/order-view/order-actions/hooks/useUpdateReminder.d.ts +3 -0
- package/dist/components/order-view/order-actions/store.d.ts +1 -0
- package/dist/components/order-view/utils.d.ts +1 -0
- package/dist/components/order-view/view-reminder/AssigneeDropdown.d.ts +3 -0
- package/dist/components/order-view/view-reminder/ViewReminder.d.ts +3 -0
- package/dist/components/order-view/view-reminder/reminder-styles.d.ts +25 -0
- package/dist/dms-client-return.cjs.development.js +613 -114
- 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 +613 -114
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-view/index.tsx +6 -1
- package/src/components/order-view/notification/OrderTemplate.tsx +349 -0
- package/src/components/order-view/notification/Tabs.tsx +10 -6
- package/src/components/order-view/order-actions/actions/confirm-order/index.tsx +0 -32
- package/src/components/order-view/order-actions/actions/hold-order/HoldOrderModal.tsx +7 -0
- package/src/components/order-view/order-actions/actions/uncancel-order/UncancelOrder.tsx +4 -3
- package/src/components/order-view/order-actions/actions/unhold-order/UnholdOrder.tsx +1 -1
- package/src/components/order-view/order-actions/hooks/useFetchSingleReminder.ts +56 -0
- package/src/components/order-view/order-actions/hooks/useUpdateReminder.ts +52 -0
- package/src/components/order-view/order-actions/index.tsx +3 -0
- package/src/components/order-view/order-actions/store.ts +6 -0
- package/src/components/order-view/order-actions/utils.ts +1 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/Carrier.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/services-section/DeliveryPoint.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/services-section/TimedService.tsx +1 -1
- package/src/components/order-view/view-reminder/AssigneeDropdown.tsx +33 -0
- package/src/components/order-view/view-reminder/ViewReminder.tsx +314 -0
- package/src/components/order-view/view-reminder/reminder-styles.tsx +173 -0
|
@@ -4562,7 +4562,7 @@ function Carrier() {
|
|
|
4562
4562
|
var onChange = function onChange(selectedOption) {
|
|
4563
4563
|
setOrderDetails(function (prev) {
|
|
4564
4564
|
return _extends({}, prev, {
|
|
4565
|
-
carrier_id: selectedOption.value
|
|
4565
|
+
carrier_id: selectedOption == null ? void 0 : selectedOption.value
|
|
4566
4566
|
});
|
|
4567
4567
|
});
|
|
4568
4568
|
};
|
|
@@ -4824,8 +4824,7 @@ function TimedServiceDropdown() {
|
|
|
4824
4824
|
setOrderData(newData);
|
|
4825
4825
|
};
|
|
4826
4826
|
return React.createElement(Container$r, null, React.createElement(Label$j, {
|
|
4827
|
-
label: "Timed Service"
|
|
4828
|
-
htmlFor: "timedServiceDropdown"
|
|
4827
|
+
label: "Timed Service"
|
|
4829
4828
|
}), React.createElement(StyledSelectDropdown$1, {
|
|
4830
4829
|
styles: _extends({}, dropdownStyles, {
|
|
4831
4830
|
control: function control(styles) {
|
|
@@ -4913,8 +4912,7 @@ function DeliveryPointDropdown() {
|
|
|
4913
4912
|
setOrderData(newData);
|
|
4914
4913
|
};
|
|
4915
4914
|
return React.createElement(Container$t, null, React.createElement(Label$j, {
|
|
4916
|
-
label: "Delivery Point"
|
|
4917
|
-
htmlFor: "deliveryPointDropdown"
|
|
4915
|
+
label: "Delivery Point"
|
|
4918
4916
|
}), React.createElement(StyledSelectDropdown$3, {
|
|
4919
4917
|
placeholder: "Select Delivery Point",
|
|
4920
4918
|
options: deliveryPointOptions || [],
|
|
@@ -6008,7 +6006,7 @@ function formatDate$1(dateString) {
|
|
|
6008
6006
|
if (dateString) {
|
|
6009
6007
|
var date = new Date(dateString);
|
|
6010
6008
|
if (!isNaN(date.getTime())) {
|
|
6011
|
-
return format(date, 'MM/
|
|
6009
|
+
return format(date, 'dd/MM/yyyy HH:mm:ss');
|
|
6012
6010
|
}
|
|
6013
6011
|
}
|
|
6014
6012
|
return 'Invalid date';
|
|
@@ -6941,6 +6939,14 @@ var initialValue = {
|
|
|
6941
6939
|
task_subcategories_id: null,
|
|
6942
6940
|
order_id: null
|
|
6943
6941
|
};
|
|
6942
|
+
var updatePayload = {
|
|
6943
|
+
details: '',
|
|
6944
|
+
id: null,
|
|
6945
|
+
assigned_to: null,
|
|
6946
|
+
due_date: null,
|
|
6947
|
+
due_time: null,
|
|
6948
|
+
status_id: null
|
|
6949
|
+
};
|
|
6944
6950
|
var flagInitialValue = {
|
|
6945
6951
|
description: '',
|
|
6946
6952
|
task_type_id: 0,
|
|
@@ -6961,6 +6967,7 @@ var taskTypeExtended = /*#__PURE__*/atom([]);
|
|
|
6961
6967
|
var departmentData = /*#__PURE__*/atom([]);
|
|
6962
6968
|
var createTaskPayload = /*#__PURE__*/atom(initialPayload);
|
|
6963
6969
|
var createReminderPayload = /*#__PURE__*/atom(initialValue);
|
|
6970
|
+
var reminderUpdatePayload = /*#__PURE__*/atom(updatePayload);
|
|
6964
6971
|
var notificationLabel = /*#__PURE__*/atom('');
|
|
6965
6972
|
var notificationData = /*#__PURE__*/atom([]);
|
|
6966
6973
|
var reminderNotifiData = /*#__PURE__*/atom([]);
|
|
@@ -6968,6 +6975,7 @@ var singleFlagData = /*#__PURE__*/atom({});
|
|
|
6968
6975
|
var singleModalPayload = /*#__PURE__*/atom(flagInitialValue);
|
|
6969
6976
|
var flagRefId = /*#__PURE__*/atom(null);
|
|
6970
6977
|
var ReminderRefId = /*#__PURE__*/atom(null);
|
|
6978
|
+
var reminderData = /*#__PURE__*/atom([]);
|
|
6971
6979
|
var resolvedModalPayload = /*#__PURE__*/atom(resolvedValue);
|
|
6972
6980
|
var routeDetails = /*#__PURE__*/atom({});
|
|
6973
6981
|
var orderNotifyCount = /*#__PURE__*/atom(0);
|
|
@@ -7059,9 +7067,19 @@ function useResolvedPayload() {
|
|
|
7059
7067
|
function useReminderRefId() {
|
|
7060
7068
|
return useAtom(ReminderRefId);
|
|
7061
7069
|
}
|
|
7070
|
+
function useSingleReminderData() {
|
|
7071
|
+
return useAtom(reminderData);
|
|
7072
|
+
}
|
|
7073
|
+
function useUpdateReminderData() {
|
|
7074
|
+
return useAtom(reminderUpdatePayload);
|
|
7075
|
+
}
|
|
7062
7076
|
function useRouteDetails() {
|
|
7063
7077
|
return useAtom(routeDetails);
|
|
7064
7078
|
}
|
|
7079
|
+
var allOrderStatus = /*#__PURE__*/atom(null);
|
|
7080
|
+
function useAllOrderStatus() {
|
|
7081
|
+
return useAtom(allOrderStatus);
|
|
7082
|
+
}
|
|
7065
7083
|
var selectedCategoryIdAtom = /*#__PURE__*/atom(null);
|
|
7066
7084
|
var selectedDocumentTypeAtom = /*#__PURE__*/atom(null);
|
|
7067
7085
|
var selectedTypeAtom = /*#__PURE__*/atom(null);
|
|
@@ -8721,28 +8739,6 @@ function ConfirmOrder() {
|
|
|
8721
8739
|
return _ref.apply(this, arguments);
|
|
8722
8740
|
};
|
|
8723
8741
|
}();
|
|
8724
|
-
// const isDifferent = () => {
|
|
8725
|
-
// const keysToRemovefromOrders = [
|
|
8726
|
-
// 'order_locked',
|
|
8727
|
-
// 'order_communications',
|
|
8728
|
-
// 'updated_at',
|
|
8729
|
-
// 'updated_by',
|
|
8730
|
-
// 'order_services',
|
|
8731
|
-
// ];
|
|
8732
|
-
// const filteredOrderDetails = filterObject(
|
|
8733
|
-
// orderDetailsConfirmOrder,
|
|
8734
|
-
// keysToRemovefromOrders
|
|
8735
|
-
// );
|
|
8736
|
-
// const filteredPrevOrderDetails = filterObject(
|
|
8737
|
-
// prevOrderDetails,
|
|
8738
|
-
// keysToRemovefromOrders
|
|
8739
|
-
// );
|
|
8740
|
-
// const orderDetailsSorted = JSON.stringify(filteredOrderDetails);
|
|
8741
|
-
// const prevOrderDetailsSorted = JSON.stringify(filteredPrevOrderDetails);
|
|
8742
|
-
// const isSame = orderDetailsSorted === prevOrderDetailsSorted;
|
|
8743
|
-
// // newOrderServicesSorted === prevOrderServicesSorted;
|
|
8744
|
-
// return !isSame;
|
|
8745
|
-
// };
|
|
8746
8742
|
var errorFound = function errorFound() {
|
|
8747
8743
|
var isError = errorState.emailError.length > 0 || errorState.homeContactError.length > 0 || errorState.workContactError.length > 0 || errorState.mobileError.length > 0;
|
|
8748
8744
|
return isError;
|
|
@@ -8946,6 +8942,8 @@ function HoldOrderModal() {
|
|
|
8946
8942
|
setPrevOrderDetails = _usePrevOrderDetails[1];
|
|
8947
8943
|
var _useCustomerInfo = useCustomerInfo(),
|
|
8948
8944
|
customerInfo = _useCustomerInfo[0];
|
|
8945
|
+
var _useLiveRecalling = useLiveRecalling(),
|
|
8946
|
+
setRecalling = _useLiveRecalling[1];
|
|
8949
8947
|
var infoText = (customerInfo == null ? void 0 : customerInfo.recipient_name) + ", " + (customerInfo == null ? void 0 : customerInfo.postcode);
|
|
8950
8948
|
var onHoldReasonOptions = orderStaticData == null || (_orderStaticData$onho = orderStaticData.onhold_reasons) == null ? void 0 : _orderStaticData$onho.map(function (item) {
|
|
8951
8949
|
return {
|
|
@@ -8987,6 +8985,10 @@ function HoldOrderModal() {
|
|
|
8987
8985
|
//@ts-ignore
|
|
8988
8986
|
if (response != null && response.data && (response == null ? void 0 : response.code) === 200) {
|
|
8989
8987
|
setShouldPerformAction(true);
|
|
8988
|
+
setRecalling(true);
|
|
8989
|
+
setTimeout(function () {
|
|
8990
|
+
setRecalling(false);
|
|
8991
|
+
}, 1000);
|
|
8990
8992
|
} else {
|
|
8991
8993
|
notification.error({
|
|
8992
8994
|
message: 'Error',
|
|
@@ -9247,7 +9249,7 @@ var UnholdOrder = function UnholdOrder() {
|
|
|
9247
9249
|
var _useLoading = useLoading(),
|
|
9248
9250
|
setLoading = _useLoading[1];
|
|
9249
9251
|
var _useApiHook = useApiHook({
|
|
9250
|
-
endpoint: "orders/" + orderId + "/unhold
|
|
9252
|
+
endpoint: "orders/" + orderId + "/unhold/",
|
|
9251
9253
|
method: 'POST',
|
|
9252
9254
|
performAction: false
|
|
9253
9255
|
}),
|
|
@@ -10742,7 +10744,10 @@ function UncancelOrder() {
|
|
|
10742
10744
|
infoText: infoText,
|
|
10743
10745
|
submitBtnTitle: "Save Details",
|
|
10744
10746
|
isSubmitDisabled: !showSubmitBtn
|
|
10745
|
-
}, React.createElement(HoldContentContainer, null, React.createElement(SplitText, null, React.createElement(HoldRow, null, React.createElement(Label$
|
|
10747
|
+
}, React.createElement(HoldContentContainer, null, React.createElement(SplitText, null, React.createElement(HoldRow, null, React.createElement(Label$j, {
|
|
10748
|
+
label: "Un-cancel Reason",
|
|
10749
|
+
required: true
|
|
10750
|
+
}), React.createElement(AntSelect, {
|
|
10746
10751
|
options: unCancelReasonOptions || [],
|
|
10747
10752
|
placeholder: "Select un-cancel Reason",
|
|
10748
10753
|
onChange: onChangeUnCancelReason,
|
|
@@ -10755,7 +10760,9 @@ function UncancelOrder() {
|
|
|
10755
10760
|
popupClassName: 'dropDownStyle',
|
|
10756
10761
|
selectWrapperClass: 'rounded',
|
|
10757
10762
|
defaultValue: unCancelReason
|
|
10758
|
-
})), React.createElement(HoldRow, null, React.createElement(Label$
|
|
10763
|
+
})), React.createElement(HoldRow, null, React.createElement(Label$j, {
|
|
10764
|
+
label: "Un-cancel Note"
|
|
10765
|
+
}), React.createElement(CustomTextArea$3, {
|
|
10759
10766
|
rows: 5,
|
|
10760
10767
|
onChange: onChange
|
|
10761
10768
|
})))));
|
|
@@ -11316,7 +11323,358 @@ function TaskModal() {
|
|
|
11316
11323
|
}
|
|
11317
11324
|
var OrderModal$1 = /*#__PURE__*/styled(OrderActionModal)(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 70%;\n"])));
|
|
11318
11325
|
|
|
11319
|
-
var _templateObject$21;
|
|
11326
|
+
var _templateObject$21, _templateObject2$1w, _templateObject3$R, _templateObject4$u, _templateObject10$3, _templateObject11$3, _templateObject13$2, _templateObject14$2, _templateObject15$1, _templateObject16, _templateObject17, _templateObject19$2, _templateObject20$1;
|
|
11327
|
+
var ReferenceContainer = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 52px;\n width: 770px;\n padding: 10px 15px;\n align-items: center;\n flex: 1 0 0;\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n background: #fff;\n"])));
|
|
11328
|
+
var InnerContainer = /*#__PURE__*/styled.div(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 52px;\n padding: 10px 15px;\n align-items: center;\n gap: 20px;\n flex: 1 0 0;\n"])));
|
|
11329
|
+
var MiniContainer = /*#__PURE__*/styled.div(_templateObject3$R || (_templateObject3$R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 3px;\n flex: 1;\n"])));
|
|
11330
|
+
var StyledText$1 = /*#__PURE__*/styled(TextArea)(_templateObject4$u || (_templateObject4$u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 105px;\n padding: 8px 12px;\n align-items: flex-start;\n gap: 4px;\n align-self: stretch;\n border-radius: 15px;\n resize: none;\n"])));
|
|
11331
|
+
var TimeWrapper = /*#__PURE__*/styled.div(_templateObject10$3 || (_templateObject10$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 80px;\n flex-direction: column;\n align-items: flex-start;\n gap: 6px;\n"])));
|
|
11332
|
+
var StyledTime = /*#__PURE__*/styled(Input$1)(_templateObject11$3 || (_templateObject11$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 30px;\n border: 1px solid #e0e2e7;\n background: #fff;\n\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n padding: 8px 5px;\n justify-content: space-between;\n align-items: center;\n align-self: stretch;\n"])));
|
|
11333
|
+
var Column = /*#__PURE__*/styled.div(_templateObject13$2 || (_templateObject13$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
11334
|
+
var Row$6 = /*#__PURE__*/styled(Column)(_templateObject14$2 || (_templateObject14$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 10px;\n"])));
|
|
11335
|
+
var Right$2 = /*#__PURE__*/styled.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n height: 100%;\n gap: 15px;\n"])));
|
|
11336
|
+
var Left$1 = /*#__PURE__*/styled.div(_templateObject16 || (_templateObject16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n gap: 15px;\n padding: 15px;\n"])));
|
|
11337
|
+
var DateTimeContainer = /*#__PURE__*/styled.div(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 15px;\n align-self: stretch;\n"])));
|
|
11338
|
+
var DetailedContainer = /*#__PURE__*/styled.div(_templateObject19$2 || (_templateObject19$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 416px;\n padding: 15px 12px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n flex: 1 0 0;\n border-radius: 66px;\n background: #f8fafc;\n"])));
|
|
11339
|
+
var ContentsContainer = /*#__PURE__*/styled(Column)(_templateObject20$1 || (_templateObject20$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n margin: 15px;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n border-radius: 15px;\n background: #f8fafc;\n /* shadow/shadow-sm */\n box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);\n"])));
|
|
11340
|
+
|
|
11341
|
+
function useFetchSingleReminderData() {
|
|
11342
|
+
var _useReminderRefId = useReminderRefId(),
|
|
11343
|
+
reminderRefId = _useReminderRefId[0];
|
|
11344
|
+
var _useFlagsLoading = useFlagsLoading(),
|
|
11345
|
+
setLoading = _useFlagsLoading[1];
|
|
11346
|
+
var ssoToken = getCookie('id_token');
|
|
11347
|
+
var res = /*#__PURE__*/function () {
|
|
11348
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11349
|
+
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
11350
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11351
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11352
|
+
case 0:
|
|
11353
|
+
endpoint = getBaseEndpoint() + "/tasks/reminder/" + reminderRefId;
|
|
11354
|
+
setLoading(true);
|
|
11355
|
+
_context.prev = 2;
|
|
11356
|
+
headers = {
|
|
11357
|
+
accept: 'application/json',
|
|
11358
|
+
'Content-Type': 'application/json',
|
|
11359
|
+
Authorization: "Bearer " + ssoToken
|
|
11360
|
+
};
|
|
11361
|
+
_context.next = 6;
|
|
11362
|
+
return fetch(endpoint, {
|
|
11363
|
+
method: 'GET',
|
|
11364
|
+
headers: headers
|
|
11365
|
+
});
|
|
11366
|
+
case 6:
|
|
11367
|
+
response = _context.sent;
|
|
11368
|
+
if (response.ok) {
|
|
11369
|
+
_context.next = 16;
|
|
11370
|
+
break;
|
|
11371
|
+
}
|
|
11372
|
+
_context.next = 10;
|
|
11373
|
+
return response.json();
|
|
11374
|
+
case 10:
|
|
11375
|
+
_json = _context.sent;
|
|
11376
|
+
detail = _json == null ? void 0 : _json.detail;
|
|
11377
|
+
msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg;
|
|
11378
|
+
notification.error({
|
|
11379
|
+
message: 'Error',
|
|
11380
|
+
description: msg || 'An error has occurred. Please try again later.'
|
|
11381
|
+
});
|
|
11382
|
+
setLoading(false);
|
|
11383
|
+
return _context.abrupt("return", []);
|
|
11384
|
+
case 16:
|
|
11385
|
+
_context.next = 18;
|
|
11386
|
+
return response.json();
|
|
11387
|
+
case 18:
|
|
11388
|
+
json = _context.sent;
|
|
11389
|
+
if (!(json.code === 200)) {
|
|
11390
|
+
_context.next = 22;
|
|
11391
|
+
break;
|
|
11392
|
+
}
|
|
11393
|
+
setLoading(false);
|
|
11394
|
+
return _context.abrupt("return", _extends({}, json.data[0]));
|
|
11395
|
+
case 22:
|
|
11396
|
+
return _context.abrupt("return", []);
|
|
11397
|
+
case 25:
|
|
11398
|
+
_context.prev = 25;
|
|
11399
|
+
_context.t0 = _context["catch"](2);
|
|
11400
|
+
//setloading(false);
|
|
11401
|
+
notification.error({
|
|
11402
|
+
message: 'Error',
|
|
11403
|
+
description: "" + _context.t0 || 'An error has occurred. Please try again later.'
|
|
11404
|
+
});
|
|
11405
|
+
return _context.abrupt("return", []);
|
|
11406
|
+
case 29:
|
|
11407
|
+
case "end":
|
|
11408
|
+
return _context.stop();
|
|
11409
|
+
}
|
|
11410
|
+
}, _callee, null, [[2, 25]]);
|
|
11411
|
+
}));
|
|
11412
|
+
return function res() {
|
|
11413
|
+
return _ref.apply(this, arguments);
|
|
11414
|
+
};
|
|
11415
|
+
}();
|
|
11416
|
+
return res;
|
|
11417
|
+
}
|
|
11418
|
+
|
|
11419
|
+
function useUpdateReminder() {
|
|
11420
|
+
var ssoToken = getCookie('id_token');
|
|
11421
|
+
var _useFlagsLoading = useFlagsLoading(),
|
|
11422
|
+
setLoading = _useFlagsLoading[1];
|
|
11423
|
+
var update = /*#__PURE__*/function () {
|
|
11424
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
11425
|
+
var endpoint, requestOptions, response, json;
|
|
11426
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11427
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11428
|
+
case 0:
|
|
11429
|
+
endpoint = getBaseEndpoint() + "/tasks/reminder/update/";
|
|
11430
|
+
setLoading(true);
|
|
11431
|
+
_context.prev = 2;
|
|
11432
|
+
requestOptions = {
|
|
11433
|
+
headers: {
|
|
11434
|
+
'Content-Type': 'application/json',
|
|
11435
|
+
Authorization: "Bearer " + ssoToken
|
|
11436
|
+
},
|
|
11437
|
+
method: 'PUT',
|
|
11438
|
+
body: JSON.stringify(data)
|
|
11439
|
+
};
|
|
11440
|
+
_context.next = 6;
|
|
11441
|
+
return fetch(endpoint, requestOptions);
|
|
11442
|
+
case 6:
|
|
11443
|
+
response = _context.sent;
|
|
11444
|
+
if (response.ok) {
|
|
11445
|
+
_context.next = 9;
|
|
11446
|
+
break;
|
|
11447
|
+
}
|
|
11448
|
+
throw new Error('response is not ok');
|
|
11449
|
+
case 9:
|
|
11450
|
+
_context.next = 11;
|
|
11451
|
+
return response.json();
|
|
11452
|
+
case 11:
|
|
11453
|
+
json = _context.sent;
|
|
11454
|
+
notification.success({
|
|
11455
|
+
message: 'Success',
|
|
11456
|
+
description: 'Reminder has been updated.'
|
|
11457
|
+
});
|
|
11458
|
+
return _context.abrupt("return", json);
|
|
11459
|
+
case 16:
|
|
11460
|
+
_context.prev = 16;
|
|
11461
|
+
_context.t0 = _context["catch"](2);
|
|
11462
|
+
notification.error({
|
|
11463
|
+
message: 'Error',
|
|
11464
|
+
description: "" + _context.t0 || 'An error has occurred. Please try again later.'
|
|
11465
|
+
});
|
|
11466
|
+
case 19:
|
|
11467
|
+
_context.prev = 19;
|
|
11468
|
+
setLoading(false);
|
|
11469
|
+
return _context.finish(19);
|
|
11470
|
+
case 22:
|
|
11471
|
+
setLoading(false);
|
|
11472
|
+
case 23:
|
|
11473
|
+
case "end":
|
|
11474
|
+
return _context.stop();
|
|
11475
|
+
}
|
|
11476
|
+
}, _callee, null, [[2, 16, 19, 22]]);
|
|
11477
|
+
}));
|
|
11478
|
+
return function update(_x) {
|
|
11479
|
+
return _ref.apply(this, arguments);
|
|
11480
|
+
};
|
|
11481
|
+
}();
|
|
11482
|
+
return update;
|
|
11483
|
+
}
|
|
11484
|
+
|
|
11485
|
+
var _templateObject$22, _templateObject2$1x;
|
|
11486
|
+
function AssigneeDropdown() {
|
|
11487
|
+
var handleSelectChange = function handleSelectChange() {
|
|
11488
|
+
notification.success({
|
|
11489
|
+
message: 'Success',
|
|
11490
|
+
description: 'Successfully updated'
|
|
11491
|
+
});
|
|
11492
|
+
};
|
|
11493
|
+
return React.createElement(FormContainer$2, null, React.createElement(Label$j, {
|
|
11494
|
+
label: "Assigned To",
|
|
11495
|
+
required: true,
|
|
11496
|
+
htmlFor: "assigneDropdown"
|
|
11497
|
+
}), React.createElement(StyledAntSelect$6, {
|
|
11498
|
+
options: [],
|
|
11499
|
+
onChange: handleSelectChange,
|
|
11500
|
+
selectWrapperClass: 'rounded',
|
|
11501
|
+
style: {
|
|
11502
|
+
display: 'flex'
|
|
11503
|
+
}
|
|
11504
|
+
}));
|
|
11505
|
+
}
|
|
11506
|
+
var FormContainer$2 = /*#__PURE__*/styled.div(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n width: 325px;\n"])));
|
|
11507
|
+
var StyledAntSelect$6 = /*#__PURE__*/styled(AntSelect)(_templateObject2$1x || (_templateObject2$1x = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11508
|
+
|
|
11509
|
+
var _templateObject$23, _templateObject2$1y, _templateObject3$S, _templateObject4$v, _templateObject5$l, _templateObject6$b, _templateObject7$c, _templateObject8$9;
|
|
11510
|
+
var ViewReminderModal = function ViewReminderModal() {
|
|
11511
|
+
var _reminderData$reminde, _reminderData$order_d, _reminderData$order_d2, _reminderData$reminde2, _reminderData$reminde3, _reminderData$reminde4, _reminderData$reminde5;
|
|
11512
|
+
var _useCurrentAction = useCurrentAction(),
|
|
11513
|
+
setCurrentAction = _useCurrentAction[1];
|
|
11514
|
+
var fetchData = useFetchSingleReminderData();
|
|
11515
|
+
var fetchRemindersData = useFetchReminders();
|
|
11516
|
+
var updateReminder = useUpdateReminder();
|
|
11517
|
+
var _useState = useState(null),
|
|
11518
|
+
setDueDate = _useState[1];
|
|
11519
|
+
var _useSingleReminderDat = useSingleReminderData(),
|
|
11520
|
+
reminderData = _useSingleReminderDat[0],
|
|
11521
|
+
setReminderData = _useSingleReminderDat[1];
|
|
11522
|
+
var _useReminderRefId = useReminderRefId(),
|
|
11523
|
+
reminderRefId = _useReminderRefId[0];
|
|
11524
|
+
var _useFlagsLoading = useFlagsLoading(),
|
|
11525
|
+
loading = _useFlagsLoading[0],
|
|
11526
|
+
setLoading = _useFlagsLoading[1];
|
|
11527
|
+
var _useUpdateReminderDat = useUpdateReminderData(),
|
|
11528
|
+
reminderPayload = _useUpdateReminderDat[0],
|
|
11529
|
+
setPayload = _useUpdateReminderDat[1];
|
|
11530
|
+
var closeModal = function closeModal() {
|
|
11531
|
+
setCurrentAction(undefined);
|
|
11532
|
+
};
|
|
11533
|
+
var fetchReminderData = /*#__PURE__*/function () {
|
|
11534
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11535
|
+
var result;
|
|
11536
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11537
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11538
|
+
case 0:
|
|
11539
|
+
setLoading(true);
|
|
11540
|
+
_context.next = 3;
|
|
11541
|
+
return fetchData();
|
|
11542
|
+
case 3:
|
|
11543
|
+
result = _context.sent;
|
|
11544
|
+
setReminderData(result);
|
|
11545
|
+
setLoading(false);
|
|
11546
|
+
case 6:
|
|
11547
|
+
case "end":
|
|
11548
|
+
return _context.stop();
|
|
11549
|
+
}
|
|
11550
|
+
}, _callee);
|
|
11551
|
+
}));
|
|
11552
|
+
return function fetchReminderData() {
|
|
11553
|
+
return _ref.apply(this, arguments);
|
|
11554
|
+
};
|
|
11555
|
+
}();
|
|
11556
|
+
useEffect(function () {
|
|
11557
|
+
fetchReminderData();
|
|
11558
|
+
}, [reminderRefId]);
|
|
11559
|
+
useEffect(function () {
|
|
11560
|
+
if (reminderData) {
|
|
11561
|
+
setPayload(_extends({}, reminderPayload, {
|
|
11562
|
+
details: reminderData == null ? void 0 : reminderData.details,
|
|
11563
|
+
id: reminderData == null ? void 0 : reminderData.id,
|
|
11564
|
+
assigned_to: reminderData == null ? void 0 : reminderData.assigned_to,
|
|
11565
|
+
due_date: reminderData == null ? void 0 : reminderData.due_date,
|
|
11566
|
+
due_time: reminderData == null ? void 0 : reminderData.due_time,
|
|
11567
|
+
status_id: reminderData == null ? void 0 : reminderData.status_id
|
|
11568
|
+
}));
|
|
11569
|
+
setDueDate(reminderData == null ? void 0 : reminderData.due_date);
|
|
11570
|
+
}
|
|
11571
|
+
}, [reminderData]);
|
|
11572
|
+
var handleDateChange = function handleDateChange(date) {
|
|
11573
|
+
if (date && isValid(date.$d)) {
|
|
11574
|
+
setDueDate(date);
|
|
11575
|
+
var formattedDate = format(new Date(date.$d), 'yyyy-MM-dd');
|
|
11576
|
+
setPayload(function (prevState) {
|
|
11577
|
+
return _extends({}, prevState, {
|
|
11578
|
+
due_date: formattedDate
|
|
11579
|
+
});
|
|
11580
|
+
});
|
|
11581
|
+
} else {
|
|
11582
|
+
setDueDate(null);
|
|
11583
|
+
setPayload(function (prevState) {
|
|
11584
|
+
return _extends({}, prevState, {
|
|
11585
|
+
due_date: undefined
|
|
11586
|
+
});
|
|
11587
|
+
});
|
|
11588
|
+
}
|
|
11589
|
+
};
|
|
11590
|
+
var handleTime = function handleTime(event) {
|
|
11591
|
+
setPayload(_extends({}, reminderPayload, {
|
|
11592
|
+
due_time: event.target.value
|
|
11593
|
+
}));
|
|
11594
|
+
};
|
|
11595
|
+
var onChangeDetails = function onChangeDetails(event) {
|
|
11596
|
+
setPayload(_extends({}, reminderPayload, {
|
|
11597
|
+
details: event.target.value
|
|
11598
|
+
}));
|
|
11599
|
+
};
|
|
11600
|
+
//set mark as complete
|
|
11601
|
+
var handleResolved = function handleResolved(event) {
|
|
11602
|
+
setPayload(_extends({}, reminderPayload, {
|
|
11603
|
+
status_id: reminderPayload.status_id === event ? 0 : event
|
|
11604
|
+
}));
|
|
11605
|
+
};
|
|
11606
|
+
var handleEditReminder = /*#__PURE__*/function () {
|
|
11607
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
11608
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11609
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11610
|
+
case 0:
|
|
11611
|
+
setLoading(true);
|
|
11612
|
+
_context2.next = 3;
|
|
11613
|
+
return updateReminder([reminderPayload]);
|
|
11614
|
+
case 3:
|
|
11615
|
+
fetchRemindersData();
|
|
11616
|
+
closeModal();
|
|
11617
|
+
case 5:
|
|
11618
|
+
case "end":
|
|
11619
|
+
return _context2.stop();
|
|
11620
|
+
}
|
|
11621
|
+
}, _callee2);
|
|
11622
|
+
}));
|
|
11623
|
+
return function handleEditReminder() {
|
|
11624
|
+
return _ref2.apply(this, arguments);
|
|
11625
|
+
};
|
|
11626
|
+
}();
|
|
11627
|
+
var isDisabled = (reminderData == null || (_reminderData$reminde = reminderData.reminder_status) == null ? void 0 : _reminderData$reminde.name_alias) === 'resolved';
|
|
11628
|
+
var additional = (reminderData == null || (_reminderData$order_d = reminderData.order_data) == null || (_reminderData$order_d = _reminderData$order_d.order_recipient) == null ? void 0 : _reminderData$order_d.recipient_name) + ' ' + (reminderData == null || (_reminderData$order_d2 = reminderData.order_data) == null || (_reminderData$order_d2 = _reminderData$order_d2.order_recipient) == null ? void 0 : _reminderData$order_d2.postcode);
|
|
11629
|
+
return React.createElement(React.Fragment, null, reminderData && loading && React.createElement(Loader, null), React.createElement(OrderActionModal, {
|
|
11630
|
+
headerTitle: "View Reminder",
|
|
11631
|
+
onCloseHeader: closeModal,
|
|
11632
|
+
onSubmit: handleEditReminder,
|
|
11633
|
+
submitBtnTitle: "Save Details",
|
|
11634
|
+
isSubmitDisabled: isDisabled,
|
|
11635
|
+
showAdditionalInfo: true,
|
|
11636
|
+
infoText: additional || 'NA',
|
|
11637
|
+
headerActions: React.createElement(OuterDiv, null, (reminderData == null || (_reminderData$reminde2 = reminderData.reminder_status) == null ? void 0 : _reminderData$reminde2.name_alias) === 'pending' || (reminderData == null || (_reminderData$reminde3 = reminderData.reminder_status) == null ? void 0 : _reminderData$reminde3.name_alias) === 'unresolved' ? React.createElement(React.Fragment, null, React.createElement(StyledWrapper, null, React.createElement(StyledLabel$2, null, React.createElement(StyledCheckbox, null, React.createElement("input", {
|
|
11638
|
+
type: "checkbox",
|
|
11639
|
+
onChange: function onChange() {
|
|
11640
|
+
return handleResolved(2);
|
|
11641
|
+
}
|
|
11642
|
+
}), React.createElement(RoundCheckbox, null)), React.createElement(StyledSpan, null, "Mark As Complete")))) : null)
|
|
11643
|
+
}, React.createElement(ReferenceContainer, {
|
|
11644
|
+
style: {
|
|
11645
|
+
marginTop: '20px'
|
|
11646
|
+
}
|
|
11647
|
+
}, React.createElement(InnerContainer, null, React.createElement(MiniContainer, null, ' ', React.createElement(Label$e, null, "Reference ", " "), React.createElement(LabelText, null, (reminderData == null ? void 0 : reminderData.reference) || 'N/A')), React.createElement(MiniContainer, null, ' ', React.createElement(Label$e, null, "Status "), React.createElement(LabelText, null, (reminderData == null || (_reminderData$reminde4 = reminderData.reminder_status) == null ? void 0 : _reminderData$reminde4.name_alias) === 'pending' || (reminderData == null || (_reminderData$reminde5 = reminderData.reminder_status) == null ? void 0 : _reminderData$reminde5.name_alias) === 'unresolved' ? React.createElement(StatusIndicator, {
|
|
11648
|
+
text: "Incomplete",
|
|
11649
|
+
status: "AD"
|
|
11650
|
+
}) : React.createElement(StatusIndicator, {
|
|
11651
|
+
text: "Completed on " + (reminderData == null ? void 0 : reminderData.completed) + " by " + (reminderData == null ? void 0 : reminderData.completed_by),
|
|
11652
|
+
status: "SD"
|
|
11653
|
+
}))))), React.createElement(ContentsContainer, null, React.createElement(Left$1, null, React.createElement(AssigneeDropdown, null), React.createElement(DateTimeContainer, null, React.createElement(Label$e, null, "Due "), React.createElement(Row$6, null, React.createElement(StyleContainer$2, null, React.createElement(DatePickerWrap, null, React.createElement(DatePicker, {
|
|
11654
|
+
format: "DD/MM/YYYY",
|
|
11655
|
+
value: reminderPayload != null && reminderPayload.due_date ? dayjs(reminderPayload == null ? void 0 : reminderPayload.due_date) : null,
|
|
11656
|
+
onChange: handleDateChange
|
|
11657
|
+
}))), React.createElement(TimeWrapper, null, React.createElement(StyledTime, {
|
|
11658
|
+
onChange: handleTime,
|
|
11659
|
+
value: reminderPayload == null ? void 0 : reminderPayload.due_time,
|
|
11660
|
+
type: "time"
|
|
11661
|
+
}))))), React.createElement(Right$2, null, React.createElement(DetailedContainer, null, React.createElement(Label$e, null, "Details"), React.createElement(StyledText$1, {
|
|
11662
|
+
name: "text",
|
|
11663
|
+
required: true,
|
|
11664
|
+
value: reminderPayload == null ? void 0 : reminderPayload.details,
|
|
11665
|
+
onChange: onChangeDetails
|
|
11666
|
+
}))))));
|
|
11667
|
+
};
|
|
11668
|
+
var StyleContainer$2 = /*#__PURE__*/styled.div(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n background: #fff;\n width: 235px;\n"])));
|
|
11669
|
+
var StyledWrapper = /*#__PURE__*/styled.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 6px 10px;\n align-items: center;\n gap: 5px;\n border-radius: 30px;\n background: #fff;\n"])));
|
|
11670
|
+
var StyledLabel$2 = /*#__PURE__*/styled.label(_templateObject3$S || (_templateObject3$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n"])));
|
|
11671
|
+
var StyledSpan = /*#__PURE__*/styled.span(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #131313;\n font-family: 'Lato', sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n white-space: nowrap;\n"])));
|
|
11672
|
+
var StyledCheckbox = /*#__PURE__*/styled.div(_templateObject5$l || (_templateObject5$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n input[type='checkbox'] {\n display: none;\n }\n\n input[type='checkbox'] + span:before {\n width: 14px;\n height: 14px;\n border: 1.5px solid #3a3630;\n content: '';\n display: inline-block;\n margin: 0 8px 0 0;\n padding: 0;\n border-radius: 50%;\n }\n\n input[type='checkbox']:checked + span:before {\n background: #feba30;\n border: 1.5px solid #3a3630;\n box-shadow: inset 0px 0px 0px 1px #fff;\n color: #333;\n content: '';\n text-align: center;\n border-radius: 50%;\n display: flex;\n width: 14px;\n height: 14px;\n }\n\n input[type='checkbox']:focus + span::before {\n outline: 0;\n }\n"])));
|
|
11673
|
+
var OuterDiv = /*#__PURE__*/styled.div(_templateObject6$b || (_templateObject6$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-left: 33%;\n"])));
|
|
11674
|
+
var RoundCheckbox = /*#__PURE__*/styled.span(_templateObject7$c || (_templateObject7$c = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11675
|
+
var LabelText = /*#__PURE__*/styled.span(_templateObject8$9 || (_templateObject8$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--primary-dark-brown, #3a3630);\n font-family: Lato;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
|
|
11676
|
+
|
|
11677
|
+
var _templateObject$24;
|
|
11320
11678
|
function OrderActions() {
|
|
11321
11679
|
var _useCurrentAction = useCurrentAction(),
|
|
11322
11680
|
currentAction = _useCurrentAction[0];
|
|
@@ -11350,6 +11708,8 @@ function OrderActions() {
|
|
|
11350
11708
|
return React.createElement(TaskReminderModal, null);
|
|
11351
11709
|
case 'create-task':
|
|
11352
11710
|
return React.createElement(TaskModal, null);
|
|
11711
|
+
case 'view-reminder':
|
|
11712
|
+
return React.createElement(ViewReminderModal, null);
|
|
11353
11713
|
case 'log-feedback':
|
|
11354
11714
|
return React.createElement(LogFeedback, null);
|
|
11355
11715
|
case 'unhold-order':
|
|
@@ -11368,7 +11728,7 @@ function OrderActions() {
|
|
|
11368
11728
|
};
|
|
11369
11729
|
return React.createElement(Container$18, null, renderContent());
|
|
11370
11730
|
}
|
|
11371
|
-
var Container$18 = /*#__PURE__*/styled.div(_templateObject$
|
|
11731
|
+
var Container$18 = /*#__PURE__*/styled.div(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11372
11732
|
|
|
11373
11733
|
function useSystemLogs() {
|
|
11374
11734
|
var ssoToken = getCookie('id_token');
|
|
@@ -11460,7 +11820,7 @@ function useSystemLogs() {
|
|
|
11460
11820
|
return perform;
|
|
11461
11821
|
}
|
|
11462
11822
|
|
|
11463
|
-
var _templateObject$
|
|
11823
|
+
var _templateObject$25, _templateObject2$1z;
|
|
11464
11824
|
var Details = function Details() {
|
|
11465
11825
|
// const [orderDetails] = useOrderDetails();
|
|
11466
11826
|
var _useCustomerInfo = useCustomerInfo(),
|
|
@@ -11469,10 +11829,10 @@ var Details = function Details() {
|
|
|
11469
11829
|
var postcodeShow = (customerInfo == null ? void 0 : customerInfo.postcode) || '';
|
|
11470
11830
|
return React.createElement(DetailsContainer, null, React.createElement(Typo, null, "CUSTOMER RETURN - ", recipient, " , ", postcodeShow));
|
|
11471
11831
|
};
|
|
11472
|
-
var DetailsContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
11473
|
-
var Typo = /*#__PURE__*/styled.div(_templateObject2$
|
|
11832
|
+
var DetailsContainer = /*#__PURE__*/styled.div(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n > svg {\n transform: scale(0.6);\n }\n"])));
|
|
11833
|
+
var Typo = /*#__PURE__*/styled.div(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 32px; /* 160% */\n text-transform: uppercase;\n margin: 0;\n padding: 0;\n\n @media screen and (max-width: 1220px) {\n font-size: 14px;\n }\n"])));
|
|
11474
11834
|
|
|
11475
|
-
var _templateObject$
|
|
11835
|
+
var _templateObject$26;
|
|
11476
11836
|
function Options() {
|
|
11477
11837
|
var _useCurrentAction = useCurrentAction(),
|
|
11478
11838
|
setCurrentAction = _useCurrentAction[1];
|
|
@@ -11538,7 +11898,7 @@ function Options() {
|
|
|
11538
11898
|
value: "OPTIONS"
|
|
11539
11899
|
}));
|
|
11540
11900
|
}
|
|
11541
|
-
var Option = /*#__PURE__*/styled.div(_templateObject$
|
|
11901
|
+
var Option = /*#__PURE__*/styled.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11542
11902
|
|
|
11543
11903
|
function BjsMenu() {
|
|
11544
11904
|
var _orderStatus$;
|
|
@@ -11595,7 +11955,7 @@ function BjsMenu() {
|
|
|
11595
11955
|
});
|
|
11596
11956
|
}
|
|
11597
11957
|
|
|
11598
|
-
var _templateObject$
|
|
11958
|
+
var _templateObject$27;
|
|
11599
11959
|
function Print() {
|
|
11600
11960
|
var _useOrderDetails = useOrderDetails(),
|
|
11601
11961
|
orderDetails = _useOrderDetails[0];
|
|
@@ -11680,28 +12040,28 @@ function Print() {
|
|
|
11680
12040
|
})
|
|
11681
12041
|
}));
|
|
11682
12042
|
}
|
|
11683
|
-
var Container$19 = /*#__PURE__*/styled.div(_templateObject$
|
|
12043
|
+
var Container$19 = /*#__PURE__*/styled.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11684
12044
|
|
|
11685
|
-
var _templateObject$
|
|
12045
|
+
var _templateObject$28;
|
|
11686
12046
|
// components
|
|
11687
12047
|
function DropDowns$1() {
|
|
11688
12048
|
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper$2, null, React.createElement(BjsMenu, null), React.createElement(Options, null), React.createElement(Print, null)));
|
|
11689
12049
|
}
|
|
11690
|
-
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject$
|
|
12050
|
+
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 5px;\n display: flex;\n align-self: center;\n gap: 10px;\n"])));
|
|
11691
12051
|
|
|
11692
|
-
var _templateObject$
|
|
12052
|
+
var _templateObject$29;
|
|
11693
12053
|
var ActionsMenu = function ActionsMenu() {
|
|
11694
12054
|
return React.createElement(Flex$2, null, React.createElement(DropDowns$1, null));
|
|
11695
12055
|
};
|
|
11696
|
-
var Flex$2 = /*#__PURE__*/styled.div(_templateObject$
|
|
12056
|
+
var Flex$2 = /*#__PURE__*/styled.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n height: 34px;\n padding: 1px;\n align-items: flex-start;\n border-radius: 20px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: #f0f2f2;\n cursor: pointer;\n"])));
|
|
11697
12057
|
|
|
11698
|
-
var _templateObject$
|
|
12058
|
+
var _templateObject$2a;
|
|
11699
12059
|
var DetailsFilters = function DetailsFilters() {
|
|
11700
12060
|
return React.createElement(Flex$3, null, React.createElement(Details, null), React.createElement(ActionsMenu, null));
|
|
11701
12061
|
};
|
|
11702
|
-
var Flex$3 = /*#__PURE__*/styled.div(_templateObject$
|
|
12062
|
+
var Flex$3 = /*#__PURE__*/styled.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: linear-gradient(180deg, #fff 0%, #f9fcff 100%);\n\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n /* z-index: 9999; */\n display: flex;\n padding: 10px;\n flex-direction: row;\n gap: 10px;\n align-self: stretch;\n position: relative;\n margin-bottom: -71px;\n width: 97%;\n margin-left: 21px;\n top: -132px;\n justify-content: space-between;\n"])));
|
|
11703
12063
|
|
|
11704
|
-
var _templateObject$
|
|
12064
|
+
var _templateObject$2b, _templateObject2$1A, _templateObject3$T;
|
|
11705
12065
|
function FlagTemplate(_ref) {
|
|
11706
12066
|
var _data$tasks_types;
|
|
11707
12067
|
var data = _ref.data;
|
|
@@ -11732,14 +12092,14 @@ function FlagTemplate(_ref) {
|
|
|
11732
12092
|
onClose: function onClose() {}
|
|
11733
12093
|
}));
|
|
11734
12094
|
}
|
|
11735
|
-
var StyledAlert = /*#__PURE__*/styled.div(_templateObject$
|
|
11736
|
-
var StyledLink$2 = /*#__PURE__*/styled.span(_templateObject2$
|
|
11737
|
-
var StyledTitle = /*#__PURE__*/styled.span(_templateObject3$
|
|
12095
|
+
var StyledAlert = /*#__PURE__*/styled.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 10px;\n"])));
|
|
12096
|
+
var StyledLink$2 = /*#__PURE__*/styled.span(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--contextual-blue, #6396e5);\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n cursor: pointer;\n"])));
|
|
12097
|
+
var StyledTitle = /*#__PURE__*/styled.span(_templateObject3$T || (_templateObject3$T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n"])), function (_ref2) {
|
|
11738
12098
|
var color = _ref2.color;
|
|
11739
12099
|
return color;
|
|
11740
12100
|
});
|
|
11741
12101
|
|
|
11742
|
-
var _templateObject$
|
|
12102
|
+
var _templateObject$2c, _templateObject2$1B, _templateObject3$U;
|
|
11743
12103
|
function ReminderTemplate(_ref) {
|
|
11744
12104
|
var _data$reminder_status, _data$reminder_status2, _data$reminder_status3, _data$reminder_status4;
|
|
11745
12105
|
var data = _ref.data,
|
|
@@ -11774,14 +12134,144 @@ function ReminderTemplate(_ref) {
|
|
|
11774
12134
|
}
|
|
11775
12135
|
})));
|
|
11776
12136
|
}
|
|
11777
|
-
var StyledAlert$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
11778
|
-
var StyledTitle$1 = /*#__PURE__*/styled.span(_templateObject2$
|
|
12137
|
+
var StyledAlert$1 = /*#__PURE__*/styled.div(_templateObject$2c || (_templateObject$2c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 10px;\n"])));
|
|
12138
|
+
var StyledTitle$1 = /*#__PURE__*/styled.span(_templateObject2$1B || (_templateObject2$1B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n"])), function (_ref2) {
|
|
11779
12139
|
var color = _ref2.color;
|
|
11780
12140
|
return color;
|
|
11781
12141
|
});
|
|
11782
|
-
var StyledLink$3 = /*#__PURE__*/styled.span(_templateObject3$
|
|
12142
|
+
var StyledLink$3 = /*#__PURE__*/styled.span(_templateObject3$U || (_templateObject3$U = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--contextual-blue, #6396e5);\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n cursor: pointer;\n"])));
|
|
12143
|
+
|
|
12144
|
+
var _templateObject$2d, _templateObject2$1C, _templateObject3$V, _templateObject4$w, _templateObject5$m, _templateObject6$c;
|
|
12145
|
+
function OrderTemplate(_ref) {
|
|
12146
|
+
var _orderStaticData$canc, _orderDetails$order_c, _routeData$route_crew, _routeData$route_crew2, _routeData$route_crew3, _routeData$route_crew4, _orderDetails$order_o, _orderDetails$order_o2, _orderDetails$order_o3, _orderDetails$order_r, _orderDetails$order_r2, _orderDetails$order_r3, _routeData$route_deta, _routeData$route_deta2, _routeData$route_deta3;
|
|
12147
|
+
var orderDetails = _ref.orderDetails;
|
|
12148
|
+
var _useRouteDetails = useRouteDetails(),
|
|
12149
|
+
routeData = _useRouteDetails[0];
|
|
12150
|
+
var _useOrderNotify = useOrderNotify(),
|
|
12151
|
+
setOrderCount = _useOrderNotify[1];
|
|
12152
|
+
var _useAllOrderStatus = useAllOrderStatus(),
|
|
12153
|
+
statusVal = _useAllOrderStatus[0];
|
|
12154
|
+
var precall = false;
|
|
12155
|
+
var _useOrderStaticData = useOrderStaticData(),
|
|
12156
|
+
orderStaticData = _useOrderStaticData[0];
|
|
12157
|
+
var unholdReasons = orderStaticData == null || (_orderStaticData$canc = orderStaticData.cancellation_reasons) == null ? void 0 : _orderStaticData$canc.map(function (x) {
|
|
12158
|
+
return {
|
|
12159
|
+
id: x == null ? void 0 : x.id,
|
|
12160
|
+
reason: x == null ? void 0 : x.reason
|
|
12161
|
+
};
|
|
12162
|
+
});
|
|
12163
|
+
var getReasonById = function getReasonById(id) {
|
|
12164
|
+
if (!unholdReasons || (unholdReasons == null ? void 0 : unholdReasons.length) === 0) {
|
|
12165
|
+
return 'Reason not found';
|
|
12166
|
+
}
|
|
12167
|
+
var match = unholdReasons == null ? void 0 : unholdReasons.find(function (item) {
|
|
12168
|
+
return (item == null ? void 0 : item.id) === id;
|
|
12169
|
+
});
|
|
12170
|
+
return match ? match == null ? void 0 : match.reason : 'Reason not found';
|
|
12171
|
+
};
|
|
12172
|
+
var reason = getReasonById(orderDetails == null || (_orderDetails$order_c = orderDetails.order_cancellations) == null ? void 0 : _orderDetails$order_c.reason_id);
|
|
12173
|
+
var _useState = useState({
|
|
12174
|
+
isHoldVisible: true,
|
|
12175
|
+
isCompleted: true,
|
|
12176
|
+
isOutstanding: true,
|
|
12177
|
+
isAwaitingConfirmation: true,
|
|
12178
|
+
isAwaitingRoute: true,
|
|
12179
|
+
isCancelled: true,
|
|
12180
|
+
isEnroute: true,
|
|
12181
|
+
isPreCall: true,
|
|
12182
|
+
isConfirmed: true
|
|
12183
|
+
}),
|
|
12184
|
+
alertVisibility = _useState[0],
|
|
12185
|
+
setAlertVisibility = _useState[1];
|
|
12186
|
+
var crewDetails = (routeData == null || (_routeData$route_crew = routeData.route_crew_info) == null ? void 0 : _routeData$route_crew.crew1_id) + ' ' + (routeData == null || (_routeData$route_crew2 = routeData.route_crew_info) == null ? void 0 : _routeData$route_crew2.crew1) + ' ' + (routeData == null || (_routeData$route_crew3 = routeData.route_crew_info) == null ? void 0 : _routeData$route_crew3.crew2_id) + ' ' + (routeData == null || (_routeData$route_crew4 = routeData.route_crew_info) == null ? void 0 : _routeData$route_crew4.crew2) + ' ';
|
|
12187
|
+
useEffect(function () {
|
|
12188
|
+
}, [precall]);
|
|
12189
|
+
//on close alert functionality
|
|
12190
|
+
var onCloseAlert = function onCloseAlert(alertType) {
|
|
12191
|
+
setAlertVisibility(function (prev) {
|
|
12192
|
+
var _extends2;
|
|
12193
|
+
return _extends({}, prev, (_extends2 = {}, _extends2[alertType] = false, _extends2));
|
|
12194
|
+
});
|
|
12195
|
+
setOrderCount(0);
|
|
12196
|
+
};
|
|
12197
|
+
return React.createElement(React.Fragment, null, statusVal == 'on hold' && (alertVisibility == null ? void 0 : alertVisibility.isHoldVisible) && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12198
|
+
type: "warn",
|
|
12199
|
+
title: React.createElement(React.Fragment, null, (orderDetails == null || (_orderDetails$order_o = orderDetails.order_on_hold) == null ? void 0 : _orderDetails$order_o.hold_indefinitely) === false ? React.createElement(HoldText, null, "on hold until:", ' ', orderDetails != null && (_orderDetails$order_o2 = orderDetails.order_on_hold) != null && _orderDetails$order_o2.hold_untill ? format(new Date(orderDetails == null || (_orderDetails$order_o3 = orderDetails.order_on_hold) == null ? void 0 : _orderDetails$order_o3.hold_untill), 'dd/MM/yyyy') : '') : React.createElement(HoldText, null, "On Hold Until: Indefinitely")),
|
|
12200
|
+
description: '',
|
|
12201
|
+
showOkButton: false,
|
|
12202
|
+
onClose: function onClose() {
|
|
12203
|
+
return onCloseAlert('isHoldVisible');
|
|
12204
|
+
}
|
|
12205
|
+
})), orderDetails.status == 'SD' && alertVisibility.isCompleted && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12206
|
+
type: "success",
|
|
12207
|
+
title: React.createElement(TitleText, null, "Completed: ", orderDetails == null || (_orderDetails$order_r = orderDetails.order_routes) == null ? void 0 : _orderDetails$order_r.complete_time, ", Signee:", ' ', orderDetails == null || (_orderDetails$order_r2 = orderDetails.order_routes) == null ? void 0 : _orderDetails$order_r2.signee, " Notes :", orderDetails == null || (_orderDetails$order_r3 = orderDetails.order_routes) == null ? void 0 : _orderDetails$order_r3.complete_notes),
|
|
12208
|
+
description: React.createElement(SubtitleText, null, "Route: ", routeData == null ? void 0 : routeData.route_name, routeData != null && routeData.route_lock ? ' *LOCKED* ' : '', " on", ' ', routeData == null || (_routeData$route_deta = routeData.route_detail) == null ? void 0 : _routeData$route_deta.vehicle_number, " | Crew : ", crewDetails, "| ", routeData == null ? void 0 : routeData.route_date),
|
|
12209
|
+
showOkButton: false,
|
|
12210
|
+
onClose: function onClose() {
|
|
12211
|
+
return onCloseAlert('isCompleted');
|
|
12212
|
+
}
|
|
12213
|
+
})), precall , statusVal == 'outstanding' && alertVisibility.isOutstanding && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12214
|
+
type: "release",
|
|
12215
|
+
title: "Outstanding",
|
|
12216
|
+
description: "",
|
|
12217
|
+
showOkButton: false,
|
|
12218
|
+
onClose: function onClose() {
|
|
12219
|
+
return onCloseAlert('isOutstanding');
|
|
12220
|
+
}
|
|
12221
|
+
})), statusVal == 'awaiting confirmation' && alertVisibility.isAwaitingConfirmation && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12222
|
+
type: "info",
|
|
12223
|
+
title: React.createElement(React.Fragment, null, React.createElement(ScheduledText, null, "Scheduled For :", ' ', orderDetails != null && orderDetails.action_date ? format(new Date(orderDetails == null ? void 0 : orderDetails.action_date), 'dd/MM/yyyy') : '', ' ', React.createElement("span", null, ", Awaiting Confirmation"))),
|
|
12224
|
+
description: "",
|
|
12225
|
+
showOkButton: false,
|
|
12226
|
+
onClose: function onClose() {
|
|
12227
|
+
return onCloseAlert('isAwaitingConfirmation');
|
|
12228
|
+
}
|
|
12229
|
+
})), statusVal == 'awaiting route' && alertVisibility.isAwaitingRoute && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12230
|
+
type: "info",
|
|
12231
|
+
title: React.createElement(React.Fragment, null, React.createElement(ScheduledText, null, "Scheduled For :", ' ', orderDetails != null && orderDetails.action_date ? format(new Date(orderDetails == null ? void 0 : orderDetails.action_date), 'dd/MM/yyyy') : '', ' ', ",", React.createElement("span", null, " Awaiting Route"))),
|
|
12232
|
+
description: "",
|
|
12233
|
+
showOkButton: false,
|
|
12234
|
+
onClose: function onClose() {
|
|
12235
|
+
return onCloseAlert('isAwaitingRoute');
|
|
12236
|
+
}
|
|
12237
|
+
})), statusVal == 'cancelled' && alertVisibility.isCancelled && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12238
|
+
type: "error",
|
|
12239
|
+
title: "This order has been cancelled",
|
|
12240
|
+
description: reason,
|
|
12241
|
+
showOkButton: false,
|
|
12242
|
+
onClose: function onClose() {
|
|
12243
|
+
return onCloseAlert('isCancelled');
|
|
12244
|
+
}
|
|
12245
|
+
})), statusVal == 'enroute' && alertVisibility.isEnroute && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12246
|
+
type: "info",
|
|
12247
|
+
title: React.createElement(React.Fragment, null, React.createElement(EnRouteText, null, "Allocated to Route :", ' ', React.createElement("span", null, routeData == null ? void 0 : routeData.route_name, routeData != null && routeData.route_lock ? ' *LOCKED* ' : '', " on", ' ', routeData == null || (_routeData$route_deta2 = routeData.route_detail) == null ? void 0 : _routeData$route_deta2.vehicle_number, " | Crew :", ' ', crewDetails, "|", ' ', routeData != null && routeData.route_date ? format(new Date(routeData == null ? void 0 : routeData.route_date), 'dd/MM/yyyy') : '', ' '), React.createElement("span", null, ' ', ", Confirmed: ", React.createElement("span", {
|
|
12248
|
+
className: "no"
|
|
12249
|
+
}, "NO")))),
|
|
12250
|
+
description: "",
|
|
12251
|
+
showOkButton: false,
|
|
12252
|
+
onClose: function onClose() {
|
|
12253
|
+
return onCloseAlert('isEnroute');
|
|
12254
|
+
}
|
|
12255
|
+
})), statusVal == 'confirmed' && alertVisibility.isConfirmed && React.createElement(StyledAlert$2, null, React.createElement(FlagAlert, {
|
|
12256
|
+
type: "info",
|
|
12257
|
+
title: React.createElement(React.Fragment, null, React.createElement(EnRouteText, null, "Allocated to Route :", ' ', React.createElement("span", null, routeData == null ? void 0 : routeData.route_name, routeData != null && routeData.route_lock ? ' *LOCKED* ' : '', " on", ' ', routeData == null || (_routeData$route_deta3 = routeData.route_detail) == null ? void 0 : _routeData$route_deta3.vehicle_number, " | Crew :", ' ', crewDetails, "|", ' ', routeData != null && routeData.route_date ? format(new Date(routeData == null ? void 0 : routeData.route_date), 'dd/MM/yyyy') : '', ' '), React.createElement("span", null, ' ', ", Confirmed: ", React.createElement("span", {
|
|
12258
|
+
className: "yes"
|
|
12259
|
+
}, "YES")))),
|
|
12260
|
+
description: "",
|
|
12261
|
+
showOkButton: false,
|
|
12262
|
+
onClose: function onClose() {
|
|
12263
|
+
return onCloseAlert('isConfirmed');
|
|
12264
|
+
}
|
|
12265
|
+
})));
|
|
12266
|
+
}
|
|
12267
|
+
var StyledAlert$2 = /*#__PURE__*/styled.div(_templateObject$2d || (_templateObject$2d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 5px;\n"])));
|
|
12268
|
+
var SubtitleText = /*#__PURE__*/styled.div(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #36a053;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px;\n"])));
|
|
12269
|
+
var TitleText = /*#__PURE__*/styled.div(_templateObject3$V || (_templateObject3$V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: Lato;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n"])));
|
|
12270
|
+
var ScheduledText = /*#__PURE__*/styled.div(_templateObject4$w || (_templateObject4$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6396e5;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n span {\n color: #36a053;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n }\n"])));
|
|
12271
|
+
var HoldText = /*#__PURE__*/styled.div(_templateObject5$m || (_templateObject5$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #feba30;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n span {\n color: #6a7378;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n }\n"])));
|
|
12272
|
+
var EnRouteText = /*#__PURE__*/styled.div(_templateObject6$c || (_templateObject6$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #36a053;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n span {\n color: #6396e5;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n .yes {\n color: #36a053;\n }\n .no {\n color: #e95252;\n }\n }\n"])));
|
|
11783
12273
|
|
|
11784
|
-
var _templateObject$
|
|
12274
|
+
var _templateObject$2e, _templateObject2$1D;
|
|
11785
12275
|
function Tabs(_ref) {
|
|
11786
12276
|
var activeNotifications = _ref.activeNotifications,
|
|
11787
12277
|
closedNotifications = _ref.closedNotifications,
|
|
@@ -11791,13 +12281,17 @@ function Tabs(_ref) {
|
|
|
11791
12281
|
dismissFlags = _ref.dismissFlags;
|
|
11792
12282
|
var _useTabType = useTabType(),
|
|
11793
12283
|
activeTab = _useTabType[0];
|
|
11794
|
-
var
|
|
11795
|
-
|
|
11796
|
-
var
|
|
11797
|
-
var
|
|
12284
|
+
var _useOrderDetails = useOrderDetails(),
|
|
12285
|
+
orderDetails = _useOrderDetails[0];
|
|
12286
|
+
var initialNotifications = activeNotifications == null ? void 0 : activeNotifications.slice(0, 3);
|
|
12287
|
+
var additionalNotifications = activeNotifications == null ? void 0 : activeNotifications.slice(3);
|
|
12288
|
+
var initialReminders = activeReminders == null ? void 0 : activeReminders.slice(0, 3);
|
|
12289
|
+
var additionalReminders = activeReminders == null ? void 0 : activeReminders.slice(3);
|
|
11798
12290
|
return React.createElement(React.Fragment, null, React.createElement(Content, null, React.createElement(Container$1a, {
|
|
11799
12291
|
className: "tab-content"
|
|
11800
|
-
}, activeTab === 'active' && React.createElement(React.Fragment, null,
|
|
12292
|
+
}, activeTab === 'active' && React.createElement(React.Fragment, null, React.createElement(OrderTemplate, {
|
|
12293
|
+
orderDetails: orderDetails
|
|
12294
|
+
}), initialReminders == null ? void 0 : initialReminders.map(function (item, index) {
|
|
11801
12295
|
return React.createElement(ReminderTemplate, {
|
|
11802
12296
|
key: index,
|
|
11803
12297
|
data: item,
|
|
@@ -11835,8 +12329,8 @@ function Tabs(_ref) {
|
|
|
11835
12329
|
});
|
|
11836
12330
|
})))));
|
|
11837
12331
|
}
|
|
11838
|
-
var Container$1a = /*#__PURE__*/styled.div(_templateObject$
|
|
11839
|
-
var Content = /*#__PURE__*/styled.div(_templateObject2$
|
|
12332
|
+
var Container$1a = /*#__PURE__*/styled.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 10px;\n display: grid;\n"])));
|
|
12333
|
+
var Content = /*#__PURE__*/styled.div(_templateObject2$1D || (_templateObject2$1D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
|
|
11840
12334
|
|
|
11841
12335
|
var NotifyFlag = function NotifyFlag() {
|
|
11842
12336
|
return React.createElement("svg", {
|
|
@@ -11854,7 +12348,7 @@ var NotifyFlag = function NotifyFlag() {
|
|
|
11854
12348
|
}));
|
|
11855
12349
|
};
|
|
11856
12350
|
|
|
11857
|
-
var _templateObject$
|
|
12351
|
+
var _templateObject$2f, _templateObject2$1E, _templateObject3$W, _templateObject4$x, _templateObject5$n, _templateObject6$d, _templateObject7$d, _templateObject8$a, _templateObject9$6, _templateObject10$4, _templateObject11$4, _templateObject12$2;
|
|
11858
12352
|
function Notification() {
|
|
11859
12353
|
var _OrderData$order_rout;
|
|
11860
12354
|
var _useTabType = useTabType(),
|
|
@@ -12031,66 +12525,66 @@ function Notification() {
|
|
|
12031
12525
|
dismissFlags: dismissFlags
|
|
12032
12526
|
})) : 'No Notifications Found'));
|
|
12033
12527
|
}
|
|
12034
|
-
var Container$1b = /*#__PURE__*/styled.div(_templateObject$
|
|
12035
|
-
var Loader$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
12036
|
-
var Spinner$1 = /*#__PURE__*/styled.div(_templateObject3$
|
|
12037
|
-
var FlagContainer = /*#__PURE__*/styled.div(_templateObject4$
|
|
12038
|
-
var TabsData = /*#__PURE__*/styled.div(_templateObject5$
|
|
12039
|
-
var ActiveCount = /*#__PURE__*/styled.div(_templateObject6$
|
|
12040
|
-
var ClosedCount = /*#__PURE__*/styled.div(_templateObject7$
|
|
12041
|
-
var StyledTab = /*#__PURE__*/styled.div(_templateObject8$
|
|
12528
|
+
var Container$1b = /*#__PURE__*/styled.div(_templateObject$2f || (_templateObject$2f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 20px;\n padding: 10px;\n border-bottom: 1px solid #ccc;\n"])));
|
|
12529
|
+
var Loader$1 = /*#__PURE__*/styled.div(_templateObject2$1E || (_templateObject2$1E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
12530
|
+
var Spinner$1 = /*#__PURE__*/styled.div(_templateObject3$W || (_templateObject3$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 4px solid rgba(0, 0, 0, 0.1);\n border-left-color: #3a3630;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n animation: spin 1s linear infinite;\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
|
|
12531
|
+
var FlagContainer = /*#__PURE__*/styled.div(_templateObject4$x || (_templateObject4$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 8px;\n background-color: #3a3630;\n border-radius: 10px;\n"])));
|
|
12532
|
+
var TabsData = /*#__PURE__*/styled.div(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 20px;\n padding: 10px;\n"])));
|
|
12533
|
+
var ActiveCount = /*#__PURE__*/styled.div(_templateObject6$d || (_templateObject6$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #ffffff;\n padding: 1px 5px;\n background-color: #6396e5;\n border-radius: 6px;\n"])));
|
|
12534
|
+
var ClosedCount = /*#__PURE__*/styled.div(_templateObject7$d || (_templateObject7$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #ffffff;\n padding: 1px 5px;\n background-color: #e95252;\n border-radius: 6px;\n"])));
|
|
12535
|
+
var StyledTab = /*#__PURE__*/styled.div(_templateObject8$a || (_templateObject8$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 5px;\n cursor: pointer;\n color: ", ";\n border-bottom: ", ";\n transition: border-bottom 0.3s ease;\n font-family: 'Roboto', sans-serif;\n padding-bottom: 5px;\n align-items: center;\n"])), function (props) {
|
|
12042
12536
|
return props.active ? '#3a3630' : '#AEA9A1';
|
|
12043
12537
|
}, function (props) {
|
|
12044
12538
|
return props.active ? '2px solid #feba30' : '2px solid #eeeeee';
|
|
12045
12539
|
});
|
|
12046
12540
|
var Section$1 = /*#__PURE__*/styled.div(_templateObject9$6 || (_templateObject9$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 14px;\n background: #ffffff;\n border-radius: 12px;\n padding: 10px;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n border: 1px solid #e0e0e0;\n"])));
|
|
12047
|
-
var Label$i = /*#__PURE__*/styled(SectionHeader)(_templateObject10$
|
|
12048
|
-
var TabsWrapper = /*#__PURE__*/styled.div(_templateObject11$
|
|
12541
|
+
var Label$i = /*#__PURE__*/styled(SectionHeader)(_templateObject10$4 || (_templateObject10$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #ccc;\n font-family: 'Roboto', sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px; /* 150% */\n text-transform: uppercase;\n"])));
|
|
12542
|
+
var TabsWrapper = /*#__PURE__*/styled.div(_templateObject11$4 || (_templateObject11$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* min-height: 200px; */\n max-height: 250px;\n overflow-y: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &:hover {\n scrollbar-width: thin;\n }\n\n &::-webkit-scrollbar {\n width: 0;\n }\n\n &:hover::-webkit-scrollbar {\n width: 8px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.5);\n }\n"])));
|
|
12049
12543
|
var Text$9 = /*#__PURE__*/styled.div(_templateObject12$2 || (_templateObject12$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--tonal-brown-651, #6a7378);\n font-family: Lato;\n font-size: 13px;\n font-style: normal;\n font-weight: 600;\n"])));
|
|
12050
12544
|
|
|
12051
|
-
var _templateObject$
|
|
12545
|
+
var _templateObject$2g;
|
|
12052
12546
|
function CollapsedContent$2() {
|
|
12053
12547
|
return React.createElement(Font$1, null, "ORDER RESOURCES");
|
|
12054
12548
|
}
|
|
12055
|
-
var Font$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
12549
|
+
var Font$1 = /*#__PURE__*/styled.div(_templateObject$2g || (_templateObject$2g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: 'Roboto', sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px; /* 150% */\n"])));
|
|
12056
12550
|
|
|
12057
|
-
var _templateObject$
|
|
12551
|
+
var _templateObject$2h, _templateObject2$1F;
|
|
12058
12552
|
function Category(props) {
|
|
12059
12553
|
var _props$row;
|
|
12060
12554
|
var data = props == null || (_props$row = props.row) == null ? void 0 : _props$row.original.category;
|
|
12061
|
-
return React.createElement(RowContainer$4, null, React.createElement(Row$
|
|
12555
|
+
return React.createElement(RowContainer$4, null, React.createElement(Row$7, null, data));
|
|
12062
12556
|
}
|
|
12063
|
-
var RowContainer$4 = /*#__PURE__*/styled.div(_templateObject$
|
|
12064
|
-
var Row$
|
|
12557
|
+
var RowContainer$4 = /*#__PURE__*/styled.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12558
|
+
var Row$7 = /*#__PURE__*/styled.div(_templateObject2$1F || (_templateObject2$1F = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12065
12559
|
|
|
12066
|
-
var _templateObject$
|
|
12560
|
+
var _templateObject$2i, _templateObject2$1G;
|
|
12067
12561
|
function Date$2(props) {
|
|
12068
12562
|
var _props$row;
|
|
12069
12563
|
var data = props == null || (_props$row = props.row) == null ? void 0 : _props$row.original.date;
|
|
12070
|
-
return React.createElement(RowContainer$5, null, React.createElement(Row$
|
|
12564
|
+
return React.createElement(RowContainer$5, null, React.createElement(Row$8, null, formatDate$1(data)));
|
|
12071
12565
|
}
|
|
12072
|
-
var RowContainer$5 = /*#__PURE__*/styled.div(_templateObject$
|
|
12073
|
-
var Row$
|
|
12566
|
+
var RowContainer$5 = /*#__PURE__*/styled.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12567
|
+
var Row$8 = /*#__PURE__*/styled.div(_templateObject2$1G || (_templateObject2$1G = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12074
12568
|
|
|
12075
|
-
var _templateObject$
|
|
12569
|
+
var _templateObject$2j, _templateObject2$1H;
|
|
12076
12570
|
function Reference(props) {
|
|
12077
12571
|
var _props$row;
|
|
12078
12572
|
var data = props == null || (_props$row = props.row) == null ? void 0 : _props$row.original.reference;
|
|
12079
|
-
return React.createElement(RowContainer$6, null, React.createElement(Row$
|
|
12573
|
+
return React.createElement(RowContainer$6, null, React.createElement(Row$9, null, data));
|
|
12080
12574
|
}
|
|
12081
|
-
var RowContainer$6 = /*#__PURE__*/styled.div(_templateObject$
|
|
12082
|
-
var Row$
|
|
12575
|
+
var RowContainer$6 = /*#__PURE__*/styled.div(_templateObject$2j || (_templateObject$2j = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12576
|
+
var Row$9 = /*#__PURE__*/styled.div(_templateObject2$1H || (_templateObject2$1H = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12083
12577
|
|
|
12084
|
-
var _templateObject$
|
|
12578
|
+
var _templateObject$2k, _templateObject2$1I;
|
|
12085
12579
|
function Type(props) {
|
|
12086
12580
|
var _props$row;
|
|
12087
12581
|
var data = props == null || (_props$row = props.row) == null ? void 0 : _props$row.original.type;
|
|
12088
|
-
return React.createElement(RowContainer$7, null, React.createElement(Row$
|
|
12582
|
+
return React.createElement(RowContainer$7, null, React.createElement(Row$a, null, data));
|
|
12089
12583
|
}
|
|
12090
|
-
var RowContainer$7 = /*#__PURE__*/styled.div(_templateObject$
|
|
12091
|
-
var Row$
|
|
12584
|
+
var RowContainer$7 = /*#__PURE__*/styled.div(_templateObject$2k || (_templateObject$2k = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12585
|
+
var Row$a = /*#__PURE__*/styled.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12092
12586
|
|
|
12093
|
-
var _templateObject$
|
|
12587
|
+
var _templateObject$2l, _templateObject2$1J, _templateObject3$X;
|
|
12094
12588
|
function Action(_ref) {
|
|
12095
12589
|
var _row$original, _orderResources$data;
|
|
12096
12590
|
var row = _ref.row;
|
|
@@ -12176,7 +12670,7 @@ function Action(_ref) {
|
|
|
12176
12670
|
return _ref2.apply(this, arguments);
|
|
12177
12671
|
};
|
|
12178
12672
|
}();
|
|
12179
|
-
return React.createElement(Actions, null, React.createElement(Row$
|
|
12673
|
+
return React.createElement(Actions, null, React.createElement(Row$b, null, React.createElement(Tippy, {
|
|
12180
12674
|
content: "View",
|
|
12181
12675
|
placement: "top",
|
|
12182
12676
|
trigger: "mouseenter"
|
|
@@ -12199,9 +12693,9 @@ function Action(_ref) {
|
|
|
12199
12693
|
}, React.createElement(DownIcon, null)))));
|
|
12200
12694
|
}
|
|
12201
12695
|
// Styled components for styling
|
|
12202
|
-
var Actions = /*#__PURE__*/styled.div(_templateObject$
|
|
12203
|
-
var TippyContainer = /*#__PURE__*/styled.div(_templateObject2$
|
|
12204
|
-
var Row$
|
|
12696
|
+
var Actions = /*#__PURE__*/styled.div(_templateObject$2l || (_templateObject$2l = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12697
|
+
var TippyContainer = /*#__PURE__*/styled.div(_templateObject2$1J || (_templateObject2$1J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: inline-block;\n margin: 7px;\n"])));
|
|
12698
|
+
var Row$b = /*#__PURE__*/styled.div(_templateObject3$X || (_templateObject3$X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n"])));
|
|
12205
12699
|
|
|
12206
12700
|
var tableColumns$1 = [{
|
|
12207
12701
|
header: 'Date',
|
|
@@ -12230,7 +12724,7 @@ var tableColumns$1 = [{
|
|
|
12230
12724
|
enableSorting: false
|
|
12231
12725
|
}];
|
|
12232
12726
|
|
|
12233
|
-
var _templateObject$
|
|
12727
|
+
var _templateObject$2m;
|
|
12234
12728
|
function Order$1() {
|
|
12235
12729
|
var _orderResources$data;
|
|
12236
12730
|
var _useOrderProductsReso = useOrderProductsResources(),
|
|
@@ -12243,9 +12737,9 @@ function Order$1() {
|
|
|
12243
12737
|
data: data
|
|
12244
12738
|
})));
|
|
12245
12739
|
}
|
|
12246
|
-
var Table$2 = /*#__PURE__*/styled.div(_templateObject$
|
|
12740
|
+
var Table$2 = /*#__PURE__*/styled.div(_templateObject$2m || (_templateObject$2m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
|
|
12247
12741
|
|
|
12248
|
-
var _templateObject$
|
|
12742
|
+
var _templateObject$2n, _templateObject2$1K, _templateObject3$Y, _templateObject4$y;
|
|
12249
12743
|
function OrderView() {
|
|
12250
12744
|
notification.config({
|
|
12251
12745
|
top: 150
|
|
@@ -12296,6 +12790,11 @@ function OrderView() {
|
|
|
12296
12790
|
setSubContracterData = _useSubContracterData[1];
|
|
12297
12791
|
var _useGlobalStateHitOrd = useGlobalStateHitOrder(),
|
|
12298
12792
|
recallOrders = _useGlobalStateHitOrd[0];
|
|
12793
|
+
var _useAllOrderStatus = useAllOrderStatus(),
|
|
12794
|
+
setStatusVal = _useAllOrderStatus[1];
|
|
12795
|
+
useEffect(function () {
|
|
12796
|
+
setStatusVal(orderDetails == null ? void 0 : orderDetails.status_value);
|
|
12797
|
+
}, [orderDetails == null ? void 0 : orderDetails.status_value]);
|
|
12299
12798
|
// query param
|
|
12300
12799
|
var location = useLocation();
|
|
12301
12800
|
var _useState2 = useState([]),
|
|
@@ -12594,13 +13093,13 @@ function OrderView() {
|
|
|
12594
13093
|
}, [fetchedSubcontractotData, fetchedSubcontractotData, apiLoading]);
|
|
12595
13094
|
return React.createElement(MainContainer$b, null, React.createElement(GeneralHeader, null), React.createElement(DetailsFilters, null), React.createElement(Notification, null), React.createElement(OrderDetails$1, null), React.createElement(ProductsInfo, null), React.createElement(SplitLayout$1, null, React.createElement(NotesContainer, null, React.createElement(Notes, null)), React.createElement(TablesContainer, null, React.createElement(Order$1, null), React.createElement(SystemLogs, null))), React.createElement(OrderActions, null));
|
|
12596
13095
|
}
|
|
12597
|
-
var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$
|
|
12598
|
-
var SplitLayout$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
12599
|
-
var NotesContainer = /*#__PURE__*/styled.div(_templateObject3$
|
|
12600
|
-
var TablesContainer = /*#__PURE__*/styled.div(_templateObject4$
|
|
13096
|
+
var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$2n || (_templateObject$2n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-bottom: 30px;\n"])));
|
|
13097
|
+
var SplitLayout$1 = /*#__PURE__*/styled.div(_templateObject2$1K || (_templateObject2$1K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n @media (max-width: 1024px) {\n display: contents;\n }\n"])));
|
|
13098
|
+
var NotesContainer = /*#__PURE__*/styled.div(_templateObject3$Y || (_templateObject3$Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n"])));
|
|
13099
|
+
var TablesContainer = /*#__PURE__*/styled.div(_templateObject4$y || (_templateObject4$y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 15px;\n"])));
|
|
12601
13100
|
|
|
12602
|
-
var _templateObject2$
|
|
12603
|
-
var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$
|
|
13101
|
+
var _templateObject2$1L;
|
|
13102
|
+
var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$1L || (_templateObject2$1L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 8px 12px;\n display: flex;\n align-items: center;\n /* border-right: 1px solid #d0d5dd; */\n gap: 8px;\n cursor: pointer;\n position: relative;\n\n @media screen and (max-width: 1030px) {\n padding: 8px 11px;\n }\n\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n top: 54px;\n }\n &:last-child {\n border-right: none;\n }\n &.active svg.arrowDown {\n transform: rotate(180deg);\n }\n label {\n color: #6a7378;\n text-align: center;\n font-family: 'Open Sans';\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n cursor: pointer;\n }\n\n &.noPadding {\n padding: 0;\n }\n"])));
|
|
12604
13103
|
|
|
12605
13104
|
var initialState$3 = {
|
|
12606
13105
|
'x-filters': [],
|
|
@@ -12666,7 +13165,7 @@ var overviewfiltersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
|
12666
13165
|
return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
|
|
12667
13166
|
});
|
|
12668
13167
|
|
|
12669
|
-
var _templateObject$
|
|
13168
|
+
var _templateObject$2o, _templateObject2$1M, _templateObject3$Z;
|
|
12670
13169
|
var SearchType = function SearchType() {
|
|
12671
13170
|
var _useState = useState(''),
|
|
12672
13171
|
searchText = _useState[0],
|
|
@@ -12712,9 +13211,9 @@ var SearchType = function SearchType() {
|
|
|
12712
13211
|
onClick: handleClear
|
|
12713
13212
|
}, React.createElement(CrossIcon, null)));
|
|
12714
13213
|
};
|
|
12715
|
-
var Search = /*#__PURE__*/styled.div(_templateObject$
|
|
12716
|
-
var ClearButton = /*#__PURE__*/styled.button(_templateObject2$
|
|
12717
|
-
var SearchInput = /*#__PURE__*/styled.input(_templateObject3$
|
|
13214
|
+
var Search = /*#__PURE__*/styled.div(_templateObject$2o || (_templateObject$2o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n svg {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n }\n .clear {\n position: absolute;\n right: 32px;\n top: 50%;\n }\n"])));
|
|
13215
|
+
var ClearButton = /*#__PURE__*/styled.button(_templateObject2$1M || (_templateObject2$1M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n border: none;\n color: rgba(0, 0, 0, 0.25);\n cursor: pointer;\n padding: 0 8px;\n font-size: 14px;\n &:hover {\n color: #000;\n }\n"])));
|
|
13216
|
+
var SearchInput = /*#__PURE__*/styled.input(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e0e2e7;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n padding: 8.5px 12px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n padding-left: 39px;\n &:focus {\n outline: none;\n border-color: gray;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n }\n"])));
|
|
12718
13217
|
|
|
12719
13218
|
var BulkFilter = function BulkFilter() {
|
|
12720
13219
|
// const [printToogle, setPrintToggle] = useMenuDropDown();
|
|
@@ -12963,7 +13462,7 @@ var ReturnTable$1 = function ReturnTable() {
|
|
|
12963
13462
|
})))));
|
|
12964
13463
|
};
|
|
12965
13464
|
|
|
12966
|
-
var _templateObject$
|
|
13465
|
+
var _templateObject$2p, _templateObject2$1N, _templateObject3$_;
|
|
12967
13466
|
var _excluded$6 = ["count"];
|
|
12968
13467
|
function ReturnMainTable() {
|
|
12969
13468
|
var _useAtom = useAtom(overviewfiltersReducerAtom),
|
|
@@ -13036,7 +13535,7 @@ function ReturnMainTable() {
|
|
|
13036
13535
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
13037
13536
|
}, React.createElement("div", {
|
|
13038
13537
|
className: "Tableconatiner"
|
|
13039
|
-
}, React.createElement(HeaderFilter, null), React.createElement(Container$1c, null, React.createElement(Row$
|
|
13538
|
+
}, React.createElement(HeaderFilter, null), React.createElement(Container$1c, null, React.createElement(Row$c, null, React.createElement(Text, null, "Client Return"), customerId ? React.createElement(ReturnFilter, null) : React.createElement(Filters, null)), React.createElement(ReturnTable$1, null)), total > 0 && React.createElement(Pagination, {
|
|
13040
13539
|
currentPage: page,
|
|
13041
13540
|
totalItems: total,
|
|
13042
13541
|
itemsPerPage: itemsPerPage,
|
|
@@ -13044,9 +13543,9 @@ function ReturnMainTable() {
|
|
|
13044
13543
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
13045
13544
|
}))));
|
|
13046
13545
|
}
|
|
13047
|
-
var Row$
|
|
13048
|
-
var Container$1c = /*#__PURE__*/styled.div(_templateObject2$
|
|
13049
|
-
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$
|
|
13546
|
+
var Row$c = /*#__PURE__*/styled.div(_templateObject$2p || (_templateObject$2p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
13547
|
+
var Container$1c = /*#__PURE__*/styled.div(_templateObject2$1N || (_templateObject2$1N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
13548
|
+
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$_ || (_templateObject3$_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
|
|
13050
13549
|
|
|
13051
13550
|
var OrderViewQueryHandler = function OrderViewQueryHandler() {
|
|
13052
13551
|
var _useSearchParams = useSearchParams(),
|