@nerdjs/sales-kit 2.4.15 → 2.4.17
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/load/load.d.ts +2 -2
- package/dist/entities/load/load.js +1 -1
- package/dist/entities/load/load.js.map +1 -1
- package/dist/entities/shipcon/helper.d.ts +1 -0
- package/dist/entities/shipcon/helper.js +16 -0
- package/dist/entities/shipcon/helper.js.map +1 -1
- package/dist/hooks/lep/constants.d.ts +2 -0
- package/dist/hooks/lep/constants.js +71 -0
- package/dist/hooks/lep/constants.js.map +1 -1
- package/dist/hooks/lep/lepActionBar.d.ts +2 -1
- package/dist/hooks/lep/lepActionBar.js +32 -4
- package/dist/hooks/lep/lepActionBar.js.map +1 -1
- package/dist/hooks/lep/loadEditPanel.d.ts +2 -1
- package/dist/hooks/lep/loadEditPanel.js +2 -2
- package/dist/hooks/lep/loadEditPanel.js.map +1 -1
- package/dist/hooks/load/loadCommodityPieces.js +4 -4
- package/dist/hooks/load/loadCommodityPieces.js.map +1 -1
- package/dist/hooks/load/loadLastLocation.js +14 -4
- package/dist/hooks/load/loadLastLocation.js.map +1 -1
- package/dist/hooks/locationsForm/index.d.ts +2 -2
- package/dist/hooks/locationsForm/index.js +2 -2
- package/dist/hooks/locationsForm/index.js.map +1 -1
- package/dist/hooks/locationsForm/{locationsForm.js → locationForm.js} +1 -1
- package/dist/hooks/locationsForm/locationForm.js.map +1 -0
- package/dist/hooks/locationsForm/locationFormSales/archerLocationAutocomplete.d.ts +6 -0
- package/dist/hooks/locationsForm/locationFormSales/archerLocationAutocomplete.js +41 -0
- package/dist/hooks/locationsForm/locationFormSales/archerLocationAutocomplete.js.map +1 -0
- package/dist/hooks/locationsForm/locationFormSales/index.d.ts +5 -0
- package/dist/hooks/locationsForm/locationFormSales/index.js +6 -0
- package/dist/hooks/locationsForm/locationFormSales/index.js.map +1 -0
- package/dist/hooks/locationsForm/locationFormSales/locationAccessorialsList.d.ts +8 -0
- package/dist/hooks/locationsForm/locationFormSales/locationAccessorialsList.js +181 -0
- package/dist/hooks/locationsForm/locationFormSales/locationAccessorialsList.js.map +1 -0
- package/dist/hooks/locationsForm/locationFormSales/locationDocumentsList.d.ts +8 -0
- package/dist/hooks/locationsForm/locationFormSales/locationDocumentsList.js +149 -0
- package/dist/hooks/locationsForm/locationFormSales/locationDocumentsList.js.map +1 -0
- package/dist/hooks/locationsForm/locationFormSales/locationFormSales.d.ts +19 -0
- package/dist/hooks/locationsForm/locationFormSales/locationFormSales.js +119 -0
- package/dist/hooks/locationsForm/locationFormSales/locationFormSales.js.map +1 -0
- package/dist/hooks/locationsForm/locationFormSales/locationFormSalesMain.d.ts +26 -0
- package/dist/hooks/locationsForm/locationFormSales/locationFormSalesMain.js +671 -0
- package/dist/hooks/locationsForm/locationFormSales/locationFormSalesMain.js.map +1 -0
- package/dist/hooks/quote/helpers.js +1 -1
- package/dist/hooks/quote/helpers.js.map +1 -1
- package/dist/locales/en/components.json +2 -1
- package/dist/locales/index.d.ts +1 -0
- package/dist/redux/api/salesApi.d.ts +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/area/areaEndpoints.d.ts +9 -9
- 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/carrierInsurance/carrierInsuranceEndpoints.d.ts +10 -10
- package/dist/redux/carrierName/carrierNameEndpoints.d.ts +12 -12
- package/dist/redux/carrierPayContract/carrierPayContractEndpoints.d.ts +11 -11
- package/dist/redux/carrierTender/carrierTenderEndpoints.d.ts +10 -10
- 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/carrierTenderV1/carrierTenderV1Endpoints.d.ts +20 -20
- 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/creditTerm/creditTermEndpoints.d.ts +9 -9
- 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 +10 -10
- package/dist/redux/ediLoadTender/ediLoadTenderEndpoints.d.ts +10 -10
- 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 +12 -12
- package/dist/redux/holiday/holidayEndpoints.d.ts +10 -10
- 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/loadTenderView/loadTenderViewEndpoints.d.ts +10 -10
- package/dist/redux/loadV1/loadV1Endpoints.d.ts +58 -58
- package/dist/redux/location/locationEndpoints.d.ts +16 -15
- package/dist/redux/location/locationEndpoints.js +7 -1
- package/dist/redux/location/locationEndpoints.js.map +1 -1
- 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/node/nodeEndpoints.d.ts +8 -8
- package/dist/redux/nodeName/nodeNameEndpoints.d.ts +10 -10
- package/dist/redux/nodeType/nodeTypeEndpoints.d.ts +8 -8
- package/dist/redux/nodeTypeNode/nodeTypeNodeEndpoints.d.ts +8 -8
- 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 -10
- package/dist/redux/quote/quoteCustomerPortalEndpoints.d.ts +15 -15
- 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 +1 -1
- package/dist/hooks/locationsForm/locationsForm.js.map +0 -1
- /package/dist/hooks/locationsForm/{locationsForm.d.ts → locationForm.d.ts} +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Typography, Modal, ModalDialog, Tabs, TabList, tabClasses, Tab, TabPanel, Box, useTheme, IconButton, Tooltip, } from "@mui/joy";
|
|
3
|
+
import { NerdDraggableDialog } from "@nerdjs/nerd-ui";
|
|
4
|
+
import { useEffect, useMemo, useState, } from "react";
|
|
5
|
+
import salesKitI18n from "../../../i18n";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
import { locationEntityTypeGuard, } from "../../../entities/location/location";
|
|
8
|
+
import { useCreateLocationV1Mutation, useGetLocationV1Query, } from "../../../redux/locationV1";
|
|
9
|
+
import { useMediaQuery } from "@mui/system";
|
|
10
|
+
import { LocationFormSalesMain } from "./locationFormSalesMain";
|
|
11
|
+
import { LocationAccessorialsList } from "./locationAccessorialsList";
|
|
12
|
+
import { LocationDocumentsList } from "./locationDocumentsList";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param {LocationFormSalesProps} props props
|
|
16
|
+
* @returns {ReactElement} LocationForm
|
|
17
|
+
*/
|
|
18
|
+
export function LocationFormSales({ onCreateLocation, open, place, onClose, onCompare, }) {
|
|
19
|
+
const { t } = useTranslation("common", { i18n: salesKitI18n });
|
|
20
|
+
const [createLocation] = useCreateLocationV1Mutation();
|
|
21
|
+
const { data } = useGetLocationV1Query(locationEntityTypeGuard(place) && place.id ? place.id : 0, { skip: locationEntityTypeGuard(place) && place.id ? false : true });
|
|
22
|
+
const [location, setLocation] = useState(data || {});
|
|
23
|
+
const [isValid, setIsValid] = useState(true);
|
|
24
|
+
const isCreateForm = useMemo(() => {
|
|
25
|
+
if (place && "id" in place && place.id) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
else
|
|
29
|
+
return true;
|
|
30
|
+
}, [place]);
|
|
31
|
+
const handleCreateLocation = () => {
|
|
32
|
+
createLocation(location)
|
|
33
|
+
.unwrap()
|
|
34
|
+
.then((l) => {
|
|
35
|
+
onCreateLocation(l);
|
|
36
|
+
})
|
|
37
|
+
.catch(() => {
|
|
38
|
+
return;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
setLocation(data || {});
|
|
43
|
+
}, [data]);
|
|
44
|
+
const handleClose = () => {
|
|
45
|
+
setLocation({});
|
|
46
|
+
onClose();
|
|
47
|
+
};
|
|
48
|
+
return (_jsx(Wrapper, { handleClose: handleClose, open: open, children: _jsxs(Box, { display: "flex", flexDirection: "column", height: "100%", children: [_jsxs(Box, { id: "draggable-title", sx: {
|
|
49
|
+
display: "flex",
|
|
50
|
+
cursor: "move",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
p: 0.5,
|
|
53
|
+
}, children: [_jsx(Typography, { level: "h4", children: location?.id ? t("Edit Location") : t("New Location") }), onCompare ? (_jsx(Tooltip, { title: t("components:lepShipcons.compareWith"), size: "sm", children: _jsx(IconButton, { id: "cancel-drag", color: "primary", sx: {
|
|
54
|
+
ml: "auto",
|
|
55
|
+
}, size: "sm", onClick: onCompare, children: _jsx("i", { className: "fa-solid fa-rectangle-vertical-history" }) }) })) : null] }), _jsx(Box, { id: "draggable-content", sx: {
|
|
56
|
+
overflow: "auto",
|
|
57
|
+
height: "100%",
|
|
58
|
+
}, children: _jsxs(Tabs, { defaultValue: 0, sx: {
|
|
59
|
+
bgcolor: "transparent",
|
|
60
|
+
overflowY: "auto",
|
|
61
|
+
overflowX: "hidden",
|
|
62
|
+
height: "100%",
|
|
63
|
+
}, size: "sm", children: [_jsxs(TabList, { size: "sm", sx: {
|
|
64
|
+
p: 0.5,
|
|
65
|
+
gap: 0.5,
|
|
66
|
+
borderRadius: "xl",
|
|
67
|
+
bgcolor: "background.level1",
|
|
68
|
+
[`& .${tabClasses.root}[aria-selected="true"]`]: {
|
|
69
|
+
boxShadow: "sm",
|
|
70
|
+
bgcolor: "background.surface",
|
|
71
|
+
},
|
|
72
|
+
}, children: [_jsx(Tab, { disableIndicator: true, children: "Main" }), !isCreateForm ? (_jsxs(_Fragment, { children: [_jsx(Tab, { disableIndicator: true, children: "Accessorials" }), _jsx(Tab, { disableIndicator: true, children: "Documents" })] })) : null] }), _jsx(TabPanel, { value: 0, sx: {
|
|
73
|
+
overflow: "auto",
|
|
74
|
+
}, children: _jsx(LocationFormSalesMain, { value: location, onChange: (location) => setLocation(location), place: place, onValidate: (validationObject) => {
|
|
75
|
+
const obj = { ...validationObject };
|
|
76
|
+
delete obj.phone;
|
|
77
|
+
setIsValid(Object.values(obj).every(Boolean) ? true : false);
|
|
78
|
+
} }) }), place && "id" in place && place.id ? (_jsxs(_Fragment, { children: [_jsx(TabPanel, { value: 1, sx: {
|
|
79
|
+
overflow: "auto",
|
|
80
|
+
height: "100%",
|
|
81
|
+
}, children: _jsx(Box, { sx: {
|
|
82
|
+
height: "100%",
|
|
83
|
+
}, children: _jsx(LocationAccessorialsList, { locationID: place.id }) }) }), _jsx(TabPanel, { value: 2, sx: {
|
|
84
|
+
overflow: "auto",
|
|
85
|
+
height: "100%",
|
|
86
|
+
}, children: _jsx(Box, { sx: {
|
|
87
|
+
height: "100%",
|
|
88
|
+
}, children: _jsx(LocationDocumentsList, { locationID: place.id }) }) })] })) : null] }) }), _jsxs(Box, { sx: {
|
|
89
|
+
display: "flex",
|
|
90
|
+
pt: 2,
|
|
91
|
+
gap: 1,
|
|
92
|
+
justifyContent: "flex-end",
|
|
93
|
+
}, children: [_jsx(Button, { variant: "soft", color: "neutral", onClick: () => {
|
|
94
|
+
handleClose();
|
|
95
|
+
}, children: !isCreateForm ? t("Close") : t("Cancel") }), isCreateForm ? (_jsx(Button, { onClick: () => {
|
|
96
|
+
handleCreateLocation();
|
|
97
|
+
handleClose();
|
|
98
|
+
}, disabled: !isValid, children: t("Create") })) : null] })] }) }));
|
|
99
|
+
}
|
|
100
|
+
const Wrapper = ({ children, open, handleClose, }) => {
|
|
101
|
+
const theme = useTheme();
|
|
102
|
+
const matches = useMediaQuery(theme.breakpoints.down("md"));
|
|
103
|
+
if (matches)
|
|
104
|
+
return (_jsx(Modal, { open: open, onClose: handleClose, children: _jsx(ModalDialog, { layout: "fullscreen", children: children }) }));
|
|
105
|
+
else if (open)
|
|
106
|
+
return (_jsx(NerdDraggableDialog, { draggableProps: {
|
|
107
|
+
handle: "#draggable-title",
|
|
108
|
+
cancel: "#draggable-content, #cancel-drag",
|
|
109
|
+
}, resizable: true, initialHeight: 820, initialWidth: 820, resizableProps: {
|
|
110
|
+
minConstraints: [300, 300],
|
|
111
|
+
}, sheetProps: {
|
|
112
|
+
sx: {
|
|
113
|
+
p: 1,
|
|
114
|
+
},
|
|
115
|
+
}, children: children }));
|
|
116
|
+
else
|
|
117
|
+
return _jsx(_Fragment, {});
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=locationFormSales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locationFormSales.js","sourceRoot":"","sources":["../../../../src/hooks/locationsForm/locationFormSales/locationFormSales.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,KAAK,EACL,WAAW,EACX,IAAI,EACJ,OAAO,EACP,UAAU,EACV,GAAG,EACH,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,UAAU,EACV,OAAO,GACR,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAGL,SAAS,EACT,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAwB,EACtB,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,2BAA2B,EAC3B,qB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,CAAC,CAAC,CACd,KAAC,MAAM,IACL,OAAO,EAAE,GAAG,EAAE;gCACZ,oBAAoB,EAAE,CAAC;gCACvB,WAAW,EAAE,CAAC;4BAChB,CAAC,EACD,QAAQ,EAAE,CAAC,OAAO,YAEjB,CAAC,CAAC,QAAQ,CAAC,GACL,CACV,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,GACE,CACX,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,GAAG,CAAC,EACf,QAAQ,EACR,IAAI,EACJ,WAAW,GACmD,EAAE,EAAE;IAClE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5D,IAAI,OAAO;QACT,OAAO,CACL,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,YACrC,KAAC,WAAW,IAAC,MAAM,EAAC,YAAY,YAAE,QAAQ,GAAe,GACnD,CACT,CAAC;SACC,IAAI,IAAI;QACX,OAAO,CACL,KAAC,mBAAmB,IAClB,cAAc,EAAE;gBACd,MAAM,EAAE,kBAAkB;gBAC1B,MAAM,EAAE,kCAAkC;aAC3C,EACD,SAAS,QACT,aAAa,EAAE,GAAG,EAClB,YAAY,EAAE,GAAG,EACjB,cAAc,EAAE;gBACd,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;aAC3B,EACD,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,CAAC,EAAE,CAAC;iBACL;aACF,YAEA,QAAQ,GACW,CACvB,CAAC;;QACC,OAAO,mBAAK,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
import { LocationV1_Entity } from "../../../entities/locationV1";
|
|
4
|
+
import { Location_Entity } from "../../../entities";
|
|
5
|
+
type ValidationObject = {
|
|
6
|
+
name: boolean;
|
|
7
|
+
address: boolean;
|
|
8
|
+
phone: boolean;
|
|
9
|
+
openTime: boolean;
|
|
10
|
+
closeTime: boolean;
|
|
11
|
+
FCFSIN: boolean;
|
|
12
|
+
FCFSOUT: boolean;
|
|
13
|
+
};
|
|
14
|
+
interface LocationFormSalesMainProps {
|
|
15
|
+
place: Location_Entity | google.maps.GeocoderResult | undefined;
|
|
16
|
+
onValidate?: (validationObject: ValidationObject) => void;
|
|
17
|
+
value: Partial<LocationV1_Entity>;
|
|
18
|
+
onChange: (location: Partial<LocationV1_Entity>) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @param {LocationFormSalesMainProps} props props
|
|
23
|
+
* @returns {ReactElement} locationsFormSalesMain
|
|
24
|
+
*/
|
|
25
|
+
export declare function LocationFormSalesMain({ place, onValidate, onChange: setLocation, value: location, }: LocationFormSalesMainProps): ReactElement;
|
|
26
|
+
export {};
|