@nerdjs/sales-kit 4.0.12 → 4.0.13

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.
Files changed (29) hide show
  1. package/dist/hooks/archerFilesDataGrid/archerFilesDataGrid.d.ts +9 -0
  2. package/dist/hooks/archerFilesDataGrid/archerFilesDataGrid.js +257 -0
  3. package/dist/hooks/archerFilesDataGrid/archerFilesDataGrid.js.map +1 -0
  4. package/dist/hooks/archerFilesDataGrid/index.d.ts +1 -0
  5. package/dist/hooks/archerFilesDataGrid/index.js +2 -0
  6. package/dist/hooks/archerFilesDataGrid/index.js.map +1 -0
  7. package/dist/hooks/carrier/carrierDocuments.js +12 -209
  8. package/dist/hooks/carrier/carrierDocuments.js.map +1 -1
  9. package/dist/hooks/carrier/consts.d.ts +1 -1
  10. package/dist/hooks/carrier/consts.js +1 -1
  11. package/dist/hooks/carrier/consts.js.map +1 -1
  12. package/dist/hooks/carrierInvoicePanel/carrierInvoiceDocuments.js +14 -210
  13. package/dist/hooks/carrierInvoicePanel/carrierInvoiceDocuments.js.map +1 -1
  14. package/dist/hooks/carrierInvoicePanel/consts.d.ts +1 -1
  15. package/dist/hooks/carrierInvoicePanel/consts.js +1 -1
  16. package/dist/hooks/carrierInvoicePanel/consts.js.map +1 -1
  17. package/dist/hooks/carrierTenderPanel/carrierTenderDocuments.js +18 -240
  18. package/dist/hooks/carrierTenderPanel/carrierTenderDocuments.js.map +1 -1
  19. package/dist/hooks/carrierTenderPanel/carrierTenderLoadDocuments.js +8 -154
  20. package/dist/hooks/carrierTenderPanel/carrierTenderLoadDocuments.js.map +1 -1
  21. package/dist/hooks/carrierTenderPanel/consts.d.ts +1 -1
  22. package/dist/hooks/carrierTenderPanel/consts.js +1 -1
  23. package/dist/hooks/carrierTenderPanel/consts.js.map +1 -1
  24. package/dist/hooks/lep/constants.d.ts +1 -1
  25. package/dist/hooks/lep/constants.js +1 -1
  26. package/dist/hooks/lep/constants.js.map +1 -1
  27. package/dist/hooks/lep/lepDocuments.js +14 -237
  28. package/dist/hooks/lep/lepDocuments.js.map +1 -1
  29. package/package.json +1 -1
@@ -1,22 +1,13 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { GridActionsCellItem, useGridApiRef, } from "@mui/x-data-grid-premium";
3
- import { useCallback, useContext, useEffect, useMemo, useState, } from "react";
4
- import { getPeopleSelectors, useDeleteArcherFileMutation, useGetCarrierInvoiceFilesQuery, useGetPeopleQuery, useShareArcherFileMutation, useUploadArcherFileMutation, } from "../../redux";
5
- import { Box, Button, FormControl, FormLabel, Grid, Modal, ModalDialog, Select, Skeleton, Typography, Option, IconButton, Sheet, FormHelperText, Tooltip, DialogActions, } from "@mui/joy";
6
- import { DateTime } from "luxon";
7
- import { NerdClickToCopy, NerdFileUpload, showNotification, useNerdConfirm, useNerdSaveDataGridState, useNerdWindow, } from "@nerdjs/nerd-ui";
2
+ import { useContext, useMemo, useState } from "react";
3
+ import { useGetCarrierInvoiceFilesQuery, useGetPeopleQuery, useUploadArcherFileMutation, } from "../../redux";
4
+ import { Box, Button, Skeleton } from "@mui/joy";
8
5
  import salesKitI18n from "../../i18n";
9
6
  import { useTranslation } from "react-i18next";
10
7
  import { CarrierInvoicePanelContext } from "./carrierInvoicePanel";
11
- import { useDispatch, useSelector } from "react-redux";
12
- import { Person } from "../../entities";
13
- import { LepStyledDataGrid } from "../lep/lepStyledDataGrid";
14
- import { tenderDocumentTypes } from "./consts";
15
- import { CustomColumnMenu } from "../lep";
8
+ import { TENDER_DOCUMENT_TYPES } from "./consts";
9
+ import { ArcherFilesDataGrid } from "../archerFilesDataGrid";
16
10
  const LOCAL_STORAGE_KEY = "CarrierInvoiceDocumentsDataGridState";
17
- const INITIAL_STATE = {
18
- sorting: { sortModel: [{ field: "description", sort: "asc" }] },
19
- };
20
11
  /**
21
12
  *
22
13
  * @returns {ReactElement} AssignCarrierInvoiceDocuments
@@ -46,212 +37,25 @@ function Content() {
46
37
  ? localStoragePrefix + LOCAL_STORAGE_KEY
47
38
  : LOCAL_STORAGE_KEY, [localStoragePrefix]);
48
39
  const { t } = useTranslation("common", { i18n: salesKitI18n });
49
- const apiRef = useGridApiRef();
50
40
  const [open, setOpen] = useState(false);
51
41
  const { data } = useGetCarrierInvoiceFilesQuery(Number(carrierInvoiceID), {
52
42
  skip: Number.isNaN(Number(carrierInvoiceID)),
53
43
  });
54
- const params2 = useMemo(() => ({
55
- filters: JSON.stringify([
56
- { name: "people.company_id", comparison: "eq", value: 1 },
57
- { name: "people.active", comparison: "eq", value: true },
58
- ]),
59
- }), []);
60
- const { data: _personNames } = useGetPeopleQuery(params2);
61
- const selectAllPersonNames = useMemo(() => getPeopleSelectors(params2).selectAll, [params2]);
62
- const personNames = useSelector(selectAllPersonNames);
63
- const [shareFileAction, { isLoading: shareFileLoading }] = useShareArcherFileMutation();
64
- const [deleteFile] = useDeleteArcherFileMutation();
65
- const confirm = useNerdConfirm();
66
- const [shareFile, setShareFile] = useState(null);
67
- const [filterModel, setFilterModel] = useState({
68
- items: [],
69
- });
70
- const personOptions = useMemo(() => personNames?.map((p) => ({
71
- label: new Person(p).name() || "",
72
- value: p.id,
73
- })), [personNames]);
74
- const { open: openDocument } = useNerdWindow();
75
- const columns = useMemo(() => [
76
- {
77
- field: "name",
78
- headerName: "File",
79
- flex: 1,
80
- },
81
- {
82
- field: "description",
83
- headerName: "Type",
84
- flex: 1,
85
- type: "singleSelect",
86
- valueOptions: tenderDocumentTypes,
87
- },
88
- {
89
- field: "created_at",
90
- headerName: "Uploaded At",
91
- renderCell(params) {
92
- return params.value
93
- ? DateTime.fromISO(params.value).toUTC().toFormat("LL/dd/yyyy")
94
- : "";
95
- },
96
- flex: 1,
97
- },
98
- {
99
- field: "person_id",
100
- headerName: "Uploaded By",
101
- renderCell(params) {
102
- return _personNames?.entities[params.value]
103
- ? new Person(_personNames?.entities[params.value]).name()
104
- : "";
105
- },
106
- flex: 1,
107
- type: "singleSelect",
108
- valueOptions: personOptions,
109
- },
110
- {
111
- field: "actions",
112
- type: "actions",
113
- headerName: "Actions",
114
- getActions: ({ row, }) => {
115
- if (Object.keys(row).length > 0) {
116
- const extension = row.name.split(".").pop();
117
- const previwDisabled = !extension ||
118
- !["gif", "jpeg", "jpg", "png", "tiff", "pdf"].includes(extension.trim().toLowerCase());
119
- return [
120
- _jsx(GridActionsCellItem, { icon: _jsx(Tooltip, { title: previwDisabled
121
- ? "File preview is only available for the following file formats: gif, jpeg, jpg, png, tiff, pdf"
122
- : "Preview", children: _jsx("span", { children: _jsx("i", { style: {
123
- color: previwDisabled
124
- ? "var(--mui-palette-action-disabled)"
125
- : undefined,
126
- }, className: "fa-solid fa-eye" }) }) }), label: `View File`, disabled: previwDisabled, onClick: () => {
127
- if (!previwDisabled)
128
- openDocument({
129
- url: `${window._APP_CONFIG?.api?.endpoint}/v3/file-service/files/${row.id}?inline=1`,
130
- name: row.name,
131
- });
132
- } }, "view"),
133
- _jsx(GridActionsCellItem, { showInMenu: true, icon: _jsx("i", { className: "fa-solid fa-download" }), label: `Download File`, onClick: () => {
134
- const link = document.createElement("a");
135
- link.href = `${window._APP_CONFIG?.api?.endpoint}/v3/file-service/files/${row.id}`;
136
- link.click();
137
- link.remove();
138
- } }, "download"),
139
- _jsx(GridActionsCellItem, { showInMenu: true, icon: _jsx("i", { className: "fa-solid fa-trash" }), label: `Delete File`, disabled: row.description == "Rate Confirmation", onClick: () => {
140
- confirm.setOpen({
141
- onConfirm() {
142
- deleteFile(row.id);
143
- },
144
- });
145
- } }, "delete"),
146
- _jsx(GridActionsCellItem, { showInMenu: true, icon: _jsx("i", { className: "fa-solid fa-share" }), label: `Share File`, onClick: () => {
147
- setShareFile(row);
148
- } }, "share"),
149
- ];
150
- }
151
- else
152
- return [];
153
- },
154
- },
155
- ], [personOptions]);
156
- const { state, key, restoreState } = useNerdSaveDataGridState(apiRef, localStorageKey, INITIAL_STATE, [columns]);
157
- useEffect(() => {
158
- if (data && shareFile) {
159
- setShareFile(data.find((d) => d.id === shareFile.id) || null);
160
- }
161
- else
162
- setShareFile(null);
163
- }, [data]);
164
- const onRowClick = useCallback((params) => {
165
- const rowNode = apiRef.current?.getRowNode(params.id);
166
- if (rowNode && rowNode.type === "group") {
167
- apiRef.current?.setRowChildrenExpansion(params.id, !rowNode.childrenExpanded);
168
- }
169
- }, [apiRef]);
170
- return (_jsxs(Box, { children: [_jsx(Box, { display: "flex", sx: {
171
- mb: 1,
172
- }, children: _jsx(Button, { startDecorator: _jsx("i", { className: "fa-solid fa-file-arrow-up" }), size: "sm", variant: "soft", color: "neutral", onClick: () => setOpen(true), disabled: Number.isNaN(Number(carrierInvoiceID)), children: t("entities:archerFile.others.upload_document") }) }), _jsx(Box, { height: "calc(100vh - 230px)", sx: { display: "grid", width: "100%" }, children: _jsx(LepStyledDataGrid, { density: "compact", apiRef: apiRef, slotProps: {
173
- columnMenu: {
174
- myCustomHandler: () => {
175
- restoreState();
176
- },
177
- },
178
- }, slots: {
179
- columnMenu: CustomColumnMenu,
180
- }, initialState: state, hideFooter: true, rows: data || [], columns: columns, filterModel: filterModel, onFilterModelChange: (model) => setFilterModel(model), onRowClick: onRowClick, defaultGroupingExpansionDepth: -1 }, key) }), _jsx(Modal, { open: Boolean(shareFile), onClose: () => setShareFile(null), children: _jsx(ModalDialog, { sx: {
181
- maxWidth: 400,
182
- }, children: _jsx(Grid, { container: true, spacing: 1, overflow: "auto", children: shareFile?.token ? (_jsxs(_Fragment, { children: [_jsx(Grid, { xs: 12, children: _jsx(NerdClickToCopy, { typographyProps: {
183
- sx: {
184
- lineBreak: "anywhere",
185
- },
186
- }, children: `${window._APP_CONFIG?.api?.endpoint}${window._APP_CONFIG?.api?.routePrefix}/shared_files/${shareFile.id}?token=${shareFile.token}` }) }), _jsx(Grid, { xs: 12, children: _jsx(Button, { fullWidth: true, onClick: () => {
187
- shareFileAction({ id: shareFile.id, share: false });
188
- }, children: "Unshare" }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Grid, { xs: 12, children: _jsxs(Typography, { children: ["By sharing this file it will be publicly viewable to people outside of the ", window._APP_CONFIG?.client?.name, " ", "organization. Do you wish to continue?"] }) }), _jsx(Grid, { xs: 12, children: _jsx(Button, { loading: shareFileLoading, fullWidth: true, onClick: () => {
189
- if (shareFile?.id)
190
- shareFileAction({ id: shareFile.id, share: true });
191
- }, children: "Share" }) })] })) }) }) }), _jsx(AddDocumentDialog, { open: open, onClose: () => setOpen(false) })] }));
192
- }
193
- const AddDocumentDialog = ({ open, onClose, }) => {
194
- const { carrierInvoiceID } = useContext(CarrierInvoicePanelContext);
195
- const { t } = useTranslation("common", { i18n: salesKitI18n });
196
- const [file, setFile] = useState(null);
197
- const [documentType, setDocumentType] = useState(null);
198
- const [uploadFile, { isLoading }] = useUploadArcherFileMutation();
199
- const dispatch = useDispatch();
200
- const handleClose = () => {
201
- onClose();
202
- setFile(null);
203
- setDocumentType(null);
204
- };
205
- const handleCreate = () => {
44
+ const [uploadFile] = useUploadArcherFileMutation();
45
+ const handleCreate = (file, documentType) => {
206
46
  const id = Number(carrierInvoiceID);
207
47
  if (!Number.isNaN(id) && file && documentType) {
208
- uploadFile({
48
+ return uploadFile({
209
49
  description: documentType,
210
50
  file,
211
51
  modelID: id,
212
52
  modelType: "CarrierInvoice",
213
- })
214
- .unwrap()
215
- .then(() => handleClose())
216
- .catch(() => handleClose());
53
+ });
217
54
  }
55
+ return;
218
56
  };
219
- return (_jsx(Modal, { open: open, onClose: handleClose, children: _jsxs(ModalDialog, { "aria-labelledby": "modal-dialog-title", layout: "center", sx: (theme) => ({
220
- width: 500,
221
- [theme.breakpoints.only("xs")]: {
222
- top: 0,
223
- left: 0,
224
- right: 0,
225
- bottom: 0,
226
- border: 0,
227
- borderRadius: 0,
228
- transform: "initial",
229
- maxWidth: "initial",
230
- maxHeight: "initial",
231
- width: "initial",
232
- },
233
- }), children: [_jsx(Typography, { id: "modal-dialog-title", level: "h2", children: t("entities:archerFile.others.upload_document") }), _jsxs(Grid, { container: true, spacing: 2, overflow: "auto", justifyContent: "center", children: [_jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: t("entities:archerFile.others.document_type") }), _jsx(Select, { value: documentType, onChange: (_e, v) => setDocumentType(v), children: tenderDocumentTypes.map((d) => (_jsx(Option, { value: d, children: d }, d))) })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(NerdFileUpload, { uploadFile: (file) => setFile(file), slotProps: {
234
- root: {
235
- variant: "soft",
236
- size: "sm",
237
- },
238
- }, accept: [
239
- "image/gif",
240
- "image/jpeg",
241
- "image/jpg",
242
- "image/png",
243
- "image/tiff",
244
- "application/pdf",
245
- "application/vnd.ms-excel",
246
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
247
- ], maxSize: 30000000, onError: (error) => dispatch(showNotification({
248
- severity: "danger",
249
- title: error.message,
250
- autohide: true,
251
- variant: "non-intrusive",
252
- })) }), _jsxs(FormHelperText, { children: ["Accepted formats: gif, jpeg, jpg, png, tiff, pdf, xls, xlsx", _jsx("br", {}), "Limit: 30 MB"] })] }) }), file ? (_jsx(Grid, { xs: 12, children: _jsx(Sheet, { sx: {
253
- p: 0.5,
254
- borderRadius: 5,
255
- }, children: _jsxs(Grid, { container: true, gap: 2, alignItems: "center", children: [_jsx(Grid, { children: _jsx(Typography, { level: "h2", color: "primary", children: _jsx("i", { className: "fa-regular fa-file" }) }) }), _jsxs(Grid, { children: [_jsx(Typography, { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", level: "body-md", display: "inline", children: file.name }), _jsx(Typography, { ml: 1, level: "body-xs", display: "inline", children: `(${(file.size / 1000000).toFixed(2)} MB)` })] }), _jsx(Grid, { marginLeft: "auto", children: _jsx(IconButton, { variant: "plain", color: "danger", onClick: () => setFile(null), size: "sm", children: _jsx("i", { className: "fa-solid fa-xmark" }) }) })] }) }) })) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: handleClose, color: "neutral", variant: "soft", children: t("global.Cancel") }), _jsx(Button, { loading: isLoading, onClick: handleCreate, children: t("global.Upload") })] })] }) }));
256
- };
57
+ return (_jsxs(Box, { children: [_jsx(Box, { display: "flex", sx: {
58
+ mb: 1,
59
+ }, children: _jsx(Button, { startDecorator: _jsx("i", { className: "fa-solid fa-file-arrow-up" }), size: "sm", variant: "soft", color: "neutral", onClick: () => setOpen(true), disabled: Number.isNaN(Number(carrierInvoiceID)), children: t("entities:archerFile.others.upload_document") }) }), _jsx(Box, { height: "calc(100vh - 230px)", sx: { display: "grid", width: "100%" }, children: _jsx(ArcherFilesDataGrid, { fileTypes: TENDER_DOCUMENT_TYPES, files: data || [], localStorageKey: localStorageKey, onAddFileDialogClose: () => setOpen(false), openAddFileDialog: open, onUploadFile: handleCreate }) })] }));
60
+ }
257
61
  //# sourceMappingURL=carrierInvoiceDocuments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carrierInvoiceDocuments.js","sourceRoot":"","sources":["../../../src/hooks/carrierInvoicePanel/carrierInvoiceDocuments.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,mBAAmB,EAEnB,aAAa,GAKd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,8BAA8B,EAC9B,iBAAiB,EACjB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,GAAG,EACH,MAAM,EACN,WAAW,EACX,SAAS,EACT,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,EACL,cAAc,EACd,OAAO,EACP,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,OA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AC3B,GACR,EACP,MAAC,IAAI,eACH,KAAC,UAAU,IACT,YAAY,EAAE,UAAU,EACxB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAC,QAAQ,EACnB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,QAAQ,YAEhB,IAAI,CAAC,IAAI,GACC,EACb,KAAC,UAAU,IAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,QAAQ,YACjD,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,GAChC,IACR,EACP,KAAC,IAAI,IAAC,UAAU,EAAE,MAAM,YACtB,KAAC,UAAU,IACT,OAAO,EAAC,OAAO,EACf,KAAK,EAAC,QAAQ,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAC5B,IAAI,EAAE,IAAI,YAEV,YAAG,SAAS,EAAC,mBAAmB,GAAG,GACxB,GACR,IACF,GACD,GACH,CACR,CAAC,CAAC,CAAC,IAAI,IACH,EACP,MAAC,aAAa,eACZ,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,SAAS,EAAC,OAAO,EAAC,MAAM,YACzD,CAAC,CAAC,eAAe,CAAC,GACZ,EACT,KAAC,MAAM,IAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,YAC9C,CAAC,CAAC,eAAe,CAAC,GACZ,IACK,IACJ,GACR,CACT,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"carrierInvoiceDocuments.js","sourceRoot":"","sources":["../../../src/hooks/carrierInvoicePanel/carrierInvoiceDocuments.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EACL,8BAA8B,EAC9B,iBAAiB,EACjB,2BAA2B,GAC5B,MAAM,aAAa,CAAC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ACT,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,eACF,KAAC,GAAG,IACF,OAAO,EAAE,MAAM,EACf,EAAE,EAAE;oBACF,EAAE,EAAE,CAAC;iBACN,YAED,KAAC,MAAM,IACL,cAAc,EAAE,YAAG,SAAS,EAAC,2BAA2B,GAAK,EAC7D,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,MAAM,EACd,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAC5B,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,YAE/C,CAAC,CAAC,4CAA4C,CAAC,GACzC,GACL,EACN,KAAC,GAAG,IACF,MAAM,EAAE,qBAAqB,EAC7B,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAEtC,KAAC,mBAAmB,IAClB,SAAS,EAAE,qBAAqB,EAChC,KAAK,EAAE,IAAI,IAAI,EAAE,EACjB,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAC1C,iBAAiB,EAAE,IAAI,EACvB,YAAY,EAAE,YAAY,GAC1B,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- export declare const tenderDocumentTypes: string[];
1
+ export declare const TENDER_DOCUMENT_TYPES: string[];
@@ -1,4 +1,4 @@
1
- export const tenderDocumentTypes = [
1
+ export const TENDER_DOCUMENT_TYPES = [
2
2
  "Carrier Tenders",
3
3
  "Invoice",
4
4
  "POD",
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../../src/hooks/carrierInvoicePanel/consts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,iBAAiB;IACjB,SAAS;IACT,KAAK;IACL,iBAAiB;CAClB,CAAC"}
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../../src/hooks/carrierInvoicePanel/consts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,iBAAiB;IACjB,SAAS;IACT,KAAK;IACL,iBAAiB;CAClB,CAAC"}
@@ -1,25 +1,13 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { GridActionsCellItem, useGridApiRef, } from "@mui/x-data-grid-premium";
3
- import { useContext, useEffect, useMemo, useState } from "react";
4
- import { getPeopleSelectors, useDeleteArcherFileMutation, useGetCargoConsolidationQuery, useGetCarrierTenderFilesQuery, useGetPeopleQuery, useShareArcherFileMutation, useUpdateArcherFileMutation, useUploadArcherFileMutation, } from "../../redux";
5
- import { Box, Button, FormControl, FormLabel, Grid, Modal, ModalDialog, Select, Skeleton, Typography, Option, IconButton, Sheet, FormHelperText, Tooltip, DialogActions, } from "@mui/joy";
6
- import { DateTime } from "luxon";
7
- import { NerdClickToCopy, NerdFileUpload, showNotification, useNerdConfirm, useNerdSaveDataGridState, useNerdWindow, } from "@nerdjs/nerd-ui";
2
+ import { useContext, useMemo, useState } from "react";
3
+ import { useGetCargoConsolidationQuery, useGetCarrierTenderFilesQuery, useGetPeopleQuery, useUploadArcherFileMutation, } from "../../redux";
4
+ import { Box, Button, Skeleton } from "@mui/joy";
8
5
  import salesKitI18n from "../../i18n";
9
6
  import { useTranslation } from "react-i18next";
10
7
  import { CarrierTenderPanelContext } from "./carrierTenderPanel";
11
- import { useDispatch, useSelector } from "react-redux";
12
- import { Person } from "../../entities";
13
- import { LepStyledDataGrid } from "../lep/lepStyledDataGrid";
14
- import { tenderDocumentTypes } from "./consts";
15
- import { CustomColumnMenu } from "../lep";
8
+ import { TENDER_DOCUMENT_TYPES } from "./consts";
9
+ import { ArcherFilesDataGrid } from "../archerFilesDataGrid";
16
10
  const LOCAL_STORAGE_KEY = "CarrierTenderDocumentsDataGridState";
17
- const KEYS_MAP = {
18
- name: "file_name",
19
- };
20
- const INITIAL_STATE = {
21
- sorting: { sortModel: [{ field: "description", sort: "asc" }] },
22
- };
23
11
  /**
24
12
  *
25
13
  * @returns {ReactElement} AssignCarrierTenderDocuments
@@ -44,194 +32,20 @@ export function CarrierTenderDocuments() {
44
32
  * @returns {ReactElement} Content
45
33
  */
46
34
  function Content() {
47
- const { carrierTenderID, localStoragePrefix } = useContext(CarrierTenderPanelContext);
35
+ const { carrierTenderID, localStoragePrefix, cargoConsolidationID } = useContext(CarrierTenderPanelContext);
36
+ const { data } = useGetCarrierTenderFilesQuery(Number(carrierTenderID), {
37
+ skip: Number.isNaN(Number(carrierTenderID)),
38
+ });
48
39
  const localStorageKey = useMemo(() => localStoragePrefix
49
40
  ? localStoragePrefix + LOCAL_STORAGE_KEY
50
41
  : LOCAL_STORAGE_KEY, [localStoragePrefix]);
51
42
  const { t } = useTranslation("common", { i18n: salesKitI18n });
52
- const apiRef = useGridApiRef();
53
43
  const [open, setOpen] = useState(false);
54
- const { data } = useGetCarrierTenderFilesQuery(Number(carrierTenderID), {
55
- skip: Number.isNaN(Number(carrierTenderID)),
56
- });
57
- const params2 = useMemo(() => ({
58
- filters: JSON.stringify([
59
- { name: "people.company_id", comparison: "eq", value: 1 },
60
- { name: "people.active", comparison: "eq", value: true },
61
- ]),
62
- }), []);
63
- const { data: _personNames } = useGetPeopleQuery(params2);
64
- const selectAllPersonNames = useMemo(() => getPeopleSelectors(params2).selectAll, [params2]);
65
- const personNames = useSelector(selectAllPersonNames);
66
- const [shareFileAction, { isLoading: shareFileLoading }] = useShareArcherFileMutation();
67
- const [deleteFile] = useDeleteArcherFileMutation();
68
- const confirm = useNerdConfirm();
69
- const [shareFile, setShareFile] = useState(null);
70
- const [filterModel, setFilterModel] = useState({
71
- items: [],
72
- });
73
- const personOptions = useMemo(() => personNames?.map((p) => ({
74
- label: new Person(p).name() || "",
75
- value: p.id,
76
- })), [personNames]);
77
- const { open: openDocument } = useNerdWindow();
78
- const [updateArcherFile] = useUpdateArcherFileMutation();
79
- const columns = useMemo(() => [
80
- {
81
- field: "name",
82
- headerName: "File",
83
- flex: 1,
84
- editable: true,
85
- },
86
- {
87
- field: "description",
88
- headerName: "Type",
89
- flex: 1,
90
- type: "singleSelect",
91
- valueOptions: tenderDocumentTypes,
92
- editable: true,
93
- },
94
- {
95
- field: "created_at",
96
- headerName: "Uploaded At",
97
- renderCell(params) {
98
- return params.value
99
- ? DateTime.fromISO(params.value).toUTC().toFormat("LL/dd/yyyy")
100
- : "";
101
- },
102
- flex: 1,
103
- },
104
- {
105
- field: "person_id",
106
- headerName: "Uploaded By",
107
- renderCell(params) {
108
- return _personNames?.entities[params.value]
109
- ? new Person(_personNames?.entities[params.value]).name()
110
- : "";
111
- },
112
- flex: 1,
113
- type: "singleSelect",
114
- valueOptions: personOptions,
115
- },
116
- {
117
- field: "actions",
118
- type: "actions",
119
- headerName: "Actions",
120
- getActions: ({ row, }) => {
121
- if (Object.keys(row).length > 0) {
122
- const extension = row.name.split(".").pop();
123
- const previwDisabled = !extension ||
124
- !["gif", "jpeg", "jpg", "png", "tiff", "pdf"].includes(extension.trim().toLowerCase());
125
- return [
126
- _jsx(GridActionsCellItem, { icon: _jsx(Tooltip, { title: previwDisabled
127
- ? "File preview is only available for the following file formats: gif, jpeg, jpg, png, tiff, pdf"
128
- : "Preview", children: _jsx("span", { children: _jsx("i", { style: {
129
- color: previwDisabled
130
- ? "var(--mui-palette-action-disabled)"
131
- : undefined,
132
- }, className: "fa-solid fa-eye" }) }) }), label: `View File`, disabled: previwDisabled, onClick: () => {
133
- if (!previwDisabled)
134
- openDocument({
135
- url: `${window._APP_CONFIG?.api?.endpoint}/v3/file-service/files/${row.id}?inline=1`,
136
- name: row.name,
137
- });
138
- } }, "view"),
139
- _jsx(GridActionsCellItem, { showInMenu: true, icon: _jsx("i", { className: "fa-solid fa-download" }), label: `Download File`, onClick: () => {
140
- const link = document.createElement("a");
141
- link.href = `${window._APP_CONFIG?.api?.endpoint}/v3/file-service/files/${row.id}`;
142
- link.click();
143
- link.remove();
144
- } }, "download"),
145
- _jsx(GridActionsCellItem, { showInMenu: true, icon: _jsx("i", { className: "fa-solid fa-trash" }), label: `Delete File`, disabled: row.description == "Rate Confirmation", onClick: () => {
146
- confirm.setOpen({
147
- onConfirm() {
148
- deleteFile(row.id);
149
- },
150
- });
151
- } }, "delete"),
152
- _jsx(GridActionsCellItem, { showInMenu: true, icon: _jsx("i", { className: "fa-solid fa-share" }), label: `Share File`, onClick: () => {
153
- setShareFile(row);
154
- } }, "share"),
155
- ];
156
- }
157
- else
158
- return [];
159
- },
160
- },
161
- ], [personOptions]);
162
- const { state, key, restoreState } = useNerdSaveDataGridState(apiRef, localStorageKey, INITIAL_STATE, [columns]);
163
- useEffect(() => {
164
- if (data && shareFile) {
165
- setShareFile(data.find((d) => d.id === shareFile.id) || null);
166
- }
167
- else
168
- setShareFile(null);
169
- }, [data]);
170
- const onRowUpdate = (newRow, oldRow) => {
171
- const body = {};
172
- Object.keys(newRow).forEach((key) => {
173
- const k = key;
174
- if (oldRow[k] !== newRow[k])
175
- body[KEYS_MAP[k] || k] = newRow[k];
176
- });
177
- if (Object.entries(body).length > 0 && newRow.id) {
178
- return updateArcherFile({
179
- id: newRow.id,
180
- body: { archerfile: body },
181
- })
182
- .unwrap()
183
- .then(() => {
184
- return newRow;
185
- })
186
- .catch(() => {
187
- return oldRow;
188
- });
189
- }
190
- return oldRow;
191
- };
192
- return (_jsxs(Box, { children: [_jsx(Box, { display: "flex", sx: {
193
- mb: 1,
194
- }, children: _jsx(Button, { startDecorator: _jsx("i", { className: "fa-solid fa-file-arrow-up" }), size: "sm", variant: "soft", color: "neutral", onClick: () => setOpen(true), disabled: Number.isNaN(Number(carrierTenderID)), children: t("entities:archerFile.others.upload_document") }) }), _jsx(Box, { height: "calc(100vh - 230px)", sx: { display: "grid", width: "100%" }, children: _jsx(LepStyledDataGrid, { density: "compact", apiRef: apiRef, slotProps: {
195
- columnMenu: {
196
- myCustomHandler: () => {
197
- restoreState();
198
- },
199
- },
200
- }, slots: {
201
- columnMenu: CustomColumnMenu,
202
- }, initialState: state, hideFooter: true, rows: data || [], columns: columns, filterModel: filterModel, onFilterModelChange: (model) => setFilterModel(model), processRowUpdate: onRowUpdate, editMode: "row", onCellClick: (e) => {
203
- if (apiRef.current?.isCellEditable(e) &&
204
- apiRef.current?.getRowMode(e.id) === "view")
205
- apiRef.current?.startRowEditMode({ id: e.id });
206
- }, defaultGroupingExpansionDepth: -1 }, key) }), _jsx(Modal, { open: Boolean(shareFile), onClose: () => setShareFile(null), children: _jsx(ModalDialog, { sx: {
207
- maxWidth: 400,
208
- }, children: _jsx(Grid, { container: true, spacing: 1, overflow: "auto", children: shareFile?.token ? (_jsxs(_Fragment, { children: [_jsx(Grid, { xs: 12, children: _jsx(NerdClickToCopy, { typographyProps: {
209
- sx: {
210
- lineBreak: "anywhere",
211
- },
212
- }, children: `${window._APP_CONFIG?.api?.endpoint}${window._APP_CONFIG?.api?.routePrefix}/shared_files/${shareFile.id}?token=${shareFile.token}` }) }), _jsx(Grid, { xs: 12, children: _jsx(Button, { fullWidth: true, onClick: () => {
213
- shareFileAction({ id: shareFile.id, share: false });
214
- }, children: "Unshare" }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Grid, { xs: 12, children: _jsxs(Typography, { children: ["By sharing this file it will be publicly viewable to people outside of the ", window._APP_CONFIG?.client?.name, " ", "organization. Do you wish to continue?"] }) }), _jsx(Grid, { xs: 12, children: _jsx(Button, { loading: shareFileLoading, fullWidth: true, onClick: () => {
215
- if (shareFile?.id)
216
- shareFileAction({ id: shareFile.id, share: true });
217
- }, children: "Share" }) })] })) }) }) }), _jsx(AddDocumentDialog, { open: open, onClose: () => setOpen(false) })] }));
218
- }
219
- const AddDocumentDialog = ({ open, onClose, }) => {
220
- const { carrierTenderID, cargoConsolidationID } = useContext(CarrierTenderPanelContext);
221
- const { t } = useTranslation("common", { i18n: salesKitI18n });
222
- const [file, setFile] = useState(null);
223
- const [documentType, setDocumentType] = useState(null);
224
- const [uploadFile, { isLoading }] = useUploadArcherFileMutation();
225
- const dispatch = useDispatch();
44
+ const [uploadFile] = useUploadArcherFileMutation();
226
45
  const { data: cargoCons } = useGetCargoConsolidationQuery(Number(cargoConsolidationID), {
227
46
  skip: Number.isNaN(Number(cargoConsolidationID)),
228
47
  });
229
- const handleClose = () => {
230
- onClose();
231
- setFile(null);
232
- setDocumentType(null);
233
- };
234
- const handleCreate = () => {
48
+ const handleCreate = (file, documentType) => {
235
49
  const id = Number(carrierTenderID);
236
50
  if (!Number.isNaN(id) && file && documentType) {
237
51
  let attributes = undefined;
@@ -242,54 +56,18 @@ const AddDocumentDialog = ({ open, onClose, }) => {
242
56
  attributable_id: id,
243
57
  })));
244
58
  }
245
- uploadFile({
59
+ return uploadFile({
246
60
  description: documentType,
247
61
  file,
248
62
  modelID: id,
249
63
  modelType: "CarrierTender",
250
64
  attributes,
251
- })
252
- .unwrap()
253
- .then(() => handleClose())
254
- .catch(() => handleClose());
65
+ });
255
66
  }
67
+ return;
256
68
  };
257
- return (_jsx(Modal, { open: open, onClose: handleClose, children: _jsxs(ModalDialog, { "aria-labelledby": "modal-dialog-title", layout: "center", sx: (theme) => ({
258
- width: 500,
259
- [theme.breakpoints.only("xs")]: {
260
- top: 0,
261
- left: 0,
262
- right: 0,
263
- bottom: 0,
264
- border: 0,
265
- borderRadius: 0,
266
- transform: "initial",
267
- maxWidth: "initial",
268
- maxHeight: "initial",
269
- width: "initial",
270
- },
271
- }), children: [_jsx(Typography, { id: "modal-dialog-title", level: "h2", children: t("entities:archerFile.others.upload_document") }), _jsxs(Grid, { container: true, spacing: 2, overflow: "auto", justifyContent: "center", children: [_jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(FormLabel, { children: t("entities:archerFile.others.document_type") }), _jsx(Select, { value: documentType, onChange: (_e, v) => setDocumentType(v), children: tenderDocumentTypes.map((d) => (_jsx(Option, { value: d, children: d }, d))) })] }) }), _jsx(Grid, { xs: 12, children: _jsxs(FormControl, { children: [_jsx(NerdFileUpload, { uploadFile: (file) => setFile(file), slotProps: {
272
- root: {
273
- variant: "soft",
274
- size: "sm",
275
- },
276
- }, accept: [
277
- "image/gif",
278
- "image/jpeg",
279
- "image/jpg",
280
- "image/png",
281
- "image/tiff",
282
- "application/pdf",
283
- "application/vnd.ms-excel",
284
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
285
- ], maxSize: 30000000, onError: (error) => dispatch(showNotification({
286
- severity: "danger",
287
- title: error.message,
288
- autohide: true,
289
- variant: "non-intrusive",
290
- })) }), _jsxs(FormHelperText, { children: ["Accepted formats: gif, jpeg, jpg, png, tiff, pdf, xls, xlsx", _jsx("br", {}), "Limit: 30 MB"] })] }) }), file ? (_jsx(Grid, { xs: 12, children: _jsx(Sheet, { sx: {
291
- p: 0.5,
292
- borderRadius: 5,
293
- }, children: _jsxs(Grid, { container: true, gap: 2, alignItems: "center", children: [_jsx(Grid, { children: _jsx(Typography, { level: "h2", color: "primary", children: _jsx("i", { className: "fa-regular fa-file" }) }) }), _jsxs(Grid, { children: [_jsx(Typography, { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", level: "body-md", display: "inline", children: file.name }), _jsx(Typography, { ml: 1, level: "body-xs", display: "inline", children: `(${(file.size / 1000000).toFixed(2)} MB)` })] }), _jsx(Grid, { marginLeft: "auto", children: _jsx(IconButton, { variant: "plain", color: "danger", onClick: () => setFile(null), size: "sm", children: _jsx("i", { className: "fa-solid fa-xmark" }) }) })] }) }) })) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: handleClose, color: "neutral", variant: "soft", children: t("global.Cancel") }), _jsx(Button, { loading: isLoading, onClick: handleCreate, children: t("global.Upload") })] })] }) }));
294
- };
69
+ return (_jsxs(Box, { children: [_jsx(Box, { display: "flex", sx: {
70
+ mb: 1,
71
+ }, children: _jsx(Button, { startDecorator: _jsx("i", { className: "fa-solid fa-file-arrow-up" }), size: "sm", variant: "soft", color: "neutral", onClick: () => setOpen(true), disabled: Number.isNaN(Number(carrierTenderID)), children: t("entities:archerFile.others.upload_document") }) }), _jsx(Box, { height: "calc(100vh - 230px)", sx: { display: "grid", width: "100%" }, children: _jsx(ArcherFilesDataGrid, { files: data || [], localStorageKey: localStorageKey, onAddFileDialogClose: () => setOpen(false), openAddFileDialog: open, fileTypes: TENDER_DOCUMENT_TYPES, onUploadFile: handleCreate }) })] }));
72
+ }
295
73
  //# sourceMappingURL=carrierTenderDocuments.js.map