@movalib/movalib-commons 1.68.18 → 1.68.19

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.
@@ -10,7 +10,7 @@ var Toolbar_1 = __importDefault(require("@mui/material/Toolbar"));
10
10
  var theme_1 = __importDefault(require("../../theme"));
11
11
  var DialogTitle_1 = __importDefault(require("@mui/material/DialogTitle"));
12
12
  var Box_1 = __importDefault(require("@mui/material/Box"));
13
- var FindInPage_1 = __importDefault(require("@mui/icons-material/FindInPage"));
13
+ var icons_material_1 = require("@mui/icons-material");
14
14
  var Typography_1 = __importDefault(require("@mui/material/Typography"));
15
15
  var IconButton_1 = __importDefault(require("@mui/material/IconButton"));
16
16
  var CloseRounded_1 = __importDefault(require("@mui/icons-material/CloseRounded"));
@@ -30,7 +30,7 @@ var LinkedDocumentDialog = function (_a) {
30
30
  background: theme_1.default.palette.grey[200],
31
31
  minHeight: 3,
32
32
  p: 0,
33
- }, children: (0, jsx_runtime_1.jsx)(DialogTitle_1.default, { id: 'search-dialog-title', children: (0, jsx_runtime_1.jsxs)(Box_1.default, { position: 'relative', sx: { display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }, children: [(0, jsx_runtime_1.jsx)(FindInPage_1.default, { sx: { height: '30px', width: '30px' } }), (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: 'h6', sx: {
33
+ }, children: (0, jsx_runtime_1.jsx)(DialogTitle_1.default, { id: 'search-dialog-title', children: (0, jsx_runtime_1.jsxs)(Box_1.default, { position: 'relative', sx: { display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }, children: [(0, jsx_runtime_1.jsx)(icons_material_1.FindInPage, { sx: { height: '30px', width: '30px' } }), (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: 'h6', sx: {
34
34
  textTransform: 'uppercase',
35
35
  fontStyle: 'bold',
36
36
  textAlign: 'center',
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = MovaTableBack;
7
7
  var jsx_runtime_1 = require("react/jsx-runtime");
8
- var Refresh_1 = __importDefault(require("@mui/icons-material/Refresh"));
8
+ var icons_material_1 = require("@mui/icons-material");
9
9
  var Search_1 = __importDefault(require("@mui/icons-material/Search"));
10
10
  var material_1 = require("@mui/material");
11
11
  var react_1 = require("react");
@@ -61,7 +61,7 @@ function MovaTableBack(_a) {
61
61
  gap: 2,
62
62
  }, children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", type: "search", onChange: handleSearchChange, inputProps: {
63
63
  startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "start", children: (0, jsx_runtime_1.jsx)(Search_1.default, {}) })),
64
- }, sx: { width: "100%" }, placeholder: "Rechercher" }), refresh && ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", onClick: refresh, variant: "contained", children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) }))] }), filterChildren && filterChildren, (0, jsx_runtime_1.jsx)(material_1.TableContainer, { sx: { height: "100%" }, component: material_1.Paper, children: (0, jsx_runtime_1.jsxs)(material_1.Table, { size: compact ? "small" : "medium", sx: { height: "100%" }, stickyHeader: true, children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: displayedColumns.map(function (column, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: column.displayName }, index)); }) }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { sx: { overflowY: "auto" }, children: [isLoading && ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, { colSpan: 5, sx: { padding: 0 }, children: (0, jsx_runtime_1.jsx)(material_1.LinearProgress, {}) }) })), (data === null || data === void 0 ? void 0 : data.length) !== 0 &&
64
+ }, sx: { width: "100%" }, placeholder: "Rechercher" }), refresh && ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", onClick: refresh, variant: "contained", children: (0, jsx_runtime_1.jsx)(icons_material_1.Refresh, {}) }))] }), filterChildren && filterChildren, (0, jsx_runtime_1.jsx)(material_1.TableContainer, { sx: { height: "100%" }, component: material_1.Paper, children: (0, jsx_runtime_1.jsxs)(material_1.Table, { size: compact ? "small" : "medium", sx: { height: "100%" }, stickyHeader: true, children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: displayedColumns.map(function (column, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: column.displayName }, index)); }) }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { sx: { overflowY: "auto" }, children: [isLoading && ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, { colSpan: 5, sx: { padding: 0 }, children: (0, jsx_runtime_1.jsx)(material_1.LinearProgress, {}) }) })), (data === null || data === void 0 ? void 0 : data.length) !== 0 &&
65
65
  (data === null || data === void 0 ? void 0 : data.map(function (element, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableRow, { onDoubleClick: function () {
66
66
  handleDoubleClick(element);
67
67
  }, onClick: function () { return handleRowClick(element); }, onContextMenu: function (event) {
@@ -74,8 +74,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
74
74
  Object.defineProperty(exports, "__esModule", { value: true });
75
75
  exports.QrCodePLVContainer = exports.getPdfDocument = void 0;
76
76
  var jsx_runtime_1 = require("react/jsx-runtime");
77
- var DocumentScanner_1 = __importDefault(require("@mui/icons-material/DocumentScanner"));
78
- var QrCode2_1 = __importDefault(require("@mui/icons-material/QrCode2"));
77
+ var icons_material_1 = require("@mui/icons-material");
79
78
  var material_1 = require("@mui/material");
80
79
  require("../../style/QRCode.css");
81
80
  var html2canvas_1 = __importDefault(require("html2canvas"));
@@ -298,7 +297,7 @@ var QrCodePLVContainer = function (_a) {
298
297
  printA3PLV,
299
298
  printA4PLV,
300
299
  ]);
301
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: "24px", children: [urlA4 && ((0, jsx_runtime_1.jsx)(PLVComponent_1.PLVComponentV2, { ref: PLVrefA4, url: urlA4, printSize: PLVComponent_1.PrintSize.A4 })), urlA3 && ((0, jsx_runtime_1.jsx)(PLVComponent_1.PLVComponentV2, { ref: PLVrefA3, url: urlA3, printSize: PLVComponent_1.PrintSize.A3 })), (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 7, children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, { fullWidth: true, size: "small", children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { id: "qrcode-plv-select", children: "Choisissez votre support" }), (0, jsx_runtime_1.jsxs)(material_1.Select, { labelId: "qrcode-plv-select", label: "Choisissez votre support", id: "qrcode-plv-select", onChange: onChangeSelectedChoice, value: selectedChoice, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "A4", children: "\uD83E\uDDFE\u00A0\u00A0PLV format A4" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "A3", children: "\uD83E\uDDFE\u00A0\u00A0PLV format A3" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "QR_Google", children: "QR Code format GoogleMyBusiness" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "QR_Headless", children: "QR Code seul" })] })] }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 4, marginLeft: 3, children: (selectedChoice === "A3" || selectedChoice === "A4") && !isReady ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(material_1.Button, { startIcon: selectedChoice === "A3" || selectedChoice === "A4" ? ((0, jsx_runtime_1.jsx)(DocumentScanner_1.default, {})) : ((0, jsx_runtime_1.jsx)(QrCode2_1.default, {})), onClick: onClickDownload, variant: "outlined", disabled: !selectedChoice ||
300
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: "24px", children: [urlA4 && ((0, jsx_runtime_1.jsx)(PLVComponent_1.PLVComponentV2, { ref: PLVrefA4, url: urlA4, printSize: PLVComponent_1.PrintSize.A4 })), urlA3 && ((0, jsx_runtime_1.jsx)(PLVComponent_1.PLVComponentV2, { ref: PLVrefA3, url: urlA3, printSize: PLVComponent_1.PrintSize.A3 })), (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 7, children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, { fullWidth: true, size: "small", children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { id: "qrcode-plv-select", children: "Choisissez votre support" }), (0, jsx_runtime_1.jsxs)(material_1.Select, { labelId: "qrcode-plv-select", label: "Choisissez votre support", id: "qrcode-plv-select", onChange: onChangeSelectedChoice, value: selectedChoice, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "A4", children: "\uD83E\uDDFE\u00A0\u00A0PLV format A4" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "A3", children: "\uD83E\uDDFE\u00A0\u00A0PLV format A3" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "QR_Google", children: "QR Code format GoogleMyBusiness" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "QR_Headless", children: "QR Code seul" })] })] }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 4, marginLeft: 3, children: (selectedChoice === "A3" || selectedChoice === "A4") && !isReady ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(material_1.Button, { startIcon: selectedChoice === "A3" || selectedChoice === "A4" ? ((0, jsx_runtime_1.jsx)(icons_material_1.DocumentScanner, {})) : ((0, jsx_runtime_1.jsx)(icons_material_1.QrCode2, {})), onClick: onClickDownload, variant: "outlined", disabled: !selectedChoice ||
302
301
  ((selectedChoice === "A3" || selectedChoice === "A4") &&
303
302
  !isReady), sx: {
304
303
  color: (0, material_1.darken)(theme.palette.primary.main, 0.2),
@@ -51,8 +51,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
51
51
  };
52
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
53
  var jsx_runtime_1 = require("react/jsx-runtime");
54
- var ContentCopy_1 = __importDefault(require("@mui/icons-material/ContentCopy"));
55
- var AttachFile_1 = __importDefault(require("@mui/icons-material/AttachFile"));
54
+ var icons_material_1 = require("@mui/icons-material");
56
55
  var CloseRounded_1 = __importDefault(require("@mui/icons-material/CloseRounded"));
57
56
  var EditRounded_1 = __importDefault(require("@mui/icons-material/EditRounded"));
58
57
  var material_1 = require("@mui/material");
@@ -281,7 +280,7 @@ var VehicleFullCard = function (_a) {
281
280
  case 1: return [2 /*return*/, _a.sent()];
282
281
  }
283
282
  });
284
- }); }, "aria-label": "Copier la plaque", children: (0, jsx_runtime_1.jsx)(ContentCopy_1.default, { sx: { fontSize: 14, color: "text.disabled" } }) })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-end", gap: 1 }, children: [onDelete && ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", color: "error", size: "small", onClick: function (e) { return handleOnClickDeleteVehicle(e); }, children: "Supprimer" })), !localEditMode && ((0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleOnClickEdit, size: "small", variant: "outlined", startIcon: (0, jsx_runtime_1.jsx)(EditRounded_1.default, { sx: { fontSize: "14px !important" } }), sx: {
283
+ }); }, "aria-label": "Copier la plaque", children: (0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, { sx: { fontSize: 14, color: "text.disabled" } }) })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-end", gap: 1 }, children: [onDelete && ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", color: "error", size: "small", onClick: function (e) { return handleOnClickDeleteVehicle(e); }, children: "Supprimer" })), !localEditMode && ((0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleOnClickEdit, size: "small", variant: "outlined", startIcon: (0, jsx_runtime_1.jsx)(EditRounded_1.default, { sx: { fontSize: "14px !important" } }), sx: {
285
284
  fontSize: 12,
286
285
  borderColor: "divider",
287
286
  }, children: "Modifier" }))] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { px: 2, py: 1.5, borderBottom: "0.5px solid", borderColor: "divider" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: sectionTitleSx, children: "Kilom\u00E9trage" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 1 }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { bgcolor: "grey.50", borderRadius: 1, p: 1.25 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "text.secondary", display: "block", children: "Actuel" }), !localEditMode ? ((0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body1", fontWeight: 500, children: [(_b = vehicle.currentMileage) !== null && _b !== void 0 ? _b : "-", " ", (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "span", variant: "caption", color: "text.secondary", children: "km" })] })) : ((0, jsx_runtime_1.jsx)(material_1.TextField, { name: "currentMileage", variant: "standard", type: "number", required: true, value: (_c = form.currentMileage.value) !== null && _c !== void 0 ? _c : "", onChange: handleInputChange, error: Boolean(form.currentMileage.error), helperText: Boolean(form.currentMileage.error && form.currentMileage.value > 0)
@@ -291,7 +290,7 @@ var VehicleFullCard = function (_a) {
291
290
  case 0: return [4 /*yield*/, navigator.clipboard.writeText(vehicle.vin)];
292
291
  case 1: return [2 /*return*/, _a.sent()];
293
292
  }
294
- }); }); }, "aria-label": "Copier le VIN", children: (0, jsx_runtime_1.jsx)(ContentCopy_1.default, { sx: { fontSize: 13, color: "text.disabled" } }) })] })] })), vehicle.energy && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "\u00C9nergie" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.energy })] })), vehicle.gearboxType && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Type bo\u00EEte" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.gearboxType })] })), vehicle.gearboxCode && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Code bo\u00EEte" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.gearboxCode })] })), vehicle.engineCode && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Code moteur" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.engineCode })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { px: 2, py: 1.5, borderBottom: "0.5px solid", borderColor: "divider" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: sectionTitleSx, children: "Pneumatiques" }), !localEditMode ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: isVehicleSecondaryTireSizeDefined(vehicle) ? "Avant" : "Taille" }), isVehicleTireSizeDefined(vehicle) ? ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: (0, Tools_1.formatVehicleTire)(vehicle.tireSize), size: "small", color: "primary", sx: {
293
+ }); }); }, "aria-label": "Copier le VIN", children: (0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, { sx: { fontSize: 13, color: "text.disabled" } }) })] })] })), vehicle.energy && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "\u00C9nergie" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.energy })] })), vehicle.gearboxType && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Type bo\u00EEte" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.gearboxType })] })), vehicle.gearboxCode && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Code bo\u00EEte" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.gearboxCode })] })), vehicle.engineCode && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Code moteur" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.engineCode })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { px: 2, py: 1.5, borderBottom: "0.5px solid", borderColor: "divider" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: sectionTitleSx, children: "Pneumatiques" }), !localEditMode ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: isVehicleSecondaryTireSizeDefined(vehicle) ? "Avant" : "Taille" }), isVehicleTireSizeDefined(vehicle) ? ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: (0, Tools_1.formatVehicleTire)(vehicle.tireSize), size: "small", color: "primary", sx: {
295
294
  fontWeight: 500,
296
295
  fontSize: 12,
297
296
  height: 24,
@@ -331,7 +330,7 @@ var VehicleFullCard = function (_a) {
331
330
  px: 1.5,
332
331
  py: 0.75,
333
332
  mb: 0.75,
334
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: invoice.originalFileName, children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: invoice.fileSignedUrl, target: "_blank", rel: "noopener", underline: "hover", sx: { fontSize: 13, color: "#185FA5", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", fontFamily: "Outfit" }, children: invoice.fileName }) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", disabled: !(invoice.ownerId.toString() === currentUser.id), onClick: function (e) { return handleDeleteDocument(e, invoice === null || invoice === void 0 ? void 0 : invoice.id); }, sx: { ml: 1, flexShrink: 0 }, children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, { sx: { fontSize: 16 } }) })] }, index + 1)); }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 1.5 }, children: [(0, jsx_runtime_1.jsx)("input", { accept: "image/*, application/pdf", type: "file", style: { display: "none" }, ref: invoiceInputRef, id: "raised-button-invoice", onChange: function (e) { return handleFileChange(e, docTypeCurrent.current); } }), (0, jsx_runtime_1.jsx)(material_1.Button, { fullWidth: true, size: "medium", disabled: currentUpload, onClick: function () { return setShowLinkedDocument(true); }, component: "span", variant: "outlined", startIcon: (0, jsx_runtime_1.jsx)(AttachFile_1.default, {}), sx: {
333
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: invoice.originalFileName, children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: invoice.fileSignedUrl, target: "_blank", rel: "noopener", underline: "hover", sx: { fontSize: 13, color: "#185FA5", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", fontFamily: "Outfit" }, children: invoice.fileName }) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", disabled: !(invoice.ownerId.toString() === currentUser.id), onClick: function (e) { return handleDeleteDocument(e, invoice === null || invoice === void 0 ? void 0 : invoice.id); }, sx: { ml: 1, flexShrink: 0 }, children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, { sx: { fontSize: 16 } }) })] }, index + 1)); }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 1.5 }, children: [(0, jsx_runtime_1.jsx)("input", { accept: "image/*, application/pdf", type: "file", style: { display: "none" }, ref: invoiceInputRef, id: "raised-button-invoice", onChange: function (e) { return handleFileChange(e, docTypeCurrent.current); } }), (0, jsx_runtime_1.jsx)(material_1.Button, { fullWidth: true, size: "medium", disabled: currentUpload, onClick: function () { return setShowLinkedDocument(true); }, component: "span", variant: "outlined", startIcon: (0, jsx_runtime_1.jsx)(icons_material_1.AttachFile, {}), sx: {
335
334
  border: "1.5px dashed",
336
335
  borderColor: "divider",
337
336
  color: "text.secondary",
@@ -18,6 +18,7 @@ export default class Garage {
18
18
  workforce: number;
19
19
  partialWorkforce?: number;
20
20
  contactPhone: string;
21
+ secondaryContactPhone: string;
21
22
  prestationCategories: CategoryPrestation[];
22
23
  prestations: Prestation[];
23
24
  schedules: Schedule[];
@@ -71,7 +72,7 @@ export default class Garage {
71
72
  newDocumentEditor?: boolean;
72
73
  isOnlineAppointment?: boolean;
73
74
  isOnlineQuote?: boolean;
74
- constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, prestationCategories: CategoryPrestation[], dayPeriodFastServiceExcluded: boolean, loanerVehicleFastServiceExcluded: boolean, fastServiceThreshold: number, timezone: string, settings: Settings[], vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, customStyle?: string, subscription?: Subscription, partialWorkforce?: number, mailCustomization?: boolean, billingActive?: boolean, billingToken?: string, legacyQuoteActive?: boolean, appId?: number, establishmentRegistrationNumber?: string, companyRegistrationNumber?: string, reopeningDate?: Date, targetMargin?: number, demoBillingActive?: boolean, onlyBilling?: boolean, newDocumentEditor?: boolean, googleReviewUrl?: string, isOnlineAppointment?: boolean, isOnlineQuote?: boolean);
75
+ constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, secondaryContactPhone: string, prestationCategories: CategoryPrestation[], dayPeriodFastServiceExcluded: boolean, loanerVehicleFastServiceExcluded: boolean, fastServiceThreshold: number, timezone: string, settings: Settings[], vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, customStyle?: string, subscription?: Subscription, partialWorkforce?: number, mailCustomization?: boolean, billingActive?: boolean, billingToken?: string, legacyQuoteActive?: boolean, appId?: number, establishmentRegistrationNumber?: string, companyRegistrationNumber?: string, reopeningDate?: Date, targetMargin?: number, demoBillingActive?: boolean, onlyBilling?: boolean, newDocumentEditor?: boolean, googleReviewUrl?: string, isOnlineAppointment?: boolean, isOnlineQuote?: boolean);
75
76
  }
76
77
  export declare function isStockActive(g: Garage): boolean;
77
78
  export declare function getSetting(settings: Settings[], code: string): string | null;
@@ -4,7 +4,7 @@ exports.isStockActive = isStockActive;
4
4
  exports.getSetting = getSetting;
5
5
  var Settings_1 = require("./Settings");
6
6
  var Garage = /** @class */ (function () {
7
- function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, prestationCategories, dayPeriodFastServiceExcluded, loanerVehicleFastServiceExcluded, fastServiceThreshold, timezone, settings, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce, mailCustomization, billingActive, billingToken, legacyQuoteActive, appId, establishmentRegistrationNumber, companyRegistrationNumber, reopeningDate, targetMargin, demoBillingActive, onlyBilling, newDocumentEditor, googleReviewUrl, isOnlineAppointment, isOnlineQuote) {
7
+ function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, secondaryContactPhone, prestationCategories, dayPeriodFastServiceExcluded, loanerVehicleFastServiceExcluded, fastServiceThreshold, timezone, settings, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce, mailCustomization, billingActive, billingToken, legacyQuoteActive, appId, establishmentRegistrationNumber, companyRegistrationNumber, reopeningDate, targetMargin, demoBillingActive, onlyBilling, newDocumentEditor, googleReviewUrl, isOnlineAppointment, isOnlineQuote) {
8
8
  if (onlyBilling === void 0) { onlyBilling = false; }
9
9
  if (newDocumentEditor === void 0) { newDocumentEditor = false; }
10
10
  this.id = id;
@@ -47,6 +47,7 @@ var Garage = /** @class */ (function () {
47
47
  this.newDocumentEditor = newDocumentEditor;
48
48
  this.isOnlineAppointment = isOnlineAppointment;
49
49
  this.isOnlineQuote = isOnlineQuote;
50
+ this.secondaryContactPhone = secondaryContactPhone;
50
51
  }
51
52
  return Garage;
52
53
  }());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.68.18",
3
+ "version": "1.68.19",
4
4
  "description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -3,7 +3,7 @@ import Toolbar from "@mui/material/Toolbar";
3
3
  import theme from "../../theme";
4
4
  import DialogTitle from "@mui/material/DialogTitle";
5
5
  import Box from "@mui/material/Box";
6
- import FindInPage from "@mui/icons-material/FindInPage";
6
+ import { FindInPage } from "@mui/icons-material";
7
7
  import Typography from "@mui/material/Typography";
8
8
  import IconButton from "@mui/material/IconButton";
9
9
  import CloseRounded from "@mui/icons-material/CloseRounded";
@@ -1,4 +1,4 @@
1
- import Refresh from "@mui/icons-material/Refresh";
1
+ import { Refresh } from "@mui/icons-material";
2
2
  import SearchIcon from "@mui/icons-material/Search";
3
3
  import {
4
4
  Box,
@@ -1,6 +1,4 @@
1
- import DocumentScanner from "@mui/icons-material/DocumentScanner";
2
- import QrCode2 from "@mui/icons-material/QrCode2";
3
-
1
+ import { DocumentScanner, QrCode2 } from "@mui/icons-material";
4
2
  import {
5
3
  Box,
6
4
  Button,
@@ -1,6 +1,4 @@
1
- import ContentCopy from "@mui/icons-material/ContentCopy";
2
- import AttachFile from "@mui/icons-material/AttachFile";
3
-
1
+ import { AttachFile, ContentCopy } from "@mui/icons-material";
4
2
  import {
5
3
  default as CancelIcon,
6
4
  default as CloseIcon,
@@ -19,6 +19,7 @@ export default class Garage {
19
19
  workforce: number;
20
20
  partialWorkforce?: number;
21
21
  contactPhone: string;
22
+ secondaryContactPhone: string;
22
23
  prestationCategories: CategoryPrestation[];
23
24
  prestations: Prestation[];
24
25
  schedules: Schedule[];
@@ -81,6 +82,7 @@ export default class Garage {
81
82
  prestations: Prestation[],
82
83
  schedules: Schedule[],
83
84
  contactPhone: string,
85
+ secondaryContactPhone: string,
84
86
  prestationCategories: CategoryPrestation[],
85
87
  dayPeriodFastServiceExcluded: boolean,
86
88
  loanerVehicleFastServiceExcluded: boolean,
@@ -154,6 +156,7 @@ export default class Garage {
154
156
  this.newDocumentEditor = newDocumentEditor;
155
157
  this.isOnlineAppointment = isOnlineAppointment;
156
158
  this.isOnlineQuote = isOnlineQuote;
159
+ this.secondaryContactPhone = secondaryContactPhone;
157
160
  }
158
161
 
159
162