@nerdjs/sales-kit 2.3.0 → 2.3.2
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/entities/ediAccount/ediAccount.d.ts +7 -0
- package/dist/entities/ediAccount/ediAccount.js +32 -0
- package/dist/entities/ediAccount/ediAccount.js.map +1 -0
- package/dist/entities/ediAccount/helper.d.ts +5 -0
- package/dist/entities/ediAccount/helper.js +16 -0
- package/dist/entities/ediAccount/helper.js.map +1 -0
- package/dist/entities/ediAccount/index.d.ts +2 -0
- package/dist/entities/ediAccount/index.js +3 -0
- package/dist/entities/ediAccount/index.js.map +1 -0
- package/dist/entities/ediLoadTender/ediLoadTender.d.ts +24 -0
- package/dist/entities/ediLoadTender/ediLoadTender.js +88 -0
- package/dist/entities/ediLoadTender/ediLoadTender.js.map +1 -0
- package/dist/entities/ediLoadTender/helper.d.ts +5 -0
- package/dist/entities/ediLoadTender/helper.js +16 -0
- package/dist/entities/ediLoadTender/helper.js.map +1 -0
- package/dist/entities/ediLoadTender/index.d.ts +2 -0
- package/dist/entities/ediLoadTender/index.js +3 -0
- package/dist/entities/ediLoadTender/index.js.map +1 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.js +2 -0
- package/dist/entities/index.js.map +1 -1
- package/dist/hooks/lep/lepAccessorials.js +10 -6
- package/dist/hooks/lep/lepAccessorials.js.map +1 -1
- package/dist/hooks/lep/lepAdjustments.js +50 -27
- package/dist/hooks/lep/lepAdjustments.js.map +1 -1
- package/dist/hooks/lep/lepCommodities.js +3 -0
- package/dist/hooks/lep/lepCommodities.js.map +1 -1
- package/dist/hooks/lep/lepConsolidations.js +2 -2
- package/dist/hooks/lep/lepConsolidations.js.map +1 -1
- package/dist/hooks/lep/lepDispatches.js +29 -7
- package/dist/hooks/lep/lepDispatches.js.map +1 -1
- package/dist/hooks/lep/lepUserNotes.js +53 -47
- package/dist/hooks/lep/lepUserNotes.js.map +1 -1
- package/dist/hooks/lep/loadEditPanel.js +8 -2
- package/dist/hooks/lep/loadEditPanel.js.map +1 -1
- package/dist/hooks/load/loadDrawer.d.ts +1 -0
- package/dist/hooks/load/loadDrawer.js +26 -6
- package/dist/hooks/load/loadDrawer.js.map +1 -1
- package/dist/hooks/locationsForm/locationsFormSales.js +98 -83
- package/dist/hooks/locationsForm/locationsFormSales.js.map +1 -1
- package/dist/hooks/quote/constants.js +11 -0
- package/dist/hooks/quote/constants.js.map +1 -1
- package/dist/hooks/quote/result.js +3 -3
- package/dist/hooks/quote/result.js.map +1 -1
- package/dist/locales/en/entities.json +1 -0
- package/dist/locales/index.d.ts +1 -0
- package/dist/redux/api/salesApi.d.ts +1 -1
- package/dist/redux/api/salesApi.js +2 -0
- package/dist/redux/api/salesApi.js.map +1 -1
- package/dist/redux/apiTender/apiTenderEndpoints.d.ts +10 -10
- package/dist/redux/appointmentArrival/appointmentArrivalEndpoints.d.ts +12 -12
- package/dist/redux/appointmentIssue/appointmentIssueEndpoints.d.ts +10 -10
- package/dist/redux/appointmentIssueCategory/appointmentIssueCategoryEndpoints.d.ts +11 -11
- package/dist/redux/appointmentIssueSubcategory/appointmentIssueSubcategoryEndpoints.d.ts +10 -10
- package/dist/redux/appointmentNote/appointmentNoteEndpoints.d.ts +10 -10
- package/dist/redux/appointmentNoteType/appointmentNoteTypeEndpoints.d.ts +10 -10
- package/dist/redux/appointmentTrip/appointmentTripEndpoints.d.ts +10 -10
- package/dist/redux/archerFile/archerFileEndpoints.d.ts +13 -13
- package/dist/redux/asset/assetEndpoints.d.ts +12 -12
- package/dist/redux/billingKickback/billingKickbackEndpoints.d.ts +11 -11
- package/dist/redux/billingKickbackResponse/billingKickbackResponseEndpoints.d.ts +10 -10
- package/dist/redux/billingKickbackResponseAccessorial/billingKickbackResponseAccessorialEndpoints.d.ts +10 -10
- package/dist/redux/billingMessage/billingMessageEndpoints.d.ts +9 -9
- package/dist/redux/billingNote/billingNoteEndpoints.d.ts +10 -10
- package/dist/redux/cargoConsolidation/cargoConsolidationEndpoints.d.ts +19 -19
- package/dist/redux/cargoConsolidationCommodityPiece/cargoConsolidationCommodityPieceEndpoints.d.ts +10 -10
- package/dist/redux/carrier/carrierEndpoints.d.ts +19 -19
- package/dist/redux/carrier/carrierEndpoints.js +8 -0
- package/dist/redux/carrier/carrierEndpoints.js.map +1 -1
- package/dist/redux/carrierInsurance/carrierInsuranceEndpoints.d.ts +10 -10
- package/dist/redux/carrierPayContract/carrierPayContractEndpoints.d.ts +11 -11
- package/dist/redux/carrierTender/carrierTenderEndpoints.d.ts +18 -18
- package/dist/redux/carrierTenderAccessorial/carrierTenderAccessorialEndpoints.d.ts +10 -10
- package/dist/redux/carrierTenderDeduction/carrierTenderDeductionEndpoints.d.ts +10 -10
- package/dist/redux/carrierTenderEdge/carrierTenderEdgeEndpoints.d.ts +9 -9
- package/dist/redux/claim/claimEndpoints.d.ts +16 -16
- package/dist/redux/claimStatus/claimStatusEndpoints.d.ts +9 -9
- package/dist/redux/commodity/commodityEndpoints.d.ts +10 -10
- package/dist/redux/commodityV1/commodityV1Endpoints.d.ts +11 -11
- package/dist/redux/companyLocation/companyLocationEndpoints.d.ts +10 -10
- package/dist/redux/contact/contactEndpoints.d.ts +10 -10
- package/dist/redux/contract/contractEndpoints.d.ts +10 -10
- package/dist/redux/contractsRecord/contractsRecordEndpoints.d.ts +12 -12
- package/dist/redux/customer/customerEndpoints.d.ts +18 -18
- package/dist/redux/customerContract/customerContractEndpoints.d.ts +10 -10
- package/dist/redux/customersAccessorial/customersAccessorialEndpoints.d.ts +9 -9
- package/dist/redux/deduction/deductionEndpoints.d.ts +9 -9
- package/dist/redux/departmentPhone/departmentPhoneEndpoints.d.ts +10 -10
- package/dist/redux/dispatch/dispatchEndpoints.d.ts +10 -10
- package/dist/redux/driver/driverEndpoints.d.ts +10 -10
- package/dist/redux/driverName/driverNameEndpoints.d.ts +9 -9
- package/dist/redux/driverV1/driverV1Endpoints.d.ts +9 -9
- package/dist/redux/ediAccount/ediAccountEndpoints.d.ts +31 -0
- package/dist/redux/ediAccount/ediAccountEndpoints.js +63 -0
- package/dist/redux/ediAccount/ediAccountEndpoints.js.map +1 -0
- package/dist/redux/ediAccount/index.d.ts +2 -0
- package/dist/redux/ediAccount/index.js +3 -0
- package/dist/redux/ediAccount/index.js.map +1 -0
- package/dist/redux/ediLoadTender/ediLoadTenderEndpoints.d.ts +31 -0
- package/dist/redux/ediLoadTender/ediLoadTenderEndpoints.js +63 -0
- package/dist/redux/ediLoadTender/ediLoadTenderEndpoints.js.map +1 -0
- package/dist/redux/ediLoadTender/index.d.ts +2 -0
- package/dist/redux/ediLoadTender/index.js +3 -0
- package/dist/redux/ediLoadTender/index.js.map +1 -0
- package/dist/redux/employeeName/employeeNameEndpoints.d.ts +9 -9
- package/dist/redux/flag/flagEndpoints.d.ts +9 -9
- package/dist/redux/generalLedgerAccount/generalLedgerAccountEndpoints.d.ts +10 -10
- package/dist/redux/genericTender/genericTenderEndpoints.d.ts +48 -14
- package/dist/redux/genericTender/genericTenderEndpoints.js +12 -22
- package/dist/redux/genericTender/genericTenderEndpoints.js.map +1 -1
- package/dist/redux/holiday/holidayEndpoints.d.ts +10 -10
- package/dist/redux/index.d.ts +2 -0
- package/dist/redux/index.js +2 -0
- package/dist/redux/index.js.map +1 -1
- package/dist/redux/invoice/invoiceEndpoints.d.ts +10 -10
- package/dist/redux/invoiceAdjustment/invoiceAdjustmentEndpoints.d.ts +10 -10
- package/dist/redux/invoiceV1/invoiceV1Endpoints.d.ts +11 -11
- package/dist/redux/load/loadEndpoints.d.ts +12 -12
- package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.d.ts +10 -10
- package/dist/redux/loadAdjustmentV1/loadAdjustmentV1Endpoints.d.ts +10 -10
- package/dist/redux/loadTender/loadTenderEndpoints.d.ts +12 -12
- package/dist/redux/loadTender/loadTenderEndpoints.js +2 -0
- package/dist/redux/loadTender/loadTenderEndpoints.js.map +1 -1
- package/dist/redux/loadTenderView/loadTenderViewEndpoints.d.ts +10 -10
- package/dist/redux/loadV1/loadV1Endpoints.d.ts +58 -58
- package/dist/redux/loadV1/loadV1Endpoints.js +1 -0
- package/dist/redux/loadV1/loadV1Endpoints.js.map +1 -1
- package/dist/redux/location/locationEndpoints.d.ts +15 -15
- package/dist/redux/locationV1/locationV1Endpoints.d.ts +19 -19
- package/dist/redux/manualCheckCall/manualCheckCallEndpoints.d.ts +10 -10
- package/dist/redux/mapUpdate/mapUpdateEndpoints.d.ts +3 -3
- package/dist/redux/nmfcClass/nmfcClassEndpoints.d.ts +9 -9
- package/dist/redux/nodeName/nodeNameEndpoints.d.ts +10 -10
- package/dist/redux/notification/notificationEndpoints.d.ts +13 -13
- package/dist/redux/otrDispatch/otrDispatchEndpoints.d.ts +23 -23
- package/dist/redux/person/personEndpoints.d.ts +12 -12
- package/dist/redux/personName/personNameEndpoints.d.ts +10 -10
- package/dist/redux/position/positionEndpoints.d.ts +10 -10
- package/dist/redux/possibleIssueItem/possibleIssueItemEndpoints.d.ts +10 -9
- package/dist/redux/possibleIssueItem/possibleIssueItemEndpoints.js +10 -1
- package/dist/redux/possibleIssueItem/possibleIssueItemEndpoints.js.map +1 -1
- package/dist/redux/quote/quoteCustomerPortalEndpoints.d.ts +13 -13
- package/dist/redux/quote/quoteHooks.d.ts +2 -2
- package/dist/redux/quote/quoteSalesEndpoints.d.ts +16 -16
- package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.d.ts +9 -9
- package/dist/redux/quoteAccessorialV1/quoteAccessorialV1Endpoints.d.ts +10 -10
- package/dist/redux/rateReview/rateReviewEndpoints.d.ts +10 -10
- package/dist/redux/rejectionReason/rejectionReasonEndpoints.d.ts +9 -9
- package/dist/redux/relayCode/relayCodeEndpoints.d.ts +11 -11
- package/dist/redux/shipConDispatch/shipConDispatchEndpoints.d.ts +11 -11
- package/dist/redux/shipConETA/shipConETAEndpoints.d.ts +10 -10
- package/dist/redux/shipcon/shipconEndpoints.d.ts +11 -11
- package/dist/redux/shipconV1/shipconV1Endpoints.d.ts +18 -18
- package/dist/redux/tender/tenderEndpoints.d.ts +9 -9
- package/dist/redux/trailerAvailability/customerEndpoints.d.ts +4 -4
- package/dist/redux/trailerCode/trailerCodeEndpoints.d.ts +9 -9
- package/dist/redux/unitV1/unitV1Endpoints.d.ts +9 -9
- package/dist/redux/userNoteV1/userNoteV1Endpoints.d.ts +10 -10
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Button, Grid, IconButton, Skeleton, Typography, useTheme, } from "@mui/joy";
|
|
2
|
+
import { Box, Button, Grid, IconButton, Skeleton, Tooltip, Typography, useTheme, } from "@mui/joy";
|
|
3
3
|
import { Drawer } from "@mui/material";
|
|
4
4
|
import { StatusStepper } from "../statusStepper";
|
|
5
5
|
import { LoadLastLocation } from "./loadLastLocation";
|
|
@@ -11,7 +11,8 @@ import { useDispatch } from "react-redux";
|
|
|
11
11
|
import { Load } from "../../entities";
|
|
12
12
|
import salesKitI18n from "../../i18n";
|
|
13
13
|
import { useTranslation } from "react-i18next";
|
|
14
|
-
import { Link } from "react-router-dom";
|
|
14
|
+
import { Link, useLocation, useNavigate, useSearchParams, } from "react-router-dom";
|
|
15
|
+
import { useCallback } from "react";
|
|
15
16
|
export const STATUS_MAP = {
|
|
16
17
|
Pending: { label: "Pending", index: 1 },
|
|
17
18
|
Ready: { label: "Ready", index: 2 },
|
|
@@ -27,7 +28,7 @@ export const STATUS_MAP = {
|
|
|
27
28
|
* @returns {ReactElement} LoadDrawer
|
|
28
29
|
*/
|
|
29
30
|
export function LoadDrawer(props) {
|
|
30
|
-
const { getOpenLoadRoute, drawerProps } = props;
|
|
31
|
+
const { getOpenLoadRoute, drawerProps, compareRoute } = props;
|
|
31
32
|
const { t } = useTranslation("entities", { i18n: salesKitI18n });
|
|
32
33
|
const theme = useTheme();
|
|
33
34
|
const selectedLoadID = useSelector(loadDrawerSelectedLoadIDSelector);
|
|
@@ -35,6 +36,25 @@ export function LoadDrawer(props) {
|
|
|
35
36
|
const { data: selectedLoad, isFetching } = useGetLoadQuery(selectedLoadID || 0, {
|
|
36
37
|
skip: !selectedLoadID,
|
|
37
38
|
});
|
|
39
|
+
const location = useLocation();
|
|
40
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
41
|
+
const navigate = useNavigate();
|
|
42
|
+
const handleCompare = useCallback(() => {
|
|
43
|
+
if (selectedLoadID) {
|
|
44
|
+
if (location.pathname.match(compareRoute)) {
|
|
45
|
+
setSearchParams((searchParams) => {
|
|
46
|
+
const _ids = (searchParams.get("ids")?.split(",") ?? []).filter((e) => e !== "");
|
|
47
|
+
_ids.push(selectedLoadID?.toString());
|
|
48
|
+
searchParams.set("ids", _ids.join(","));
|
|
49
|
+
return searchParams;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
navigate(`${compareRoute}?ids=${selectedLoadID}`);
|
|
54
|
+
}
|
|
55
|
+
dispatch(setLoadDrawerSelectedLoadID(null));
|
|
56
|
+
}
|
|
57
|
+
}, [selectedLoadID, location, compareRoute, searchParams]);
|
|
38
58
|
return (_jsx(Drawer, { open: Boolean(selectedLoadID), onClose: () => dispatch(setLoadDrawerSelectedLoadID(null)), anchor: "right", variant: "persistent", sx: {
|
|
39
59
|
width: 530,
|
|
40
60
|
flexShrink: 0,
|
|
@@ -47,9 +67,9 @@ export function LoadDrawer(props) {
|
|
|
47
67
|
alignItems: "stretch",
|
|
48
68
|
flexDirection: "column",
|
|
49
69
|
mt: { xs: "138px", sm: "98px" },
|
|
50
|
-
}, children: [_jsx(IconButton, { size: "sm", onClick: () => dispatch(setLoadDrawerSelectedLoadID(null)), sx: {
|
|
51
|
-
|
|
52
|
-
|
|
70
|
+
}, children: [_jsxs(Box, { display: "flex", children: [_jsx(Tooltip, { title: t("components:lepShipcons.compareWith"), children: _jsx(IconButton, { color: "primary", size: "sm", onClick: handleCompare, children: _jsx("i", { className: "fa-solid fa-rectangle-vertical-history" }) }) }), _jsx(IconButton, { size: "sm", onClick: () => dispatch(setLoadDrawerSelectedLoadID(null)), sx: {
|
|
71
|
+
ml: "auto",
|
|
72
|
+
}, children: _jsx("i", { className: "fa-solid fa-xmark" }) })] }), selectedLoad ? (_jsxs(Grid, { container: true, gap: 1, children: [_jsx(Grid, { children: _jsx("img", { height: "20", src: new Load(selectedLoad).getServiceLevelIcon(), alt: t("quote.service_level") }) }), selectedLoad.reeferTemp ? (_jsx(Grid, { children: _jsx(Typography, { lineHeight: 1, color: "primary", children: _jsx("i", { className: "fa-solid fa-snowflake" }) }) })) : null, _jsxs(Grid, { xs: true, children: [_jsxs(Typography, { lineHeight: 1, fontWeight: "md", children: ["#", selectedLoad.id] }), _jsxs(Typography, { level: "body-xs", children: ["(", selectedLoad.referenceNumber, ")"] })] }), selectedLoad.status ? (_jsx(Grid, { ml: { xs: undefined, sm: "auto" }, xs: 12, sm: "auto", children: _jsx(StatusStepper, { currentStep: STATUS_MAP[selectedLoad.status], stepsLength: 6, primaryColor: selectedLoad.status === "Cancelled"
|
|
53
73
|
? theme.palette.danger[500]
|
|
54
74
|
: selectedLoad.status === "Pending"
|
|
55
75
|
? theme.palette.warning[500]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadDrawer.js","sourceRoot":"","sources":["../../../src/hooks/load/loadDrawer.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,MAAM,EACN,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,GACT,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE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YAAY,CAAC,EAAE,GAAI,GACxC,EACP,KAAC,IAAI,IAAC,EAAE,EAAE,EAAE,YACV,KAAC,iBAAiB,IAAC,IAAI,EAAE,YAAY,GAAI,GACpC,EACP,KAAC,IAAI,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,QAAC,GAAG,EAAE,CAAC,YAC5B,KAAC,SAAS,IAAC,IAAI,EAAE,YAAY,GAAI,GAC5B,IACF,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,GACG,GACJ,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, FormControl, FormLabel, Input, Typography, Grid, Checkbox, CircularProgress, Select, Option, FormHelperText, Modal, ModalDialog, Textarea, Tabs, TabList, tabClasses, Tab, TabPanel, Box, Autocomplete, useTheme, } from "@mui/joy";
|
|
2
|
+
import { Button, FormControl, FormLabel, Input, Typography, Grid, Checkbox, CircularProgress, Select, Option, FormHelperText, Modal, ModalDialog, Textarea, Tabs, TabList, tabClasses, Tab, TabPanel, Box, Autocomplete, useTheme, Divider, } from "@mui/joy";
|
|
3
3
|
import { NerdClickToCopy, NerdCurrencyFieldDataGridAdapter, NerdDatePicker, NerdDraggableDialog, NerdFileUpload, NerdPhoneField, NerdTimePicker, showNotification, useNerdConfirm, } from "@nerdjs/nerd-ui";
|
|
4
4
|
import { useEffect, useMemo, useState, } from "react";
|
|
5
5
|
import salesKitI18n from "../../i18n";
|
|
@@ -203,7 +203,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
203
203
|
overflowY: "auto",
|
|
204
204
|
overflowX: "hidden",
|
|
205
205
|
height: "100%",
|
|
206
|
-
}, size: "sm", children: [_jsxs(TabList, { sx: {
|
|
206
|
+
}, size: "sm", children: [_jsxs(TabList, { size: "sm", sx: {
|
|
207
207
|
p: 0.5,
|
|
208
208
|
gap: 0.5,
|
|
209
209
|
borderRadius: "xl",
|
|
@@ -214,7 +214,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
214
214
|
},
|
|
215
215
|
}, children: [_jsx(Tab, { disableIndicator: true, children: "Main" }), location.id ? (_jsxs(_Fragment, { children: [_jsx(Tab, { disableIndicator: true, children: "Accessorials" }), _jsx(Tab, { disableIndicator: true, children: "Documents" })] })) : null] }), _jsx(TabPanel, { value: 0, sx: {
|
|
216
216
|
overflow: "auto",
|
|
217
|
-
}, children: _jsxs(Grid, { container: true, spacing: 0.5, children: [_jsx(Grid, { xs: 12,
|
|
217
|
+
}, children: _jsxs(Grid, { container: true, spacing: 0.5, children: [_jsx(Grid, { xs: 12, md: 5, children: _jsxs(FormControl, { required: true, children: [_jsx(FormLabel, { children: t("Name") }), _jsx(Input, { fullWidth: true, error: !validationObject.name, onChange: (e) => {
|
|
218
218
|
setValidationObject({
|
|
219
219
|
...validationObject,
|
|
220
220
|
name: e.target.value ? true : false,
|
|
@@ -227,16 +227,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
227
227
|
...l,
|
|
228
228
|
name: e.target.value,
|
|
229
229
|
}));
|
|
230
|
-
}, size: "sm", value: location?.name ?? "", placeholder: t("Facility's name") })] }) }), _jsx(Grid, { xs:
|
|
231
|
-
setLocation((l) => ({
|
|
232
|
-
...l,
|
|
233
|
-
line2: e.target.value,
|
|
234
|
-
}));
|
|
235
|
-
setBody((l) => ({
|
|
236
|
-
...l,
|
|
237
|
-
line2: e.target.value,
|
|
238
|
-
}));
|
|
239
|
-
} })] }) }), _jsx(Grid, { xs: 6, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "City" }), _jsx(Input, { fullWidth: true, readOnly: true, size: "sm", value: location?.city ?? "", placeholder: t("City") })] }) }), _jsx(Grid, { xs: 3, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "State" }), _jsx(Input, { fullWidth: true, readOnly: true, size: "sm", value: location?.state ?? "", placeholder: t("State") })] }) }), _jsx(Grid, { xs: 3, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "ZIP" }), _jsx(Input, { fullWidth: true, readOnly: true, size: "sm", value: location?.zip ?? "", placeholder: t("ZIP") })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { required: true, children: [_jsx(FormLabel, { children: "Address" }), _jsx(Autocomplete, { value: value, error: !validationObject.address, options: googleMapsPredictions || [], onInputChange: (_e, v) => {
|
|
230
|
+
}, size: "sm", value: location?.name ?? "", placeholder: t("Facility's name") })] }) }), _jsx(Grid, { xs: 12, md: 7, children: _jsxs(FormControl, { required: true, children: [_jsx(FormLabel, { children: "Address" }), _jsx(Autocomplete, { size: "sm", value: value, error: !validationObject.address, options: googleMapsPredictions || [], onInputChange: (_e, v) => {
|
|
240
231
|
getGoogleAddresses(v, false);
|
|
241
232
|
}, onChange: (_e, v) => {
|
|
242
233
|
setValue(v);
|
|
@@ -262,7 +253,16 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
262
253
|
...validationObject,
|
|
263
254
|
address: !v ? false : true,
|
|
264
255
|
});
|
|
265
|
-
}, getOptionLabel: (option) => `${option.structured_formatting.main_text}, ${option.structured_formatting.secondary_text}`, isOptionEqualToValue: (o, v) => o.place_id === v.place_id })] }) }), _jsx(Grid, { xs:
|
|
256
|
+
}, getOptionLabel: (option) => `${option.structured_formatting.main_text}, ${option.structured_formatting.secondary_text}`, isOptionEqualToValue: (o, v) => o.place_id === v.place_id })] }) }), _jsx(Grid, { xs: 8, md: 4.5, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Line 1" }), _jsx(Input, { fullWidth: true, readOnly: true, size: "sm", value: location?.line1 ?? "", placeholder: t("Line 1") })] }) }), _jsx(Grid, { xs: 4, md: 3.5, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "#" }), _jsx(Input, { fullWidth: true, size: "sm", value: location?.line2 ?? "", onChange: (e) => {
|
|
257
|
+
setLocation((l) => ({
|
|
258
|
+
...l,
|
|
259
|
+
line2: e.target.value,
|
|
260
|
+
}));
|
|
261
|
+
setBody((l) => ({
|
|
262
|
+
...l,
|
|
263
|
+
line2: e.target.value,
|
|
264
|
+
}));
|
|
265
|
+
} })] }) }), _jsx(Grid, { xs: 6, md: 2, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "City" }), _jsx(Input, { fullWidth: true, readOnly: true, size: "sm", value: location?.city ?? "", placeholder: t("City") })] }) }), _jsx(Grid, { xs: 3, md: 0.75, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "State" }), _jsx(Input, { fullWidth: true, readOnly: true, size: "sm", value: location?.state ?? "", placeholder: t("State") })] }) }), _jsx(Grid, { xs: 3, md: 1.25, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "ZIP" }), _jsx(Input, { fullWidth: true, readOnly: true, size: "sm", value: location?.zip ?? "", placeholder: t("ZIP") })] }) }), _jsx(Grid, { xs: 12, mt: 1, mb: 1, children: _jsx(Divider, {}) }), _jsx(Grid, { xs: 12, md: 4.5, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Emails" }), _jsx(Input, { fullWidth: true, onChange: (e) => {
|
|
266
266
|
setLocation((l) => ({
|
|
267
267
|
...l,
|
|
268
268
|
email_addresses: e.target.value,
|
|
@@ -271,7 +271,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
271
271
|
...l,
|
|
272
272
|
email_addresses: e.target.value,
|
|
273
273
|
}));
|
|
274
|
-
}, size: "sm", value: location?.email_addresses || "", placeholder: "one@email.com; two@email.com..." })] }) }), _jsx(Grid, { xs:
|
|
274
|
+
}, size: "sm", value: location?.email_addresses || "", placeholder: "one@email.com; two@email.com..." })] }) }), _jsx(Grid, { xs: 12, md: 2.5, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Contact" }), _jsx(Input, { fullWidth: true, onChange: (e) => {
|
|
275
275
|
setLocation((l) => ({
|
|
276
276
|
...l,
|
|
277
277
|
contact: e.target.value,
|
|
@@ -282,7 +282,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
282
282
|
}));
|
|
283
283
|
}, size: "sm", value: location.contact || "", placeholder: "Contact" }), _jsx(FormHelperText, { sx: {
|
|
284
284
|
display: { xs: "none", lg: "initial" },
|
|
285
|
-
}, children: " " })] }) }), _jsx(Grid, { xs: 12,
|
|
285
|
+
}, children: " " })] }) }), _jsx(Grid, { xs: 12, md: 3.5, children: _jsx(NerdPhoneField, { value: location.phone, label: t("Phone"), inputProps: {
|
|
286
286
|
placeholder: t("Phone"),
|
|
287
287
|
size: "sm",
|
|
288
288
|
fullWidth: true,
|
|
@@ -304,7 +304,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
304
304
|
...validationObject,
|
|
305
305
|
phone: false,
|
|
306
306
|
});
|
|
307
|
-
} }) }), _jsx(Grid, { xs: 12,
|
|
307
|
+
} }) }), _jsx(Grid, { xs: 12, md: 1.5, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Ext" }), _jsx(Input, { value: location.ext_number || "", placeholder: "Ext", size: "sm", fullWidth: true, onChange: (e) => {
|
|
308
308
|
setLocation((l) => ({
|
|
309
309
|
...l,
|
|
310
310
|
ext_number: e.target.value,
|
|
@@ -313,25 +313,25 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
313
313
|
...l,
|
|
314
314
|
ext_number: e.target.value,
|
|
315
315
|
}));
|
|
316
|
-
} })] }) }), _jsx(Grid, { xs: 12, mt: 1,
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
316
|
+
} })] }) }), _jsx(Grid, { xs: 12, mt: 1, mb: 1, children: _jsx(Divider, {}) }), _jsx(Grid, { xs: 6, md: 2, children: _jsx(FormControl, { children: _jsx(Checkbox, { label: "Need File", checked: location.needs_file || false, onChange: (e) => {
|
|
317
|
+
setLocation((l) => ({
|
|
318
|
+
...l,
|
|
319
|
+
needs_file: e.target.checked,
|
|
320
|
+
}));
|
|
321
|
+
setBody((l) => ({
|
|
322
|
+
...l,
|
|
323
|
+
needs_file: e.target.checked,
|
|
324
|
+
}));
|
|
325
|
+
} }) }) }), _jsx(Grid, { xs: 6, md: 3, children: _jsx(FormControl, { children: _jsx(Checkbox, { label: "Need Liquor Permit", checked: location.needs_liquor_permit || false, onChange: (e) => {
|
|
326
|
+
setLocation((l) => ({
|
|
327
|
+
...l,
|
|
328
|
+
needs_liquor_permit: e.target.checked,
|
|
329
|
+
}));
|
|
330
|
+
setBody((l) => ({
|
|
331
|
+
...l,
|
|
332
|
+
needs_liquor_permit: e.target.checked,
|
|
333
|
+
}));
|
|
334
|
+
} }) }) }), _jsx(Grid, { xs: 6, md: 4, children: _jsx(Checkbox, { label: "First come first serve(FCFS)", checked: location.first_come_first_serve || false, onChange: (e) => {
|
|
335
335
|
setLocation((l) => ({
|
|
336
336
|
...l,
|
|
337
337
|
first_come_first_serve: e.target.checked,
|
|
@@ -340,7 +340,16 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
340
340
|
...l,
|
|
341
341
|
first_come_first_serve: e.target.checked,
|
|
342
342
|
}));
|
|
343
|
-
} }) }), _jsx(Grid, {
|
|
343
|
+
} }) }), _jsx(Grid, { xs: 6, md: 3, children: _jsx(Checkbox, { label: "Strict Scheduling", checked: location.strict_scheduling || false, onChange: (e) => {
|
|
344
|
+
setLocation((l) => ({
|
|
345
|
+
...l,
|
|
346
|
+
strict_scheduling: e.target.checked,
|
|
347
|
+
}));
|
|
348
|
+
setBody((l) => ({
|
|
349
|
+
...l,
|
|
350
|
+
strict_scheduling: e.target.checked,
|
|
351
|
+
}));
|
|
352
|
+
} }) }), _jsx(Grid, { xs: 3, children: _jsx(NerdDatePicker, { inputProps: {
|
|
344
353
|
size: "sm",
|
|
345
354
|
}, value: location.first_come_date
|
|
346
355
|
? DateTime.fromISO(location.first_come_date)
|
|
@@ -353,7 +362,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
353
362
|
...l,
|
|
354
363
|
first_come_date: newDate?.toISO() || "",
|
|
355
364
|
}));
|
|
356
|
-
} }) }), _jsx(Grid, {
|
|
365
|
+
} }) }), _jsx(Grid, { xs: "auto", children: _jsx(NerdTimePicker, { label: "FCFS IN", inputProps: {
|
|
357
366
|
sx: {
|
|
358
367
|
width: 100,
|
|
359
368
|
},
|
|
@@ -400,7 +409,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
400
409
|
first_come_in: newTime,
|
|
401
410
|
}));
|
|
402
411
|
}
|
|
403
|
-
} }) }), _jsx(Grid, {
|
|
412
|
+
} }) }), _jsx(Grid, { xs: "auto", children: _jsx(NerdTimePicker, { label: "FCFS OUT", inputProps: {
|
|
404
413
|
sx: {
|
|
405
414
|
width: 100,
|
|
406
415
|
},
|
|
@@ -447,22 +456,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
447
456
|
first_come_out: newTime,
|
|
448
457
|
}));
|
|
449
458
|
}
|
|
450
|
-
} }) }), _jsx(Grid, { xs:
|
|
451
|
-
setLocation((l) => ({
|
|
452
|
-
...l,
|
|
453
|
-
tms_link: e.target.value,
|
|
454
|
-
}));
|
|
455
|
-
setBody((l) => ({
|
|
456
|
-
...l,
|
|
457
|
-
tms_link: e.target.value,
|
|
458
|
-
}));
|
|
459
|
-
}, size: "sm", value: location.tms_link || "", placeholder: "TMS Link" })] }) }), _jsx(Grid, { xs: 2, alignSelf: "end", children: _jsx(Button, { variant: "soft", size: "sm", component: location.tms_link ? "a" : "button", href: location.tms_link
|
|
460
|
-
? location.tms_link.match(/^https?:\/{2}/)
|
|
461
|
-
? location.tms_link
|
|
462
|
-
: `//${location.tms_link}`
|
|
463
|
-
: "", startDecorator: _jsx("i", { className: "fa-solid fa-arrow-up-right-from-square" }), target: "_blank", rel: "noopener noreferrer", sx: {
|
|
464
|
-
textDecoration: "none!important",
|
|
465
|
-
}, children: "GO" }) }), _jsx(Grid, { xs: 12, lg: 4, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "PSR Days" }), _jsxs(Select, { size: "sm", defaultValue: location.preschedule_days || 0, onChange: (_e, value) => {
|
|
459
|
+
} }) }), _jsx(Grid, { xs: 12, md: "auto", ml: { sx: "none", md: "auto" }, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "PSR Days" }), _jsxs(Select, { size: "sm", defaultValue: location.preschedule_days || 0, onChange: (_e, value) => {
|
|
466
460
|
setLocation((l) => ({
|
|
467
461
|
...l,
|
|
468
462
|
preschedule_days: value || 0,
|
|
@@ -477,28 +471,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
477
471
|
zIndex: (theme) => theme.zIndex.modal,
|
|
478
472
|
},
|
|
479
473
|
},
|
|
480
|
-
}, children: [_jsx(Option, { value: 0, children: "None" }, 0), [1, 2, 3, 4, 5].map((v) => (_jsx(Option, { value: v, children: v }, v))), _jsx(Option, { value: 14, children: "ASAP" }, 14)] })] }) }), _jsx(Grid, {
|
|
481
|
-
setLocation((l) => ({
|
|
482
|
-
...l,
|
|
483
|
-
scheduling_channel: value || "",
|
|
484
|
-
}));
|
|
485
|
-
setBody((l) => ({
|
|
486
|
-
...l,
|
|
487
|
-
scheduling_channel: value || "",
|
|
488
|
-
}));
|
|
489
|
-
}, slotProps: {
|
|
490
|
-
listbox: {
|
|
491
|
-
sx: {
|
|
492
|
-
zIndex: (theme) => theme.zIndex.modal,
|
|
493
|
-
},
|
|
494
|
-
},
|
|
495
|
-
}, children: [
|
|
496
|
-
{ label: "None", value: "" },
|
|
497
|
-
{ label: "Email", value: "email" },
|
|
498
|
-
{ label: "Call", value: "call" },
|
|
499
|
-
{ label: "Portal", value: "portal" },
|
|
500
|
-
{ label: "Customer", value: "customer" },
|
|
501
|
-
].map((v) => (_jsx(Option, { value: v.value, children: v.label }, v.value))) }), _jsx(FormHelperText, { children: " " })] }) }), _jsx(Grid, { lg: "auto", children: _jsx(NerdTimePicker, { inputProps: {
|
|
474
|
+
}, children: [_jsx(Option, { value: 0, children: "None" }, 0), [1, 2, 3, 4, 5].map((v) => (_jsx(Option, { value: v, children: v }, v))), _jsx(Option, { value: 14, children: "ASAP" }, 14)] })] }) }), _jsx(Grid, { lg: "auto", children: _jsx(NerdTimePicker, { inputProps: {
|
|
502
475
|
sx: {
|
|
503
476
|
width: 100,
|
|
504
477
|
},
|
|
@@ -578,7 +551,45 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
578
551
|
time_to: newTime,
|
|
579
552
|
}));
|
|
580
553
|
}
|
|
581
|
-
} }) }), _jsx(Grid, { xs:
|
|
554
|
+
} }) }), _jsx(Grid, { xs: 6, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "TMS Link" }), _jsx(Input, { fullWidth: true, onChange: (e) => {
|
|
555
|
+
setLocation((l) => ({
|
|
556
|
+
...l,
|
|
557
|
+
tms_link: e.target.value,
|
|
558
|
+
}));
|
|
559
|
+
setBody((l) => ({
|
|
560
|
+
...l,
|
|
561
|
+
tms_link: e.target.value,
|
|
562
|
+
}));
|
|
563
|
+
}, size: "sm", value: location.tms_link || "", placeholder: "TMS Link", endDecorator: _jsx(Button, { variant: "soft", size: "sm", component: location.tms_link ? "a" : "button", href: location.tms_link
|
|
564
|
+
? location.tms_link.match(/^https?:\/{2}/)
|
|
565
|
+
? location.tms_link
|
|
566
|
+
: `//${location.tms_link}`
|
|
567
|
+
: "", startDecorator: _jsx("i", { className: "fa-solid fa-arrow-up-right-from-square" }), target: "_blank", rel: "noopener noreferrer", sx: {
|
|
568
|
+
mr: -1,
|
|
569
|
+
height: "100%",
|
|
570
|
+
textDecoration: "none!important",
|
|
571
|
+
}, children: "GO" }) })] }) }), _jsx(Grid, { xs: 4, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Channel" }), _jsx(Select, { size: "sm", defaultValue: location.scheduling_channel, onChange: (_e, value) => {
|
|
572
|
+
setLocation((l) => ({
|
|
573
|
+
...l,
|
|
574
|
+
scheduling_channel: value || "",
|
|
575
|
+
}));
|
|
576
|
+
setBody((l) => ({
|
|
577
|
+
...l,
|
|
578
|
+
scheduling_channel: value || "",
|
|
579
|
+
}));
|
|
580
|
+
}, slotProps: {
|
|
581
|
+
listbox: {
|
|
582
|
+
sx: {
|
|
583
|
+
zIndex: (theme) => theme.zIndex.modal,
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
}, children: [
|
|
587
|
+
{ label: "None", value: "" },
|
|
588
|
+
{ label: "Email", value: "email" },
|
|
589
|
+
{ label: "Call", value: "call" },
|
|
590
|
+
{ label: "Portal", value: "portal" },
|
|
591
|
+
{ label: "Customer", value: "customer" },
|
|
592
|
+
].map((v) => (_jsx(Option, { value: v.value, children: v.label }, v.value))) }), _jsx(FormHelperText, { children: " " })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Prev. Appts." }), _jsx(Textarea, { maxRows: 4, onChange: (e) => {
|
|
582
593
|
setLocation((l) => ({
|
|
583
594
|
...l,
|
|
584
595
|
prev_apts: e.target.value,
|
|
@@ -587,7 +598,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
587
598
|
...l,
|
|
588
599
|
prev_apts: e.target.value,
|
|
589
600
|
}));
|
|
590
|
-
}, size: "sm", value: location.prev_apts || "" })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Location Notes" }), _jsx(Textarea, { onChange: (e) => {
|
|
601
|
+
}, size: "sm", value: location.prev_apts || "" })] }) }), _jsx(Grid, { xs: 12, md: 6, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Location Notes" }), _jsx(Textarea, { maxRows: 4, onChange: (e) => {
|
|
591
602
|
setLocation((l) => ({
|
|
592
603
|
...l,
|
|
593
604
|
notes: e.target.value,
|
|
@@ -596,7 +607,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
596
607
|
...l,
|
|
597
608
|
notes: e.target.value,
|
|
598
609
|
}));
|
|
599
|
-
}, size: "sm", value: location.notes || "" })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Location Scheduling Notes" }), _jsx(Textarea, { onChange: (e) => {
|
|
610
|
+
}, size: "sm", value: location.notes || "" })] }) }), _jsx(Grid, { xs: 12, md: 6, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Location Scheduling Notes" }), _jsx(Textarea, { maxRows: 4, onChange: (e) => {
|
|
600
611
|
setLocation((l) => ({
|
|
601
612
|
...l,
|
|
602
613
|
scheduling_notes: e.target.value,
|
|
@@ -605,7 +616,7 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
605
616
|
...l,
|
|
606
617
|
scheduling_notes: e.target.value,
|
|
607
618
|
}));
|
|
608
|
-
}, size: "sm", value: location.scheduling_notes || "" })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Driver Instructions" }), _jsx(Textarea, { onChange: (e) => {
|
|
619
|
+
}, size: "sm", value: location.scheduling_notes || "" })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: "Driver Instructions" }), _jsx(Textarea, { maxRows: 4, onChange: (e) => {
|
|
609
620
|
setLocation((l) => ({
|
|
610
621
|
...l,
|
|
611
622
|
driver_instructions: e.target.value,
|
|
@@ -638,15 +649,19 @@ export function LocationFormSales({ onCreateLocation, onSaveLocation, open, plac
|
|
|
638
649
|
}
|
|
639
650
|
const Wrapper = ({ children, open, handleClose, }) => {
|
|
640
651
|
const theme = useTheme();
|
|
641
|
-
const matches = useMediaQuery(theme.breakpoints.down("
|
|
652
|
+
const matches = useMediaQuery(theme.breakpoints.down("md"));
|
|
642
653
|
if (matches)
|
|
643
654
|
return (_jsx(Modal, { open: open, onClose: handleClose, children: _jsx(ModalDialog, { layout: "fullscreen", children: children }) }));
|
|
644
655
|
else if (open)
|
|
645
656
|
return (_jsx(NerdDraggableDialog, { draggableProps: {
|
|
646
657
|
handle: "#draggable-title",
|
|
647
658
|
cancel: "#draggable-content",
|
|
648
|
-
}, resizable: true, initialHeight:
|
|
659
|
+
}, resizable: true, initialHeight: 820, initialWidth: 820, resizableProps: {
|
|
649
660
|
minConstraints: [300, 300],
|
|
661
|
+
}, sheetProps: {
|
|
662
|
+
sx: {
|
|
663
|
+
p: 1,
|
|
664
|
+
},
|
|
650
665
|
}, children: children }));
|
|
651
666
|
else
|
|
652
667
|
return _jsx(_Fragment, {});
|