@bjsdistribution/dms-client-return 0.0.81 → 0.0.83
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/DynamicTable.d.ts +4 -1
- package/dist/components/order-view/notification/ReminderTemplate.d.ts +1 -1
- package/dist/components/order-view/notification/Tabs.d.ts +1 -1
- package/dist/components/order-view/order-actions/Dropdown.d.ts +1 -0
- package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrder.d.ts +3 -0
- package/dist/components/store.d.ts +2 -1
- package/dist/dms-client-return.cjs.development.js +948 -400
- 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 +983 -435
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +1 -1
- package/src/components/order-view/DynamicTable.tsx +115 -90
- package/src/components/order-view/fakedata.ts +4 -2
- package/src/components/order-view/generic-table/AuditLogs.tsx +23 -81
- package/src/components/order-view/index.tsx +9 -7
- package/src/components/order-view/notes/NoteType.tsx +12 -1
- package/src/components/order-view/notes/index.tsx +46 -33
- package/src/components/order-view/notes/order-dropdown/NewReturnDropdown.tsx +17 -4
- package/src/components/order-view/notification/ReminderTemplate.tsx +10 -11
- package/src/components/order-view/notification/Tabs.tsx +26 -6
- package/src/components/order-view/notification/index.tsx +47 -13
- package/src/components/order-view/order-actions/Dropdown.tsx +10 -1
- package/src/components/order-view/order-actions/actions/cancel-order/index.tsx +21 -2
- package/src/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.tsx +51 -48
- package/src/components/order-view/order-actions/actions/create-task-reminder/CreateReminderModal.tsx +3 -0
- package/src/components/order-view/order-actions/actions/split-order/SplitOrderTable.tsx +28 -19
- package/src/components/order-view/order-actions/actions/split-order/index.tsx +24 -2
- package/src/components/order-view/order-actions/actions/uncancel-order/UncancelOrder.tsx +166 -0
- package/src/components/order-view/order-actions/index.tsx +3 -2
- package/src/components/order-view/order-actions/store.ts +1 -2
- package/src/components/order-view/order-details/expanded-content/footer/index.tsx +9 -6
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +16 -4
- package/src/components/order-view/view-reminder/reminder-styles.tsx +1 -0
- package/src/components/store.ts +7 -1
|
@@ -5,7 +5,7 @@ import { Select, notification, Skeleton, Empty, DatePicker, Upload, message, Inp
|
|
|
5
5
|
import { useAtom, atom } from 'jotai';
|
|
6
6
|
import { format, isValid, parse } from 'date-fns';
|
|
7
7
|
import { atomWithReducer } from 'jotai/utils';
|
|
8
|
-
import { useApiHook, Checkbox as Checkbox$1, AntTable, Alert, AntModal, Label as Label$
|
|
8
|
+
import { useApiHook, Checkbox as Checkbox$1, AntTable, Alert, AntModal, Label as Label$i, Input as Input$1, TextArea, FormSection, displayValueOrNA as displayValueOrNA$1, SelectDropdown, dropdownStyles, RadioButtonGroup as RadioButtonGroup$1, Switch, getBaseEndpoint, Button, formatDateTime, SectionHeader, CrossIcon, AntSelect, CustomRating, CancelationModal, CancelAndCompleteAction, filterDropdownStyles, BackgroundModal as BackgroundModal$1, FlagAlert } from '@bjsdistribution/dms-component-library';
|
|
9
9
|
import dayjs from 'dayjs';
|
|
10
10
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
11
11
|
import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
|
|
@@ -403,6 +403,7 @@ var assignPayload = /*#__PURE__*/atom(AssignUpdateInitial);
|
|
|
403
403
|
var callAPIAgain = /*#__PURE__*/atom(true);
|
|
404
404
|
var actionTypeOptions = /*#__PURE__*/atom([]);
|
|
405
405
|
var selectedProductsMove = /*#__PURE__*/atom([]);
|
|
406
|
+
var newReturnOrderData = /*#__PURE__*/atom([]);
|
|
406
407
|
var selectedOrderlList = /*#__PURE__*/atom([]);
|
|
407
408
|
function useSelectedOrders() {
|
|
408
409
|
return useAtom(selectedOrderlList);
|
|
@@ -470,6 +471,9 @@ var selectedAssignee = /*#__PURE__*/atom('');
|
|
|
470
471
|
function useSelectedData() {
|
|
471
472
|
return useAtom(selectedAssignee);
|
|
472
473
|
}
|
|
474
|
+
function useNewReturnOrderData() {
|
|
475
|
+
return useAtom(newReturnOrderData);
|
|
476
|
+
}
|
|
473
477
|
|
|
474
478
|
// let todayDate = new Date();
|
|
475
479
|
var initialState = {
|
|
@@ -650,6 +654,9 @@ var useItemsPerOverviewPage = function useItemsPerOverviewPage() {
|
|
|
650
654
|
// return useAtom(routeInfoState);
|
|
651
655
|
// };
|
|
652
656
|
|
|
657
|
+
// OrderActionsType
|
|
658
|
+
var activeTabAtom = /*#__PURE__*/atom('active');
|
|
659
|
+
var infoAtom = /*#__PURE__*/atom(false);
|
|
653
660
|
var currentActionAtom = /*#__PURE__*/atom(undefined);
|
|
654
661
|
var orderStaticDataAtom = /*#__PURE__*/atom({});
|
|
655
662
|
var customerInfoAtom = /*#__PURE__*/atom({
|
|
@@ -731,6 +738,12 @@ var ordersInitialValue = {
|
|
|
731
738
|
id: null,
|
|
732
739
|
name: ''
|
|
733
740
|
};
|
|
741
|
+
function useTabType() {
|
|
742
|
+
return useAtom(activeTabAtom);
|
|
743
|
+
}
|
|
744
|
+
function useInfoType() {
|
|
745
|
+
return useAtom(infoAtom);
|
|
746
|
+
}
|
|
734
747
|
function useCurrentAction() {
|
|
735
748
|
return useAtom(currentActionAtom);
|
|
736
749
|
}
|
|
@@ -1373,7 +1386,7 @@ var StyledFilterBtnLabel = /*#__PURE__*/styled.div(_templateObject37 || (_templa
|
|
|
1373
1386
|
var _templateObject19, _templateObject20, _templateObject21;
|
|
1374
1387
|
var StyledTable$1 = /*#__PURE__*/styled.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n position: sticky;\n top: 10px;\n z-index: 1;\n background: #fff;\n box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n position: relative;\n font-family: 'lato', sans-serif;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .custom-check {\n position: absloute;\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .sortIconClass {\n cursor: pointer;\n display: flex;\n }\n }\n }\n }\n tbody {\n max-height: 400px;\n overflow-y: auto;\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n position: relative;\n .actionbox {\n display: flex;\n gap: 5px;\n }\n .shareIconContainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n gap: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #fff;\n list-style-type: none;\n /* padding-left: 0; */\n /* fontWeight: 600,\n paddingLeft: 0, */\n cursor: pointer;\n position: relative;\n }\n .statusCancelled {\n color: #e95252;\n /* background: rgba(233, 82, 82, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOnHold {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusSubContracted {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusAwaiting {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusCompleted {\n color: #1f9254;\n /* background: rgba(41, 204, 106, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOutstanding {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusUnknown {\n color: #000;\n /* background: #fff; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n .statustext {\n color: #1f9254;\n font-family: 'Open Sans';\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n }\n .downloadcontainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n\n width: 28px;\n height: 28px;\n flex-direction: column;\n\n border-radius: 14px;\n border: 1px solid #e2e0db;\n background: #fff;\n }\n .statuscontainer {\n display: flex;\n padding: 5px 30px 5px 30px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n .awaiting {\n display: flex;\n min-width: 85px;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border-radius: 22px;\n background: rgba(233, 82, 82, 0.15);\n color: #e95252;\n font-family: 'Open Sans';\n font-size: 12px;\n font-weight: 600;\n }\n ul > li > a {\n text-decoration: none !important;\n color: #0099ff;\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
|
|
1375
1388
|
// Styled components
|
|
1376
|
-
var StyledTableWrapper$1 = /*#__PURE__*/styled.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: 60vh;\n overflow-x: auto;\n min-height: 50vh;\n\n .fortables {\n max-height: 60vh;\n overflow-x: auto;\n min-height: 50vh;\n }\n /* height: 600px; */\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
|
|
1389
|
+
var StyledTableWrapper$1 = /*#__PURE__*/styled.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: 60vh;\n overflow-x: auto;\n // min-height: 50vh;\n\n .fortables {\n max-height: 60vh;\n overflow-x: auto;\n min-height: 50vh;\n }\n /* height: 600px; */\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
|
|
1377
1390
|
var CustomDrop = /*#__PURE__*/styled.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n display: flex;\n padding: 4px 8px;\n gap: 8px;\n align-items: center; */\n cursor: pointer;\n &.active .drop {\n transform: rotate(180deg);\n }\n"])));
|
|
1378
1391
|
|
|
1379
1392
|
var PrinterIcon = function PrinterIcon() {
|
|
@@ -3923,7 +3936,7 @@ function RecipientName() {
|
|
|
3923
3936
|
});
|
|
3924
3937
|
});
|
|
3925
3938
|
};
|
|
3926
|
-
return React.createElement(Container$7, null, React.createElement(Wrapper$3, null, React.createElement(Label$
|
|
3939
|
+
return React.createElement(Container$7, null, React.createElement(Wrapper$3, null, React.createElement(Label$i, {
|
|
3927
3940
|
label: "Recipient Name",
|
|
3928
3941
|
htmlFor: "recipient-name"
|
|
3929
3942
|
}), showCopyIcon && React.createElement(CopyText, {
|
|
@@ -3963,7 +3976,7 @@ function Address() {
|
|
|
3963
3976
|
});
|
|
3964
3977
|
});
|
|
3965
3978
|
};
|
|
3966
|
-
return React.createElement(Container$8, null, React.createElement(Wrapper$4, null, React.createElement(Label$
|
|
3979
|
+
return React.createElement(Container$8, null, React.createElement(Wrapper$4, null, React.createElement(Label$i, {
|
|
3967
3980
|
label: "Address",
|
|
3968
3981
|
htmlFor: "address"
|
|
3969
3982
|
}), showCopyIcon && React.createElement(CopyText, {
|
|
@@ -4002,7 +4015,7 @@ function Postcode() {
|
|
|
4002
4015
|
});
|
|
4003
4016
|
});
|
|
4004
4017
|
};
|
|
4005
|
-
return React.createElement(Container$9, null, React.createElement(Wrapper$5, null, React.createElement(Label$
|
|
4018
|
+
return React.createElement(Container$9, null, React.createElement(Wrapper$5, null, React.createElement(Label$i, {
|
|
4006
4019
|
label: "Postcode",
|
|
4007
4020
|
htmlFor: "postcode"
|
|
4008
4021
|
}), showCopyIcon && React.createElement(CopyText, {
|
|
@@ -4041,7 +4054,7 @@ function Latitude() {
|
|
|
4041
4054
|
});
|
|
4042
4055
|
});
|
|
4043
4056
|
};
|
|
4044
|
-
return React.createElement(Container$a, null, React.createElement(Label$
|
|
4057
|
+
return React.createElement(Container$a, null, React.createElement(Label$i, {
|
|
4045
4058
|
label: "Latitude",
|
|
4046
4059
|
htmlFor: "lat"
|
|
4047
4060
|
}), React.createElement(CustomInput, {
|
|
@@ -4076,7 +4089,7 @@ function Longitude() {
|
|
|
4076
4089
|
});
|
|
4077
4090
|
});
|
|
4078
4091
|
};
|
|
4079
|
-
return React.createElement(Container$b, null, React.createElement(Label$
|
|
4092
|
+
return React.createElement(Container$b, null, React.createElement(Label$i, {
|
|
4080
4093
|
label: "Longitude",
|
|
4081
4094
|
htmlFor: "long"
|
|
4082
4095
|
}), React.createElement(CustomInput$1, {
|
|
@@ -4132,7 +4145,7 @@ function What3words() {
|
|
|
4132
4145
|
});
|
|
4133
4146
|
}
|
|
4134
4147
|
};
|
|
4135
|
-
return React.createElement(Container$c, null, React.createElement(Label$
|
|
4148
|
+
return React.createElement(Container$c, null, React.createElement(Label$i, {
|
|
4136
4149
|
label: "What3Words Address",
|
|
4137
4150
|
htmlFor: "w3w"
|
|
4138
4151
|
}), React.createElement(Wrapper$6, null, React.createElement(What3wordsPrefix, null, React.createElement(What3WordsIcon, null)), React.createElement(CustomInput$2, {
|
|
@@ -4209,7 +4222,7 @@ function ContactHome() {
|
|
|
4209
4222
|
});
|
|
4210
4223
|
}
|
|
4211
4224
|
};
|
|
4212
|
-
return React.createElement(MainContainer$1, null, React.createElement(Wrapper$7, null, React.createElement(Label$
|
|
4225
|
+
return React.createElement(MainContainer$1, null, React.createElement(Wrapper$7, null, React.createElement(Label$i, {
|
|
4213
4226
|
label: "Contact Home",
|
|
4214
4227
|
htmlFor: "contact-home"
|
|
4215
4228
|
})), React.createElement(InputContainer, null, React.createElement(CustomInput$3, {
|
|
@@ -4279,7 +4292,7 @@ function ContactWork() {
|
|
|
4279
4292
|
});
|
|
4280
4293
|
}
|
|
4281
4294
|
};
|
|
4282
|
-
return React.createElement(Container$e, null, React.createElement(Wrapper$8, null, React.createElement(Label$
|
|
4295
|
+
return React.createElement(Container$e, null, React.createElement(Wrapper$8, null, React.createElement(Label$i, {
|
|
4283
4296
|
label: "Contact Work",
|
|
4284
4297
|
htmlFor: "contact-work"
|
|
4285
4298
|
})), React.createElement(InputContainer$1, null, React.createElement(CustomInput$4, {
|
|
@@ -4359,7 +4372,7 @@ function ContactMobile() {
|
|
|
4359
4372
|
});
|
|
4360
4373
|
}
|
|
4361
4374
|
};
|
|
4362
|
-
return React.createElement(Container$g, null, React.createElement(Wrapper$9, null, React.createElement(Label$
|
|
4375
|
+
return React.createElement(Container$g, null, React.createElement(Wrapper$9, null, React.createElement(Label$i, {
|
|
4363
4376
|
label: "Contact Mobile",
|
|
4364
4377
|
htmlFor: "contact-work"
|
|
4365
4378
|
}), showCopyIcon && React.createElement(CopyText, {
|
|
@@ -4413,7 +4426,7 @@ function ContactEmail() {
|
|
|
4413
4426
|
});
|
|
4414
4427
|
});
|
|
4415
4428
|
};
|
|
4416
|
-
return React.createElement(Container$h, null, React.createElement(Wrapper$a, null, React.createElement(Label$
|
|
4429
|
+
return React.createElement(Container$h, null, React.createElement(Wrapper$a, null, React.createElement(Label$i, {
|
|
4417
4430
|
label: "Email",
|
|
4418
4431
|
htmlFor: "email-id"
|
|
4419
4432
|
})), React.createElement(Input$1, {
|
|
@@ -4448,7 +4461,7 @@ var _templateObject$y, _templateObject2$r, _templateObject3$d;
|
|
|
4448
4461
|
function ConsignmentNumber() {
|
|
4449
4462
|
var _useOrderDetails = useOrderDetails(),
|
|
4450
4463
|
orderDetails = _useOrderDetails[0];
|
|
4451
|
-
return React.createElement(Container$j, null, React.createElement(Wrapper$b, null, React.createElement(Label$
|
|
4464
|
+
return React.createElement(Container$j, null, React.createElement(Wrapper$b, null, React.createElement(Label$i, {
|
|
4452
4465
|
label: "Consignment Number"
|
|
4453
4466
|
}), React.createElement(CopyText, {
|
|
4454
4467
|
text: displayValueOrNA$1(orderDetails.consignment)
|
|
@@ -4472,7 +4485,7 @@ function RecipientReference() {
|
|
|
4472
4485
|
});
|
|
4473
4486
|
});
|
|
4474
4487
|
};
|
|
4475
|
-
return React.createElement(Container$k, null, React.createElement(Wrapper$c, null, React.createElement(Label$
|
|
4488
|
+
return React.createElement(Container$k, null, React.createElement(Wrapper$c, null, React.createElement(Label$i, {
|
|
4476
4489
|
label: "Recipient Reference",
|
|
4477
4490
|
htmlFor: "recipient-reference"
|
|
4478
4491
|
}), showCopyIcon && React.createElement(CopyText, {
|
|
@@ -4505,7 +4518,7 @@ function DepotDropdown() {
|
|
|
4505
4518
|
});
|
|
4506
4519
|
});
|
|
4507
4520
|
};
|
|
4508
|
-
return React.createElement(FormContainer, null, React.createElement(Label$
|
|
4521
|
+
return React.createElement(FormContainer, null, React.createElement(Label$i, {
|
|
4509
4522
|
label: "Depot",
|
|
4510
4523
|
htmlFor: "depotDropdown"
|
|
4511
4524
|
}), React.createElement(SelectDropdown, {
|
|
@@ -4541,7 +4554,7 @@ function Droptime() {
|
|
|
4541
4554
|
});
|
|
4542
4555
|
});
|
|
4543
4556
|
};
|
|
4544
|
-
return React.createElement(Container$l, null, React.createElement(Label$
|
|
4557
|
+
return React.createElement(Container$l, null, React.createElement(Label$i, {
|
|
4545
4558
|
label: "Droptime",
|
|
4546
4559
|
htmlFor: "droptime"
|
|
4547
4560
|
}), React.createElement(CustomInput$6, {
|
|
@@ -4592,7 +4605,7 @@ function DeliveryDate() {
|
|
|
4592
4605
|
});
|
|
4593
4606
|
}
|
|
4594
4607
|
};
|
|
4595
|
-
return React.createElement(MainContainer$2, null, React.createElement(Label$
|
|
4608
|
+
return React.createElement(MainContainer$2, null, React.createElement(Label$i, {
|
|
4596
4609
|
label: "Delivery Date next"
|
|
4597
4610
|
}), React.createElement(DatePicker, {
|
|
4598
4611
|
onChange: onChange,
|
|
@@ -4610,7 +4623,7 @@ var MainContainer$2 = /*#__PURE__*/styled.div(_templateObject$C || (_templateObj
|
|
|
4610
4623
|
var _templateObject$D, _templateObject2$u;
|
|
4611
4624
|
function Carrier() {
|
|
4612
4625
|
// show copy icon if there is input value
|
|
4613
|
-
return React.createElement(Container$m, null, React.createElement(Wrapper$d, null, React.createElement(Label$
|
|
4626
|
+
return React.createElement(Container$m, null, React.createElement(Wrapper$d, null, React.createElement(Label$i, {
|
|
4614
4627
|
label: "Carrier",
|
|
4615
4628
|
htmlFor: "carrier"
|
|
4616
4629
|
}), React.createElement(CopyText, {
|
|
@@ -4642,7 +4655,7 @@ function OrderNumber() {
|
|
|
4642
4655
|
});
|
|
4643
4656
|
});
|
|
4644
4657
|
};
|
|
4645
|
-
return React.createElement(Container$n, null, React.createElement(Wrapper$e, null, React.createElement(Label$
|
|
4658
|
+
return React.createElement(Container$n, null, React.createElement(Wrapper$e, null, React.createElement(Label$i, {
|
|
4646
4659
|
label: "Order Number",
|
|
4647
4660
|
htmlFor: "order-number"
|
|
4648
4661
|
}), showCopyIcon && React.createElement(CopyText, {
|
|
@@ -4693,7 +4706,7 @@ function ScheduleAfter() {
|
|
|
4693
4706
|
});
|
|
4694
4707
|
}
|
|
4695
4708
|
};
|
|
4696
|
-
return React.createElement(MainContainer$3, null, React.createElement(Label$
|
|
4709
|
+
return React.createElement(MainContainer$3, null, React.createElement(Label$i, {
|
|
4697
4710
|
label: "Schedule After"
|
|
4698
4711
|
}), React.createElement(DatePicker, {
|
|
4699
4712
|
onChange: onChange,
|
|
@@ -4726,7 +4739,7 @@ function VehicleTypeDropdown() {
|
|
|
4726
4739
|
});
|
|
4727
4740
|
});
|
|
4728
4741
|
};
|
|
4729
|
-
return React.createElement(FormContainer$1, null, React.createElement(Label$
|
|
4742
|
+
return React.createElement(FormContainer$1, null, React.createElement(Label$i, {
|
|
4730
4743
|
label: "Vehicle Type",
|
|
4731
4744
|
htmlFor: "vehicleType"
|
|
4732
4745
|
}), React.createElement(SelectDropdown, {
|
|
@@ -4764,7 +4777,7 @@ function OrderStatusNote() {
|
|
|
4764
4777
|
});
|
|
4765
4778
|
});
|
|
4766
4779
|
};
|
|
4767
|
-
return React.createElement(Container$o, null, React.createElement(Label$
|
|
4780
|
+
return React.createElement(Container$o, null, React.createElement(Label$i, {
|
|
4768
4781
|
label: "Order Status Note"
|
|
4769
4782
|
}), React.createElement(CustomTextArea, {
|
|
4770
4783
|
value: (orderDetails == null ? void 0 : orderDetails.order_status_note) || '',
|
|
@@ -4787,7 +4800,7 @@ function DeliveryInstructions() {
|
|
|
4787
4800
|
});
|
|
4788
4801
|
});
|
|
4789
4802
|
};
|
|
4790
|
-
return React.createElement(Container$p, null, React.createElement(Label$
|
|
4803
|
+
return React.createElement(Container$p, null, React.createElement(Label$i, {
|
|
4791
4804
|
label: "Delivery Instructions"
|
|
4792
4805
|
}), React.createElement(CustomTextArea$1, {
|
|
4793
4806
|
value: (orderDetails == null ? void 0 : orderDetails.delivery_instructions) || '',
|
|
@@ -4810,7 +4823,7 @@ function OtherInstructions() {
|
|
|
4810
4823
|
});
|
|
4811
4824
|
});
|
|
4812
4825
|
};
|
|
4813
|
-
return React.createElement(Container$q, null, React.createElement(Label$
|
|
4826
|
+
return React.createElement(Container$q, null, React.createElement(Label$i, {
|
|
4814
4827
|
label: "Other Instructions (simple instructions)"
|
|
4815
4828
|
}), React.createElement(CustomTextArea$2, {
|
|
4816
4829
|
value: (orderDetails == null ? void 0 : orderDetails.other_instructions) || '',
|
|
@@ -4867,7 +4880,7 @@ function TimedServiceDropdown() {
|
|
|
4867
4880
|
});
|
|
4868
4881
|
setOrderData(newData);
|
|
4869
4882
|
};
|
|
4870
|
-
return React.createElement(Container$r, null, React.createElement(Label$
|
|
4883
|
+
return React.createElement(Container$r, null, React.createElement(Label$i, {
|
|
4871
4884
|
label: "Timed Service",
|
|
4872
4885
|
htmlFor: "timedServiceDropdown"
|
|
4873
4886
|
}), React.createElement(StyledSelectDropdown, {
|
|
@@ -4913,7 +4926,7 @@ function ServiceTypeDropdown() {
|
|
|
4913
4926
|
});
|
|
4914
4927
|
setOrderData(newData);
|
|
4915
4928
|
};
|
|
4916
|
-
return React.createElement(Container$s, null, React.createElement(Label$
|
|
4929
|
+
return React.createElement(Container$s, null, React.createElement(Label$i, {
|
|
4917
4930
|
label: "Service Type",
|
|
4918
4931
|
htmlFor: "serviceTypeDropdown"
|
|
4919
4932
|
}), React.createElement(StyledSelectDropdown$1, {
|
|
@@ -4956,7 +4969,7 @@ function DeliveryPointDropdown() {
|
|
|
4956
4969
|
});
|
|
4957
4970
|
setOrderData(newData);
|
|
4958
4971
|
};
|
|
4959
|
-
return React.createElement(Container$t, null, React.createElement(Label$
|
|
4972
|
+
return React.createElement(Container$t, null, React.createElement(Label$i, {
|
|
4960
4973
|
label: "Delivery Point",
|
|
4961
4974
|
htmlFor: "deliveryPointDropdown"
|
|
4962
4975
|
}), React.createElement(StyledSelectDropdown$2, {
|
|
@@ -5433,6 +5446,10 @@ function OrderDetailsFooter() {
|
|
|
5433
5446
|
errorState = _useAtom[0];
|
|
5434
5447
|
var _useUpdateApiCall = useUpdateApiCall(),
|
|
5435
5448
|
setCallApi = _useUpdateApiCall[1]; //single detail
|
|
5449
|
+
var _useLiveRecalling = useLiveRecalling(),
|
|
5450
|
+
setRecalling = _useLiveRecalling[1];
|
|
5451
|
+
var _useGlobalStateHitAud = useGlobalStateHitAuditLog(),
|
|
5452
|
+
setRecallAuditLog = _useGlobalStateHitAud[1];
|
|
5436
5453
|
var errorFound = function errorFound() {
|
|
5437
5454
|
var isError = (errorState == null ? void 0 : errorState.w3wError.length) > 0 || (errorState == null ? void 0 : errorState.emailError.length) > 0 || (errorState == null ? void 0 : errorState.homeContactError.length) > 0 || (errorState == null ? void 0 : errorState.workCOntanctError.length) > 0 || (errorState == null ? void 0 : errorState.mobileError.length) > 0 || (errorState == null ? void 0 : errorState.postCodeError.length) > 0;
|
|
5438
5455
|
return isError;
|
|
@@ -5476,14 +5493,13 @@ function OrderDetailsFooter() {
|
|
|
5476
5493
|
recipient_name: response == null || (_response$data$ = response.data[0]) == null || (_response$data$ = _response$data$.order_recipient) == null ? void 0 : _response$data$.recipient_name,
|
|
5477
5494
|
postcode: response == null || (_response$data$2 = response.data[0]) == null || (_response$data$2 = _response$data$2.order_recipient) == null ? void 0 : _response$data$2.postcode
|
|
5478
5495
|
});
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5496
|
+
setRecalling(true);
|
|
5497
|
+
setTimeout(function () {
|
|
5498
|
+
setRecalling(false);
|
|
5499
|
+
setRecallAuditLog(false);
|
|
5500
|
+
}, 1000);
|
|
5482
5501
|
setCallApi(true);
|
|
5483
|
-
// }, 2000);
|
|
5484
5502
|
} else {
|
|
5485
|
-
// setLogsCallAPi(false);
|
|
5486
|
-
// setCallApi(false);
|
|
5487
5503
|
setOrderDetails(prevOrderDetails);
|
|
5488
5504
|
}
|
|
5489
5505
|
case 6:
|
|
@@ -5561,6 +5577,16 @@ function NoteType() {
|
|
|
5561
5577
|
var _useSelectedData = useSelectedData(),
|
|
5562
5578
|
selected = _useSelectedData[0],
|
|
5563
5579
|
setSelected = _useSelectedData[1];
|
|
5580
|
+
useEffect(function () {
|
|
5581
|
+
if (visibilityData && !selected) {
|
|
5582
|
+
var defaultOption = visibilityData == null ? void 0 : visibilityData.find(function (option) {
|
|
5583
|
+
return option.type === 'Private';
|
|
5584
|
+
});
|
|
5585
|
+
if (defaultOption) {
|
|
5586
|
+
setSelected(defaultOption.value);
|
|
5587
|
+
}
|
|
5588
|
+
}
|
|
5589
|
+
}, [visibilityData, selected, setSelected]);
|
|
5564
5590
|
var handleRadioButtonChange = function handleRadioButtonChange(event) {
|
|
5565
5591
|
var selectedValue = event.target.value;
|
|
5566
5592
|
var selectedOption = visibilityData == null ? void 0 : visibilityData.find(function (option) {
|
|
@@ -5695,7 +5721,7 @@ function AddNote() {
|
|
|
5695
5721
|
top: 80
|
|
5696
5722
|
});
|
|
5697
5723
|
}, [notificationData]);
|
|
5698
|
-
return React.createElement(Container$C, null, React.createElement(Label$
|
|
5724
|
+
return React.createElement(Container$C, null, React.createElement(Label$i, {
|
|
5699
5725
|
label: "Add New Note"
|
|
5700
5726
|
}), React.createElement(StyledTextArea, {
|
|
5701
5727
|
name: "description",
|
|
@@ -5726,50 +5752,37 @@ var NotesTableData = [{
|
|
|
5726
5752
|
tableBody: []
|
|
5727
5753
|
}];
|
|
5728
5754
|
|
|
5729
|
-
var
|
|
5730
|
-
var Table = /*#__PURE__*/styled.table(_templateObject2$J || (_templateObject2$J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n border-collapse: separate;\n border-spacing: 0 12px;\n\n thead tr {\n border-radius: 40px;\n\n th:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n th:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n\n tbody tr {\n border-radius: 40px;\n &.completed td {\n background: rgba(87, 219, 122, 0.2) !important;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td {\n .red path {\n fill: #e95252;\n }\n .green path {\n fill: #29cc6a;\n }\n }\n }\n"])));
|
|
5731
|
-
var Th = /*#__PURE__*/styled.th(_templateObject3$k || (_templateObject3$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 6px 15px;\n background: #f0f2f2;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n text-align: left;\n"])));
|
|
5732
|
-
var Td = /*#__PURE__*/styled.td(_templateObject4$9 || (_templateObject4$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 6px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n"])));
|
|
5733
|
-
var IconCover = /*#__PURE__*/styled.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n span {\n margin-top: 4px;\n }\n"])));
|
|
5734
|
-
|
|
5735
|
-
var _templateObject$Z, _templateObject2$K, _templateObject3$l, _templateObject4$a, _templateObject5$8, _templateObject6$2, _templateObject7$4, _templateObject8$2, _templateObject9$1;
|
|
5755
|
+
var _templateObject$Z, _templateObject2$J;
|
|
5736
5756
|
var GenericAuditLogsTable = function GenericAuditLogsTable() {
|
|
5737
|
-
var _getNotes$data, _getNotes$data2;
|
|
5738
5757
|
var tableHeadData = NotesTableData[0].tableHead; // Assuming NotesTableData contains table header information
|
|
5739
5758
|
var _usegetNotes = usegetNotes(),
|
|
5740
5759
|
getNotes = _usegetNotes[0];
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
return React.createElement(ScrollableTableWrapper, null, React.createElement(AuditTableWrapper, null, React.createElement(
|
|
5744
|
-
return React.createElement(
|
|
5760
|
+
var _useAuditLogLoadingSt = useAuditLogLoadingState(),
|
|
5761
|
+
auditLogLoadingStatus = _useAuditLogLoadingSt[0];
|
|
5762
|
+
return React.createElement(ScrollableTableWrapper, null, React.createElement(AuditTableWrapper, null, React.createElement("table", null, React.createElement("thead", null, React.createElement("tr", null, tableHeadData == null ? void 0 : tableHeadData.map(function (column) {
|
|
5763
|
+
return React.createElement("th", {
|
|
5745
5764
|
key: column.key
|
|
5746
|
-
},
|
|
5747
|
-
})))
|
|
5765
|
+
}, column.label);
|
|
5766
|
+
}))), React.createElement("tbody", null, auditLogLoadingStatus ? React.createElement("tr", null, React.createElement("td", {
|
|
5748
5767
|
className: "noBoder",
|
|
5749
5768
|
colSpan: tableHeadData == null ? void 0 : tableHeadData.length
|
|
5750
|
-
}, React.createElement(Skeleton, null))) : getNotes
|
|
5751
|
-
return React.createElement(
|
|
5769
|
+
}, React.createElement(Skeleton, null))) : getNotes && (getNotes == null ? void 0 : getNotes.length) > 0 ? getNotes == null ? void 0 : getNotes.map(function (note) {
|
|
5770
|
+
return React.createElement("tr", {
|
|
5752
5771
|
key: note == null ? void 0 : note.id
|
|
5753
|
-
}, React.createElement(
|
|
5772
|
+
}, React.createElement("td", null, React.createElement("div", {
|
|
5773
|
+
className: "bold",
|
|
5754
5774
|
title: note == null ? void 0 : note.created_by
|
|
5755
|
-
}, note == null ? void 0 : note.created_by), React.createElement("div", null, formatDateTime(note == null ? void 0 : note.created_at))), React.createElement(
|
|
5775
|
+
}, note == null ? void 0 : note.created_by), React.createElement("div", null, formatDateTime(note == null ? void 0 : note.created_at))), React.createElement("td", {
|
|
5756
5776
|
dangerouslySetInnerHTML: {
|
|
5757
5777
|
__html: note == null ? void 0 : note.description
|
|
5758
5778
|
}
|
|
5759
5779
|
}));
|
|
5760
|
-
}) : React.createElement("tr", null, React.createElement(
|
|
5780
|
+
}) : React.createElement("tr", null, React.createElement("td", {
|
|
5761
5781
|
colSpan: tableHeadData == null ? void 0 : tableHeadData.length
|
|
5762
5782
|
}, "No data found"))))));
|
|
5763
5783
|
};
|
|
5764
5784
|
var AuditTableWrapper = /*#__PURE__*/styled.div(_templateObject$Z || (_templateObject$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 250px;\n min-height: 200px;\n /* overflow: auto; */\n\n table {\n border-spacing: 0;\n width: 100%;\n text-align: left;\n\n thead {\n th {\n border-bottom: 1px solid rgba(58, 54, 48, 0.25);\n background: #faf9f9;\n padding: 14px 12px;\n color: #3a3630;\n font-size: 14px;\n font-weight: 600;\n line-height: 24px;\n }\n }\n tbody {\n td {\n color: #667085;\n font-family: Lato;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n padding: 10px;\n .bold {\n font-weight: 500;\n font-size: 14px;\n }\n }\n }\n }\n"])));
|
|
5765
|
-
var
|
|
5766
|
-
var NoDataFound = /*#__PURE__*/styled(Td)(_templateObject3$l || (_templateObject3$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n text-align: center;\n padding: 16px;\n font-size: 16px;\n color: #999;\n"])));
|
|
5767
|
-
var StyledTable$2 = /*#__PURE__*/styled(Table)(_templateObject4$a || (_templateObject4$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n table-layout: fixed;\n td.noBoder {\n background: none !important;\n border: none !important;\n padding: 0;\n }\n"])));
|
|
5768
|
-
var StyledTr = /*#__PURE__*/styled.tr(_templateObject5$8 || (_templateObject5$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &:nth-child(even) {\n background-color: #f3fbff;\n }\n"])));
|
|
5769
|
-
var StyledTd = /*#__PURE__*/styled(Td)(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 10px;\n"])));
|
|
5770
|
-
var CreatedBy$1 = /*#__PURE__*/styled.div(_templateObject7$4 || (_templateObject7$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-weight: bold;\n"])));
|
|
5771
|
-
var ScrollableTableWrapper = /*#__PURE__*/styled.div(_templateObject8$2 || (_templateObject8$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 250px;\n min-height: 200px;\n overflow: auto;\n"])));
|
|
5772
|
-
var StickyHeaderWrapper = /*#__PURE__*/styled.div(_templateObject9$1 || (_templateObject9$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: #fff;\n"])));
|
|
5785
|
+
var ScrollableTableWrapper = /*#__PURE__*/styled.div(_templateObject2$J || (_templateObject2$J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 250px;\n min-height: 200px;\n overflow: auto;\n"])));
|
|
5773
5786
|
|
|
5774
5787
|
var _templateObject$_;
|
|
5775
5788
|
function AuditLogs() {
|
|
@@ -5777,7 +5790,7 @@ function AuditLogs() {
|
|
|
5777
5790
|
}
|
|
5778
5791
|
var Container$D = /*#__PURE__*/styled.div(_templateObject$_ || (_templateObject$_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 295px; /* Set height to limit container size */\n overflow: auto; /* Enable scrolling */\n scrollbar-width: thin;\n"])));
|
|
5779
5792
|
|
|
5780
|
-
var _templateObject$$, _templateObject2$
|
|
5793
|
+
var _templateObject$$, _templateObject2$K, _templateObject3$k, _templateObject4$9;
|
|
5781
5794
|
// import { useLocation } from 'react-router-dom';
|
|
5782
5795
|
function Notes() {
|
|
5783
5796
|
var _usemoduleIds = usemoduleIds(),
|
|
@@ -5785,16 +5798,13 @@ function Notes() {
|
|
|
5785
5798
|
setModuleIds = _usemoduleIds[1];
|
|
5786
5799
|
var _useOrderId = useOrderId(),
|
|
5787
5800
|
orderId = _useOrderId[0];
|
|
5788
|
-
// const location = useLocation();
|
|
5789
|
-
// const pathname = location.pathname;
|
|
5790
|
-
// const orderIdLocaation = pathname.split('/')[1];
|
|
5791
|
-
var _useGlobalStateHitAud = useGlobalStateHitAuditLog(),
|
|
5792
|
-
recallAuditLog = _useGlobalStateHitAud[0];
|
|
5793
|
-
var _useAuditLogLoadingSt = useAuditLogLoadingState(),
|
|
5794
|
-
setAuditLogLoading = _useAuditLogLoadingSt[1];
|
|
5795
5801
|
var _usegetNotes = usegetNotes(),
|
|
5796
5802
|
setNotes = _usegetNotes[1];
|
|
5797
|
-
|
|
5803
|
+
var _useAuditLogLoadingSt = useAuditLogLoadingState(),
|
|
5804
|
+
setAuditLogLoading = _useAuditLogLoadingSt[1];
|
|
5805
|
+
var _useGlobalStateHitAud = useGlobalStateHitAuditLog(),
|
|
5806
|
+
recallAuditLog = _useGlobalStateHitAud[0],
|
|
5807
|
+
setAuditLogs = _useGlobalStateHitAud[1];
|
|
5798
5808
|
// Fetch module IDs
|
|
5799
5809
|
var _useApiHook = useApiHook({
|
|
5800
5810
|
endpoint: 'audit_logs/modules/',
|
|
@@ -5808,22 +5818,21 @@ function Notes() {
|
|
|
5808
5818
|
return (item == null ? void 0 : item.name) === 'ORDER';
|
|
5809
5819
|
}).flatMap(function (item) {
|
|
5810
5820
|
var _item$static_child_ma;
|
|
5811
|
-
return item == null || (_item$static_child_ma = item.static_child_mappings) == null ? void 0 : _item$static_child_ma.
|
|
5812
|
-
var _child$child_module
|
|
5821
|
+
return item == null || (_item$static_child_ma = item.static_child_mappings) == null ? void 0 : _item$static_child_ma.filter(function (child) {
|
|
5822
|
+
var _child$child_module;
|
|
5823
|
+
return (child == null || (_child$child_module = child.child_module) == null ? void 0 : _child$child_module.name) === 'ORDER-NOTE';
|
|
5824
|
+
}).map(function (child) {
|
|
5825
|
+
var _child$child_module2, _child$parent_module;
|
|
5813
5826
|
return {
|
|
5814
|
-
id: child == null || (_child$
|
|
5815
|
-
|
|
5816
|
-
parentId: child == null || (_child$parent_module = child.parent_module) == null ? void 0 : _child$parent_module.id,
|
|
5817
|
-
parentName: child == null || (_child$parent_module2 = child.parent_module) == null ? void 0 : _child$parent_module2.name
|
|
5827
|
+
id: child == null || (_child$child_module2 = child.child_module) == null ? void 0 : _child$child_module2.id,
|
|
5828
|
+
parentId: child == null || (_child$parent_module = child.parent_module) == null ? void 0 : _child$parent_module.id
|
|
5818
5829
|
};
|
|
5819
5830
|
});
|
|
5820
5831
|
})) || [];
|
|
5821
|
-
|
|
5822
|
-
return (module == null ? void 0 : module.name) === 'ORDER-NOTE';
|
|
5823
|
-
});
|
|
5824
|
-
setModuleIds(orderNoteModule || modules[0] || null);
|
|
5832
|
+
setModuleIds(modules[0] || null);
|
|
5825
5833
|
}
|
|
5826
5834
|
}, [apiLoading, fetchedData]);
|
|
5835
|
+
// Fetch Notes Data
|
|
5827
5836
|
var _useApiHook2 = useApiHook({
|
|
5828
5837
|
endpoint: "audit_logs/?module_id=" + (moduleIds == null ? void 0 : moduleIds.parentId) + "&module_object_id=" + orderId,
|
|
5829
5838
|
method: 'GET',
|
|
@@ -5837,20 +5846,12 @@ function Notes() {
|
|
|
5837
5846
|
setShouldPerformAction(true);
|
|
5838
5847
|
}
|
|
5839
5848
|
if (!NotesLoading && NotesData != null && NotesData.data) {
|
|
5840
|
-
|
|
5841
|
-
// .filter((item: any) => item['ORDER-NOTE'] || item['ORDER'])
|
|
5842
|
-
// .map((item: any) => [item['ORDER-NOTE'], item['ORDER']])
|
|
5843
|
-
// .flat()
|
|
5844
|
-
// .filter(Boolean);
|
|
5845
|
-
var updatedData = NotesData.data.filter(function (item) {
|
|
5849
|
+
var updatedData = NotesData == null ? void 0 : NotesData.data.filter(function (item) {
|
|
5846
5850
|
return item['ORDER-NOTE'] || item['ORDER'] || item['ORDER-RETURN'];
|
|
5847
5851
|
}).map(function (item) {
|
|
5848
5852
|
return [item['ORDER-NOTE'], item['ORDER'], item['ORDER-RETURN']];
|
|
5849
|
-
});
|
|
5850
|
-
|
|
5851
|
-
// const orderNotesData = NotesData?.data[1]?.['ORDER-NOTE'] || [];
|
|
5852
|
-
// const allNotes = [...orderData, ...orderNotesData];
|
|
5853
|
-
var combinedArray = updatedData.flat();
|
|
5853
|
+
}).flat().filter(Boolean);
|
|
5854
|
+
var combinedArray = updatedData == null ? void 0 : updatedData.flat();
|
|
5854
5855
|
combinedArray.sort(function (a, b) {
|
|
5855
5856
|
return new Date(b.created_at).getTime() - new Date(a.created_at).getTime();
|
|
5856
5857
|
});
|
|
@@ -5859,11 +5860,20 @@ function Notes() {
|
|
|
5859
5860
|
}
|
|
5860
5861
|
setAuditLogLoading(NotesLoading);
|
|
5861
5862
|
}, [moduleIds, orderId, NotesLoading, recallAuditLog]);
|
|
5862
|
-
|
|
5863
|
+
var handleGetLogs = function handleGetLogs() {
|
|
5864
|
+
setAuditLogs(true);
|
|
5865
|
+
setTimeout(function () {
|
|
5866
|
+
setAuditLogs(false);
|
|
5867
|
+
}, 1000);
|
|
5868
|
+
};
|
|
5869
|
+
return React.createElement(Container$E, null, React.createElement(CardHeader, null, "NOTES", React.createElement(SmallButton, {
|
|
5870
|
+
onClick: handleGetLogs
|
|
5871
|
+
}, "UPDATE LOGS")), React.createElement(CustomizedFormSection, null, React.createElement(AddNote, null), React.createElement(AuditLogs, null)));
|
|
5863
5872
|
}
|
|
5864
5873
|
var Container$E = /*#__PURE__*/styled.div(_templateObject$$ || (_templateObject$$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 5px;\n"])));
|
|
5865
|
-
var CardHeader = /*#__PURE__*/styled.div(_templateObject2$
|
|
5866
|
-
var CustomizedFormSection = /*#__PURE__*/styled.div(_templateObject3$
|
|
5874
|
+
var CardHeader = /*#__PURE__*/styled.div(_templateObject2$K || (_templateObject2$K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid #f0f2f2;\n background-color: #f8fafc;\n color: #3a3630;\n font-size: 16px;\n padding: 10px;\n border-bottom: 1px solid #ddd;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n text-transform: uppercase;\n font-family: 'Roboto', sans-serif;\n font-weight: 600;\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
5875
|
+
var CustomizedFormSection = /*#__PURE__*/styled.div(_templateObject3$k || (_templateObject3$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n background: #ffffff;\n padding: 10px;\n flex-direction: column;\n gap: 14px;\n border: 1px solid #f0f2f2;\n border-bottom-right-radius: 8px;\n border-bottom-left-radius: 8px;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n"])));
|
|
5876
|
+
var SmallButton = /*#__PURE__*/styled.button(_templateObject4$9 || (_templateObject4$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: #363a30;\n color: #ffffff;\n font-size: 12px;\n padding: 4px 8px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: background-color 0.3s;\n\n &:hover {\n background-color: #feba30;\n }\n"])));
|
|
5867
5877
|
|
|
5868
5878
|
var _templateObject$10;
|
|
5869
5879
|
// import styled from 'styled-components';
|
|
@@ -5888,7 +5898,7 @@ function ChevronUp(props) {
|
|
|
5888
5898
|
}));
|
|
5889
5899
|
}
|
|
5890
5900
|
|
|
5891
|
-
var _templateObject$11, _templateObject2$
|
|
5901
|
+
var _templateObject$11, _templateObject2$L, _templateObject3$l, _templateObject4$a, _templateObject5$8, _templateObject6$2, _templateObject7$4, _templateObject8$2;
|
|
5892
5902
|
function CollapsableForm(props) {
|
|
5893
5903
|
var _useState = useState(true),
|
|
5894
5904
|
isExpanded = _useState[0],
|
|
@@ -5909,17 +5919,17 @@ function CollapsableForm(props) {
|
|
|
5909
5919
|
}, React.createElement(ChevronUp, null))))), isExpanded && React.createElement(CustomizedFormSection$1, null, React.createElement(ExpandedContent$1, null, props.children)));
|
|
5910
5920
|
}
|
|
5911
5921
|
var CustomizedFormSection$1 = /*#__PURE__*/styled.div(_templateObject$11 || (_templateObject$11 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n background: #ffffff;\n padding: 12px;\n flex-direction: column;\n gap: 14px;\n border: 1px solid #f0f2f2;\n border-bottom-right-radius: 8px;\n border-bottom-left-radius: 8px;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n"])));
|
|
5912
|
-
var CardHeader$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
5913
|
-
var Text$3 = /*#__PURE__*/styled.span(_templateObject3$
|
|
5914
|
-
var Container$F = /*#__PURE__*/styled.div(_templateObject4$
|
|
5915
|
-
var MainContainer$5 = /*#__PURE__*/styled.div(_templateObject5$
|
|
5916
|
-
var IconContainer$1 = /*#__PURE__*/styled.div(_templateObject6$
|
|
5922
|
+
var CardHeader$1 = /*#__PURE__*/styled.div(_templateObject2$L || (_templateObject2$L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid #f0f2f2;\n background-color: #f8fafc;\n color: #3a3630;\n font-size: 16px;\n padding: 10px;\n border-bottom: 1px solid #ddd;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: 'Roboto', sans-serif;\n font-weight: 600;\n"])));
|
|
5923
|
+
var Text$3 = /*#__PURE__*/styled.span(_templateObject3$l || (_templateObject3$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 14px;\n color: #3a3630;\n font-weight: 500;\n font-family: 'lato', sans-serif;\n cursor: pointer;\n"])));
|
|
5924
|
+
var Container$F = /*#__PURE__*/styled.div(_templateObject4$a || (_templateObject4$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 10px;\n align-items: center;\n"])));
|
|
5925
|
+
var MainContainer$5 = /*#__PURE__*/styled.div(_templateObject5$8 || (_templateObject5$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 0;\n"])));
|
|
5926
|
+
var IconContainer$1 = /*#__PURE__*/styled.div(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: 25px;\n height: 25px;\n padding: 2px;\n border-radius: 3px;\n background: #ffffff;\n box-shadow: 0px 1px 2px 0px #1018280d;\n &:hover {\n background: rgba(58, 54, 57, 0.05);\n }\n svg {\n transform: rotate(", ");\n }\n"])), function (props) {
|
|
5917
5927
|
return props.isExpanded ? '360deg' : '180deg';
|
|
5918
5928
|
});
|
|
5919
|
-
var ExpandedContent$1 = /*#__PURE__*/styled.div(_templateObject7$
|
|
5920
|
-
var CollapsedContent = /*#__PURE__*/styled.div(_templateObject8$
|
|
5929
|
+
var ExpandedContent$1 = /*#__PURE__*/styled.div(_templateObject7$4 || (_templateObject7$4 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
5930
|
+
var CollapsedContent = /*#__PURE__*/styled.div(_templateObject8$2 || (_templateObject8$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
5921
5931
|
|
|
5922
|
-
var _templateObject$12, _templateObject2$
|
|
5932
|
+
var _templateObject$12, _templateObject2$M, _templateObject3$m;
|
|
5923
5933
|
function CustomScrollBar(props) {
|
|
5924
5934
|
var children = props.children,
|
|
5925
5935
|
_props$thumbHeight = props.thumbHeight,
|
|
@@ -5938,11 +5948,12 @@ function CustomScrollBar(props) {
|
|
|
5938
5948
|
}, children);
|
|
5939
5949
|
}
|
|
5940
5950
|
var ThumbVertical = /*#__PURE__*/styled.div(_templateObject$12 || (_templateObject$12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: #586164;\n border-radius: 66px;\n width: 2px !important; // to overide styles\n margin-top: 60px;\n"])));
|
|
5941
|
-
var View = /*#__PURE__*/styled.div(_templateObject2$
|
|
5942
|
-
var TrackHorizontal = /*#__PURE__*/styled.div(_templateObject3$
|
|
5951
|
+
var View = /*#__PURE__*/styled.div(_templateObject2$M || (_templateObject2$M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: hidden;\n"])));
|
|
5952
|
+
var TrackHorizontal = /*#__PURE__*/styled.div(_templateObject3$m || (_templateObject3$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: none;\n"])));
|
|
5943
5953
|
|
|
5944
|
-
var _templateObject$13, _templateObject2$
|
|
5945
|
-
|
|
5954
|
+
var _templateObject$13, _templateObject2$N, _templateObject3$n, _templateObject4$b, _templateObject5$9, _templateObject6$3, _templateObject7$5, _templateObject8$3, _templateObject9$1;
|
|
5955
|
+
var selectedID = /*#__PURE__*/atom([]);
|
|
5956
|
+
function DynamicTable(_ref, props) {
|
|
5946
5957
|
var columns = _ref.columns,
|
|
5947
5958
|
data = _ref.data;
|
|
5948
5959
|
var tableColumns = useMemo(function () {
|
|
@@ -5959,45 +5970,54 @@ function DynamicTable(_ref) {
|
|
|
5959
5970
|
});
|
|
5960
5971
|
var rows = table.getRowModel().rows;
|
|
5961
5972
|
var headerGroups = table.getHeaderGroups();
|
|
5962
|
-
var
|
|
5963
|
-
var
|
|
5964
|
-
|
|
5965
|
-
|
|
5973
|
+
var action = props;
|
|
5974
|
+
var _useAtom = useAtom(selectedID),
|
|
5975
|
+
selectedRows = _useAtom[0];
|
|
5976
|
+
var smallColumns = ['types', 'sources', 'event', 'code', 'type', 'route', 'action'];
|
|
5977
|
+
var mediumColumns = ['date', 'reference', 'note', 'category'];
|
|
5978
|
+
var largeColumns = ['details', 'datetime'];
|
|
5979
|
+
var noFlexColumns = ['id'];
|
|
5980
|
+
return React.createElement(MainContainer$6, null, React.createElement(Container$G, null, React.createElement(TableWrapper, null, React.createElement(CustomScrollBar, null, React.createElement(Table, null, React.createElement(TableHead, null, headerGroups == null ? void 0 : headerGroups.map(function (headerGroup) {
|
|
5966
5981
|
return React.createElement(TableRow, {
|
|
5967
5982
|
key: headerGroup.id
|
|
5968
5983
|
}, headerGroup.headers.map(function (header) {
|
|
5969
5984
|
return React.createElement(TableHeadData, {
|
|
5970
|
-
className: "col \n
|
|
5985
|
+
className: "col \n " + (smallColumns.includes(header == null ? void 0 : header.id) ? 'sm' : mediumColumns.includes(header == null ? void 0 : header.id) ? 'md' : largeColumns.includes(header == null ? void 0 : header.id) ? 'lg' : ''),
|
|
5971
5986
|
key: header.id,
|
|
5972
5987
|
onClick: header.column.getToggleSortingHandler()
|
|
5973
5988
|
}, flexRender(header.column.columnDef.header, header.getContext()));
|
|
5974
5989
|
}));
|
|
5975
|
-
})), React.createElement(TableBody, null, rows.length > 0 ? rows.map(function (row) {
|
|
5990
|
+
})), React.createElement(TableBody, null, (rows == null ? void 0 : rows.length) > 0 ? rows == null ? void 0 : rows.map(function (row) {
|
|
5991
|
+
var _selectedRows$filter;
|
|
5976
5992
|
return React.createElement(TableRow, {
|
|
5977
|
-
key: row.id
|
|
5993
|
+
key: row.id,
|
|
5994
|
+
className: "" + ((selectedRows == null ? void 0 : selectedRows.length) > 0 && selectedRows != null && (_selectedRows$filter = selectedRows.filter(function (f) {
|
|
5995
|
+
var _row$original;
|
|
5996
|
+
return (f == null ? void 0 : f.id) === (row == null || (_row$original = row.original) == null ? void 0 : _row$original.id);
|
|
5997
|
+
})) != null && _selectedRows$filter.length ? 'isSelectedRow' : '')
|
|
5978
5998
|
}, row.getVisibleCells().map(function (cell) {
|
|
5979
5999
|
return React.createElement(TableData, {
|
|
5980
|
-
className: "col \n
|
|
6000
|
+
className: "col \n " + (noFlexColumns.includes(cell == null ? void 0 : cell.column.id) ? 'noFlex' : smallColumns.includes(cell == null ? void 0 : cell.column.id) ? 'sm' : mediumColumns.includes(cell == null ? void 0 : cell.column.id) ? 'md' : largeColumns.includes(cell == null ? void 0 : cell.column.id) ? 'lg' : '') + " " + (cell == null ? void 0 : cell.column.id),
|
|
5981
6001
|
key: cell.id
|
|
5982
|
-
}, flexRender(cell.column.columnDef.cell, cell.getContext()
|
|
6002
|
+
}, flexRender(cell.column.columnDef.cell, _extends({}, cell.getContext(), {
|
|
6003
|
+
action: action
|
|
6004
|
+
})));
|
|
5983
6005
|
}));
|
|
5984
|
-
}) : React.createElement(
|
|
6006
|
+
}) : React.createElement(TableRow, null, React.createElement(TableData, {
|
|
6007
|
+
colSpan: columns.length
|
|
6008
|
+
}, "No entries found."))))))));
|
|
5985
6009
|
}
|
|
5986
|
-
// const ChevronUpIcon = styled(ChevronDownIcon)`
|
|
5987
|
-
// transform: rotate(180deg);
|
|
5988
|
-
// cursor: pointer;
|
|
5989
|
-
// `;
|
|
5990
6010
|
var Container$G = /*#__PURE__*/styled.div(_templateObject$13 || (_templateObject$13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 30vh;\n pointer-events: initial;\n @media (max-width: 1024px) {\n height: 40vh;\n }\n"])));
|
|
5991
|
-
var TableWrapper = /*#__PURE__*/styled.div(_templateObject2$
|
|
5992
|
-
var TableHeadData = /*#__PURE__*/styled.th(_templateObject3$
|
|
5993
|
-
var TableData = /*#__PURE__*/styled.td(_templateObject4$
|
|
5994
|
-
var TableRow = /*#__PURE__*/styled.tr(_templateObject5$
|
|
5995
|
-
var TableBody = /*#__PURE__*/styled.tbody(_templateObject6$
|
|
5996
|
-
var TableHead = /*#__PURE__*/styled.thead(_templateObject7$
|
|
5997
|
-
var Table
|
|
5998
|
-
var MainContainer$6 = /*#__PURE__*/styled.div(_templateObject9$
|
|
5999
|
-
|
|
6000
|
-
var _templateObject$14, _templateObject2$
|
|
6011
|
+
var TableWrapper = /*#__PURE__*/styled.div(_templateObject2$N || (_templateObject2$N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 100%;\n overflow-x: auto;\n scrollbar-width: thin;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n"])));
|
|
6012
|
+
var TableHeadData = /*#__PURE__*/styled.th(_templateObject3$n || (_templateObject3$n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 10px 5px;\n font-family: 'Roboto', sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: 0px;\n"])));
|
|
6013
|
+
var TableData = /*#__PURE__*/styled.td(_templateObject4$b || (_templateObject4$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0px;\n padding: 10px 5px;\n font-family: 'Lato', sans-serif;\n font-size: 13px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0px;\n"])));
|
|
6014
|
+
var TableRow = /*#__PURE__*/styled.tr(_templateObject5$9 || (_templateObject5$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: stretch;\n width: 100%;\n border-bottom: 1px solid rgb(215, 214, 213);\n font-weight: 300;\n"])));
|
|
6015
|
+
var TableBody = /*#__PURE__*/styled.tbody(_templateObject6$3 || (_templateObject6$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom-right-radius: 10px;\n background: rgb(255, 255, 255);\n height: 96%;\n overflow: auto;\n width: 100%;\n"])));
|
|
6016
|
+
var TableHead = /*#__PURE__*/styled.thead(_templateObject7$5 || (_templateObject7$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: sticky;\n top: 0px;\n z-index: 1;\n background: #f8f8f8;\n white-space: nowrap;\n"])));
|
|
6017
|
+
var Table = /*#__PURE__*/styled.table(_templateObject8$3 || (_templateObject8$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n height: 50%;\n background: rgb(255, 255, 255);\n box-shadow: 0px 4px 30px 0px #2e2d740d;\n"])));
|
|
6018
|
+
var MainContainer$6 = /*#__PURE__*/styled.div(_templateObject9$1 || (_templateObject9$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .col {\n display: flex;\n align-items: center;\n color: #3a3630;\n padding: 10px 5px;\n text-align: left;\n }\n\n .col.noFlex {\n flex: 0;\n }\n\n .col.sm {\n flex: 1;\n min-width: 100px;\n }\n\n .col.md {\n flex: 2;\n justify-content: flex-start;\n min-width: 85px;\n }\n\n .col.lg {\n flex: 4;\n justify-content: flex-start;\n min-width: 180px;\n }\n\n .col.date {\n }\n\n .col.amount,\n .col.price {\n justify-content: flex-end;\n }\n\n .TableHeadData,\n .TableData {\n padding: 10px 5px;\n text-align: left;\n white-space: nowrap;\n }\n\n .TableRow {\n display: flex;\n width: 100%;\n }\n\n .Table {\n width: 100%;\n }\n"])));
|
|
6019
|
+
|
|
6020
|
+
var _templateObject$14, _templateObject2$O;
|
|
6001
6021
|
function Event(props) {
|
|
6002
6022
|
var _props$row;
|
|
6003
6023
|
var data = props == null || (_props$row = props.row) == null ? void 0 : _props$row.original.event_information_id;
|
|
@@ -6013,7 +6033,7 @@ function Event(props) {
|
|
|
6013
6033
|
return React.createElement(RowContainer, null, React.createElement(Row, null, getDescription(data)));
|
|
6014
6034
|
}
|
|
6015
6035
|
var RowContainer = /*#__PURE__*/styled.div(_templateObject$14 || (_templateObject$14 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6016
|
-
var Row = /*#__PURE__*/styled.div(_templateObject2$
|
|
6036
|
+
var Row = /*#__PURE__*/styled.div(_templateObject2$O || (_templateObject2$O = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6017
6037
|
|
|
6018
6038
|
//to change data into options
|
|
6019
6039
|
var transformOption = function transformOption(option, key) {
|
|
@@ -6060,25 +6080,25 @@ var priorityData = [{
|
|
|
6060
6080
|
color: '#E95252'
|
|
6061
6081
|
}];
|
|
6062
6082
|
|
|
6063
|
-
var _templateObject$15, _templateObject2$
|
|
6083
|
+
var _templateObject$15, _templateObject2$P;
|
|
6064
6084
|
function Date$1(props) {
|
|
6065
6085
|
var _props$row;
|
|
6066
6086
|
var data = props == null || (_props$row = props.row) == null ? void 0 : _props$row.original.created_at;
|
|
6067
6087
|
return React.createElement(RowContainer$1, null, React.createElement(Row$1, null, formatDate$1(data)));
|
|
6068
6088
|
}
|
|
6069
6089
|
var RowContainer$1 = /*#__PURE__*/styled.div(_templateObject$15 || (_templateObject$15 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6070
|
-
var Row$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
6090
|
+
var Row$1 = /*#__PURE__*/styled.div(_templateObject2$P || (_templateObject2$P = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6071
6091
|
|
|
6072
|
-
var _templateObject$16, _templateObject2$
|
|
6092
|
+
var _templateObject$16, _templateObject2$Q;
|
|
6073
6093
|
function Code(props) {
|
|
6074
6094
|
var _props$row;
|
|
6075
6095
|
var data = props == null || (_props$row = props.row) == null ? void 0 : _props$row.original.event_code;
|
|
6076
6096
|
return React.createElement(RowContainer$2, null, React.createElement(Row$2, null, data));
|
|
6077
6097
|
}
|
|
6078
6098
|
var RowContainer$2 = /*#__PURE__*/styled.div(_templateObject$16 || (_templateObject$16 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6079
|
-
var Row$2 = /*#__PURE__*/styled.div(_templateObject2$
|
|
6099
|
+
var Row$2 = /*#__PURE__*/styled.div(_templateObject2$Q || (_templateObject2$Q = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6080
6100
|
|
|
6081
|
-
var _templateObject$17, _templateObject2$
|
|
6101
|
+
var _templateObject$17, _templateObject2$R;
|
|
6082
6102
|
function Note(props) {
|
|
6083
6103
|
var _props$row;
|
|
6084
6104
|
var data = props == null || (_props$row = props.row) == null || (_props$row = _props$row.original) == null ? void 0 : _props$row.event_notes;
|
|
@@ -6087,7 +6107,7 @@ function Note(props) {
|
|
|
6087
6107
|
}, React.createElement(Row$3, null, data));
|
|
6088
6108
|
}
|
|
6089
6109
|
var RowContainer$3 = /*#__PURE__*/styled.div(_templateObject$17 || (_templateObject$17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: inline-block;\n max-width: 200px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
6090
|
-
var Row$3 = /*#__PURE__*/styled.div(_templateObject2$
|
|
6110
|
+
var Row$3 = /*#__PURE__*/styled.div(_templateObject2$R || (_templateObject2$R = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6091
6111
|
|
|
6092
6112
|
var tableColumns = [{
|
|
6093
6113
|
header: 'Date',
|
|
@@ -6235,14 +6255,14 @@ function SystemLogs() {
|
|
|
6235
6255
|
useEffect(function () {
|
|
6236
6256
|
fetchReminderData();
|
|
6237
6257
|
}, [setNotesData]);
|
|
6238
|
-
return React.createElement(Table$
|
|
6258
|
+
return React.createElement(Table$1, null, React.createElement(CollapsableForm, {
|
|
6239
6259
|
collapsedContent: React.createElement(SystemCollapsedContent, null)
|
|
6240
6260
|
}, React.createElement(DynamicTable, {
|
|
6241
6261
|
columns: tableColumns,
|
|
6242
6262
|
data: systemLogs
|
|
6243
6263
|
})));
|
|
6244
6264
|
}
|
|
6245
|
-
var Table$
|
|
6265
|
+
var Table$1 = /*#__PURE__*/styled.div(_templateObject$18 || (_templateObject$18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
|
|
6246
6266
|
|
|
6247
6267
|
var StatusOptions = [{
|
|
6248
6268
|
label: 'Released',
|
|
@@ -6399,7 +6419,7 @@ function ConfirmedIcon() {
|
|
|
6399
6419
|
}))));
|
|
6400
6420
|
}
|
|
6401
6421
|
|
|
6402
|
-
var _templateObject$19, _templateObject2$
|
|
6422
|
+
var _templateObject$19, _templateObject2$S, _templateObject3$o, _templateObject4$c;
|
|
6403
6423
|
function Status() {
|
|
6404
6424
|
var _useStatusDetails = useStatusDetails(),
|
|
6405
6425
|
orderStatus = _useStatusDetails[0];
|
|
@@ -6446,9 +6466,9 @@ var renderIcon = function renderIcon(value, orderStatus) {
|
|
|
6446
6466
|
}
|
|
6447
6467
|
};
|
|
6448
6468
|
var BoxContainer = /*#__PURE__*/styled.div(_templateObject$19 || (_templateObject$19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid #e3e3e3;\n display: flex;\n justify-content: space-evenly;\n border-radius: 8px;\n background: #f8fafc;\n align-items: center;\n height: 5%;\n"])));
|
|
6449
|
-
var Heading = /*#__PURE__*/styled.div(_templateObject2$
|
|
6450
|
-
var Container$H = /*#__PURE__*/styled.div(_templateObject3$
|
|
6451
|
-
var TextContainer$1 = /*#__PURE__*/styled.div(_templateObject4$
|
|
6469
|
+
var Heading = /*#__PURE__*/styled.div(_templateObject2$S || (_templateObject2$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: 'lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n text-transform: uppercase;\n"])));
|
|
6470
|
+
var Container$H = /*#__PURE__*/styled.div(_templateObject3$o || (_templateObject3$o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 15px;\n margin-top: 25px;\n"])));
|
|
6471
|
+
var TextContainer$1 = /*#__PURE__*/styled.div(_templateObject4$c || (_templateObject4$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 10px;\n display: flex;\n align-items: center;\n"])));
|
|
6452
6472
|
|
|
6453
6473
|
var _templateObject$1a;
|
|
6454
6474
|
// import DropDownOptions from './dropdowns';
|
|
@@ -6474,6 +6494,7 @@ var ActionIcon = function ActionIcon() {
|
|
|
6474
6494
|
}));
|
|
6475
6495
|
};
|
|
6476
6496
|
|
|
6497
|
+
var _templateObject$1b;
|
|
6477
6498
|
var ReturnProductTable = function ReturnProductTable() {
|
|
6478
6499
|
var _orderStaticData$retu;
|
|
6479
6500
|
var _useSelectedProducts = useSelectedProducts(),
|
|
@@ -6490,6 +6511,8 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
6490
6511
|
setSelectedRowId = _useState2[1];
|
|
6491
6512
|
var _useOrderId = useOrderId(),
|
|
6492
6513
|
orderId = _useOrderId[0];
|
|
6514
|
+
var _useNewReturnOrderDat = useNewReturnOrderData(),
|
|
6515
|
+
returnOrderData = _useNewReturnOrderDat[0];
|
|
6493
6516
|
var handleActionClick = function handleActionClick(id) {
|
|
6494
6517
|
setSelectedRowId(id);
|
|
6495
6518
|
};
|
|
@@ -6559,7 +6582,7 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
6559
6582
|
});
|
|
6560
6583
|
return matchedReason ? matchedReason.label : 'N/A';
|
|
6561
6584
|
};
|
|
6562
|
-
var disableCheckbox = (productData == null ? void 0 : productData.length) == 0;
|
|
6585
|
+
var disableCheckbox = (productData == null ? void 0 : productData.length) == 0 || (returnOrderData == null ? void 0 : returnOrderData.length) == 0;
|
|
6563
6586
|
return React.createElement("div", null, loading && React.createElement(Loader, {
|
|
6564
6587
|
title: "Deleting"
|
|
6565
6588
|
}), React.createElement(StyledTableWrapper$1, {
|
|
@@ -6567,7 +6590,7 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
6567
6590
|
className: "orderProductTable"
|
|
6568
6591
|
}, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
|
|
6569
6592
|
className: "emailproductsCheckbox"
|
|
6570
|
-
}, React.createElement(
|
|
6593
|
+
}, React.createElement(StyleCheckbox, {
|
|
6571
6594
|
disabled: disableCheckbox,
|
|
6572
6595
|
checked: selectAll,
|
|
6573
6596
|
onChange: handleSelectAll
|
|
@@ -6575,11 +6598,12 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
6575
6598
|
var _product$orders_produ, _product$order_data, _product$order_data2;
|
|
6576
6599
|
return React.createElement("tr", {
|
|
6577
6600
|
key: product.id
|
|
6578
|
-
}, React.createElement("td", null, React.createElement(
|
|
6601
|
+
}, React.createElement("td", null, React.createElement(StyleCheckbox, {
|
|
6579
6602
|
checked: selectedProducts == null ? void 0 : selectedProducts.includes(product == null ? void 0 : product.id),
|
|
6580
6603
|
onChange: function onChange() {
|
|
6581
6604
|
return handleSelectProduct(product == null ? void 0 : product.id);
|
|
6582
|
-
}
|
|
6605
|
+
},
|
|
6606
|
+
disabled: disableCheckbox
|
|
6583
6607
|
})), React.createElement("td", null, (product == null || (_product$orders_produ = product.orders_products_stock) == null ? void 0 : _product$orders_produ.location) || 'N/A'), React.createElement("td", null, product == null || (_product$order_data = product.order_data) == null || (_product$order_data = _product$order_data.order_recipient) == null ? void 0 : _product$order_data.recipient_name, ' ', product == null || (_product$order_data2 = product.order_data) == null || (_product$order_data2 = _product$order_data2.order_recipient) == null ? void 0 : _product$order_data2.postcode), React.createElement("td", null, product == null ? void 0 : product.code), React.createElement("td", null, product == null ? void 0 : product.description), React.createElement("td", null, getReturnReasonLabel(product == null ? void 0 : product.return_reason_id)), React.createElement("td", null, "1 of 1"), React.createElement("td", null, React.createElement("div", {
|
|
6584
6608
|
onClick: function onClick() {
|
|
6585
6609
|
handleActionClick(product == null ? void 0 : product.id);
|
|
@@ -6596,26 +6620,27 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
6596
6620
|
}
|
|
6597
6621
|
}, "No records found"))))));
|
|
6598
6622
|
};
|
|
6623
|
+
var StyleCheckbox = /*#__PURE__*/styled(Checkbox$1)(_templateObject$1b || (_templateObject$1b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &:disabled {\n background-color: gray;\n cursor: not-allowed;\n opacity: -0.4;\n }\n"])));
|
|
6599
6624
|
|
|
6600
|
-
var _templateObject$
|
|
6625
|
+
var _templateObject$1c;
|
|
6601
6626
|
var ProductTable = function ProductTable() {
|
|
6602
6627
|
return React.createElement(Container$I, null, React.createElement(ReturnProductTable, null));
|
|
6603
6628
|
};
|
|
6604
|
-
var Container$I = /*#__PURE__*/styled.div(_templateObject$
|
|
6629
|
+
var Container$I = /*#__PURE__*/styled.div(_templateObject$1c || (_templateObject$1c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* height: 230px; */\n overflow: auto; /* Enable scrolling */\n scrollbar-width: thin;\n"])));
|
|
6605
6630
|
|
|
6606
|
-
var _templateObject$
|
|
6631
|
+
var _templateObject$1d, _templateObject2$T, _templateObject3$p;
|
|
6607
6632
|
var payloadAtom = /*#__PURE__*/atom(null);
|
|
6608
6633
|
var NewReturnDropdown = function NewReturnDropdown() {
|
|
6609
6634
|
var defaultSelectStyle = {
|
|
6610
6635
|
width: '100%'
|
|
6611
6636
|
};
|
|
6612
6637
|
var defaultPopupClassName = 'dropDownStyle';
|
|
6613
|
-
var
|
|
6614
|
-
returnOrderData =
|
|
6615
|
-
setReturnOrderData =
|
|
6616
|
-
var
|
|
6617
|
-
selectedOrderId =
|
|
6618
|
-
setSelectedOrderId =
|
|
6638
|
+
var _useNewReturnOrderDat = useNewReturnOrderData(),
|
|
6639
|
+
returnOrderData = _useNewReturnOrderDat[0],
|
|
6640
|
+
setReturnOrderData = _useNewReturnOrderDat[1];
|
|
6641
|
+
var _useState = useState(null),
|
|
6642
|
+
selectedOrderId = _useState[0],
|
|
6643
|
+
setSelectedOrderId = _useState[1];
|
|
6619
6644
|
var _useSelectedProducts = useSelectedProducts(),
|
|
6620
6645
|
selectedProducts = _useSelectedProducts[0];
|
|
6621
6646
|
var _useOrderDetails = useOrderDetails(),
|
|
@@ -6624,9 +6649,9 @@ var NewReturnDropdown = function NewReturnDropdown() {
|
|
|
6624
6649
|
setPayload = _useAtom[1];
|
|
6625
6650
|
var _useProductDetails = useProductDetails(),
|
|
6626
6651
|
productData = _useProductDetails[0];
|
|
6627
|
-
var
|
|
6628
|
-
idProduct =
|
|
6629
|
-
setId =
|
|
6652
|
+
var _useState2 = useState(),
|
|
6653
|
+
idProduct = _useState2[0],
|
|
6654
|
+
setId = _useState2[1];
|
|
6630
6655
|
var _useOrderId = useOrderId(),
|
|
6631
6656
|
orderId = _useOrderId[0];
|
|
6632
6657
|
var id = orderData == null ? void 0 : orderData.customer_id;
|
|
@@ -6700,23 +6725,26 @@ var NewReturnDropdown = function NewReturnDropdown() {
|
|
|
6700
6725
|
value: order.id
|
|
6701
6726
|
};
|
|
6702
6727
|
});
|
|
6703
|
-
return React.createElement(Container$J, null, React.createElement(Text$4, null, "New Return Order:"), React.createElement(
|
|
6728
|
+
return React.createElement(Container$J, null, React.createElement(Text$4, null, "New Return Order:"), React.createElement(StyledAntSelect$3, {
|
|
6704
6729
|
options: dropdownOptions,
|
|
6730
|
+
value: selectedOrderId,
|
|
6705
6731
|
placeholder: "Select",
|
|
6732
|
+
// @ts-ignore
|
|
6706
6733
|
onChange: handleDropdownChange,
|
|
6707
6734
|
style: defaultSelectStyle,
|
|
6708
|
-
disabled: false,
|
|
6709
6735
|
showSearch: true,
|
|
6710
6736
|
dropdownStyle: {
|
|
6711
6737
|
width: 'max-content'
|
|
6712
6738
|
},
|
|
6713
|
-
popupClassName: defaultPopupClassName
|
|
6739
|
+
popupClassName: defaultPopupClassName,
|
|
6740
|
+
status: selectedOrderId ? '' : 'error'
|
|
6714
6741
|
}));
|
|
6715
6742
|
};
|
|
6716
|
-
var
|
|
6717
|
-
var
|
|
6743
|
+
var StyledAntSelect$3 = /*#__PURE__*/styled(Select)(_templateObject$1d || (_templateObject$1d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
|
|
6744
|
+
var Container$J = /*#__PURE__*/styled.div(_templateObject2$T || (_templateObject2$T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n align-self: stretch;\n white-space: nowrap;\n"])));
|
|
6745
|
+
var Text$4 = /*#__PURE__*/styled.div(_templateObject3$p || (_templateObject3$p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #000;\n font-family: 'Lato';\n font-size: 13px;\n font-weight: 400;\n line-height: 16px;\n"])));
|
|
6718
6746
|
|
|
6719
|
-
var _templateObject$
|
|
6747
|
+
var _templateObject$1e, _templateObject2$U, _templateObject3$q;
|
|
6720
6748
|
function ExpandedContent$2() {
|
|
6721
6749
|
var _response$data, _response$data2;
|
|
6722
6750
|
var _useAtom = useAtom(payloadAtom),
|
|
@@ -6793,18 +6821,18 @@ function ExpandedContent$2() {
|
|
|
6793
6821
|
disabled: isButtonDisabled
|
|
6794
6822
|
}, "Move Products"), React.createElement(NewReturnDropdown, null))));
|
|
6795
6823
|
}
|
|
6796
|
-
var MidContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
6797
|
-
var SaveNoteContainer$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
6798
|
-
var Container$K = /*#__PURE__*/styled.div(_templateObject3$
|
|
6824
|
+
var MidContainer = /*#__PURE__*/styled.div(_templateObject$1e || (_templateObject$1e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n padding: 10px 15px;\n align-items: flex-start;\n border-top: 1px solid #edebe8;\n background: #f8fafc;\n margin: 0px -15px -15px -15px;\n border-radius: 0px 0px 8px 8px;\n margin-bottom: 22px;\n"])));
|
|
6825
|
+
var SaveNoteContainer$1 = /*#__PURE__*/styled.div(_templateObject2$U || (_templateObject2$U = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: inline-flex;\n gap: 10px;\n"])));
|
|
6826
|
+
var Container$K = /*#__PURE__*/styled.div(_templateObject3$q || (_templateObject3$q = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6799
6827
|
|
|
6800
|
-
var _templateObject$
|
|
6828
|
+
var _templateObject$1f, _templateObject2$V;
|
|
6801
6829
|
function CollapsedContent$1() {
|
|
6802
6830
|
return React.createElement(Container$L, null, React.createElement(SectionHeader, {
|
|
6803
6831
|
label: "Products"
|
|
6804
6832
|
}), React.createElement(Dimensions, null, "Products to be Returned"));
|
|
6805
6833
|
}
|
|
6806
|
-
var Dimensions = /*#__PURE__*/styled.span(_templateObject$
|
|
6807
|
-
var Container$L = /*#__PURE__*/styled.div(_templateObject2$
|
|
6834
|
+
var Dimensions = /*#__PURE__*/styled.span(_templateObject$1f || (_templateObject$1f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px; /* 171.429% */\n"])));
|
|
6835
|
+
var Container$L = /*#__PURE__*/styled.div(_templateObject2$V || (_templateObject2$V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n /* justify-content: space-between; */\n width: 100%;\n gap: 30px;\n"])));
|
|
6808
6836
|
|
|
6809
6837
|
function ProductsInfo() {
|
|
6810
6838
|
var _useOrderDetails = useOrderDetails(),
|
|
@@ -6844,22 +6872,22 @@ function ProductsInfo() {
|
|
|
6844
6872
|
}, React.createElement(ExpandedContent$2, null));
|
|
6845
6873
|
}
|
|
6846
6874
|
|
|
6847
|
-
var _templateObject$
|
|
6875
|
+
var _templateObject$1g;
|
|
6848
6876
|
function BackgroundModal(props) {
|
|
6849
6877
|
return createPortal(React.createElement(Container$M, Object.assign({}, props), props.children), document.body);
|
|
6850
6878
|
}
|
|
6851
|
-
var Container$M = /*#__PURE__*/styled.div(_templateObject$
|
|
6879
|
+
var Container$M = /*#__PURE__*/styled.div(_templateObject$1g || (_templateObject$1g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center; \n z-index: 1000;\n background: rgba(0, 0, 0, 0.8);\n box-shadow: 0px 3px 10px #00000029;\n"])));
|
|
6852
6880
|
|
|
6853
|
-
var _templateObject$
|
|
6881
|
+
var _templateObject$1h, _templateObject2$W, _templateObject3$r, _templateObject4$d;
|
|
6854
6882
|
function AdditionalInformation(props) {
|
|
6855
6883
|
return React.createElement(Container$N, null, React.createElement(Rect, null), React.createElement(AdditionalInfo, null, React.createElement(Text$5, null, props.info)));
|
|
6856
6884
|
}
|
|
6857
|
-
var Text$5 = /*#__PURE__*/styled.p(_templateObject$
|
|
6858
|
-
var Container$N = /*#__PURE__*/styled.div(_templateObject2$
|
|
6859
|
-
var Rect = /*#__PURE__*/styled.div(_templateObject3$
|
|
6860
|
-
var AdditionalInfo = /*#__PURE__*/styled.div(_templateObject4$
|
|
6885
|
+
var Text$5 = /*#__PURE__*/styled.p(_templateObject$1h || (_templateObject$1h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #ffffff;\n font-family: 'Lato', sans-serif;\n font-size: 13px;\n font-style: normal;\n font-weight: 600;\n margin: 0;\n padding: 0;\n"])));
|
|
6886
|
+
var Container$N = /*#__PURE__*/styled.div(_templateObject2$W || (_templateObject2$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
|
|
6887
|
+
var Rect = /*#__PURE__*/styled.div(_templateObject3$r || (_templateObject3$r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 9px;\n height: 45px;\n background: #3a3630;\n"])));
|
|
6888
|
+
var AdditionalInfo = /*#__PURE__*/styled.div(_templateObject4$d || (_templateObject4$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 3px 10px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n border-radius: 0px 15px 15px 0px;\n background: rgba(63, 151, 188, 0.6);\n box-shadow: 2px 0px 2px 0px rgba(0, 0, 0, 0.25) inset;\n"])));
|
|
6861
6889
|
|
|
6862
|
-
var _templateObject$
|
|
6890
|
+
var _templateObject$1i, _templateObject2$X, _templateObject3$s, _templateObject4$e;
|
|
6863
6891
|
function OrderActionHeader(props) {
|
|
6864
6892
|
var title = props.title,
|
|
6865
6893
|
actions = props.actions,
|
|
@@ -6874,12 +6902,12 @@ function OrderActionHeader(props) {
|
|
|
6874
6902
|
onClick: onClose
|
|
6875
6903
|
}, React.createElement(CrossIcon, null)));
|
|
6876
6904
|
}
|
|
6877
|
-
var Wrapper$f = /*#__PURE__*/styled.div(_templateObject$
|
|
6878
|
-
var IconContainer$2 = /*#__PURE__*/styled.div(_templateObject2$
|
|
6879
|
-
var Title$2 = /*#__PURE__*/styled.h3(_templateObject3$
|
|
6880
|
-
var Container$O = /*#__PURE__*/styled.div(_templateObject4$
|
|
6905
|
+
var Wrapper$f = /*#__PURE__*/styled.div(_templateObject$1i || (_templateObject$1i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 6px;\n align-items: center;\n width: 90%;\n margin-left: 20px;\n"])));
|
|
6906
|
+
var IconContainer$2 = /*#__PURE__*/styled.div(_templateObject2$X || (_templateObject2$X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n svg > path {\n fill: #ffffff;\n }\n cursor: pointer;\n"])));
|
|
6907
|
+
var Title$2 = /*#__PURE__*/styled.h3(_templateObject3$s || (_templateObject3$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n color: #edebe8;\n text-transform: uppercase;\n font-size: 20px;\n font-family: 'Roboto', sans-serif;\n font-style: normal;\n font-weight: 900;\n text-wrap: nowrap;\n"])));
|
|
6908
|
+
var Container$O = /*#__PURE__*/styled.div(_templateObject4$e || (_templateObject4$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n background: #3a3630;\n border-radius: 12px 12px 0px 0px;\n padding: 10px 15px 10px 15px;\n position: sticky;\n top: 0;\n z-index: 9;\n"])));
|
|
6881
6909
|
|
|
6882
|
-
var _templateObject$
|
|
6910
|
+
var _templateObject$1j, _templateObject2$Y;
|
|
6883
6911
|
function OrderActionFooter(props) {
|
|
6884
6912
|
var isSubmitDisabled = props.isSubmitDisabled;
|
|
6885
6913
|
return React.createElement(Container$P, null, React.createElement(SubmitButton, {
|
|
@@ -6889,10 +6917,10 @@ function OrderActionFooter(props) {
|
|
|
6889
6917
|
disabled: isSubmitDisabled
|
|
6890
6918
|
}, props.submitButtonTitle || 'submit'), props.actions);
|
|
6891
6919
|
}
|
|
6892
|
-
var SubmitButton = /*#__PURE__*/styled(Button)(_templateObject$
|
|
6893
|
-
var Container$P = /*#__PURE__*/styled.div(_templateObject2$
|
|
6920
|
+
var SubmitButton = /*#__PURE__*/styled(Button)(_templateObject$1j || (_templateObject$1j = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
6921
|
+
var Container$P = /*#__PURE__*/styled.div(_templateObject2$Y || (_templateObject2$Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* justify-content: space-between; */\n gap: 15px;\n align-items: center;\n width: 100%;\n background: #f8fafc;\n border-radius: 0px 0px 6px 6px;\n padding: 10px 15px 10px 15px;\n border-top: 1px solid #edebe8;\n margin-left: 25px;\n"])));
|
|
6894
6922
|
|
|
6895
|
-
var _templateObject$
|
|
6923
|
+
var _templateObject$1k;
|
|
6896
6924
|
function OrderActionModal(props) {
|
|
6897
6925
|
return React.createElement(BackgroundModal, null, React.createElement(MainContainer$7, null, React.createElement(OrderActionHeader, {
|
|
6898
6926
|
title: props.headerTitle,
|
|
@@ -6907,13 +6935,13 @@ function OrderActionModal(props) {
|
|
|
6907
6935
|
isSubmitDisabled: props.isSubmitDisabled
|
|
6908
6936
|
})));
|
|
6909
6937
|
}
|
|
6910
|
-
var MainContainer$7 = /*#__PURE__*/styled.div(_templateObject$
|
|
6938
|
+
var MainContainer$7 = /*#__PURE__*/styled.div(_templateObject$1k || (_templateObject$1k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n min-height: 30vh;\n max-height: 80vh;\n /* overflow: auto; */\n border-radius: 12px;\n background: #fff;\n box-shadow: 0px 20px 24px -4px #10182814;\n display: flex;\n flex-direction: column;\n /* gap: 15px; */\n align-items: center;\n justify-content: space-between;\n overflow-x: hidden;\n max-width: 75vw;\n min-width: 30vw;\n"])));
|
|
6911
6939
|
|
|
6912
|
-
var _templateObject$
|
|
6940
|
+
var _templateObject$1l, _templateObject2$Z, _templateObject3$t;
|
|
6913
6941
|
function OrderActionsDropdown(props) {
|
|
6914
6942
|
return React.createElement(Container$Q, {
|
|
6915
6943
|
className: props.className
|
|
6916
|
-
}, React.createElement(Label$1, null, props.label), React.createElement(AntSelect, {
|
|
6944
|
+
}, React.createElement(Label$1, null, props.label, props.required && React.createElement(RequiredAsterisk, null, "*")), React.createElement(AntSelect, {
|
|
6917
6945
|
options: props.options,
|
|
6918
6946
|
placeholder: props.placeholder,
|
|
6919
6947
|
onChange: props.onSelect,
|
|
@@ -6928,8 +6956,9 @@ function OrderActionsDropdown(props) {
|
|
|
6928
6956
|
defaultValue: props.value
|
|
6929
6957
|
}));
|
|
6930
6958
|
}
|
|
6931
|
-
var
|
|
6932
|
-
var
|
|
6959
|
+
var RequiredAsterisk = /*#__PURE__*/styled.span(_templateObject$1l || (_templateObject$1l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: red;\n margin-left: 2px;\n"])));
|
|
6960
|
+
var Label$1 = /*#__PURE__*/styled.label(_templateObject2$Z || (_templateObject2$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
6961
|
+
var Container$Q = /*#__PURE__*/styled.div(_templateObject3$t || (_templateObject3$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
6933
6962
|
|
|
6934
6963
|
function DocumentTypeDropdown() {
|
|
6935
6964
|
var onSelect = function onSelect() {};
|
|
@@ -7009,7 +7038,7 @@ function UploadIcon(props) {
|
|
|
7009
7038
|
})));
|
|
7010
7039
|
}
|
|
7011
7040
|
|
|
7012
|
-
var _templateObject$
|
|
7041
|
+
var _templateObject$1m, _templateObject2$_, _templateObject3$u, _templateObject4$f, _templateObject5$a, _templateObject6$4, _templateObject7$6;
|
|
7013
7042
|
var Dragger = Upload.Dragger;
|
|
7014
7043
|
var props = {
|
|
7015
7044
|
name: 'file',
|
|
@@ -7036,15 +7065,15 @@ function DocFileUpload() {
|
|
|
7036
7065
|
shape: 'rounded'
|
|
7037
7066
|
}, "Upload Button"), React.createElement(IconContainer$3, null, React.createElement(UploadIcon, null)), React.createElement(TextContainer$2, null, React.createElement(Text1, null, "or drag and drop your file "), React.createElement(Text2, null, "Excel (.xls / .xlsx) or CSV (.csv) Only")))));
|
|
7038
7067
|
}
|
|
7039
|
-
var MainContainer$8 = /*#__PURE__*/styled.div(_templateObject$
|
|
7040
|
-
var Text2 = /*#__PURE__*/styled.p(_templateObject2
|
|
7068
|
+
var MainContainer$8 = /*#__PURE__*/styled.div(_templateObject$1m || (_templateObject$1m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n .ant-upload-wrapper .ant-upload-drag .ant-upload {\n padding: 0;\n }\n .ant-upload-wrapper, .ant-upload-drag, .ant-upload {\n border: none;\n background: transparent;\n }\n"])));
|
|
7069
|
+
var Text2 = /*#__PURE__*/styled.p(_templateObject2$_ || (_templateObject2$_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #BCBAB7;\n text-align: center;\n font-family: 'Roboto', sans-serif;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n text-transform: lowercase;\n padding: 0;\n margin: 0;\n"])));
|
|
7041
7070
|
var TextContainer$2 = /*#__PURE__*/styled.div(_templateObject3$u || (_templateObject3$u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\n"])));
|
|
7042
|
-
var Text1 = /*#__PURE__*/styled.p(_templateObject4$
|
|
7043
|
-
var IconContainer$3 = /*#__PURE__*/styled.div(_templateObject5$
|
|
7044
|
-
var UploadButton = /*#__PURE__*/styled(Button)(_templateObject6$
|
|
7045
|
-
var Container$R = /*#__PURE__*/styled.div(_templateObject7$
|
|
7071
|
+
var Text1 = /*#__PURE__*/styled.p(_templateObject4$f || (_templateObject4$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #AEA9A1;\n text-align: left;\n font-family: 'Roboto', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n text-transform: lowercase;\n padding: 0;\n margin: 0;\n"])));
|
|
7072
|
+
var IconContainer$3 = /*#__PURE__*/styled.div(_templateObject5$a || (_templateObject5$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px dashed #0465AC;\n padding: 5px;\n display: flex;\n align-items: center;\n"])));
|
|
7073
|
+
var UploadButton = /*#__PURE__*/styled(Button)(_templateObject6$4 || (_templateObject6$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 16px;\n font-size: 14px;\n padding: 7px 20px;\n"])));
|
|
7074
|
+
var Container$R = /*#__PURE__*/styled.div(_templateObject7$6 || (_templateObject7$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 8px;\n padding: 6px;\n align-items: center;\n align-self: stretch;\n border-radius: 30px;\n border: 1px solid #E0E2E7;\n background: #FFF;\n\n \n"])));
|
|
7046
7075
|
|
|
7047
|
-
var _templateObject$
|
|
7076
|
+
var _templateObject$1n, _templateObject2$$, _templateObject3$v, _templateObject4$g;
|
|
7048
7077
|
// import DocFileUpload from './DocFileUpload';
|
|
7049
7078
|
function AddResources() {
|
|
7050
7079
|
var _useCurrentAction = useCurrentAction(),
|
|
@@ -7060,10 +7089,10 @@ function AddResources() {
|
|
|
7060
7089
|
onSubmit: function onSubmit() {}
|
|
7061
7090
|
}, React.createElement(ContentContainer, null, React.createElement(Top$1, null, React.createElement(DocumentTypeDropdown, null), React.createElement(CategoryDropdown, null), React.createElement(VisibilityRadioButtons, null)), React.createElement(Bottom$1, null, React.createElement(Label$2, null, "File"), React.createElement(DocFileUpload, null))));
|
|
7062
7091
|
}
|
|
7063
|
-
var Label$2 = /*#__PURE__*/styled.label(_templateObject$
|
|
7064
|
-
var Bottom$1 = /*#__PURE__*/styled.div(_templateObject2
|
|
7092
|
+
var Label$2 = /*#__PURE__*/styled.label(_templateObject$1n || (_templateObject$1n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
7093
|
+
var Bottom$1 = /*#__PURE__*/styled.div(_templateObject2$$ || (_templateObject2$$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
|
|
7065
7094
|
var Top$1 = /*#__PURE__*/styled.div(_templateObject3$v || (_templateObject3$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n > div {\n min-width: 240px;\n }\n"])));
|
|
7066
|
-
var ContentContainer = /*#__PURE__*/styled.div(_templateObject4$
|
|
7095
|
+
var ContentContainer = /*#__PURE__*/styled.div(_templateObject4$g || (_templateObject4$g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex; */\n padding: 15px 12px;\n flex: 1 0 0;\n border-radius: 15px;\n background: #f8fafc;\n margin: 0px 20px 0 20px;\n"])));
|
|
7067
7096
|
|
|
7068
7097
|
var initialValue = {
|
|
7069
7098
|
due: undefined,
|
|
@@ -7112,6 +7141,8 @@ var flagRefId = /*#__PURE__*/atom(null);
|
|
|
7112
7141
|
var ReminderRefId = /*#__PURE__*/atom(null);
|
|
7113
7142
|
var reminderData = /*#__PURE__*/atom([]);
|
|
7114
7143
|
var resolvedModalPayload = /*#__PURE__*/atom(resolvedValue);
|
|
7144
|
+
var routeDetails = /*#__PURE__*/atom({});
|
|
7145
|
+
var orderNotifyCount = /*#__PURE__*/atom(0);
|
|
7115
7146
|
var loading$1 = /*#__PURE__*/atom(true);
|
|
7116
7147
|
function useFlagsLoading() {
|
|
7117
7148
|
return useAtom(loading$1);
|
|
@@ -7200,11 +7231,17 @@ function useSingleReminderData() {
|
|
|
7200
7231
|
function useUpdateReminderData() {
|
|
7201
7232
|
return useAtom(reminderUpdatePayload);
|
|
7202
7233
|
}
|
|
7234
|
+
function useRouteDetails() {
|
|
7235
|
+
return useAtom(routeDetails);
|
|
7236
|
+
}
|
|
7237
|
+
function useOrderNotify() {
|
|
7238
|
+
return useAtom(orderNotifyCount);
|
|
7239
|
+
}
|
|
7203
7240
|
|
|
7204
|
-
var _templateObject$
|
|
7241
|
+
var _templateObject$1o, _templateObject2$10, _templateObject3$w;
|
|
7205
7242
|
// Styled components
|
|
7206
|
-
var StyledTableWrapper$2 = /*#__PURE__*/styled.div(_templateObject$
|
|
7207
|
-
var StyledTable$
|
|
7243
|
+
var StyledTableWrapper$2 = /*#__PURE__*/styled.div(_templateObject$1o || (_templateObject$1o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 290px);\n scrollbar-width: none;\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
|
|
7244
|
+
var StyledTable$2 = /*#__PURE__*/styled.table(_templateObject2$10 || (_templateObject2$10 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n padding: 10px;\n thead {\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 5px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n text-transform: capitalize;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n }\n .link {\n color: #09f;\n font-family: Roboto;\n font-weight: 400;\n cursor: pointer;\n }\n td {\n .flex {\n display: flex;\n gap: 4px;\n align-items: center;\n }\n .overDue {\n border-radius: 20px;\n border: 1px solid #edebe8;\n background: #fff;\n padding: 4px 8px;\n color: #e95252;\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 16px;\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .emptyTd {\n border-radius: 100px !important;\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
|
|
7208
7245
|
var EmptyDataContainer$1 = /*#__PURE__*/styled.div(_templateObject3$w || (_templateObject3$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
7209
7246
|
|
|
7210
7247
|
function SplitOrderTable() {
|
|
@@ -7221,10 +7258,12 @@ function SplitOrderTable() {
|
|
|
7221
7258
|
var _useSplitOrderPayload = useSplitOrderPayload(),
|
|
7222
7259
|
payload = _useSplitOrderPayload[0],
|
|
7223
7260
|
setPayload = _useSplitOrderPayload[1];
|
|
7261
|
+
// Handle Select All
|
|
7224
7262
|
var handleSelectAll = function handleSelectAll(e) {
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7263
|
+
var isChecked = e.target.checked;
|
|
7264
|
+
setSelectAll(isChecked);
|
|
7265
|
+
if (isChecked) {
|
|
7266
|
+
setSelectedSplit(orderProductDetails == null ? void 0 : orderProductDetails.map(function (order) {
|
|
7228
7267
|
return {
|
|
7229
7268
|
id: order.id
|
|
7230
7269
|
};
|
|
@@ -7238,15 +7277,13 @@ function SplitOrderTable() {
|
|
|
7238
7277
|
var isSelected = prevSelectedOrder == null ? void 0 : prevSelectedOrder.some(function (order) {
|
|
7239
7278
|
return order.id === id;
|
|
7240
7279
|
});
|
|
7241
|
-
|
|
7242
|
-
return
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
}
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
}]);
|
|
7249
|
-
}
|
|
7280
|
+
var updatedSelection = isSelected ? prevSelectedOrder == null ? void 0 : prevSelectedOrder.filter(function (order) {
|
|
7281
|
+
return order.id !== id;
|
|
7282
|
+
}) : [].concat(prevSelectedOrder, [{
|
|
7283
|
+
id: id
|
|
7284
|
+
}]);
|
|
7285
|
+
setSelectAll((updatedSelection == null ? void 0 : updatedSelection.length) === (orderProductDetails == null ? void 0 : orderProductDetails.length));
|
|
7286
|
+
return updatedSelection;
|
|
7250
7287
|
});
|
|
7251
7288
|
};
|
|
7252
7289
|
useEffect(function () {
|
|
@@ -7257,12 +7294,13 @@ function SplitOrderTable() {
|
|
|
7257
7294
|
}),
|
|
7258
7295
|
force: true
|
|
7259
7296
|
}));
|
|
7260
|
-
}, [
|
|
7297
|
+
}, [selectedSplits, setPayload]);
|
|
7261
7298
|
return React.createElement(StyledTableWrapper$2, {
|
|
7262
7299
|
id: "tableScrolling"
|
|
7263
|
-
}, React.createElement(StyledTable$
|
|
7300
|
+
}, React.createElement(StyledTable$2, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", null, React.createElement(Checkbox$1, {
|
|
7264
7301
|
checked: selectAll,
|
|
7265
|
-
onChange: handleSelectAll
|
|
7302
|
+
onChange: handleSelectAll,
|
|
7303
|
+
disabled: (orderProductDetails == null ? void 0 : orderProductDetails.length) === 0 || (orderProductDetails == null ? void 0 : orderProductDetails.length) === null
|
|
7266
7304
|
})), React.createElement("th", null, "Type"), React.createElement("th", null, "Code"), React.createElement("th", null, "Scan"), React.createElement("th", null, "Description"), React.createElement("th", null, "Delivery Instructions"), React.createElement("th", null, "Barcode"))), React.createElement("tbody", null, loading ? React.createElement("tr", null, React.createElement("td", {
|
|
7267
7305
|
colSpan: 6
|
|
7268
7306
|
}, React.createElement(Skeleton, {
|
|
@@ -7272,22 +7310,24 @@ function SplitOrderTable() {
|
|
|
7272
7310
|
})) : (orderProductDetails == null ? void 0 : orderProductDetails.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
|
|
7273
7311
|
className: "emptyTd",
|
|
7274
7312
|
colSpan: 7
|
|
7275
|
-
}, React.createElement(EmptyDataContainer$1, null, React.createElement(Empty,
|
|
7313
|
+
}, React.createElement(EmptyDataContainer$1, null, React.createElement(Empty, {
|
|
7314
|
+
description: "No Data Found"
|
|
7315
|
+
})))) : (orderProductDetails == null ? void 0 : orderProductDetails.length) > 0 && (orderProductDetails == null ? void 0 : orderProductDetails.map(function (order) {
|
|
7276
7316
|
var _order$order_product_;
|
|
7277
7317
|
return React.createElement("tr", {
|
|
7278
7318
|
key: order.id
|
|
7279
7319
|
}, React.createElement("td", null, React.createElement(Checkbox$1, {
|
|
7280
|
-
checked: selectedSplits == null ? void 0 : selectedSplits.some(function (
|
|
7281
|
-
return
|
|
7320
|
+
checked: selectedSplits == null ? void 0 : selectedSplits.some(function (selectedOrder) {
|
|
7321
|
+
return selectedOrder.id === order.id;
|
|
7282
7322
|
}),
|
|
7283
7323
|
onChange: function onChange() {
|
|
7284
7324
|
return handleSelectedSplitList(order.id);
|
|
7285
7325
|
}
|
|
7286
7326
|
})), React.createElement("td", null, order == null || (_order$order_product_ = order.order_product_type) == null ? void 0 : _order$order_product_.type), React.createElement("td", null, order == null ? void 0 : order.code), React.createElement("td", null, order == null ? void 0 : order.description), React.createElement("td", null, order == null ? void 0 : order.description), React.createElement("td", null, order == null ? void 0 : order.description), React.createElement("td", null, order == null ? void 0 : order.sku));
|
|
7287
|
-
}))));
|
|
7327
|
+
})))));
|
|
7288
7328
|
}
|
|
7289
7329
|
|
|
7290
|
-
var _templateObject$
|
|
7330
|
+
var _templateObject$1p;
|
|
7291
7331
|
function SplitOrder() {
|
|
7292
7332
|
var _useCurrentAction = useCurrentAction(),
|
|
7293
7333
|
setCurrentAction = _useCurrentAction[1];
|
|
@@ -7311,12 +7351,30 @@ function SplitOrder() {
|
|
|
7311
7351
|
body: payload,
|
|
7312
7352
|
performAction: false
|
|
7313
7353
|
}),
|
|
7354
|
+
response = _useApiHook.data,
|
|
7314
7355
|
setPerformAction = _useApiHook.setShouldPerformAction;
|
|
7315
7356
|
var onSubmitSplitOrder = function onSubmitSplitOrder() {
|
|
7316
7357
|
if (orderId) {
|
|
7317
7358
|
setPerformAction(true);
|
|
7359
|
+
//@ts-ignore
|
|
7360
|
+
if (response != null && response.data && (response == null ? void 0 : response.code) === 200) {
|
|
7361
|
+
notification.success({
|
|
7362
|
+
message: 'Success',
|
|
7363
|
+
description:
|
|
7364
|
+
//@ts-ignore
|
|
7365
|
+
(response == null ? void 0 : response.message) || 'Sucess'
|
|
7366
|
+
});
|
|
7367
|
+
} else {
|
|
7368
|
+
// alert(response?.error_traceback);
|
|
7369
|
+
notification.error({
|
|
7370
|
+
message: 'Error',
|
|
7371
|
+
description:
|
|
7372
|
+
//@ts-ignore
|
|
7373
|
+
(response == null ? void 0 : response.message) || 'An error has occurred. Please try again later.'
|
|
7374
|
+
});
|
|
7375
|
+
}
|
|
7376
|
+
setSelectedSplit([]);
|
|
7318
7377
|
}
|
|
7319
|
-
setSelectedSplit([]);
|
|
7320
7378
|
};
|
|
7321
7379
|
var isSubmitDisabled = function isSubmitDisabled() {
|
|
7322
7380
|
if ((seledtedSplitOrder == null ? void 0 : seledtedSplitOrder.length) > 0) {
|
|
@@ -7335,7 +7393,7 @@ function SplitOrder() {
|
|
|
7335
7393
|
isSubmitDisabled: isSubmitDisabled()
|
|
7336
7394
|
}, React.createElement(ContentContainer$1, null, React.createElement(SplitOrderTable, null)));
|
|
7337
7395
|
}
|
|
7338
|
-
var ContentContainer$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
7396
|
+
var ContentContainer$1 = /*#__PURE__*/styled.div(_templateObject$1p || (_templateObject$1p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex; */\n padding: 15px 12px;\n flex: 1 0 0;\n border-radius: 15px;\n background: white;\n display: flex;\n flex-direction: column;\n gap: 15px;\n overflow: auto;\n min-height: 500px;\n overflow-x: hidden;\n max-height: 500px;\n scrollbar-width: thin;\n"])));
|
|
7339
7397
|
|
|
7340
7398
|
function RadioButtonCheckIcon(props) {
|
|
7341
7399
|
return React.createElement("svg", Object.assign({
|
|
@@ -7366,7 +7424,7 @@ var fonts = {
|
|
|
7366
7424
|
secondary: "'Lato', sans-serif"
|
|
7367
7425
|
};
|
|
7368
7426
|
|
|
7369
|
-
var _templateObject$
|
|
7427
|
+
var _templateObject$1q, _templateObject2$11, _templateObject3$x;
|
|
7370
7428
|
function RadioButton(props) {
|
|
7371
7429
|
return React.createElement(RadioContainer$1, null, props.checked && React.createElement(RadioButtonCheckIcon, {
|
|
7372
7430
|
color: props.color
|
|
@@ -7377,15 +7435,15 @@ function RadioButton(props) {
|
|
|
7377
7435
|
htmlFor: props.id
|
|
7378
7436
|
}, props.label));
|
|
7379
7437
|
}
|
|
7380
|
-
var Label$3 = /*#__PURE__*/styled.label(_templateObject$
|
|
7381
|
-
var Input = /*#__PURE__*/styled.input(_templateObject2$
|
|
7438
|
+
var Label$3 = /*#__PURE__*/styled.label(_templateObject$1q || (_templateObject$1q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n font-size: 14px;\n font-weight: 400;\n font-family: ", ";\n color: #aea9a1;\n white-space: nowrap;\n"])), fonts.secondary);
|
|
7439
|
+
var Input = /*#__PURE__*/styled.input(_templateObject2$11 || (_templateObject2$11 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n appearance: none;\n margin: 0;\n width: 16px;\n height: 16px;\n border: 1px solid #aea9a1;\n border-radius: 14px;\n cursor: pointer;\n\n &:checked {\n & + ", " {\n color: ", ";\n }\n display: none;\n }\n\n &::after {\n content: '';\n display: block;\n border-radius: 14px;\n width: 12px;\n height: 12px;\n margin: 2px;\n }\n\n &:checked::after {\n background-color: ", ";\n }\n"])), Label$3, function (props) {
|
|
7382
7440
|
return props.color || '#6396e5';
|
|
7383
7441
|
}, function (props) {
|
|
7384
7442
|
return props.color || '#6396e5';
|
|
7385
7443
|
});
|
|
7386
7444
|
var RadioContainer$1 = /*#__PURE__*/styled.div(_templateObject3$x || (_templateObject3$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 5px;\n align-items: center;\n"])));
|
|
7387
7445
|
|
|
7388
|
-
var _templateObject$
|
|
7446
|
+
var _templateObject$1r, _templateObject2$12, _templateObject3$y, _templateObject4$h, _templateObject5$b, _templateObject6$5, _templateObject7$7;
|
|
7389
7447
|
function RadioButtonGroup(props) {
|
|
7390
7448
|
var heading = props.heading,
|
|
7391
7449
|
_props$direction = props.direction,
|
|
@@ -7420,19 +7478,19 @@ function RadioButtonGroup(props) {
|
|
|
7420
7478
|
className: "custom-wrapper"
|
|
7421
7479
|
}, renderOptions()));
|
|
7422
7480
|
}
|
|
7423
|
-
var Separator = /*#__PURE__*/styled.div(_templateObject$
|
|
7424
|
-
var labelStyles = /*#__PURE__*/css(_templateObject2$
|
|
7481
|
+
var Separator = /*#__PURE__*/styled.div(_templateObject$1r || (_templateObject$1r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 1px;\n background: #e0e2e7;\n"])));
|
|
7482
|
+
var labelStyles = /*#__PURE__*/css(_templateObject2$12 || (_templateObject2$12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-size: 14px;\n font-weight: 400;\n font-family: ", ";\n line-height: 20px;\n"])), fonts.secondary);
|
|
7425
7483
|
var RequiredText = /*#__PURE__*/styled.span(_templateObject3$y || (_templateObject3$y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n ", "\n"])), function (props) {
|
|
7426
7484
|
return !props.$required && 'visibility: hidden;';
|
|
7427
7485
|
}, labelStyles);
|
|
7428
|
-
var LegendContainer = /*#__PURE__*/styled.div(_templateObject4$
|
|
7429
|
-
var Legend = /*#__PURE__*/styled.legend(_templateObject5$
|
|
7430
|
-
var Fieldset = /*#__PURE__*/styled.fieldset(_templateObject6$
|
|
7431
|
-
var Wrapper$g = /*#__PURE__*/styled.div(_templateObject7$
|
|
7486
|
+
var LegendContainer = /*#__PURE__*/styled.div(_templateObject4$h || (_templateObject4$h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n margin-bottom: 7px;\n"])));
|
|
7487
|
+
var Legend = /*#__PURE__*/styled.legend(_templateObject5$b || (_templateObject5$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-size: 14px;\n font-weight: 400;\n font-family: ", ";\n line-height: 20px;\n"])), fonts.secondary);
|
|
7488
|
+
var Fieldset = /*#__PURE__*/styled.fieldset(_templateObject6$5 || (_templateObject6$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: none;\n padding: 0px;\n"])));
|
|
7489
|
+
var Wrapper$g = /*#__PURE__*/styled.div(_templateObject7$7 || (_templateObject7$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: ", ";\n gap: 32px;\n padding: 0px 10px;\n border-radius: 15px;\n border: 1px solid #e0e2e7;\n background: #fff;\n height: 30px;\n justify-content: space-evenly;\n"])), function (props) {
|
|
7432
7490
|
return props.$direction === 'horizontal' ? 'row' : 'column';
|
|
7433
7491
|
});
|
|
7434
7492
|
|
|
7435
|
-
var _templateObject$
|
|
7493
|
+
var _templateObject$1s;
|
|
7436
7494
|
var deliveryPoints = [{
|
|
7437
7495
|
label: 'Hallway',
|
|
7438
7496
|
value: 'hallway'
|
|
@@ -7463,9 +7521,9 @@ function DeliveryPoint() {
|
|
|
7463
7521
|
required: false
|
|
7464
7522
|
}));
|
|
7465
7523
|
}
|
|
7466
|
-
var Container$S = /*#__PURE__*/styled.div(_templateObject$
|
|
7524
|
+
var Container$S = /*#__PURE__*/styled.div(_templateObject$1s || (_templateObject$1s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* height: 30px; */\n padding: 1px;\n align-items: flex-start;\n align-self: stretch;\n"])));
|
|
7467
7525
|
|
|
7468
|
-
var _templateObject$
|
|
7526
|
+
var _templateObject$1t, _templateObject2$13, _templateObject3$z, _templateObject4$i, _templateObject5$c, _templateObject6$6, _templateObject7$8, _templateObject8$4;
|
|
7469
7527
|
var _excluded$5 = ["imageSrc", "label", "checked"];
|
|
7470
7528
|
function Checkbox(props) {
|
|
7471
7529
|
var imageSrc = props.imageSrc,
|
|
@@ -7486,20 +7544,20 @@ function Checkbox(props) {
|
|
|
7486
7544
|
"$checked": checked
|
|
7487
7545
|
}, label)));
|
|
7488
7546
|
}
|
|
7489
|
-
var Image = /*#__PURE__*/styled.img(_templateObject$
|
|
7547
|
+
var Image = /*#__PURE__*/styled.img(_templateObject$1t || (_templateObject$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 28px;\n width: 20px;\n filter: ", ";\n"])), function (props) {
|
|
7490
7548
|
return props.$checked ? 'grayscale(0)' : 'grayscale(1)';
|
|
7491
7549
|
});
|
|
7492
|
-
var CircleContainer = /*#__PURE__*/styled.span(_templateObject2$
|
|
7550
|
+
var CircleContainer = /*#__PURE__*/styled.span(_templateObject2$13 || (_templateObject2$13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 20px;\n width: 20px;\n border: 1px solid #e0e2e7;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 8px;\n left: 8px;\n"])));
|
|
7493
7551
|
var Circle = /*#__PURE__*/styled.span(_templateObject3$z || (_templateObject3$z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 14px;\n width: 14px;\n background: ", ";\n border-radius: 50%;\n display: inline-block;\n transition: 0.2s ease all;\n"])), function (props) {
|
|
7494
7552
|
return props.$checked ? '#feba30' : 'white';
|
|
7495
7553
|
});
|
|
7496
|
-
var Text$6 = /*#__PURE__*/styled.span(_templateObject4$
|
|
7554
|
+
var Text$6 = /*#__PURE__*/styled.span(_templateObject4$i || (_templateObject4$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n font-family: 'lato', sans-serif;\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n"])), function (props) {
|
|
7497
7555
|
return props.$checked ? '#3a3630' : 'rgba(58, 54, 48, 0.50)';
|
|
7498
7556
|
});
|
|
7499
|
-
var InformationContainer = /*#__PURE__*/styled.div(_templateObject5$
|
|
7500
|
-
var CheckboxContainer = /*#__PURE__*/styled.div(_templateObject6$
|
|
7501
|
-
var HiddenCheckbox = /*#__PURE__*/styled.input(_templateObject7$
|
|
7502
|
-
var MainContainer$9 = /*#__PURE__*/styled.div(_templateObject8$
|
|
7557
|
+
var InformationContainer = /*#__PURE__*/styled.div(_templateObject5$c || (_templateObject5$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n align-items: center;\n"])));
|
|
7558
|
+
var CheckboxContainer = /*#__PURE__*/styled.div(_templateObject6$6 || (_templateObject6$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
7559
|
+
var HiddenCheckbox = /*#__PURE__*/styled.input(_templateObject7$8 || (_templateObject7$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 0;\n height: 100%;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 100%;\n opacity: 0;\n cursor: pointer;\n top: 0;\n left: 0;\n"])));
|
|
7560
|
+
var MainContainer$9 = /*#__PURE__*/styled.div(_templateObject8$4 || (_templateObject8$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 130px;\n height: 93px;\n gap: 10px;\n border-radius: 15px;\n border: 1px solid ", ";\n align-items: center;\n justify-content: center;\n position: relative;\n\n &:hover {\n border: 1px solid #cbc8c2;\n .checkbox-img {\n filter: grayscale(0);\n }\n }\n"])), function (props) {
|
|
7503
7561
|
return props.$checked ? '#cbc8c2' : '#e0e2e7';
|
|
7504
7562
|
});
|
|
7505
7563
|
|
|
@@ -7526,7 +7584,7 @@ var getIcon$1 = function getIcon(input) {
|
|
|
7526
7584
|
return "" + baseURL$1 + subPath;
|
|
7527
7585
|
};
|
|
7528
7586
|
|
|
7529
|
-
var _templateObject$
|
|
7587
|
+
var _templateObject$1u;
|
|
7530
7588
|
function OrderServices$1() {
|
|
7531
7589
|
// TO DO -> get services from static data
|
|
7532
7590
|
return React.createElement(Container$T, null, React.createElement(Checkbox, {
|
|
@@ -7551,9 +7609,9 @@ function OrderServices$1() {
|
|
|
7551
7609
|
imageSrc: getIcon$1(4)
|
|
7552
7610
|
}));
|
|
7553
7611
|
}
|
|
7554
|
-
var Container$T = /*#__PURE__*/styled.div(_templateObject$
|
|
7612
|
+
var Container$T = /*#__PURE__*/styled.div(_templateObject$1u || (_templateObject$1u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-wrap: wrap;\n"])));
|
|
7555
7613
|
|
|
7556
|
-
var _templateObject$
|
|
7614
|
+
var _templateObject$1v, _templateObject2$14;
|
|
7557
7615
|
function Notes$1(_ref) {
|
|
7558
7616
|
var onNotesChange = _ref.onNotesChange;
|
|
7559
7617
|
var handleTextChange = function handleTextChange(event) {
|
|
@@ -7564,10 +7622,10 @@ function Notes$1(_ref) {
|
|
|
7564
7622
|
onChange: handleTextChange
|
|
7565
7623
|
}));
|
|
7566
7624
|
}
|
|
7567
|
-
var Label$4 = /*#__PURE__*/styled.span(_templateObject$
|
|
7568
|
-
var Container$U = /*#__PURE__*/styled.div(_templateObject2$
|
|
7625
|
+
var Label$4 = /*#__PURE__*/styled.span(_templateObject$1v || (_templateObject$1v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
7626
|
+
var Container$U = /*#__PURE__*/styled.div(_templateObject2$14 || (_templateObject2$14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 5px;\n flex-direction: column;\n width: 100%;\n"])));
|
|
7569
7627
|
|
|
7570
|
-
var _templateObject$
|
|
7628
|
+
var _templateObject$1w, _templateObject2$15, _templateObject3$A;
|
|
7571
7629
|
function LogServiceRefusal() {
|
|
7572
7630
|
var _useCurrentAction = useCurrentAction(),
|
|
7573
7631
|
setCurrentAction = _useCurrentAction[1];
|
|
@@ -7587,8 +7645,8 @@ function LogServiceRefusal() {
|
|
|
7587
7645
|
}
|
|
7588
7646
|
}))));
|
|
7589
7647
|
}
|
|
7590
|
-
var ContentContainer$2 = /*#__PURE__*/styled.div(_templateObject$
|
|
7591
|
-
var Left = /*#__PURE__*/styled.div(_templateObject2$
|
|
7648
|
+
var ContentContainer$2 = /*#__PURE__*/styled.div(_templateObject$1w || (_templateObject$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0px 15px;\n align-items: flex-start;\n gap: 10px;\n align-self: stretch;\n"])));
|
|
7649
|
+
var Left = /*#__PURE__*/styled.div(_templateObject2$15 || (_templateObject2$15 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\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: 15px;\n background: #f8fafc;\n"])));
|
|
7592
7650
|
var Right$1 = /*#__PURE__*/styled(Left)(_templateObject3$A || (_templateObject3$A = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
7593
7651
|
|
|
7594
7652
|
function ReturnAction() {
|
|
@@ -7615,7 +7673,7 @@ function ReturnReason() {
|
|
|
7615
7673
|
});
|
|
7616
7674
|
}
|
|
7617
7675
|
|
|
7618
|
-
var _templateObject$
|
|
7676
|
+
var _templateObject$1x, _templateObject2$16, _templateObject3$B, _templateObject4$j, _templateObject5$d, _templateObject6$7, _templateObject7$9, _templateObject8$5, _templateObject9$2;
|
|
7619
7677
|
function CancelOrder() {
|
|
7620
7678
|
var _orderStaticData$canc;
|
|
7621
7679
|
var _useOrderId = useOrderId(),
|
|
@@ -7678,6 +7736,12 @@ function CancelOrder() {
|
|
|
7678
7736
|
//@ts-ignore
|
|
7679
7737
|
if (response != null && response.data && (response == null ? void 0 : response.code) === 200) {
|
|
7680
7738
|
setShouldPerformAction(true);
|
|
7739
|
+
notification.success({
|
|
7740
|
+
message: 'Success',
|
|
7741
|
+
description:
|
|
7742
|
+
//@ts-ignore
|
|
7743
|
+
(response == null ? void 0 : response.message) || 'Sucess'
|
|
7744
|
+
});
|
|
7681
7745
|
} else {
|
|
7682
7746
|
// alert(response?.error_traceback);
|
|
7683
7747
|
notification.error({
|
|
@@ -7714,28 +7778,36 @@ function CancelOrder() {
|
|
|
7714
7778
|
submitBtnTitle: "Save Details",
|
|
7715
7779
|
isSubmitDisabled: !showSubmitBtn
|
|
7716
7780
|
}, React.createElement(ContentContainer$3, null, React.createElement(Top$2, null, React.createElement(TopLeft, null, React.createElement(OrderActionsDropdown, {
|
|
7781
|
+
required: true,
|
|
7717
7782
|
label: "Cancelation Reason",
|
|
7718
7783
|
placeholder: "Select Cancelation Reason",
|
|
7719
7784
|
options: cancelReasonOptions || [],
|
|
7720
7785
|
onSelect: onSelectCancelReason,
|
|
7721
7786
|
value: cancelReason
|
|
7722
|
-
}), React.createElement(Wrapper$h, null, React.createElement(ReturnAction, null), React.createElement(ReturnReason, null))), React.createElement(TopRight, null, React.createElement(Container$V, null, React.createElement(
|
|
7787
|
+
}), React.createElement(Wrapper$h, null, React.createElement(ReturnAction, null), React.createElement(ReturnReason, null))), React.createElement(TopRight, null, React.createElement(Container$V, null, React.createElement("div", {
|
|
7788
|
+
style: {
|
|
7789
|
+
display: 'flex',
|
|
7790
|
+
flexDirection: 'row'
|
|
7791
|
+
}
|
|
7792
|
+
}, React.createElement(Label$5, null, "Cancelation Note"), ' ', React.createElement(RequiredAsterisk$1, null, "*")), React.createElement(TArea, {
|
|
7723
7793
|
rows: 5,
|
|
7724
7794
|
onChange: onChangeNotes,
|
|
7725
7795
|
value: cancelNotes,
|
|
7726
7796
|
placeholder: "Reason for Cancel Order"
|
|
7727
7797
|
}))))));
|
|
7728
7798
|
}
|
|
7729
|
-
var
|
|
7730
|
-
var
|
|
7731
|
-
var
|
|
7732
|
-
var
|
|
7733
|
-
var
|
|
7734
|
-
var
|
|
7799
|
+
var RequiredAsterisk$1 = /*#__PURE__*/styled.span(_templateObject$1x || (_templateObject$1x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: red;\n margin-left: 2px;\n font-size: x-small;\n"])));
|
|
7800
|
+
var TArea = /*#__PURE__*/styled(TextArea)(_templateObject2$16 || (_templateObject2$16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n resize: none;\n"])));
|
|
7801
|
+
var Label$5 = /*#__PURE__*/styled.label(_templateObject3$B || (_templateObject3$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
7802
|
+
var Container$V = /*#__PURE__*/styled.div(_templateObject4$j || (_templateObject4$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
7803
|
+
var Wrapper$h = /*#__PURE__*/styled.div(_templateObject5$d || (_templateObject5$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n width: 100%;\n > div {\n width: 50%;\n }\n"])));
|
|
7804
|
+
var TopLeft = /*#__PURE__*/styled.div(_templateObject6$7 || (_templateObject6$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 15px;\n width: 50%;\n"])));
|
|
7805
|
+
var TopRight = /*#__PURE__*/styled.div(_templateObject7$9 || (_templateObject7$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 50%;\n"])));
|
|
7806
|
+
var Top$2 = /*#__PURE__*/styled.div(_templateObject8$5 || (_templateObject8$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 30px;\n width: 100%;\n"])));
|
|
7735
7807
|
// const Bottom = styled.div``;
|
|
7736
|
-
var ContentContainer$3 = /*#__PURE__*/styled.div(
|
|
7808
|
+
var ContentContainer$3 = /*#__PURE__*/styled.div(_templateObject9$2 || (_templateObject9$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0px 15px;\n align-items: flex-start;\n gap: 10px;\n flex-direction: column;\n"])));
|
|
7737
7809
|
|
|
7738
|
-
var _templateObject$
|
|
7810
|
+
var _templateObject$1y, _templateObject2$17, _templateObject3$C;
|
|
7739
7811
|
function EmailAddress() {
|
|
7740
7812
|
var emailRegex = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;
|
|
7741
7813
|
var _useOrderDetailsConfi = useOrderDetailsConfirmOrder(),
|
|
@@ -7776,11 +7848,11 @@ function EmailAddress() {
|
|
|
7776
7848
|
onChange: onChange
|
|
7777
7849
|
}), errors.emailError && React.createElement(ErrorText$5, null, errors.emailError));
|
|
7778
7850
|
}
|
|
7779
|
-
var Label$6 = /*#__PURE__*/styled.label(_templateObject$
|
|
7780
|
-
var Container$W = /*#__PURE__*/styled.div(_templateObject2$
|
|
7851
|
+
var Label$6 = /*#__PURE__*/styled.label(_templateObject$1y || (_templateObject$1y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
7852
|
+
var Container$W = /*#__PURE__*/styled.div(_templateObject2$17 || (_templateObject2$17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
7781
7853
|
var ErrorText$5 = /*#__PURE__*/styled.span(_templateObject3$C || (_templateObject3$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: red;\n font-size: 0.85rem;\n margin-top: 4px;\n"])));
|
|
7782
7854
|
|
|
7783
|
-
var _templateObject$
|
|
7855
|
+
var _templateObject$1z, _templateObject2$18, _templateObject3$D;
|
|
7784
7856
|
function ContactPhone() {
|
|
7785
7857
|
var _useOrderDetailsConfi = useOrderDetailsConfirmOrder(),
|
|
7786
7858
|
orderDetails = _useOrderDetailsConfi[0],
|
|
@@ -7841,11 +7913,11 @@ function ContactPhone() {
|
|
|
7841
7913
|
onChange: onChange
|
|
7842
7914
|
}), errors.homeContactError && React.createElement(ErrorText$6, null, errors.homeContactError));
|
|
7843
7915
|
}
|
|
7844
|
-
var Label$7 = /*#__PURE__*/styled.label(_templateObject$
|
|
7845
|
-
var Container$X = /*#__PURE__*/styled.div(_templateObject2$
|
|
7916
|
+
var Label$7 = /*#__PURE__*/styled.label(_templateObject$1z || (_templateObject$1z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
7917
|
+
var Container$X = /*#__PURE__*/styled.div(_templateObject2$18 || (_templateObject2$18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
7846
7918
|
var ErrorText$6 = /*#__PURE__*/styled.span(_templateObject3$D || (_templateObject3$D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: red;\n font-size: 0.85rem;\n margin-top: 4px;\n"])));
|
|
7847
7919
|
|
|
7848
|
-
var _templateObject$
|
|
7920
|
+
var _templateObject$1A, _templateObject2$19, _templateObject3$E;
|
|
7849
7921
|
function ContactWork$1() {
|
|
7850
7922
|
var _useOrderDetailsConfi = useOrderDetailsConfirmOrder(),
|
|
7851
7923
|
orderDetails = _useOrderDetailsConfi[0],
|
|
@@ -7906,11 +7978,11 @@ function ContactWork$1() {
|
|
|
7906
7978
|
onChange: onChange
|
|
7907
7979
|
}), errors.workContactError && React.createElement(ErrorText$7, null, errors.workContactError));
|
|
7908
7980
|
}
|
|
7909
|
-
var Label$8 = /*#__PURE__*/styled.label(_templateObject$
|
|
7910
|
-
var Container$Y = /*#__PURE__*/styled.div(_templateObject2$
|
|
7981
|
+
var Label$8 = /*#__PURE__*/styled.label(_templateObject$1A || (_templateObject$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
7982
|
+
var Container$Y = /*#__PURE__*/styled.div(_templateObject2$19 || (_templateObject2$19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
7911
7983
|
var ErrorText$7 = /*#__PURE__*/styled.span(_templateObject3$E || (_templateObject3$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: red;\n font-size: 0.85rem;\n margin-top: 4px;\n"])));
|
|
7912
7984
|
|
|
7913
|
-
var _templateObject$
|
|
7985
|
+
var _templateObject$1B, _templateObject2$1a, _templateObject3$F;
|
|
7914
7986
|
function ContactMobile$1() {
|
|
7915
7987
|
var _useOrderDetailsConfi = useOrderDetailsConfirmOrder(),
|
|
7916
7988
|
orderDetails = _useOrderDetailsConfi[0],
|
|
@@ -7971,8 +8043,8 @@ function ContactMobile$1() {
|
|
|
7971
8043
|
onChange: onChange
|
|
7972
8044
|
}), errors.mobileError && React.createElement(ErrorText$8, null, errors.mobileError));
|
|
7973
8045
|
}
|
|
7974
|
-
var Label$9 = /*#__PURE__*/styled.label(_templateObject$
|
|
7975
|
-
var Container$Z = /*#__PURE__*/styled.div(_templateObject2$
|
|
8046
|
+
var Label$9 = /*#__PURE__*/styled.label(_templateObject$1B || (_templateObject$1B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
8047
|
+
var Container$Z = /*#__PURE__*/styled.div(_templateObject2$1a || (_templateObject2$1a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
7976
8048
|
var ErrorText$8 = /*#__PURE__*/styled.span(_templateObject3$F || (_templateObject3$F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: red;\n font-size: 0.85rem;\n margin-top: 4px;\n"])));
|
|
7977
8049
|
|
|
7978
8050
|
function ContactTypeDropdown() {
|
|
@@ -8039,7 +8111,7 @@ function ActionDropdown() {
|
|
|
8039
8111
|
});
|
|
8040
8112
|
}
|
|
8041
8113
|
|
|
8042
|
-
var _templateObject$
|
|
8114
|
+
var _templateObject$1C, _templateObject2$1b;
|
|
8043
8115
|
function DeliveryDate$1() {
|
|
8044
8116
|
var _useOrderDetailsConfi = useOrderDetailsConfirmOrder(),
|
|
8045
8117
|
orderDetails = _useOrderDetailsConfi[0];
|
|
@@ -8075,8 +8147,8 @@ function DeliveryDate$1() {
|
|
|
8075
8147
|
allowClear: false
|
|
8076
8148
|
}));
|
|
8077
8149
|
}
|
|
8078
|
-
var Label$a = /*#__PURE__*/styled.label(_templateObject$
|
|
8079
|
-
var Container$_ = /*#__PURE__*/styled.div(_templateObject2$
|
|
8150
|
+
var Label$a = /*#__PURE__*/styled.label(_templateObject$1C || (_templateObject$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
8151
|
+
var Container$_ = /*#__PURE__*/styled.div(_templateObject2$1b || (_templateObject2$1b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n white-space: nowrap;\n"])));
|
|
8080
8152
|
|
|
8081
8153
|
function convertTo12HourFormat$1(time24) {
|
|
8082
8154
|
var _time24$split, _minutes$toString;
|
|
@@ -8125,19 +8197,19 @@ function TimedServiceDropdown$1() {
|
|
|
8125
8197
|
});
|
|
8126
8198
|
}
|
|
8127
8199
|
|
|
8128
|
-
var _templateObject$
|
|
8200
|
+
var _templateObject$1D, _templateObject2$1c, _templateObject3$G, _templateObject4$k;
|
|
8129
8201
|
function CustomerInformation() {
|
|
8130
8202
|
var _orderDetails$order_r;
|
|
8131
8203
|
var _useOrderDetailsConfi = useOrderDetailsConfirmOrder(),
|
|
8132
8204
|
orderDetails = _useOrderDetailsConfi[0];
|
|
8133
8205
|
return React.createElement(Container$$, null, React.createElement(Title$3, null, "Address"), React.createElement(AddressField, null, orderDetails == null || (_orderDetails$order_r = orderDetails.order_recipient) == null ? void 0 : _orderDetails$order_r.address), React.createElement(Wrapper$i, null, React.createElement(EmailAddress, null), React.createElement(ContactPhone, null)), React.createElement(Wrapper$i, null, React.createElement(ContactWork$1, null), React.createElement(ContactMobile$1, null)), React.createElement(Wrapper$i, null, React.createElement(ContactTypeDropdown, null), React.createElement(ActionDropdown, null)), React.createElement(Wrapper$i, null, React.createElement(DeliveryDate$1, null), React.createElement(TimedServiceDropdown$1, null)));
|
|
8134
8206
|
}
|
|
8135
|
-
var Wrapper$i = /*#__PURE__*/styled.div(_templateObject$
|
|
8136
|
-
var AddressField = /*#__PURE__*/styled.p(_templateObject2$
|
|
8207
|
+
var Wrapper$i = /*#__PURE__*/styled.div(_templateObject$1D || (_templateObject$1D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n width: 100%;\n .contact-type-dropdown,\n .action-dropdown {\n flex: 1;\n }\n"])));
|
|
8208
|
+
var AddressField = /*#__PURE__*/styled.p(_templateObject2$1c || (_templateObject2$1c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Open Sans';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n padding: 0;\n margin: 0;\n"])));
|
|
8137
8209
|
var Title$3 = /*#__PURE__*/styled.span(_templateObject3$G || (_templateObject3$G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Roboto', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n"])));
|
|
8138
|
-
var Container$$ = /*#__PURE__*/styled.div(_templateObject4$
|
|
8210
|
+
var Container$$ = /*#__PURE__*/styled.div(_templateObject4$k || (_templateObject4$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 15px 12px;\n flex: 1 0 0;\n border-radius: 15px;\n background: #f8fafc;\n display: flex;\n flex-direction: column;\n gap: 15px;\n"])));
|
|
8139
8211
|
|
|
8140
|
-
var _templateObject$
|
|
8212
|
+
var _templateObject$1E, _templateObject2$1d;
|
|
8141
8213
|
function ProductTable$1() {
|
|
8142
8214
|
var _useProductDetails = useProductDetails(),
|
|
8143
8215
|
orderProductDetails = _useProductDetails[0];
|
|
@@ -8146,7 +8218,7 @@ function ProductTable$1() {
|
|
|
8146
8218
|
if (!orderProductDetails) {
|
|
8147
8219
|
return null;
|
|
8148
8220
|
}
|
|
8149
|
-
return React.createElement(Container$10, null, React.createElement(Title$4, null, "Products (", orderProductDetails == null ? void 0 : orderProductDetails.length, ")"), React.createElement(StyledTableWrapper$2, null, React.createElement(StyledTable$
|
|
8221
|
+
return React.createElement(Container$10, null, React.createElement(Title$4, null, "Products (", orderProductDetails == null ? void 0 : orderProductDetails.length, ")"), React.createElement(StyledTableWrapper$2, null, React.createElement(StyledTable$2, {
|
|
8150
8222
|
className: "scrollClass"
|
|
8151
8223
|
}, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", null, "Action"), React.createElement("th", null, "Code"), React.createElement("th", null, "Description"), React.createElement("th", null, "Parts"))), React.createElement("tbody", null, loading ? React.createElement("tr", null, React.createElement("td", {
|
|
8152
8224
|
colSpan: 6
|
|
@@ -8164,10 +8236,10 @@ function ProductTable$1() {
|
|
|
8164
8236
|
}, React.createElement("td", null, order == null || (_order$order_product_ = order.order_product_type) == null ? void 0 : _order$order_product_.type), React.createElement("td", null, order == null ? void 0 : order.code), React.createElement("td", null, order == null ? void 0 : order.description), React.createElement("td", null, order == null ? void 0 : order.sku));
|
|
8165
8237
|
})))));
|
|
8166
8238
|
}
|
|
8167
|
-
var Title$4 = /*#__PURE__*/styled.h2(_templateObject$
|
|
8168
|
-
var Container$10 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8239
|
+
var Title$4 = /*#__PURE__*/styled.h2(_templateObject$1E || (_templateObject$1E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Roboto', sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n text-transform: uppercase;\n padding: 0;\n margin: 0;\n"])));
|
|
8240
|
+
var Container$10 = /*#__PURE__*/styled.div(_templateObject2$1d || (_templateObject2$1d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n > div {\n min-height: 165px;\n }\n"])));
|
|
8169
8241
|
|
|
8170
|
-
var _templateObject$
|
|
8242
|
+
var _templateObject$1F, _templateObject2$1e;
|
|
8171
8243
|
function NotesTable() {
|
|
8172
8244
|
var _useState = useState(null),
|
|
8173
8245
|
moduleIds = _useState[0],
|
|
@@ -8220,7 +8292,7 @@ function NotesTable() {
|
|
|
8220
8292
|
setShouldPerformAction = _useApiHook2.setShouldPerformAction;
|
|
8221
8293
|
useEffect(function () {
|
|
8222
8294
|
setNoteLoadingStore(true);
|
|
8223
|
-
if (moduleIds
|
|
8295
|
+
if (moduleIds) {
|
|
8224
8296
|
setShouldPerformAction(true);
|
|
8225
8297
|
}
|
|
8226
8298
|
if (!NotesLoading && NotesData != null && NotesData.data) {
|
|
@@ -8235,7 +8307,7 @@ function NotesTable() {
|
|
|
8235
8307
|
if ((notes == null ? void 0 : notes.length) === 0) {
|
|
8236
8308
|
return null;
|
|
8237
8309
|
}
|
|
8238
|
-
return React.createElement(Container$11, null, React.createElement(Title$5, null, "Notes (", notes == null ? void 0 : notes.length, ")"), React.createElement(StyledTableWrapper$2, null, React.createElement(StyledTable$
|
|
8310
|
+
return React.createElement(Container$11, null, React.createElement(Title$5, null, "Notes (", notes == null ? void 0 : notes.length, ")"), React.createElement(StyledTableWrapper$2, null, React.createElement(CustomScrollBar, null, React.createElement(StyledTable$2, {
|
|
8239
8311
|
className: "scrollClass"
|
|
8240
8312
|
}, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", null, "Created"), React.createElement("th", null, "Notes"))), React.createElement("tbody", null, loading ? React.createElement("tr", null, React.createElement("td", {
|
|
8241
8313
|
colSpan: 6
|
|
@@ -8259,32 +8331,32 @@ function NotesTable() {
|
|
|
8259
8331
|
__html: order == null ? void 0 : order.description
|
|
8260
8332
|
}
|
|
8261
8333
|
}));
|
|
8262
|
-
})))));
|
|
8334
|
+
}))))));
|
|
8263
8335
|
}
|
|
8264
|
-
var Title$5 = /*#__PURE__*/styled.h2(_templateObject$
|
|
8265
|
-
var Container$11 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8336
|
+
var Title$5 = /*#__PURE__*/styled.h2(_templateObject$1F || (_templateObject$1F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Roboto', sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n text-transform: uppercase;\n padding: 0;\n margin: 0;\n"])));
|
|
8337
|
+
var Container$11 = /*#__PURE__*/styled.div(_templateObject2$1e || (_templateObject2$1e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n > div {\n min-height: 350px;\n }\n"])));
|
|
8266
8338
|
|
|
8267
|
-
var _templateObject$
|
|
8339
|
+
var _templateObject$1G, _templateObject2$1f;
|
|
8268
8340
|
function ConfirmationNotes() {
|
|
8269
8341
|
return React.createElement(Container$12, null, React.createElement(Label$b, null, "Notes"), React.createElement(TextArea, {
|
|
8270
8342
|
rows: 5,
|
|
8271
8343
|
placeholder: "Enter Notes"
|
|
8272
8344
|
}));
|
|
8273
8345
|
}
|
|
8274
|
-
var Label$b = /*#__PURE__*/styled.label(_templateObject$
|
|
8275
|
-
var Container$12 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8346
|
+
var Label$b = /*#__PURE__*/styled.label(_templateObject$1G || (_templateObject$1G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
8347
|
+
var Container$12 = /*#__PURE__*/styled.div(_templateObject2$1f || (_templateObject2$1f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
8276
8348
|
|
|
8277
|
-
var _templateObject$
|
|
8349
|
+
var _templateObject$1H, _templateObject2$1g;
|
|
8278
8350
|
function DeliveryInstructions$1() {
|
|
8279
8351
|
return React.createElement(Container$13, null, React.createElement(Label$c, null, "Delivery Instructions"), React.createElement(TextArea, {
|
|
8280
8352
|
rows: 5,
|
|
8281
8353
|
placeholder: "Enter Delivery Instructions"
|
|
8282
8354
|
}));
|
|
8283
8355
|
}
|
|
8284
|
-
var Label$c = /*#__PURE__*/styled.label(_templateObject$
|
|
8285
|
-
var Container$13 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8356
|
+
var Label$c = /*#__PURE__*/styled.label(_templateObject$1H || (_templateObject$1H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
8357
|
+
var Container$13 = /*#__PURE__*/styled.div(_templateObject2$1g || (_templateObject2$1g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
8286
8358
|
|
|
8287
|
-
var _templateObject$
|
|
8359
|
+
var _templateObject$1I, _templateObject2$1h;
|
|
8288
8360
|
function ContactWith() {
|
|
8289
8361
|
return React.createElement(Container$14, null, React.createElement(Label$d, null, "Contact With"), React.createElement(Input$2, {
|
|
8290
8362
|
style: {
|
|
@@ -8292,22 +8364,22 @@ function ContactWith() {
|
|
|
8292
8364
|
}
|
|
8293
8365
|
}));
|
|
8294
8366
|
}
|
|
8295
|
-
var Label$d = /*#__PURE__*/styled.label(_templateObject$
|
|
8296
|
-
var Container$14 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8367
|
+
var Label$d = /*#__PURE__*/styled.label(_templateObject$1I || (_templateObject$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
8368
|
+
var Container$14 = /*#__PURE__*/styled.div(_templateObject2$1h || (_templateObject2$1h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
8297
8369
|
|
|
8298
|
-
var _templateObject$
|
|
8370
|
+
var _templateObject$1J, _templateObject2$1i, _templateObject3$H, _templateObject4$l;
|
|
8299
8371
|
function SlotAndInstructions() {
|
|
8300
8372
|
var _orderDetails$order_r;
|
|
8301
8373
|
var _useOrderDetailsConfi = useOrderDetailsConfirmOrder(),
|
|
8302
8374
|
orderDetails = _useOrderDetailsConfi[0];
|
|
8303
8375
|
return React.createElement(Container$15, null, React.createElement(Slot, null, React.createElement(Title$6, null, "Slot"), React.createElement(Value, null, orderDetails == null || (_orderDetails$order_r = orderDetails.order_routes) == null ? void 0 : _orderDetails$order_r.slot)), React.createElement(ContactWith, null), React.createElement(DeliveryInstructions$1, null), React.createElement(ConfirmationNotes, null));
|
|
8304
8376
|
}
|
|
8305
|
-
var Value = /*#__PURE__*/styled.span(_templateObject$
|
|
8306
|
-
var Slot = /*#__PURE__*/styled.div(_templateObject2$
|
|
8377
|
+
var Value = /*#__PURE__*/styled.span(_templateObject$1J || (_templateObject$1J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Lato', 'Open Sans';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n"])));
|
|
8378
|
+
var Slot = /*#__PURE__*/styled.div(_templateObject2$1i || (_templateObject2$1i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 5px;\n"])));
|
|
8307
8379
|
var Title$6 = /*#__PURE__*/styled.span(_templateObject3$H || (_templateObject3$H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Lato', 'Open Sans';\n font-size: 13px;\n font-style: normal;\n font-weight: 700;\n"])));
|
|
8308
|
-
var Container$15 = /*#__PURE__*/styled.div(_templateObject4$
|
|
8380
|
+
var Container$15 = /*#__PURE__*/styled.div(_templateObject4$l || (_templateObject4$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 15px 12px;\n flex: 1 0 0;\n border-radius: 15px;\n background: #f8fafc;\n display: flex;\n flex-direction: column;\n gap: 15px;\n"])));
|
|
8309
8381
|
|
|
8310
|
-
var _templateObject$
|
|
8382
|
+
var _templateObject$1K, _templateObject2$1j;
|
|
8311
8383
|
// import { filterObject } from '../../../utils';
|
|
8312
8384
|
function ConfirmOrder() {
|
|
8313
8385
|
var _useCurrentAction = useCurrentAction(),
|
|
@@ -8484,21 +8556,21 @@ function ConfirmOrder() {
|
|
|
8484
8556
|
isSubmitDisabled: errorFound()
|
|
8485
8557
|
}, React.createElement(ContentContainer$4, null, React.createElement(Wrapper$j, null, React.createElement(CustomerInformation, null), React.createElement(SlotAndInstructions, null)), React.createElement(ProductTable$1, null), React.createElement(NotesTable, null)));
|
|
8486
8558
|
}
|
|
8487
|
-
var Wrapper$j = /*#__PURE__*/styled.div(_templateObject$
|
|
8488
|
-
var ContentContainer$4 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8559
|
+
var Wrapper$j = /*#__PURE__*/styled.div(_templateObject$1K || (_templateObject$1K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 10px;\n"])));
|
|
8560
|
+
var ContentContainer$4 = /*#__PURE__*/styled.div(_templateObject2$1j || (_templateObject2$1j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex; */\n padding: 15px 12px;\n flex: 1 0 0;\n border-radius: 15px;\n background: white;\n display: flex;\n flex-direction: column;\n gap: 15px;\n overflow: auto;\n min-height: 500px;\n overflow-x: hidden;\n max-height: 500px;\n scrollbar-width: thin;\n"])));
|
|
8489
8561
|
|
|
8490
|
-
var _templateObject2$
|
|
8491
|
-
var StyledInput = /*#__PURE__*/styled(Input$1)(_templateObject2$
|
|
8562
|
+
var _templateObject2$1k, _templateObject3$I, _templateObject4$m, _templateObject5$e, _templateObject6$8, _templateObject7$a, _templateObject8$6, _templateObject9$3, _templateObject10$1, _templateObject11$1, _templateObject12, _templateObject13, _templateObject14$1, _templateObject15, _templateObject18, _templateObject19$1, _templateObject26;
|
|
8563
|
+
var StyledInput = /*#__PURE__*/styled(Input$1)(_templateObject2$1k || (_templateObject2$1k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 66px;\n min-width: 700px;\n"])));
|
|
8492
8564
|
var StyledTextArea$1 = /*#__PURE__*/styled(TextArea)(_templateObject3$I || (_templateObject3$I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 12px;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n align-self: stretch;\n border-radius: 10px;\n border: 1px solid #e0e2e7;\n background: #fff;\n resize: none;\n min-height: 200px;\n"])));
|
|
8493
|
-
var StyledTextAreas = /*#__PURE__*/styled(TextArea)(_templateObject4$
|
|
8494
|
-
var SplitLayout = /*#__PURE__*/styled.div(_templateObject5$
|
|
8495
|
-
var SplitText = /*#__PURE__*/styled.div(_templateObject6$
|
|
8496
|
-
var Row$4 = /*#__PURE__*/styled.div(_templateObject7$
|
|
8565
|
+
var StyledTextAreas = /*#__PURE__*/styled(TextArea)(_templateObject4$m || (_templateObject4$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 12px;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n align-self: stretch;\n border-radius: 10px;\n border: 1px solid #e0e2e7;\n background: #fff;\n resize: none;\n min-height: 50px;\n"])));
|
|
8566
|
+
var SplitLayout = /*#__PURE__*/styled.div(_templateObject5$e || (_templateObject5$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n gap: 10px;\n"])));
|
|
8567
|
+
var SplitText = /*#__PURE__*/styled.div(_templateObject6$8 || (_templateObject6$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n gap: 10px;\n flex-direction: column;\n margin-bottom: 4px;\n"])));
|
|
8568
|
+
var Row$4 = /*#__PURE__*/styled.div(_templateObject7$a || (_templateObject7$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1 0 0;\n display: grid;\n gap: 5px;\n justify-content: center;\n"])));
|
|
8497
8569
|
var HoldRow = /*#__PURE__*/styled.div(_templateObject8$6 || (_templateObject8$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1 0 0;\n display: grid;\n gap: 5px;\n justify-content: center;\n /* margin-bottom: 25px; */\n"])));
|
|
8498
8570
|
var Label$e = /*#__PURE__*/styled.label(_templateObject9$3 || (_templateObject9$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #758588;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
8499
8571
|
var ContentContainer$5 = /*#__PURE__*/styled.div(_templateObject10$1 || (_templateObject10$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 12px 12px;\n margin: 5px 14px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n flex: 1 0 0;\n border-radius: 15px;\n background: #f8fafc;\n"])));
|
|
8500
8572
|
var HoldContentContainer = /*#__PURE__*/styled.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 20px 20px;\n margin: 5px 14px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n flex: 1 0 0;\n border-radius: 15px;\n"])));
|
|
8501
|
-
var Container$16 = /*#__PURE__*/styled.div(_templateObject12
|
|
8573
|
+
var Container$16 = /*#__PURE__*/styled.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 15px;\n border: 1px solid #e0e2e7;\n background: #fff;\n display: flex;\n padding: 15px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n flex: 1 0 0;\n width: 450px;\n"])));
|
|
8502
8574
|
var StaticText = /*#__PURE__*/styled.div(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 18px; /* 128.571% */\n flex: 1 0 0;\n"])));
|
|
8503
8575
|
var ImageCircle = /*#__PURE__*/styled.div(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n border-radius: 50px;\n background: #f2f4f6;\n"])));
|
|
8504
8576
|
var ImageRow = /*#__PURE__*/styled.div(_templateObject15 || (_templateObject15 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 15px;\n align-self: stretch;\n"])));
|
|
@@ -8583,6 +8655,9 @@ var optionsMenu = [{
|
|
|
8583
8655
|
}, {
|
|
8584
8656
|
label: 'Un Hold',
|
|
8585
8657
|
value: 'unhold-order'
|
|
8658
|
+
}, {
|
|
8659
|
+
label: 'Un-Cancel',
|
|
8660
|
+
value: 'uncancel-order'
|
|
8586
8661
|
}];
|
|
8587
8662
|
var PrintMenu = [{
|
|
8588
8663
|
label: 'Return Notes',
|
|
@@ -8744,14 +8819,14 @@ function HoldOrderModal() {
|
|
|
8744
8819
|
infoText: infoText,
|
|
8745
8820
|
submitBtnTitle: "Save Details",
|
|
8746
8821
|
isSubmitDisabled: !showSubmitBtn
|
|
8747
|
-
}, React.createElement(HoldContentContainer, null, React.createElement(SplitText, null, React.createElement(HoldRow, null, React.createElement(Label$
|
|
8822
|
+
}, React.createElement(HoldContentContainer, null, React.createElement(SplitText, null, React.createElement(HoldRow, null, React.createElement(Label$i, {
|
|
8748
8823
|
label: "Hold Until (leave blank for indefinite)"
|
|
8749
8824
|
}), React.createElement(HoldDatePickerWrap, null, React.createElement(DatePicker, {
|
|
8750
8825
|
needConfirm: true,
|
|
8751
8826
|
format: 'MMMM D, YYYY',
|
|
8752
8827
|
onChange: handleDateChange,
|
|
8753
8828
|
value: selectedDate === null ? selectedDate : dayjs(selectedDate)
|
|
8754
|
-
}))), React.createElement(HoldRow, null, React.createElement(Label$
|
|
8829
|
+
}))), React.createElement(HoldRow, null, React.createElement(Label$i, {
|
|
8755
8830
|
label: "Hold Reason",
|
|
8756
8831
|
required: true
|
|
8757
8832
|
}), React.createElement(AntSelect, {
|
|
@@ -9108,7 +9183,7 @@ function ChargeLog() {
|
|
|
9108
9183
|
})));
|
|
9109
9184
|
}
|
|
9110
9185
|
|
|
9111
|
-
var _templateObject$
|
|
9186
|
+
var _templateObject$1L;
|
|
9112
9187
|
var UnholdOrder = function UnholdOrder() {
|
|
9113
9188
|
var _useOrderId = useOrderId(),
|
|
9114
9189
|
orderId = _useOrderId[0];
|
|
@@ -9183,9 +9258,9 @@ var UnholdOrder = function UnholdOrder() {
|
|
|
9183
9258
|
})
|
|
9184
9259
|
});
|
|
9185
9260
|
};
|
|
9186
|
-
var CustomCancelAndCompleteAction = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject$
|
|
9261
|
+
var CustomCancelAndCompleteAction = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject$1L || (_templateObject$1L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n"])));
|
|
9187
9262
|
|
|
9188
|
-
var _templateObject$
|
|
9263
|
+
var _templateObject$1M, _templateObject2$1l;
|
|
9189
9264
|
function AssigneeDropdown() {
|
|
9190
9265
|
var handleSelectChange = function handleSelectChange() {
|
|
9191
9266
|
// alert('hello');
|
|
@@ -9194,11 +9269,11 @@ function AssigneeDropdown() {
|
|
|
9194
9269
|
description: 'Order has been saved successfully.'
|
|
9195
9270
|
});
|
|
9196
9271
|
};
|
|
9197
|
-
return React.createElement(FormContainer$2, null, React.createElement(Label$
|
|
9272
|
+
return React.createElement(FormContainer$2, null, React.createElement(Label$i, {
|
|
9198
9273
|
label: "Assigned To",
|
|
9199
9274
|
required: true,
|
|
9200
9275
|
htmlFor: "assigneDropdown"
|
|
9201
|
-
}), React.createElement(StyledAntSelect$
|
|
9276
|
+
}), React.createElement(StyledAntSelect$4, {
|
|
9202
9277
|
options: [],
|
|
9203
9278
|
onChange: handleSelectChange,
|
|
9204
9279
|
selectWrapperClass: 'rounded',
|
|
@@ -9207,8 +9282,8 @@ function AssigneeDropdown() {
|
|
|
9207
9282
|
}
|
|
9208
9283
|
}));
|
|
9209
9284
|
}
|
|
9210
|
-
var FormContainer$2 = /*#__PURE__*/styled.div(_templateObject$
|
|
9211
|
-
var StyledAntSelect$
|
|
9285
|
+
var FormContainer$2 = /*#__PURE__*/styled.div(_templateObject$1M || (_templateObject$1M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n width: 285px;\n"])));
|
|
9286
|
+
var StyledAntSelect$4 = /*#__PURE__*/styled(AntSelect)(_templateObject2$1l || (_templateObject2$1l = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9212
9287
|
|
|
9213
9288
|
var DatePickerIcon = function DatePickerIcon() {
|
|
9214
9289
|
return React.createElement("svg", {
|
|
@@ -9226,11 +9301,11 @@ var DatePickerIcon = function DatePickerIcon() {
|
|
|
9226
9301
|
}));
|
|
9227
9302
|
};
|
|
9228
9303
|
|
|
9229
|
-
var _templateObject$
|
|
9230
|
-
var ReferenceContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
9231
|
-
var InnerContainer = /*#__PURE__*/styled.div(_templateObject2$
|
|
9304
|
+
var _templateObject$1N, _templateObject2$1m, _templateObject3$J, _templateObject4$n, _templateObject8$7, _templateObject10$2, _templateObject11$2, _templateObject13$1, _templateObject14$2, _templateObject15$1, _templateObject16, _templateObject17, _templateObject19$2, _templateObject20$1;
|
|
9305
|
+
var ReferenceContainer = /*#__PURE__*/styled.div(_templateObject$1N || (_templateObject$1N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 52px;\n width: 740px;\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 margin-top: 15px;\n"])));
|
|
9306
|
+
var InnerContainer = /*#__PURE__*/styled.div(_templateObject2$1m || (_templateObject2$1m = /*#__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"])));
|
|
9232
9307
|
var MiniContainer = /*#__PURE__*/styled.div(_templateObject3$J || (_templateObject3$J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 3px;\n flex: 1;\n"])));
|
|
9233
|
-
var StyledText$1 = /*#__PURE__*/styled(TextArea)(_templateObject4$
|
|
9308
|
+
var StyledText$1 = /*#__PURE__*/styled(TextArea)(_templateObject4$n || (_templateObject4$n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 96px;\n padding: 8px 12px;\n align-items: flex-start;\n gap: 4px;\n align-self: stretch;\n border-radius: 22px;\n resize: none;\n"])));
|
|
9234
9309
|
var StyledDateContainer = /*#__PURE__*/styled.div(_templateObject8$7 || (_templateObject8$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n border-radius: 66px;\n border: 1px solid #e0e2e7;\n box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);\n input[type='text'] {\n border-radius: 20px;\n background: #fff;\n border: none;\n color: #6a7378;\n font-size: 14px;\n font-weight: 400;\n padding: 10px 0;\n padding-left: 33px;\n &:focus-visible {\n outline: none;\n }\n }\n svg {\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n }\n"])));
|
|
9235
9310
|
var TimeWrapper = /*#__PURE__*/styled.div(_templateObject10$2 || (_templateObject10$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 80px;\n flex-direction: column;\n align-items: flex-start;\n gap: 6px;\n"])));
|
|
9236
9311
|
var StyledTime = /*#__PURE__*/styled(Input$1)(_templateObject11$2 || (_templateObject11$2 = /*#__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"])));
|
|
@@ -9321,7 +9396,7 @@ function useFetchSingleReminderData() {
|
|
|
9321
9396
|
return res;
|
|
9322
9397
|
}
|
|
9323
9398
|
|
|
9324
|
-
var _templateObject$
|
|
9399
|
+
var _templateObject$1O, _templateObject2$1n, _templateObject3$K, _templateObject4$o;
|
|
9325
9400
|
function StatusIndicator(props) {
|
|
9326
9401
|
var statusColor = getStatusColor(props.status);
|
|
9327
9402
|
return React.createElement(Container$17, null, React.createElement(StatusCircleContainer, {
|
|
@@ -9332,14 +9407,14 @@ function StatusIndicator(props) {
|
|
|
9332
9407
|
status: props.status
|
|
9333
9408
|
}, props.text));
|
|
9334
9409
|
}
|
|
9335
|
-
var StatusCircleContainer = /*#__PURE__*/styled.span(_templateObject$
|
|
9410
|
+
var StatusCircleContainer = /*#__PURE__*/styled.span(_templateObject$1O || (_templateObject$1O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 20px;\n width: 20px;\n border: 1px solid\n ", ";\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) {
|
|
9336
9411
|
return props.status === 'SD' ? '#30fe43' : props.status === 'AD' ? '#E95252' : 'transparent';
|
|
9337
9412
|
});
|
|
9338
|
-
var StatusCircle = /*#__PURE__*/styled.span(_templateObject2$
|
|
9413
|
+
var StatusCircle = /*#__PURE__*/styled.span(_templateObject2$1n || (_templateObject2$1n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 10px;\n width: 10px;\n background: ", ";\n border-radius: 50%;\n display: inline-block;\n transition: 0.2s ease all;\n"])), function (props) {
|
|
9339
9414
|
return props.color;
|
|
9340
9415
|
});
|
|
9341
9416
|
var Container$17 = /*#__PURE__*/styled.div(_templateObject3$K || (_templateObject3$K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n height: 22px;\n"])));
|
|
9342
|
-
var Text$7 = /*#__PURE__*/styled.span(_templateObject4$
|
|
9417
|
+
var Text$7 = /*#__PURE__*/styled.span(_templateObject4$o || (_templateObject4$o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 13px;\n font-weight: normal;\n text-transform: capitalize;\n font-weight: 500;\n color: ", ";\n"])), function (props) {
|
|
9343
9418
|
return props.status === 'SD' ? '#57DB7A' : props.status === 'AD' ? '#E95252' : 'transparent';
|
|
9344
9419
|
});
|
|
9345
9420
|
|
|
@@ -9501,7 +9576,7 @@ function useFetchReminders() {
|
|
|
9501
9576
|
return perform;
|
|
9502
9577
|
}
|
|
9503
9578
|
|
|
9504
|
-
var _templateObject$
|
|
9579
|
+
var _templateObject$1P, _templateObject2$1o, _templateObject3$L, _templateObject4$p, _templateObject5$f, _templateObject6$9, _templateObject7$b;
|
|
9505
9580
|
var ViewReminderModal = function ViewReminderModal() {
|
|
9506
9581
|
var _reminderData$reminde, _reminderData$order_d, _reminderData$order_d2, _reminderData$reminde2, _reminderData$reminde3, _reminderData$reminde4, _reminderData$reminde5;
|
|
9507
9582
|
var _useCurrentAction = useCurrentAction(),
|
|
@@ -9657,20 +9732,20 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
9657
9732
|
onChange: onChangeDetails
|
|
9658
9733
|
}))))));
|
|
9659
9734
|
};
|
|
9660
|
-
var StyledWrapper = /*#__PURE__*/styled.div(_templateObject$
|
|
9661
|
-
var StyledLabel$1 = /*#__PURE__*/styled.label(_templateObject2$
|
|
9735
|
+
var StyledWrapper = /*#__PURE__*/styled.div(_templateObject$1P || (_templateObject$1P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 6px 10px;\n align-items: center;\n gap: 5px;\n border-radius: 30px;\n background: #fff;\n"])));
|
|
9736
|
+
var StyledLabel$1 = /*#__PURE__*/styled.label(_templateObject2$1o || (_templateObject2$1o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n"])));
|
|
9662
9737
|
var StyledSpan = /*#__PURE__*/styled.span(_templateObject3$L || (_templateObject3$L = /*#__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"])));
|
|
9663
|
-
var StyledCheckbox = /*#__PURE__*/styled.div(_templateObject4$
|
|
9664
|
-
var OuterDiv = /*#__PURE__*/styled.div(_templateObject5$
|
|
9665
|
-
var RoundCheckbox = /*#__PURE__*/styled.span(_templateObject6$
|
|
9666
|
-
var LabelText = /*#__PURE__*/styled.span(_templateObject7$
|
|
9738
|
+
var StyledCheckbox = /*#__PURE__*/styled.div(_templateObject4$p || (_templateObject4$p = /*#__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"])));
|
|
9739
|
+
var OuterDiv = /*#__PURE__*/styled.div(_templateObject5$f || (_templateObject5$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-left: 33%;\n"])));
|
|
9740
|
+
var RoundCheckbox = /*#__PURE__*/styled.span(_templateObject6$9 || (_templateObject6$9 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9741
|
+
var LabelText = /*#__PURE__*/styled.span(_templateObject7$b || (_templateObject7$b = /*#__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"])));
|
|
9667
9742
|
|
|
9668
|
-
var _templateObject$
|
|
9743
|
+
var _templateObject$1Q, _templateObject3$M, _templateObject5$g, _templateObject7$c, _templateObject8$8, _templateObject9$4;
|
|
9669
9744
|
// Shared styles and components
|
|
9670
|
-
var Wrapper$k = /*#__PURE__*/styled.div(_templateObject$
|
|
9745
|
+
var Wrapper$k = /*#__PURE__*/styled.div(_templateObject$1Q || (_templateObject$1Q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n"])));
|
|
9671
9746
|
var SplitContainer = /*#__PURE__*/styled.div(_templateObject3$M || (_templateObject3$M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* width: 95%; */\n min-width: 25vw;\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
9672
|
-
var Label$f = /*#__PURE__*/styled.label(_templateObject5$
|
|
9673
|
-
var ContentContainer$6 = /*#__PURE__*/styled.div(_templateObject7$
|
|
9747
|
+
var Label$f = /*#__PURE__*/styled.label(_templateObject5$g || (_templateObject5$g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-weight: 500;\n"])));
|
|
9748
|
+
var ContentContainer$6 = /*#__PURE__*/styled.div(_templateObject7$c || (_templateObject7$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 12px 12px;\n margin: 5px 14px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n background: #f8fafc;\n border-radius: 15px;\n"])));
|
|
9674
9749
|
var Row$6 = /*#__PURE__*/styled.div(_templateObject8$8 || (_templateObject8$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
9675
9750
|
var DoubleDropdownContainer = /*#__PURE__*/styled.div(_templateObject9$4 || (_templateObject9$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 10px;\n width: 100%;\n"])));
|
|
9676
9751
|
var FormRow = function FormRow(_ref) {
|
|
@@ -9686,7 +9761,7 @@ var FormRow = function FormRow(_ref) {
|
|
|
9686
9761
|
}, " * ")), children);
|
|
9687
9762
|
};
|
|
9688
9763
|
|
|
9689
|
-
var _templateObject$
|
|
9764
|
+
var _templateObject$1R, _templateObject2$1p, _templateObject3$N, _templateObject4$q, _templateObject5$h;
|
|
9690
9765
|
dayjs.extend(utc);
|
|
9691
9766
|
dayjs.extend(isValid);
|
|
9692
9767
|
function CreateReminderModal() {
|
|
@@ -9710,6 +9785,8 @@ function CreateReminderModal() {
|
|
|
9710
9785
|
var _useState4 = useState(),
|
|
9711
9786
|
displayDate = _useState4[0],
|
|
9712
9787
|
setDisplayDate = _useState4[1];
|
|
9788
|
+
var _useOrderId = useOrderId(),
|
|
9789
|
+
orderId = _useOrderId[0];
|
|
9713
9790
|
var handleSelectChange = function handleSelectChange() {
|
|
9714
9791
|
return console.log('testing log');
|
|
9715
9792
|
};
|
|
@@ -9767,7 +9844,8 @@ function CreateReminderModal() {
|
|
|
9767
9844
|
var desc = event.target.value;
|
|
9768
9845
|
setPayload(function (prevState) {
|
|
9769
9846
|
return _extends({}, prevState, {
|
|
9770
|
-
details: desc
|
|
9847
|
+
details: desc,
|
|
9848
|
+
order_id: +orderId
|
|
9771
9849
|
});
|
|
9772
9850
|
});
|
|
9773
9851
|
};
|
|
@@ -9803,14 +9881,14 @@ function CreateReminderModal() {
|
|
|
9803
9881
|
};
|
|
9804
9882
|
return React.createElement(Wrapper$k, null, React.createElement(SplitContainer, null, React.createElement(FormRow, {
|
|
9805
9883
|
label: "Assigned To"
|
|
9806
|
-
}, React.createElement(DoubleDropdownContainer, null, React.createElement(StyledAntSelect$
|
|
9884
|
+
}, React.createElement(DoubleDropdownContainer, null, React.createElement(StyledAntSelect$5, {
|
|
9807
9885
|
options: [],
|
|
9808
9886
|
placeholder: "IND",
|
|
9809
9887
|
onChange: handleSelectChange,
|
|
9810
9888
|
style: {
|
|
9811
9889
|
width: '8vw'
|
|
9812
9890
|
}
|
|
9813
|
-
}), React.createElement(StyledAntSelect$
|
|
9891
|
+
}), React.createElement(StyledAntSelect$5, {
|
|
9814
9892
|
options: departmentOptions,
|
|
9815
9893
|
placeholder: "Select Department",
|
|
9816
9894
|
onChange: handleDepartmentChange,
|
|
@@ -9818,7 +9896,7 @@ function CreateReminderModal() {
|
|
|
9818
9896
|
width: '18vw'
|
|
9819
9897
|
},
|
|
9820
9898
|
value: createReminder.department_id
|
|
9821
|
-
})), React.createElement(StyledAntSelect$
|
|
9899
|
+
})), React.createElement(StyledAntSelect$5, {
|
|
9822
9900
|
options: [],
|
|
9823
9901
|
placeholder: "Select User",
|
|
9824
9902
|
onChange: handleSelectChange,
|
|
@@ -9827,7 +9905,7 @@ function CreateReminderModal() {
|
|
|
9827
9905
|
}
|
|
9828
9906
|
}), React.createElement(StyledLink, null, "Assign to me")), (createReminder.department_id === 1 || createReminder.department_id === 2) && React.createElement(React.Fragment, null, React.createElement(FormRow, {
|
|
9829
9907
|
label: "Category"
|
|
9830
|
-
}, React.createElement(StyledAntSelect$
|
|
9908
|
+
}, React.createElement(StyledAntSelect$5, {
|
|
9831
9909
|
style: {
|
|
9832
9910
|
minWidth: '20vw'
|
|
9833
9911
|
},
|
|
@@ -9837,7 +9915,7 @@ function CreateReminderModal() {
|
|
|
9837
9915
|
value: createReminder.task_categories_id
|
|
9838
9916
|
})), React.createElement(FormRow, {
|
|
9839
9917
|
label: "Type"
|
|
9840
|
-
}, React.createElement(StyledAntSelect$
|
|
9918
|
+
}, React.createElement(StyledAntSelect$5, {
|
|
9841
9919
|
options: subCategoryOptions,
|
|
9842
9920
|
placeholder: "Select Type",
|
|
9843
9921
|
onChange: handleTypeChange,
|
|
@@ -9909,11 +9987,11 @@ function CreateReminderModal() {
|
|
|
9909
9987
|
onChange: handleChange
|
|
9910
9988
|
})));
|
|
9911
9989
|
}
|
|
9912
|
-
var StyleContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
9913
|
-
var Label$g = /*#__PURE__*/styled.label(_templateObject2$
|
|
9914
|
-
var StyledAntSelect$
|
|
9915
|
-
var StyledTextArea$2 = /*#__PURE__*/styled(TextArea)(_templateObject4$
|
|
9916
|
-
var StyledLink = /*#__PURE__*/styled.div(_templateObject5$
|
|
9990
|
+
var StyleContainer = /*#__PURE__*/styled.div(_templateObject$1R || (_templateObject$1R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n background: var(--Flowkit-White, #fff);\n"])));
|
|
9991
|
+
var Label$g = /*#__PURE__*/styled.label(_templateObject2$1p || (_templateObject2$1p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-weight: 500;\n"])));
|
|
9992
|
+
var StyledAntSelect$5 = /*#__PURE__*/styled(Select)(_templateObject3$N || (_templateObject3$N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n width: 20vw;\n border-radius: 22px;\n }\n"])));
|
|
9993
|
+
var StyledTextArea$2 = /*#__PURE__*/styled(TextArea)(_templateObject4$q || (_templateObject4$q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 12px;\n align-items: flex-start;\n gap: 4px;\n align-self: stretch;\n border-radius: 10px;\n border: 1px solid var(--Neutral-Gray-Gray-100, #e0e2e7);\n background: var(--Flowkit-White, #fff);\n resize: none;\n height: 100px;\n"])));
|
|
9994
|
+
var StyledLink = /*#__PURE__*/styled.div(_templateObject5$h || (_templateObject5$h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--contextual-blue, #6396e5);\n font-family: Lato;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n cursor: pointer;\n"])));
|
|
9917
9995
|
|
|
9918
9996
|
function useCreateReminder() {
|
|
9919
9997
|
var ssoToken = getCookie('id_token');
|
|
@@ -10083,7 +10161,7 @@ function useFetchUnresolvedTasks() {
|
|
|
10083
10161
|
return perform;
|
|
10084
10162
|
}
|
|
10085
10163
|
|
|
10086
|
-
var _templateObject$
|
|
10164
|
+
var _templateObject$1S;
|
|
10087
10165
|
function TaskReminderModal() {
|
|
10088
10166
|
var createReminderAPI = useCreateReminder();
|
|
10089
10167
|
var _useCurrentAction = useCurrentAction(),
|
|
@@ -10182,9 +10260,9 @@ function TaskReminderModal() {
|
|
|
10182
10260
|
isSubmitDisabled: isSubmitDisabled()
|
|
10183
10261
|
}, React.createElement(ContentContainer$6, null, React.createElement(CreateReminderModal, null))));
|
|
10184
10262
|
}
|
|
10185
|
-
var OrderModal = /*#__PURE__*/styled(OrderActionModal)(_templateObject$
|
|
10263
|
+
var OrderModal = /*#__PURE__*/styled(OrderActionModal)(_templateObject$1S || (_templateObject$1S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 70%;\n"])));
|
|
10186
10264
|
|
|
10187
|
-
var _templateObject$
|
|
10265
|
+
var _templateObject$1T, _templateObject2$1q;
|
|
10188
10266
|
function OrderLock() {
|
|
10189
10267
|
var _useCurrentAction = useCurrentAction(),
|
|
10190
10268
|
setCurrentAction = _useCurrentAction[1];
|
|
@@ -10237,8 +10315,8 @@ function OrderLock() {
|
|
|
10237
10315
|
})
|
|
10238
10316
|
});
|
|
10239
10317
|
}
|
|
10240
|
-
var CustomCancelationModal = /*#__PURE__*/styled(CancelationModal)(_templateObject$
|
|
10241
|
-
var CustomCancelAndCompleteAction$1 = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject2$
|
|
10318
|
+
var CustomCancelationModal = /*#__PURE__*/styled(CancelationModal)(_templateObject$1T || (_templateObject$1T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background: rgba(0, 0, 0, 0.8);\n"])));
|
|
10319
|
+
var CustomCancelAndCompleteAction$1 = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject2$1q || (_templateObject2$1q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n"])));
|
|
10242
10320
|
|
|
10243
10321
|
function useUpdateFlag() {
|
|
10244
10322
|
var ssoToken = getCookie('id_token');
|
|
@@ -10308,7 +10386,7 @@ function useUpdateFlag() {
|
|
|
10308
10386
|
return create;
|
|
10309
10387
|
}
|
|
10310
10388
|
|
|
10311
|
-
var _templateObject$
|
|
10389
|
+
var _templateObject$1U, _templateObject2$1r, _templateObject3$O, _templateObject4$r, _templateObject5$i, _templateObject6$a;
|
|
10312
10390
|
function HeaderSection() {
|
|
10313
10391
|
var _useSingleFlagData = useSingleFlagData(),
|
|
10314
10392
|
dataArray = _useSingleFlagData[0];
|
|
@@ -10378,14 +10456,14 @@ function HeaderSection() {
|
|
|
10378
10456
|
})
|
|
10379
10457
|
})));
|
|
10380
10458
|
}
|
|
10381
|
-
var Header$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
10382
|
-
var CustomCancelAndCompleteAction$2 = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject2$
|
|
10459
|
+
var Header$1 = /*#__PURE__*/styled.div(_templateObject$1U || (_templateObject$1U = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n"])));
|
|
10460
|
+
var CustomCancelAndCompleteAction$2 = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject2$1r || (_templateObject2$1r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n"])));
|
|
10383
10461
|
var ResolveButton = /*#__PURE__*/styled.button(_templateObject3$O || (_templateObject3$O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-size: 14px;\n font-weight: 600;\n background: transparent;\n border: none;\n cursor: pointer;\n"])));
|
|
10384
|
-
var Title$7 = /*#__PURE__*/styled.span(_templateObject4$
|
|
10385
|
-
var StyledOverlay = /*#__PURE__*/styled.div(_templateObject5$
|
|
10386
|
-
var CrossWrapper = /*#__PURE__*/styled.div(_templateObject6$
|
|
10462
|
+
var Title$7 = /*#__PURE__*/styled.span(_templateObject4$r || (_templateObject4$r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: 'Roboto', sans-serif;\n font-size: 20px;\n font-weight: 900;\n line-height: 32px;\n text-transform: uppercase;\n color: #3a3630;\n"])));
|
|
10463
|
+
var StyledOverlay = /*#__PURE__*/styled.div(_templateObject5$i || (_templateObject5$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.4);\n backdrop-filter: blur(2px);\n z-index: 1000;\n"])));
|
|
10464
|
+
var CrossWrapper = /*#__PURE__*/styled.div(_templateObject6$a || (_templateObject6$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n"])));
|
|
10387
10465
|
|
|
10388
|
-
var _templateObject$
|
|
10466
|
+
var _templateObject$1V, _templateObject2$1s;
|
|
10389
10467
|
function TextSection() {
|
|
10390
10468
|
var _useSinglePayload = useSinglePayload(),
|
|
10391
10469
|
payload = _useSinglePayload[0],
|
|
@@ -10395,7 +10473,7 @@ function TextSection() {
|
|
|
10395
10473
|
description: event.target.value
|
|
10396
10474
|
}));
|
|
10397
10475
|
};
|
|
10398
|
-
return React.createElement(Text$8, null, React.createElement(Label$
|
|
10476
|
+
return React.createElement(Text$8, null, React.createElement(Label$i, {
|
|
10399
10477
|
label: "Details"
|
|
10400
10478
|
}), React.createElement(TextField, {
|
|
10401
10479
|
placeholder: "Type here....",
|
|
@@ -10403,10 +10481,10 @@ function TextSection() {
|
|
|
10403
10481
|
onChange: onChangeDetails
|
|
10404
10482
|
}));
|
|
10405
10483
|
}
|
|
10406
|
-
var TextField = /*#__PURE__*/styled(TextArea)(_templateObject$
|
|
10407
|
-
var Text$8 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10484
|
+
var TextField = /*#__PURE__*/styled(TextArea)(_templateObject$1V || (_templateObject$1V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 97% !important;\n"])));
|
|
10485
|
+
var Text$8 = /*#__PURE__*/styled.div(_templateObject2$1s || (_templateObject2$1s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: grid;\n margin-top: 2%;\n"])));
|
|
10408
10486
|
|
|
10409
|
-
var _templateObject$
|
|
10487
|
+
var _templateObject$1W, _templateObject2$1t;
|
|
10410
10488
|
function ButtonsSection() {
|
|
10411
10489
|
var _useSinglePayload = useSinglePayload(),
|
|
10412
10490
|
payload = _useSinglePayload[0],
|
|
@@ -10437,7 +10515,7 @@ function ButtonsSection() {
|
|
|
10437
10515
|
}));
|
|
10438
10516
|
};
|
|
10439
10517
|
var isStatusShow = dataArray == null ? void 0 : dataArray.task_status_id;
|
|
10440
|
-
return React.createElement(Buttons, null, React.createElement(Flex, null, React.createElement(Label$
|
|
10518
|
+
return React.createElement(Buttons, null, React.createElement(Flex, null, React.createElement(Label$i, {
|
|
10441
10519
|
label: "Type"
|
|
10442
10520
|
}), React.createElement(SelectDropdown, {
|
|
10443
10521
|
styles: _extends({}, dropdownStyles, filterDropdownStyles, {
|
|
@@ -10461,7 +10539,7 @@ function ButtonsSection() {
|
|
|
10461
10539
|
return f.value === payload.task_type_id;
|
|
10462
10540
|
}),
|
|
10463
10541
|
onChange: onFlagtypeChange
|
|
10464
|
-
})), React.createElement(Flex, null, React.createElement(Label$
|
|
10542
|
+
})), React.createElement(Flex, null, React.createElement(Label$i, {
|
|
10465
10543
|
label: "Priority"
|
|
10466
10544
|
}), React.createElement(SelectDropdown, {
|
|
10467
10545
|
styles: _extends({}, dropdownStyles, filterDropdownStyles, {
|
|
@@ -10485,22 +10563,22 @@ function ButtonsSection() {
|
|
|
10485
10563
|
return f.value === payload.task_priority_id;
|
|
10486
10564
|
}),
|
|
10487
10565
|
onChange: onPriorityChange
|
|
10488
|
-
})), React.createElement(React.Fragment, null, isStatusShow === 1 ? React.createElement(Flex, null, React.createElement(Label$
|
|
10566
|
+
})), React.createElement(React.Fragment, null, isStatusShow === 1 ? React.createElement(Flex, null, React.createElement(Label$i, {
|
|
10489
10567
|
label: "Status"
|
|
10490
10568
|
}), React.createElement(StatusIndicator, {
|
|
10491
10569
|
text: "Unresolved",
|
|
10492
10570
|
status: "AD"
|
|
10493
|
-
})) : React.createElement(Flex, null, React.createElement(Label$
|
|
10571
|
+
})) : React.createElement(Flex, null, React.createElement(Label$i, {
|
|
10494
10572
|
label: "Status"
|
|
10495
10573
|
}), React.createElement(StatusIndicator, {
|
|
10496
10574
|
text: "Resolved on " + formatDate$1(dataArray == null ? void 0 : dataArray.resolved_at) + " by " + (dataArray == null ? void 0 : dataArray.resolved_by),
|
|
10497
10575
|
status: "SD"
|
|
10498
10576
|
}))));
|
|
10499
10577
|
}
|
|
10500
|
-
var Buttons = /*#__PURE__*/styled.div(_templateObject$
|
|
10501
|
-
var Flex = /*#__PURE__*/styled.div(_templateObject2$
|
|
10578
|
+
var Buttons = /*#__PURE__*/styled.div(_templateObject$1W || (_templateObject$1W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 25px;\n"])));
|
|
10579
|
+
var Flex = /*#__PURE__*/styled.div(_templateObject2$1t || (_templateObject2$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
|
|
10502
10580
|
|
|
10503
|
-
var _templateObject$
|
|
10581
|
+
var _templateObject$1X, _templateObject2$1u, _templateObject3$P, _templateObject4$s, _templateObject5$j, _templateObject6$b;
|
|
10504
10582
|
function ActionSection() {
|
|
10505
10583
|
var _useCurrentAction = useCurrentAction(),
|
|
10506
10584
|
setCurrentAction = _useCurrentAction[1];
|
|
@@ -10586,14 +10664,14 @@ function RadioButtonsSection() {
|
|
|
10586
10664
|
required: false
|
|
10587
10665
|
}));
|
|
10588
10666
|
}
|
|
10589
|
-
var ButtonWrapper = /*#__PURE__*/styled.div(_templateObject$
|
|
10590
|
-
var SaveButton = /*#__PURE__*/styled(Button)(_templateObject2$
|
|
10667
|
+
var ButtonWrapper = /*#__PURE__*/styled.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n"])));
|
|
10668
|
+
var SaveButton = /*#__PURE__*/styled(Button)(_templateObject2$1u || (_templateObject2$1u = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10591
10669
|
var CancelButton = /*#__PURE__*/styled(Button)(_templateObject3$P || (_templateObject3$P = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10592
|
-
var DropDowns = /*#__PURE__*/styled.div(_templateObject4$
|
|
10593
|
-
var TooltipContent = /*#__PURE__*/styled.div(_templateObject5$
|
|
10594
|
-
var Wrapper$l = /*#__PURE__*/styled.div(_templateObject6$
|
|
10670
|
+
var DropDowns = /*#__PURE__*/styled.div(_templateObject4$s || (_templateObject4$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 25px;\n"])));
|
|
10671
|
+
var TooltipContent = /*#__PURE__*/styled.div(_templateObject5$j || (_templateObject5$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: #333;\n color: #fff;\n padding: 5px 10px;\n border-radius: 5px;\n"])));
|
|
10672
|
+
var Wrapper$l = /*#__PURE__*/styled.div(_templateObject6$b || (_templateObject6$b = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10595
10673
|
|
|
10596
|
-
var _templateObject$
|
|
10674
|
+
var _templateObject$1Y, _templateObject2$1v, _templateObject3$Q, _templateObject4$t, _templateObject5$k;
|
|
10597
10675
|
function DetailSection() {
|
|
10598
10676
|
var _dataArray$order_data, _dataArray$order_data2;
|
|
10599
10677
|
var _useSingleFlagData = useSingleFlagData(),
|
|
@@ -10605,11 +10683,11 @@ function DetailSection() {
|
|
|
10605
10683
|
label: "Order"
|
|
10606
10684
|
}), React.createElement(Order, null, orderColumnData)));
|
|
10607
10685
|
}
|
|
10608
|
-
var Detail = /*#__PURE__*/styled.div(_templateObject$
|
|
10609
|
-
var Flex$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10686
|
+
var Detail = /*#__PURE__*/styled.div(_templateObject$1Y || (_templateObject$1Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 40%;\n flex-wrap: wrap;\n"])));
|
|
10687
|
+
var Flex$1 = /*#__PURE__*/styled.div(_templateObject2$1v || (_templateObject2$1v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
|
|
10610
10688
|
var Ref = /*#__PURE__*/styled.div(_templateObject3$Q || (_templateObject3$Q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #7b7874;\n font-family: 'Lato', sans-serif;\n"])));
|
|
10611
|
-
var Order = /*#__PURE__*/styled.div(_templateObject4$
|
|
10612
|
-
var StyledLabel$2 = /*#__PURE__*/styled(Label$
|
|
10689
|
+
var Order = /*#__PURE__*/styled.div(_templateObject4$t || (_templateObject4$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #7b7874;\n text-decoration: underline;\n font-family: 'Lato', sans-serif;\n"])));
|
|
10690
|
+
var StyledLabel$2 = /*#__PURE__*/styled(Label$i)(_templateObject5$k || (_templateObject5$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 10px;\n font-weight: bold;\n"])));
|
|
10613
10691
|
|
|
10614
10692
|
function useFetchSingleFlagsData() {
|
|
10615
10693
|
var _useFlagRefId = useFlagRefId(),
|
|
@@ -10691,7 +10769,7 @@ function useFetchSingleFlagsData() {
|
|
|
10691
10769
|
return res;
|
|
10692
10770
|
}
|
|
10693
10771
|
|
|
10694
|
-
var _templateObject$
|
|
10772
|
+
var _templateObject$1Z, _templateObject2$1w, _templateObject3$R;
|
|
10695
10773
|
function ViewFlag() {
|
|
10696
10774
|
var _useSingleFlagData = useSingleFlagData(),
|
|
10697
10775
|
dataArray = _useSingleFlagData[0],
|
|
@@ -10788,11 +10866,11 @@ function ViewFlag() {
|
|
|
10788
10866
|
}, [dataArray]);
|
|
10789
10867
|
return React.createElement(React.Fragment, null, React.createElement(BackgroundModals, null, dataArray && loading && React.createElement(Loader, null), React.createElement(MainContainer$a, null, React.createElement(HeaderSection, null), React.createElement(DetailSection, null), React.createElement(TextSection, null), React.createElement(ButtonsSection, null), React.createElement(SectionsContainer, null, React.createElement(ActionSection, null), React.createElement(RadioButtonsSection, null)))));
|
|
10790
10868
|
}
|
|
10791
|
-
var SectionsContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
10792
|
-
var BackgroundModals = /*#__PURE__*/styled(BackgroundModal$1)(_templateObject2$
|
|
10869
|
+
var SectionsContainer = /*#__PURE__*/styled.div(_templateObject$1Z || (_templateObject$1Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-top: 6%;\n"])));
|
|
10870
|
+
var BackgroundModals = /*#__PURE__*/styled(BackgroundModal$1)(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(1px);\n"])));
|
|
10793
10871
|
var MainContainer$a = /*#__PURE__*/styled.div(_templateObject3$R || (_templateObject3$R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 24px;\n border-radius: 12px;\n background: #ffffff;\n box-shadow: 0px 20px 24px -4px #10182814;\n width: 80%;\n max-width: 50%;\n margin: 0 auto;\n @media (max-width: 1024px) {\n max-width: 80%;\n }\n"])));
|
|
10794
10872
|
|
|
10795
|
-
var _templateObject$
|
|
10873
|
+
var _templateObject$1_;
|
|
10796
10874
|
function ReleaseOrder() {
|
|
10797
10875
|
var _useOrderId = useOrderId(),
|
|
10798
10876
|
orderId = _useOrderId[0];
|
|
@@ -10871,9 +10949,132 @@ function ReleaseOrder() {
|
|
|
10871
10949
|
// position: absolute;
|
|
10872
10950
|
// transform: translate3d(57px, 308px, 0px) scaleX(1);
|
|
10873
10951
|
// `;
|
|
10874
|
-
var CustomCancelAndCompleteAction$3 = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject$
|
|
10952
|
+
var CustomCancelAndCompleteAction$3 = /*#__PURE__*/styled(CancelAndCompleteAction)(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n"])));
|
|
10875
10953
|
|
|
10876
|
-
var _templateObject$
|
|
10954
|
+
var _templateObject$1$;
|
|
10955
|
+
function UncancelOrder() {
|
|
10956
|
+
var _orderStaticData$unca;
|
|
10957
|
+
var _useOrderId = useOrderId(),
|
|
10958
|
+
orderId = _useOrderId[0];
|
|
10959
|
+
var _useCurrentAction = useCurrentAction(),
|
|
10960
|
+
setCurrentAction = _useCurrentAction[1];
|
|
10961
|
+
var onClose = function onClose() {
|
|
10962
|
+
setCurrentAction(undefined);
|
|
10963
|
+
};
|
|
10964
|
+
var _useOrderStaticData = useOrderStaticData(),
|
|
10965
|
+
orderStaticData = _useOrderStaticData[0];
|
|
10966
|
+
var _useState = useState(undefined),
|
|
10967
|
+
unCancelReason = _useState[0],
|
|
10968
|
+
setUncancelReason = _useState[1];
|
|
10969
|
+
var _useState2 = useState(''),
|
|
10970
|
+
unCancelNotes = _useState2[0],
|
|
10971
|
+
setUncancelNotes = _useState2[1];
|
|
10972
|
+
var _useOrderDetails = useOrderDetails(),
|
|
10973
|
+
setOrderDetails = _useOrderDetails[1];
|
|
10974
|
+
var _usePrevOrderDetails = usePrevOrderDetails(),
|
|
10975
|
+
setPrevOrderDetails = _usePrevOrderDetails[1];
|
|
10976
|
+
var _useLoading = useLoading(),
|
|
10977
|
+
setLoading = _useLoading[1];
|
|
10978
|
+
var _useCustomerInfo = useCustomerInfo(),
|
|
10979
|
+
customerInfo = _useCustomerInfo[0];
|
|
10980
|
+
var infoText = (customerInfo == null ? void 0 : customerInfo.recipient_name) + ", " + (customerInfo == null ? void 0 : customerInfo.postcode);
|
|
10981
|
+
var unCancelReasonOptions = orderStaticData == null || (_orderStaticData$unca = orderStaticData.uncancel_reasons) == null ? void 0 : _orderStaticData$unca.map(function (item) {
|
|
10982
|
+
return {
|
|
10983
|
+
label: item == null ? void 0 : item.reason,
|
|
10984
|
+
value: item == null ? void 0 : item.reason
|
|
10985
|
+
};
|
|
10986
|
+
});
|
|
10987
|
+
var _useApiHook = useApiHook({
|
|
10988
|
+
endpoint: "orders/" + orderId + "/uncancel/?uncancelled_reason=" + unCancelReason + "&uncancelled_notes=" + unCancelNotes,
|
|
10989
|
+
method: 'POST',
|
|
10990
|
+
performAction: false
|
|
10991
|
+
}),
|
|
10992
|
+
response = _useApiHook.data,
|
|
10993
|
+
setPerformAction = _useApiHook.setShouldPerformAction;
|
|
10994
|
+
var _useApiHook2 = useApiHook({
|
|
10995
|
+
endpoint: "orders/" + orderId,
|
|
10996
|
+
method: 'GET',
|
|
10997
|
+
performAction: false
|
|
10998
|
+
}),
|
|
10999
|
+
fetchedData = _useApiHook2.data,
|
|
11000
|
+
loading = _useApiHook2.loading,
|
|
11001
|
+
setShouldPerformAction = _useApiHook2.setShouldPerformAction;
|
|
11002
|
+
useEffect(function () {
|
|
11003
|
+
var _fetchedData$data;
|
|
11004
|
+
setLoading(loading);
|
|
11005
|
+
if (fetchedData && fetchedData.data) {
|
|
11006
|
+
var requiredData = fetchedData == null ? void 0 : fetchedData.data;
|
|
11007
|
+
setOrderDetails(requiredData[0]);
|
|
11008
|
+
setPrevOrderDetails(requiredData[0]);
|
|
11009
|
+
setCurrentAction(undefined);
|
|
11010
|
+
}
|
|
11011
|
+
if (fetchedData && (fetchedData == null ? void 0 : fetchedData.data) === null || (fetchedData == null || (_fetchedData$data = fetchedData.data) == null ? void 0 : _fetchedData$data.length) === 0) {
|
|
11012
|
+
setCurrentAction(undefined);
|
|
11013
|
+
}
|
|
11014
|
+
}, [loading]);
|
|
11015
|
+
useEffect(function () {
|
|
11016
|
+
if (response) {
|
|
11017
|
+
//@ts-ignore
|
|
11018
|
+
if (response != null && response.data && (response == null ? void 0 : response.code) === 200) {
|
|
11019
|
+
setShouldPerformAction(true);
|
|
11020
|
+
notification.success({
|
|
11021
|
+
message: 'Success',
|
|
11022
|
+
description:
|
|
11023
|
+
//@ts-ignore
|
|
11024
|
+
(response == null ? void 0 : response.message) || 'Sucess'
|
|
11025
|
+
});
|
|
11026
|
+
} else {
|
|
11027
|
+
notification.error({
|
|
11028
|
+
message: 'Error',
|
|
11029
|
+
description:
|
|
11030
|
+
//@ts-ignore
|
|
11031
|
+
(response == null ? void 0 : response.error_traceback) || 'An error has occurred. Please try again later.'
|
|
11032
|
+
});
|
|
11033
|
+
setCurrentAction(undefined);
|
|
11034
|
+
}
|
|
11035
|
+
}
|
|
11036
|
+
}, [response]);
|
|
11037
|
+
var onChange = function onChange(event) {
|
|
11038
|
+
setUncancelNotes(event.target.value);
|
|
11039
|
+
};
|
|
11040
|
+
var onChangeUnCancelReason = function onChangeUnCancelReason(value) {
|
|
11041
|
+
setUncancelReason(value);
|
|
11042
|
+
};
|
|
11043
|
+
var onSubmit = function onSubmit() {
|
|
11044
|
+
if (orderId) {
|
|
11045
|
+
setPerformAction(true);
|
|
11046
|
+
}
|
|
11047
|
+
};
|
|
11048
|
+
var showSubmitBtn = unCancelReason !== undefined && (unCancelNotes == null ? void 0 : unCancelNotes.length) > 0;
|
|
11049
|
+
return React.createElement(OrderActionModal, {
|
|
11050
|
+
headerTitle: "Un-Cancel order",
|
|
11051
|
+
onCloseHeader: onClose,
|
|
11052
|
+
onSubmit: onSubmit,
|
|
11053
|
+
showAdditionalInfo: true,
|
|
11054
|
+
infoText: infoText,
|
|
11055
|
+
submitBtnTitle: "Save Details",
|
|
11056
|
+
isSubmitDisabled: !showSubmitBtn
|
|
11057
|
+
}, React.createElement(HoldContentContainer, null, React.createElement(SplitText, null, React.createElement(HoldRow, null, React.createElement(Label$e, null, "Un-cancel Reason"), React.createElement(AntSelect, {
|
|
11058
|
+
options: unCancelReasonOptions || [],
|
|
11059
|
+
placeholder: "Select un-cancel Reason",
|
|
11060
|
+
onChange: onChangeUnCancelReason,
|
|
11061
|
+
disabled: false,
|
|
11062
|
+
style: {
|
|
11063
|
+
width: '346px',
|
|
11064
|
+
height: 40
|
|
11065
|
+
},
|
|
11066
|
+
showSearch: true,
|
|
11067
|
+
popupClassName: 'dropDownStyle',
|
|
11068
|
+
selectWrapperClass: 'rounded',
|
|
11069
|
+
defaultValue: unCancelReason
|
|
11070
|
+
})), React.createElement(HoldRow, null, React.createElement(Label$e, null, "Un-cancel Note"), React.createElement(CustomTextArea$3, {
|
|
11071
|
+
rows: 5,
|
|
11072
|
+
onChange: onChange
|
|
11073
|
+
})))));
|
|
11074
|
+
}
|
|
11075
|
+
var CustomTextArea$3 = /*#__PURE__*/styled(TextArea)(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 346px;\n"])));
|
|
11076
|
+
|
|
11077
|
+
var _templateObject$20;
|
|
10877
11078
|
function OrderActions() {
|
|
10878
11079
|
var _useCurrentAction = useCurrentAction(),
|
|
10879
11080
|
currentAction = _useCurrentAction[0];
|
|
@@ -10891,8 +11092,8 @@ function OrderActions() {
|
|
|
10891
11092
|
return React.createElement(LogServiceRefusal, null);
|
|
10892
11093
|
case 'cancel-order':
|
|
10893
11094
|
return React.createElement(CancelOrder, null);
|
|
10894
|
-
|
|
10895
|
-
|
|
11095
|
+
case 'uncancel-order':
|
|
11096
|
+
return React.createElement(UncancelOrder, null);
|
|
10896
11097
|
case 'confirm-order':
|
|
10897
11098
|
return React.createElement(ConfirmOrder, null);
|
|
10898
11099
|
case 'send-sms':
|
|
@@ -10925,7 +11126,7 @@ function OrderActions() {
|
|
|
10925
11126
|
};
|
|
10926
11127
|
return React.createElement(Container$18, null, renderContent());
|
|
10927
11128
|
}
|
|
10928
|
-
var Container$18 = /*#__PURE__*/styled.div(_templateObject$
|
|
11129
|
+
var Container$18 = /*#__PURE__*/styled.div(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10929
11130
|
|
|
10930
11131
|
function useSystemLogs() {
|
|
10931
11132
|
var ssoToken = getCookie('id_token');
|
|
@@ -11017,7 +11218,7 @@ function useSystemLogs() {
|
|
|
11017
11218
|
return perform;
|
|
11018
11219
|
}
|
|
11019
11220
|
|
|
11020
|
-
var _templateObject$
|
|
11221
|
+
var _templateObject$21, _templateObject2$1x;
|
|
11021
11222
|
var Details = function Details() {
|
|
11022
11223
|
// const [orderDetails] = useOrderDetails();
|
|
11023
11224
|
var _useCustomerInfo = useCustomerInfo(),
|
|
@@ -11026,10 +11227,10 @@ var Details = function Details() {
|
|
|
11026
11227
|
var postcodeShow = (customerInfo == null ? void 0 : customerInfo.postcode) || '';
|
|
11027
11228
|
return React.createElement(DetailsContainer, null, React.createElement(Typo, null, "CUSTOMER RETURN - ", recipient, " , ", postcodeShow));
|
|
11028
11229
|
};
|
|
11029
|
-
var DetailsContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
11030
|
-
var Typo = /*#__PURE__*/styled.div(_templateObject2$
|
|
11230
|
+
var DetailsContainer = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n > svg {\n transform: scale(0.6);\n }\n"])));
|
|
11231
|
+
var Typo = /*#__PURE__*/styled.div(_templateObject2$1x || (_templateObject2$1x = /*#__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"])));
|
|
11031
11232
|
|
|
11032
|
-
var _templateObject$
|
|
11233
|
+
var _templateObject$22;
|
|
11033
11234
|
function Options() {
|
|
11034
11235
|
var _useCurrentAction = useCurrentAction(),
|
|
11035
11236
|
setCurrentAction = _useCurrentAction[1];
|
|
@@ -11095,7 +11296,7 @@ function Options() {
|
|
|
11095
11296
|
value: "OPTIONS"
|
|
11096
11297
|
}));
|
|
11097
11298
|
}
|
|
11098
|
-
var Option = /*#__PURE__*/styled.div(_templateObject$
|
|
11299
|
+
var Option = /*#__PURE__*/styled.div(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11099
11300
|
|
|
11100
11301
|
function BjsMenu() {
|
|
11101
11302
|
var _orderStatus$;
|
|
@@ -11152,7 +11353,7 @@ function BjsMenu() {
|
|
|
11152
11353
|
});
|
|
11153
11354
|
}
|
|
11154
11355
|
|
|
11155
|
-
var _templateObject$
|
|
11356
|
+
var _templateObject$23;
|
|
11156
11357
|
function Print() {
|
|
11157
11358
|
var _useOrderDetails = useOrderDetails(),
|
|
11158
11359
|
orderDetails = _useOrderDetails[0];
|
|
@@ -11237,29 +11438,376 @@ function Print() {
|
|
|
11237
11438
|
})
|
|
11238
11439
|
}));
|
|
11239
11440
|
}
|
|
11240
|
-
var Container$19 = /*#__PURE__*/styled.div(_templateObject$
|
|
11441
|
+
var Container$19 = /*#__PURE__*/styled.div(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11241
11442
|
|
|
11242
|
-
var _templateObject$
|
|
11443
|
+
var _templateObject$24;
|
|
11243
11444
|
// components
|
|
11244
11445
|
function DropDowns$1() {
|
|
11245
11446
|
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper$2, null, React.createElement(BjsMenu, null), React.createElement(Options, null), React.createElement(Print, null)));
|
|
11246
11447
|
}
|
|
11247
|
-
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject$
|
|
11448
|
+
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 5px;\n display: flex;\n align-self: center;\n gap: 10px;\n"])));
|
|
11248
11449
|
|
|
11249
|
-
var _templateObject$
|
|
11450
|
+
var _templateObject$25;
|
|
11250
11451
|
// import Actions from './actions/Actions';
|
|
11251
11452
|
var ActionsMenu = function ActionsMenu() {
|
|
11252
11453
|
return React.createElement(Flex$2, null, React.createElement(DropDowns$1, null));
|
|
11253
11454
|
};
|
|
11254
|
-
var Flex$2 = /*#__PURE__*/styled.div(_templateObject$
|
|
11455
|
+
var Flex$2 = /*#__PURE__*/styled.div(_templateObject$25 || (_templateObject$25 = /*#__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"])));
|
|
11255
11456
|
|
|
11256
|
-
var _templateObject$
|
|
11457
|
+
var _templateObject$26;
|
|
11257
11458
|
var DetailsFilters = function DetailsFilters() {
|
|
11258
11459
|
return React.createElement(Flex$3, null, React.createElement(Details, null), React.createElement(ActionsMenu, null));
|
|
11259
11460
|
};
|
|
11260
|
-
var Flex$3 = /*#__PURE__*/styled.div(_templateObject$
|
|
11461
|
+
var Flex$3 = /*#__PURE__*/styled.div(_templateObject$26 || (_templateObject$26 = /*#__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"])));
|
|
11261
11462
|
|
|
11262
|
-
var _templateObject$
|
|
11463
|
+
var _templateObject$27, _templateObject2$1y, _templateObject3$S;
|
|
11464
|
+
function FlagTemplate(_ref) {
|
|
11465
|
+
var _data$tasks_types;
|
|
11466
|
+
var data = _ref.data;
|
|
11467
|
+
var _useFlagRefId = useFlagRefId(),
|
|
11468
|
+
setSelectedFlag = _useFlagRefId[1];
|
|
11469
|
+
var _useCurrentAction = useCurrentAction(),
|
|
11470
|
+
setCurrentAction = _useCurrentAction[1];
|
|
11471
|
+
var openModal = function openModal() {
|
|
11472
|
+
setCurrentAction('view-flag');
|
|
11473
|
+
};
|
|
11474
|
+
var handleClick = function handleClick(Id) {
|
|
11475
|
+
setSelectedFlag(Id);
|
|
11476
|
+
openModal();
|
|
11477
|
+
};
|
|
11478
|
+
var titleColor = data.task_status_id === 2 ? '#36A053' : '#3a3630';
|
|
11479
|
+
return React.createElement(StyledAlert, null, React.createElement(FlagAlert, {
|
|
11480
|
+
type: (data == null ? void 0 : data.task_status_id) === 1 ? 'info' : 'success',
|
|
11481
|
+
title: React.createElement(React.Fragment, null, React.createElement(StyledTitle, {
|
|
11482
|
+
color: titleColor
|
|
11483
|
+
}, "Flag : ", data != null && data.is_private ? 'Private' : '', ' ', React.createElement(StyledLink$1, {
|
|
11484
|
+
onClick: function onClick() {
|
|
11485
|
+
return handleClick(data.id);
|
|
11486
|
+
}
|
|
11487
|
+
}, data == null ? void 0 : data.id, " - ", data == null || (_data$tasks_types = data.tasks_types) == null ? void 0 : _data$tasks_types.type, ' '), ' ', data.task_status_id === 1 ? 'Unresolved' : 'Resolved on', ' ', data.task_status_id == 2 ? React.createElement(React.Fragment, null, formatDate$1(data == null ? void 0 : data.resolved_at), " by ", data == null ? void 0 : data.resolved_by, ' ') : null)),
|
|
11488
|
+
subtitle: "",
|
|
11489
|
+
description: "" + data.details,
|
|
11490
|
+
showOkButton: false,
|
|
11491
|
+
onClose: function onClose() {}
|
|
11492
|
+
}));
|
|
11493
|
+
}
|
|
11494
|
+
var StyledAlert = /*#__PURE__*/styled.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 10px;\n"])));
|
|
11495
|
+
var StyledLink$1 = /*#__PURE__*/styled.span(_templateObject2$1y || (_templateObject2$1y = /*#__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"])));
|
|
11496
|
+
var StyledTitle = /*#__PURE__*/styled.span(_templateObject3$S || (_templateObject3$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n"])), function (_ref2) {
|
|
11497
|
+
var color = _ref2.color;
|
|
11498
|
+
return color;
|
|
11499
|
+
});
|
|
11500
|
+
|
|
11501
|
+
var _templateObject$28, _templateObject2$1z, _templateObject3$T;
|
|
11502
|
+
function ReminderTemplate(_ref) {
|
|
11503
|
+
var _data$reminder_status, _data$reminder_status2, _data$reminder_status3, _data$reminder_status4;
|
|
11504
|
+
var data = _ref.data,
|
|
11505
|
+
dismissReminder = _ref.dismissReminder;
|
|
11506
|
+
var _useCurrentAction = useCurrentAction(),
|
|
11507
|
+
setCurrentAction = _useCurrentAction[1];
|
|
11508
|
+
var _useReminderRefId = useReminderRefId(),
|
|
11509
|
+
setReminderRefId = _useReminderRefId[1];
|
|
11510
|
+
var openModal = function openModal() {
|
|
11511
|
+
setCurrentAction('view-reminder');
|
|
11512
|
+
};
|
|
11513
|
+
//getting particular reminder data
|
|
11514
|
+
var handleClick = function handleClick(Id) {
|
|
11515
|
+
setReminderRefId(Id);
|
|
11516
|
+
openModal();
|
|
11517
|
+
};
|
|
11518
|
+
var type = (data == null || (_data$reminder_status = data.reminder_status) == null ? void 0 : _data$reminder_status.name) === 'AD' ? 'info' : (data == null || (_data$reminder_status2 = data.reminder_status) == null ? void 0 : _data$reminder_status2.name) === 'pending' ? 'warn' : 'success';
|
|
11519
|
+
var titleColor = (data == null || (_data$reminder_status3 = data.reminder_status) == null ? void 0 : _data$reminder_status3.name) === 'SD' ? '#36A053' : (data == null || (_data$reminder_status4 = data.reminder_status) == null ? void 0 : _data$reminder_status4.name) === 'pending' ? '#FEBA30' : '#3A3630';
|
|
11520
|
+
return React.createElement("div", null, React.createElement(StyledAlert$1, null, React.createElement(FlagAlert, {
|
|
11521
|
+
type: type,
|
|
11522
|
+
title: React.createElement(React.Fragment, null, React.createElement(StyledTitle$1, {
|
|
11523
|
+
color: titleColor
|
|
11524
|
+
}, "Reminder:", React.createElement(StyledLink$2, {
|
|
11525
|
+
onClick: function onClick() {
|
|
11526
|
+
return handleClick(data.id);
|
|
11527
|
+
}
|
|
11528
|
+
}, ' ', (data == null ? void 0 : data.reference) || 'NA', ' '), formatDate$1(data == null ? void 0 : data.due), ", Assigned to :", ' ')),
|
|
11529
|
+
description: "" + (data == null ? void 0 : data.details),
|
|
11530
|
+
showOkButton: false,
|
|
11531
|
+
onClose: function onClose() {
|
|
11532
|
+
return dismissReminder(data.id);
|
|
11533
|
+
}
|
|
11534
|
+
})));
|
|
11535
|
+
}
|
|
11536
|
+
var StyledAlert$1 = /*#__PURE__*/styled.div(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 10px;\n"])));
|
|
11537
|
+
var StyledTitle$1 = /*#__PURE__*/styled.span(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n"])), function (_ref2) {
|
|
11538
|
+
var color = _ref2.color;
|
|
11539
|
+
return color;
|
|
11540
|
+
});
|
|
11541
|
+
var StyledLink$2 = /*#__PURE__*/styled.span(_templateObject3$T || (_templateObject3$T = /*#__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"])));
|
|
11542
|
+
|
|
11543
|
+
var _templateObject$29, _templateObject2$1A;
|
|
11544
|
+
function Tabs(_ref) {
|
|
11545
|
+
var activeNotifications = _ref.activeNotifications,
|
|
11546
|
+
closedNotifications = _ref.closedNotifications,
|
|
11547
|
+
activeReminders = _ref.activeReminders,
|
|
11548
|
+
closedReminders = _ref.closedReminders,
|
|
11549
|
+
dismissReminder = _ref.dismissReminder,
|
|
11550
|
+
dismissFlags = _ref.dismissFlags;
|
|
11551
|
+
var _useTabType = useTabType(),
|
|
11552
|
+
activeTab = _useTabType[0];
|
|
11553
|
+
var initialNotifications = activeNotifications.slice(0, 3);
|
|
11554
|
+
var additionalNotifications = activeNotifications.slice(3);
|
|
11555
|
+
var initialReminders = activeReminders.slice(0, 3);
|
|
11556
|
+
var additionalReminders = activeReminders.slice(3);
|
|
11557
|
+
return React.createElement(React.Fragment, null, React.createElement(Content, null, React.createElement(Container$1a, {
|
|
11558
|
+
className: "tab-content"
|
|
11559
|
+
}, activeTab === 'active' && React.createElement(React.Fragment, null, initialReminders.map(function (item, index) {
|
|
11560
|
+
return React.createElement(ReminderTemplate, {
|
|
11561
|
+
key: index,
|
|
11562
|
+
data: item,
|
|
11563
|
+
dismissReminder: dismissReminder
|
|
11564
|
+
});
|
|
11565
|
+
}), initialNotifications.map(function (item, index) {
|
|
11566
|
+
return React.createElement(FlagTemplate, {
|
|
11567
|
+
key: index,
|
|
11568
|
+
data: item,
|
|
11569
|
+
dismissFlags: dismissFlags
|
|
11570
|
+
});
|
|
11571
|
+
}), React.createElement(React.Fragment, null, additionalReminders.map(function (item, index) {
|
|
11572
|
+
return React.createElement(ReminderTemplate, {
|
|
11573
|
+
key: index + initialReminders.length,
|
|
11574
|
+
data: item,
|
|
11575
|
+
dismissReminder: dismissReminder
|
|
11576
|
+
});
|
|
11577
|
+
}), additionalNotifications.map(function (item, index) {
|
|
11578
|
+
return React.createElement(FlagTemplate, {
|
|
11579
|
+
key: index + initialNotifications.length,
|
|
11580
|
+
data: item,
|
|
11581
|
+
dismissFlags: dismissFlags
|
|
11582
|
+
});
|
|
11583
|
+
}))), activeTab === 'closed' && React.createElement(React.Fragment, null, closedReminders.map(function (item, index) {
|
|
11584
|
+
return React.createElement(ReminderTemplate, {
|
|
11585
|
+
key: index,
|
|
11586
|
+
data: item,
|
|
11587
|
+
dismissReminder: dismissReminder
|
|
11588
|
+
});
|
|
11589
|
+
}), closedNotifications.map(function (item, index) {
|
|
11590
|
+
return React.createElement(FlagTemplate, {
|
|
11591
|
+
key: index,
|
|
11592
|
+
data: item,
|
|
11593
|
+
dismissFlags: dismissFlags
|
|
11594
|
+
});
|
|
11595
|
+
})))));
|
|
11596
|
+
}
|
|
11597
|
+
var Container$1a = /*#__PURE__*/styled.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 10px;\n display: grid;\n"])));
|
|
11598
|
+
var Content = /*#__PURE__*/styled.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
|
|
11599
|
+
|
|
11600
|
+
var NotifyFlag = function NotifyFlag() {
|
|
11601
|
+
return React.createElement("svg", {
|
|
11602
|
+
width: "18",
|
|
11603
|
+
height: "20",
|
|
11604
|
+
viewBox: "0 0 18 20",
|
|
11605
|
+
fill: "none",
|
|
11606
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11607
|
+
}, React.createElement("path", {
|
|
11608
|
+
d: "M9.767 13.12C9.10538 12.8759 8.50311 12.4942 8 12C7.06536 11.0839 5.80876 10.5707 4.5 10.5707C3.19124 10.5707 1.93464 11.0839 1 12M1 12V2.99999C1.93464 2.08386 3.19124 1.57071 4.5 1.57071C5.80876 1.57071 7.06536 2.08386 8 2.99999C8.93464 3.91613 10.1912 4.42928 11.5 4.42928C12.8088 4.42928 14.0654 3.91613 15 2.99999V11.5M1 12V19M11 17L13 19L17 15",
|
|
11609
|
+
stroke: "#FEBA30",
|
|
11610
|
+
strokeWidth: "2",
|
|
11611
|
+
strokeLinecap: "round",
|
|
11612
|
+
strokeLinejoin: "round"
|
|
11613
|
+
}));
|
|
11614
|
+
};
|
|
11615
|
+
|
|
11616
|
+
var _templateObject$2a, _templateObject2$1B, _templateObject3$U, _templateObject4$u, _templateObject5$l, _templateObject6$c, _templateObject7$d, _templateObject8$9, _templateObject9$5, _templateObject10$3, _templateObject11$3, _templateObject12$1;
|
|
11617
|
+
function Notification() {
|
|
11618
|
+
var _OrderData$order_rout;
|
|
11619
|
+
var _useTabType = useTabType(),
|
|
11620
|
+
activeTab = _useTabType[0],
|
|
11621
|
+
setActiveTab = _useTabType[1];
|
|
11622
|
+
var _useInfoType = useInfoType(),
|
|
11623
|
+
setShowMoreInfo = _useInfoType[1];
|
|
11624
|
+
var TaskData = useFetchUnresolvedTasks();
|
|
11625
|
+
var ReminderData = useFetchReminders();
|
|
11626
|
+
var _useOrderDetails = useOrderDetails(),
|
|
11627
|
+
OrderData = _useOrderDetails[0];
|
|
11628
|
+
var _useNotificationData = useNotificationData(),
|
|
11629
|
+
notificationData = _useNotificationData[0],
|
|
11630
|
+
setNotififcationData = _useNotificationData[1];
|
|
11631
|
+
var _useTaskLoading = useTaskLoading(),
|
|
11632
|
+
flagLoading = _useTaskLoading[0];
|
|
11633
|
+
var _useReminderNotiData = useReminderNotiData(),
|
|
11634
|
+
reminderData = _useReminderNotiData[0],
|
|
11635
|
+
setReminderData = _useReminderNotiData[1];
|
|
11636
|
+
var routeId = OrderData == null || (_OrderData$order_rout = OrderData.order_routes) == null ? void 0 : _OrderData$order_rout.route_id;
|
|
11637
|
+
var _useRouteDetails = useRouteDetails(),
|
|
11638
|
+
setRouteData = _useRouteDetails[1];
|
|
11639
|
+
var _useOrderNotify = useOrderNotify(),
|
|
11640
|
+
orderCount = _useOrderNotify[0];
|
|
11641
|
+
var _useState = useState([]),
|
|
11642
|
+
activeNotifications = _useState[0],
|
|
11643
|
+
setActiveNotifications = _useState[1];
|
|
11644
|
+
var _useState2 = useState([]),
|
|
11645
|
+
closedNotifications = _useState2[0],
|
|
11646
|
+
setCloseNotifications = _useState2[1];
|
|
11647
|
+
var _useState3 = useState([]),
|
|
11648
|
+
activeReminders = _useState3[0],
|
|
11649
|
+
setActiveReminders = _useState3[1];
|
|
11650
|
+
var _useState4 = useState([]),
|
|
11651
|
+
closedReminders = _useState4[0],
|
|
11652
|
+
setCloseReminders = _useState4[1];
|
|
11653
|
+
var handleTabChange = function handleTabChange(tab) {
|
|
11654
|
+
setActiveTab(tab);
|
|
11655
|
+
setShowMoreInfo(false);
|
|
11656
|
+
};
|
|
11657
|
+
//flags notification data
|
|
11658
|
+
var fetchTaskData = /*#__PURE__*/function () {
|
|
11659
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11660
|
+
var result;
|
|
11661
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11662
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11663
|
+
case 0:
|
|
11664
|
+
_context.next = 2;
|
|
11665
|
+
return TaskData();
|
|
11666
|
+
case 2:
|
|
11667
|
+
result = _context.sent;
|
|
11668
|
+
setNotififcationData(result);
|
|
11669
|
+
case 4:
|
|
11670
|
+
case "end":
|
|
11671
|
+
return _context.stop();
|
|
11672
|
+
}
|
|
11673
|
+
}, _callee);
|
|
11674
|
+
}));
|
|
11675
|
+
return function fetchTaskData() {
|
|
11676
|
+
return _ref.apply(this, arguments);
|
|
11677
|
+
};
|
|
11678
|
+
}();
|
|
11679
|
+
//reminder noitification
|
|
11680
|
+
var fetchReminderData = /*#__PURE__*/function () {
|
|
11681
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
11682
|
+
var result;
|
|
11683
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11684
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11685
|
+
case 0:
|
|
11686
|
+
_context2.next = 2;
|
|
11687
|
+
return ReminderData();
|
|
11688
|
+
case 2:
|
|
11689
|
+
result = _context2.sent;
|
|
11690
|
+
setReminderData(result);
|
|
11691
|
+
case 4:
|
|
11692
|
+
case "end":
|
|
11693
|
+
return _context2.stop();
|
|
11694
|
+
}
|
|
11695
|
+
}, _callee2);
|
|
11696
|
+
}));
|
|
11697
|
+
return function fetchReminderData() {
|
|
11698
|
+
return _ref2.apply(this, arguments);
|
|
11699
|
+
};
|
|
11700
|
+
}();
|
|
11701
|
+
//route API calling...
|
|
11702
|
+
var _useApiHook = useApiHook({
|
|
11703
|
+
endpoint: "route/" + routeId,
|
|
11704
|
+
method: 'GET',
|
|
11705
|
+
performAction: false
|
|
11706
|
+
}),
|
|
11707
|
+
fetchedData = _useApiHook.data,
|
|
11708
|
+
setShouldPerformAction = _useApiHook.setShouldPerformAction;
|
|
11709
|
+
useEffect(function () {
|
|
11710
|
+
if (OrderData.id) {
|
|
11711
|
+
fetchTaskData();
|
|
11712
|
+
fetchReminderData();
|
|
11713
|
+
}
|
|
11714
|
+
}, [OrderData.id]);
|
|
11715
|
+
useEffect(function () {
|
|
11716
|
+
if (routeId) {
|
|
11717
|
+
setShouldPerformAction(true);
|
|
11718
|
+
setRouteData(fetchedData == null ? void 0 : fetchedData.data[0]);
|
|
11719
|
+
}
|
|
11720
|
+
});
|
|
11721
|
+
useEffect(function () {
|
|
11722
|
+
if ((notificationData == null ? void 0 : notificationData.length) > 0) {
|
|
11723
|
+
setActiveNotifications(notificationData == null ? void 0 : notificationData.filter(function (item) {
|
|
11724
|
+
return item.task_status_id !== 2;
|
|
11725
|
+
}));
|
|
11726
|
+
setCloseNotifications(notificationData == null ? void 0 : notificationData.filter(function (item) {
|
|
11727
|
+
return (item == null ? void 0 : item.task_status_id) === 2;
|
|
11728
|
+
}));
|
|
11729
|
+
}
|
|
11730
|
+
}, [notificationData]);
|
|
11731
|
+
useEffect(function () {
|
|
11732
|
+
if ((reminderData == null ? void 0 : reminderData.length) > 0) {
|
|
11733
|
+
setActiveReminders(reminderData == null ? void 0 : reminderData.filter(function (item) {
|
|
11734
|
+
return item.status_id === 1 || item.status_id === 3;
|
|
11735
|
+
}));
|
|
11736
|
+
setCloseReminders(reminderData == null ? void 0 : reminderData.filter(function (item) {
|
|
11737
|
+
return (item == null ? void 0 : item.status_id) === 2;
|
|
11738
|
+
}));
|
|
11739
|
+
}
|
|
11740
|
+
}, [reminderData]);
|
|
11741
|
+
//dismiss notifcations
|
|
11742
|
+
var dismissFlags = function dismissFlags(id) {
|
|
11743
|
+
setActiveNotifications(function (prevFlags) {
|
|
11744
|
+
return prevFlags.filter(function (flags) {
|
|
11745
|
+
return flags.id !== id;
|
|
11746
|
+
});
|
|
11747
|
+
});
|
|
11748
|
+
setCloseNotifications(function (prevFlags) {
|
|
11749
|
+
return prevFlags.filter(function (flags) {
|
|
11750
|
+
return flags.id !== id;
|
|
11751
|
+
});
|
|
11752
|
+
});
|
|
11753
|
+
};
|
|
11754
|
+
var dismissReminder = function dismissReminder(id) {
|
|
11755
|
+
setActiveReminders(function (prevReminders) {
|
|
11756
|
+
return prevReminders.filter(function (reminder) {
|
|
11757
|
+
return reminder.id !== id;
|
|
11758
|
+
});
|
|
11759
|
+
});
|
|
11760
|
+
setCloseReminders(function (prevReminders) {
|
|
11761
|
+
return prevReminders.filter(function (reminder) {
|
|
11762
|
+
return reminder.id !== id;
|
|
11763
|
+
});
|
|
11764
|
+
});
|
|
11765
|
+
};
|
|
11766
|
+
var totalActiveCount = activeNotifications.length + activeReminders.length + orderCount;
|
|
11767
|
+
var totalClosedCount = closedNotifications.length + closedReminders.length;
|
|
11768
|
+
return React.createElement(React.Fragment, null, React.createElement(Section$1, null, React.createElement(Container$1b, {
|
|
11769
|
+
className: "notification-header"
|
|
11770
|
+
}, React.createElement(FlagContainer, null, React.createElement(NotifyFlag, null)), React.createElement(Label$h, {
|
|
11771
|
+
label: "NOTIFICATIONS"
|
|
11772
|
+
}), React.createElement(TabsData, {
|
|
11773
|
+
className: "tab-buttons"
|
|
11774
|
+
}, React.createElement(StyledTab, {
|
|
11775
|
+
active: activeTab === 'active',
|
|
11776
|
+
onClick: function onClick() {
|
|
11777
|
+
return handleTabChange('active');
|
|
11778
|
+
}
|
|
11779
|
+
}, "Active", React.createElement(ActiveCount, null, totalActiveCount)), React.createElement(StyledTab, {
|
|
11780
|
+
active: activeTab === 'closed',
|
|
11781
|
+
onClick: function onClick() {
|
|
11782
|
+
return handleTabChange('closed');
|
|
11783
|
+
}
|
|
11784
|
+
}, "Closed", React.createElement(ClosedCount, null, totalClosedCount)))), flagLoading ? React.createElement(Loader$1, null, React.createElement(Spinner$1, null), React.createElement(Text$9, null, "Fetching Notifications...")) : notificationData.length > 0 || reminderData.length > 0 || OrderData ? React.createElement(TabsWrapper, null, React.createElement(Tabs, {
|
|
11785
|
+
activeNotifications: activeNotifications,
|
|
11786
|
+
closedNotifications: closedNotifications,
|
|
11787
|
+
activeReminders: activeReminders,
|
|
11788
|
+
closedReminders: closedReminders,
|
|
11789
|
+
dismissReminder: dismissReminder,
|
|
11790
|
+
dismissFlags: dismissFlags
|
|
11791
|
+
})) : 'No Notifications Found'));
|
|
11792
|
+
}
|
|
11793
|
+
var Container$1b = /*#__PURE__*/styled.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 20px;\n padding: 10px;\n border-bottom: 1px solid #ccc;\n"])));
|
|
11794
|
+
var Loader$1 = /*#__PURE__*/styled.div(_templateObject2$1B || (_templateObject2$1B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
11795
|
+
var Spinner$1 = /*#__PURE__*/styled.div(_templateObject3$U || (_templateObject3$U = /*#__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"])));
|
|
11796
|
+
var FlagContainer = /*#__PURE__*/styled.div(_templateObject4$u || (_templateObject4$u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 8px;\n background-color: #3a3630;\n border-radius: 10px;\n"])));
|
|
11797
|
+
var TabsData = /*#__PURE__*/styled.div(_templateObject5$l || (_templateObject5$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 20px;\n padding: 10px;\n"])));
|
|
11798
|
+
var ActiveCount = /*#__PURE__*/styled.div(_templateObject6$c || (_templateObject6$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #ffffff;\n padding: 1px 5px;\n background-color: #6396e5;\n border-radius: 6px;\n"])));
|
|
11799
|
+
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"])));
|
|
11800
|
+
var StyledTab = /*#__PURE__*/styled.div(_templateObject8$9 || (_templateObject8$9 = /*#__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) {
|
|
11801
|
+
return props.active ? '#3a3630' : '#AEA9A1';
|
|
11802
|
+
}, function (props) {
|
|
11803
|
+
return props.active ? '2px solid #feba30' : '2px solid #eeeeee';
|
|
11804
|
+
});
|
|
11805
|
+
var Section$1 = /*#__PURE__*/styled.div(_templateObject9$5 || (_templateObject9$5 = /*#__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"])));
|
|
11806
|
+
var Label$h = /*#__PURE__*/styled(SectionHeader)(_templateObject10$3 || (_templateObject10$3 = /*#__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"])));
|
|
11807
|
+
var TabsWrapper = /*#__PURE__*/styled.div(_templateObject11$3 || (_templateObject11$3 = /*#__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"])));
|
|
11808
|
+
var Text$9 = /*#__PURE__*/styled.div(_templateObject12$1 || (_templateObject12$1 = /*#__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"])));
|
|
11809
|
+
|
|
11810
|
+
var _templateObject$2b, _templateObject2$1C, _templateObject3$V, _templateObject4$v;
|
|
11263
11811
|
function OrderView() {
|
|
11264
11812
|
notification.config({
|
|
11265
11813
|
top: 150
|
|
@@ -11360,12 +11908,6 @@ function OrderView() {
|
|
|
11360
11908
|
fetchedData = _useApiHook2.data,
|
|
11361
11909
|
loading = _useApiHook2.loading,
|
|
11362
11910
|
orderUpdate = _useApiHook2.setShouldPerformAction;
|
|
11363
|
-
useEffect(function () {
|
|
11364
|
-
if (orderId) {
|
|
11365
|
-
orderUpdate(true);
|
|
11366
|
-
liveRecalling ? setLivePerformAction(false) : setLivePerformAction(true);
|
|
11367
|
-
}
|
|
11368
|
-
}, [orderId, liveRecalling]);
|
|
11369
11911
|
var _useApiHook3 = useApiHook({
|
|
11370
11912
|
endpoint: "/orders/getStaticData/all/",
|
|
11371
11913
|
method: 'GET'
|
|
@@ -11392,6 +11934,12 @@ function OrderView() {
|
|
|
11392
11934
|
}),
|
|
11393
11935
|
fetchedDepotData = _useApiHook5.data,
|
|
11394
11936
|
depotDataLoading = _useApiHook5.loading;
|
|
11937
|
+
useEffect(function () {
|
|
11938
|
+
if (orderId) {
|
|
11939
|
+
orderUpdate(true);
|
|
11940
|
+
liveRecalling ? setLivePerformAction(false) : setLivePerformAction(true);
|
|
11941
|
+
}
|
|
11942
|
+
}, [orderId, liveRecalling]);
|
|
11395
11943
|
useEffect(function () {
|
|
11396
11944
|
setLoading(staticDataLoading);
|
|
11397
11945
|
if (fetchedStaticData && fetchedStaticData.data) {
|
|
@@ -11570,15 +12118,15 @@ function OrderView() {
|
|
|
11570
12118
|
};
|
|
11571
12119
|
}, [gsitId]);
|
|
11572
12120
|
console.log(orderId, 'orderId');
|
|
11573
|
-
return React.createElement(MainContainer$b, null, React.createElement(GeneralHeader, null), React.createElement(DetailsFilters, 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(SystemLogs, null))), React.createElement(OrderActions, null));
|
|
12121
|
+
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(SystemLogs, null))), React.createElement(OrderActions, null));
|
|
11574
12122
|
}
|
|
11575
|
-
var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$
|
|
11576
|
-
var SplitLayout$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
11577
|
-
var NotesContainer = /*#__PURE__*/styled.div(_templateObject3$
|
|
12123
|
+
var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-bottom: 30px;\n"])));
|
|
12124
|
+
var SplitLayout$1 = /*#__PURE__*/styled.div(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n @media (max-width: 1024px) {\n display: contents;\n }\n"])));
|
|
12125
|
+
var NotesContainer = /*#__PURE__*/styled.div(_templateObject3$V || (_templateObject3$V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n"])));
|
|
11578
12126
|
var TablesContainer = /*#__PURE__*/styled.div(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 15px;\n"])));
|
|
11579
12127
|
|
|
11580
|
-
var _templateObject2$
|
|
11581
|
-
var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$
|
|
12128
|
+
var _templateObject2$1D;
|
|
12129
|
+
var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$1D || (_templateObject2$1D = /*#__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"])));
|
|
11582
12130
|
|
|
11583
12131
|
var initialState$3 = {
|
|
11584
12132
|
'x-filters': [],
|
|
@@ -11644,7 +12192,7 @@ var overviewfiltersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
|
11644
12192
|
return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
|
|
11645
12193
|
});
|
|
11646
12194
|
|
|
11647
|
-
var _templateObject$
|
|
12195
|
+
var _templateObject$2c, _templateObject2$1E, _templateObject3$W;
|
|
11648
12196
|
var SearchType = function SearchType() {
|
|
11649
12197
|
var _useState = useState(''),
|
|
11650
12198
|
searchText = _useState[0],
|
|
@@ -11690,9 +12238,9 @@ var SearchType = function SearchType() {
|
|
|
11690
12238
|
onClick: handleClear
|
|
11691
12239
|
}, React.createElement(CrossIcon, null)));
|
|
11692
12240
|
};
|
|
11693
|
-
var Search = /*#__PURE__*/styled.div(_templateObject$
|
|
11694
|
-
var ClearButton = /*#__PURE__*/styled.button(_templateObject2$
|
|
11695
|
-
var SearchInput = /*#__PURE__*/styled.input(_templateObject3$
|
|
12241
|
+
var Search = /*#__PURE__*/styled.div(_templateObject$2c || (_templateObject$2c = /*#__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"])));
|
|
12242
|
+
var ClearButton = /*#__PURE__*/styled.button(_templateObject2$1E || (_templateObject2$1E = /*#__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"])));
|
|
12243
|
+
var SearchInput = /*#__PURE__*/styled.input(_templateObject3$W || (_templateObject3$W = /*#__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"])));
|
|
11696
12244
|
|
|
11697
12245
|
var BulkFilter = function BulkFilter() {
|
|
11698
12246
|
// const [printToogle, setPrintToggle] = useMenuDropDown();
|
|
@@ -11990,7 +12538,7 @@ var ReturnTable$1 = function ReturnTable() {
|
|
|
11990
12538
|
})))));
|
|
11991
12539
|
};
|
|
11992
12540
|
|
|
11993
|
-
var _templateObject$
|
|
12541
|
+
var _templateObject$2d, _templateObject2$1F, _templateObject3$X;
|
|
11994
12542
|
var _excluded$6 = ["count"];
|
|
11995
12543
|
function ReturnMainTable() {
|
|
11996
12544
|
var _useAtom = useAtom(overviewfiltersReducerAtom),
|
|
@@ -12063,7 +12611,7 @@ function ReturnMainTable() {
|
|
|
12063
12611
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
12064
12612
|
}, React.createElement("div", {
|
|
12065
12613
|
className: "Tableconatiner"
|
|
12066
|
-
}, React.createElement(HeaderFilter, null), React.createElement(Container$
|
|
12614
|
+
}, React.createElement(HeaderFilter, null), React.createElement(Container$1c, null, React.createElement(Row$7, 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, {
|
|
12067
12615
|
currentPage: page,
|
|
12068
12616
|
totalItems: total,
|
|
12069
12617
|
itemsPerPage: itemsPerPage,
|
|
@@ -12071,9 +12619,9 @@ function ReturnMainTable() {
|
|
|
12071
12619
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
12072
12620
|
}))));
|
|
12073
12621
|
}
|
|
12074
|
-
var Row$7 = /*#__PURE__*/styled.div(_templateObject$
|
|
12075
|
-
var Container$
|
|
12076
|
-
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$
|
|
12622
|
+
var Row$7 = /*#__PURE__*/styled.div(_templateObject$2d || (_templateObject$2d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
12623
|
+
var Container$1c = /*#__PURE__*/styled.div(_templateObject2$1F || (_templateObject2$1F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
12624
|
+
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$X || (_templateObject3$X = /*#__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"])));
|
|
12077
12625
|
|
|
12078
12626
|
var OrderViewQueryHandler = function OrderViewQueryHandler() {
|
|
12079
12627
|
var _useSearchParams = useSearchParams(),
|