@movalib/movalib-commons 1.68.37 → 1.68.38
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.
|
@@ -54,7 +54,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
54
54
|
var icons_material_1 = require("@mui/icons-material");
|
|
55
55
|
var CloseRounded_1 = __importDefault(require("@mui/icons-material/CloseRounded"));
|
|
56
56
|
var EditRounded_1 = __importDefault(require("@mui/icons-material/EditRounded"));
|
|
57
|
-
var
|
|
57
|
+
var StickyNote2_1 = __importDefault(require("@mui/icons-material/StickyNote2"));
|
|
58
58
|
var material_1 = require("@mui/material");
|
|
59
59
|
var x_date_pickers_1 = require("@mui/x-date-pickers");
|
|
60
60
|
var moment_1 = __importDefault(require("moment"));
|
|
@@ -283,7 +283,7 @@ var VehicleFullCard = function (_a) {
|
|
|
283
283
|
case 1: return [2 /*return*/, _a.sent()];
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
|
-
}); }, "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: [vehicle.notes && appType !== Enums_1.MovaAppType.INDIVIDUAL && (isDesktop ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: vehicle.notes.length > 500 ? vehicle.notes.slice(0, 500) + '…' : vehicle.notes, children: (0, jsx_runtime_1.jsx)(
|
|
286
|
+
}); }, "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: [vehicle.notes && appType !== Enums_1.MovaAppType.INDIVIDUAL && (isDesktop ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: vehicle.notes.length > 500 ? vehicle.notes.slice(0, 500) + '…' : vehicle.notes, children: (0, jsx_runtime_1.jsx)(StickyNote2_1.default, { sx: { color: theme.palette.primary.main, fontSize: 22, cursor: 'default', alignSelf: 'center' } }) })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: function (e) { return setNotesAnchorEl(e.currentTarget); }, sx: { p: 0.5, alignSelf: 'center' }, children: (0, jsx_runtime_1.jsx)(StickyNote2_1.default, { sx: { color: theme.palette.primary.main, fontSize: 22 } }) }), (0, jsx_runtime_1.jsx)(material_1.Popover, { open: Boolean(notesAnchorEl), anchorEl: notesAnchorEl, onClose: function () { return setNotesAnchorEl(null); }, anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { p: 2, maxWidth: 280, fontSize: 13 }, children: vehicle.notes.length > 500 ? vehicle.notes.slice(0, 500) + '…' : vehicle.notes }) })] }))), 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: {
|
|
287
287
|
fontSize: 12,
|
|
288
288
|
borderColor: "divider",
|
|
289
289
|
}, 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)
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
default as CloseIcon,
|
|
5
5
|
} from "@mui/icons-material/CloseRounded";
|
|
6
6
|
import EditIcon from "@mui/icons-material/EditRounded";
|
|
7
|
-
import
|
|
7
|
+
import StickyNote2Icon from "@mui/icons-material/StickyNote2";
|
|
8
8
|
import {
|
|
9
9
|
Alert,
|
|
10
10
|
Box,
|
|
@@ -407,12 +407,12 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({
|
|
|
407
407
|
{vehicle.notes && appType !== MovaAppType.INDIVIDUAL && (
|
|
408
408
|
isDesktop ? (
|
|
409
409
|
<Tooltip title={vehicle.notes.length > 500 ? vehicle.notes.slice(0, 500) + '…' : vehicle.notes}>
|
|
410
|
-
<
|
|
410
|
+
<StickyNote2Icon sx={{ color: theme.palette.primary.main, fontSize: 22, cursor: 'default', alignSelf: 'center' }} />
|
|
411
411
|
</Tooltip>
|
|
412
412
|
) : (
|
|
413
413
|
<>
|
|
414
414
|
<IconButton size="small" onClick={(e) => setNotesAnchorEl(e.currentTarget)} sx={{ p: 0.5, alignSelf: 'center' }}>
|
|
415
|
-
<
|
|
415
|
+
<StickyNote2Icon sx={{ color: theme.palette.primary.main, fontSize: 22 }} />
|
|
416
416
|
</IconButton>
|
|
417
417
|
<Popover
|
|
418
418
|
open={Boolean(notesAnchorEl)}
|