@movalib/movalib-commons 1.68.15 → 1.68.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/devIndex.tsx +5 -3
- package/dist/devIndex.js +29 -30
- package/dist/src/AccountValidation.js +11 -11
- package/dist/src/AddressFields.js +1 -12
- package/dist/src/ConfirmationDialog.js +3 -3
- package/dist/src/DialogForgotPassword.js +4 -15
- package/dist/src/DownloadedQRCode.js +4 -15
- package/dist/src/GaragePLV.js +3 -14
- package/dist/src/GenderSelector.js +1 -1
- package/dist/src/IbanInput.js +1 -1
- package/dist/src/Loader.js +1 -12
- package/dist/src/MovaCopyright.js +1 -1
- package/dist/src/MovaDialog.js +2 -2
- package/dist/src/MovaLogin.js +9 -9
- package/dist/src/MovaSignUp.js +12 -12
- package/dist/src/MovaSnackbar.js +1 -12
- package/dist/src/QRCode.js +5 -16
- package/dist/src/ScheduleFields.js +5 -5
- package/dist/src/components/LinkedDocumentDialog.d.ts +0 -1
- package/dist/src/components/LinkedDocumentDialog.js +5 -16
- package/dist/src/components/MovaTable/MovaTable.js +2 -2
- package/dist/src/components/MovaTableBack/MovaTableBack.js +8 -19
- package/dist/src/components/QrCodePLVContainer/PLVComponent.js +6 -17
- package/dist/src/components/QrCodePLVContainer/QrCodePLVContainer.js +26 -27
- package/dist/src/components/singup/ActivateAccount.js +3 -3
- package/dist/src/components/vehicle/VehicleFullCard.js +21 -21
- package/dist/src/components/vehicle/VehiclePlateField.js +4 -15
- package/dist/src/helpers/DateUtils.d.ts +1 -0
- package/dist/src/helpers/DateUtils.js +4 -4
- package/dist/src/helpers/Enums.js +27 -27
- package/dist/src/helpers/Tools.js +5 -5
- package/dist/src/helpers/Validator.js +3 -4
- package/dist/src/models/Customer.d.ts +4 -1
- package/dist/src/models/Customer.js +4 -1
- package/dist/src/models/Garage.js +2 -3
- package/dist/src/models/Settings.js +1 -1
- package/dist/src/services/AuthenticationService.js +2 -2
- package/dist/src/services/UserService.js +2 -2
- package/dist/src/style/styled.d.ts +4 -6
- package/dist/src/style/styled.js +1 -0
- package/dist/src/style/styled.ts +11 -3
- package/dist/src/utils/DialogPrint.js +1 -2
- package/dist/src/utils/getQRCodeBase64.d.ts +1 -3
- package/dist/src/utils/getQRCodeBase64.js +2 -2
- package/dist/theme.js +2 -2
- package/package.json +15 -22
- package/src/GaragePLV.tsx +3 -3
- package/src/components/QrCodePLVContainer/QrCodePLVContainer.tsx +3 -3
- package/src/helpers/DateUtils.ts +3 -3
- package/src/models/Customer.ts +11 -2
- package/src/react-app-env.d.ts +34 -1
- package/src/style/styled.ts +11 -3
|
@@ -161,7 +161,7 @@ var ActivateAccount = function (_a) {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [currentUser !== null && (0, jsx_runtime_1.jsx)(MovaSignUp_1.default, { movaAppType: movaAppType, onSubmit: updateActivateUseronSubmit, alertMessage: alertMessage, alertSeverity: alertSeverity, userToEdit: currentUser, loading: loading }), expiredCode && ((0, jsx_runtime_1.jsx)(material_1.Box,
|
|
164
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [currentUser !== null && (0, jsx_runtime_1.jsx)(MovaSignUp_1.default, { movaAppType: movaAppType, onSubmit: updateActivateUseronSubmit, alertMessage: alertMessage, alertSeverity: alertSeverity, userToEdit: currentUser, loading: loading }), expiredCode && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '99vw', height: '99vh', display: 'flex' }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
165
165
|
display: 'block',
|
|
166
166
|
margin: 'auto',
|
|
167
167
|
textAlign: 'center',
|
|
@@ -170,7 +170,7 @@ var ActivateAccount = function (_a) {
|
|
|
170
170
|
boxShadow: 3,
|
|
171
171
|
maxWidth: 400,
|
|
172
172
|
backgroundColor: 'white',
|
|
173
|
-
}
|
|
173
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", color: "error", gutterBottom: true, children: "Code de validation expir\u00E9" }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Indiquez nous votre num\u00E9ro de t\u00E9l\u00E9phone." }), (0, jsx_runtime_1.jsx)("br", {}), "Nous allons renvoyer un SMS d'activation de compte"] }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", fullWidth: true, required: true, id: "phoneNumber", label: "N\u00B0 de t\u00E9l\u00E9phone", name: "phoneNumber", autoComplete: "tel", onChange: function (e) { return handleInputChange(e); }, value: validationForm.phoneNumber.value, error: Boolean(validationForm.phoneNumber.error), helperText: validationForm.phoneNumber.error }) }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: resendCode, sx: { cursor: 'pointer', textAlign: 'center', width: '100%', mt: 1 }, children: "Renvoyer le code" })] }) })), unknowCode && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '99vw', height: '99vh', display: 'flex' }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
174
174
|
display: 'flex',
|
|
175
175
|
flexDirection: 'column',
|
|
176
176
|
alignItems: 'center',
|
|
@@ -183,6 +183,6 @@ var ActivateAccount = function (_a) {
|
|
|
183
183
|
borderRadius: 2,
|
|
184
184
|
boxShadow: 3,
|
|
185
185
|
backgroundColor: 'white',
|
|
186
|
-
}
|
|
186
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", color: "error", gutterBottom: true, children: "Code de validation invalide" }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body1", color: "textSecondary", gutterBottom: true, children: ["Le code de validation fourni ne correspond \u00E0 aucun utilisateur (ou votre compte a d\u00E9j\u00E0 \u00E9t\u00E9 activ\u00E9). ", (0, jsx_runtime_1.jsx)("br", {}), "Essayez de vous connecter avec votre num\u00E9ro de t\u00E9l\u00E9phone.", (0, jsx_runtime_1.jsx)("br", {}), "Si le probl\u00E8me persiste, veuillez nous contacter \u00E0", ' ', (0, jsx_runtime_1.jsx)("b", { children: "support@movalib.com" }), "."] }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", onClick: function (e) { return history.push('/login'); }, sx: { marginTop: 2 }, children: "Retour \u00E0 la connexion" })] }) }))] }));
|
|
187
187
|
};
|
|
188
188
|
exports.default = ActivateAccount;
|
|
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g =
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -114,7 +114,7 @@ var VehicleFullCard = function (_a) {
|
|
|
114
114
|
var tirePictureInputRef = (0, react_1.useRef)(null);
|
|
115
115
|
var _p = (0, react_1.useState)(false), isShowLinkedDocument = _p[0], setShowLinkedDocument = _p[1];
|
|
116
116
|
var docTypeCurrent = (0, react_1.useRef)();
|
|
117
|
-
var messageRGPD = appType === Enums_1.MovaAppType.INDIVIDUAL ? ((0, jsx_runtime_1.jsx)(material_1.Box, {})) : ((0, jsx_runtime_1.jsx)(material_1.Box,
|
|
117
|
+
var messageRGPD = appType === Enums_1.MovaAppType.INDIVIDUAL ? ((0, jsx_runtime_1.jsx)(material_1.Box, {})) : ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { mt: 2 }, children: (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "warning", children: "Vous \u00EAtes responsable des documents que vous importez, en ajoutant un document vous reconnaissez disposer du consentement explicite du client pour le stockage de ses donn\u00E9es conform\u00E9ment \u00E0 la r\u00E9glementation RGPD." }) }));
|
|
118
118
|
(0, react_1.useEffect)(function () {
|
|
119
119
|
setLocalEditMode(editMode);
|
|
120
120
|
}, [editMode]);
|
|
@@ -241,7 +241,7 @@ var VehicleFullCard = function (_a) {
|
|
|
241
241
|
var formatted = (0, DateUtils_1.formatDateByTimezone)(date, "Europe/Paris", Enums_1.DateFormatTypes.SHORT_FORMAT_DATE);
|
|
242
242
|
return formatted !== "" ? formatted : "-";
|
|
243
243
|
};
|
|
244
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [vehicle && ((0, jsx_runtime_1.jsxs)(material_1.Card,
|
|
244
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [vehicle && ((0, jsx_runtime_1.jsxs)(material_1.Card, { variant: "outlined", sx: {
|
|
245
245
|
width: "100%",
|
|
246
246
|
backgroundColor: focused ? theme.palette.primary.light : "white",
|
|
247
247
|
overflow: "visible",
|
|
@@ -249,7 +249,7 @@ var VehicleFullCard = function (_a) {
|
|
|
249
249
|
borderRadius: 2,
|
|
250
250
|
border: "0.5px solid",
|
|
251
251
|
borderColor: "divider",
|
|
252
|
-
}
|
|
252
|
+
}, children: [(0, jsx_runtime_1.jsxs)(material_1.CardContent, { sx: { pt: 0, pb: 0 }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
253
253
|
display: "flex",
|
|
254
254
|
justifyContent: "space-between",
|
|
255
255
|
alignItems: "flex-start",
|
|
@@ -258,7 +258,7 @@ var VehicleFullCard = function (_a) {
|
|
|
258
258
|
pb: 2,
|
|
259
259
|
borderBottom: "0.5px solid",
|
|
260
260
|
borderColor: "divider",
|
|
261
|
-
}
|
|
261
|
+
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "h6", sx: { fontWeight: 500, lineHeight: 1.2, color: "text.primary" }, children: [vehicle.brand && "".concat(vehicle.brand, " "), vehicle.model && "".concat(vehicle.model, " ")] }), vehicle.version && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", sx: { mt: 0.25 }, children: vehicle.version })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
262
262
|
display: "inline-flex",
|
|
263
263
|
alignItems: "center",
|
|
264
264
|
gap: 0.75,
|
|
@@ -268,60 +268,60 @@ var VehicleFullCard = function (_a) {
|
|
|
268
268
|
bgcolor: "#F5F4F0",
|
|
269
269
|
border: "0.5px solid #D3D1C7",
|
|
270
270
|
borderRadius: "6px",
|
|
271
|
-
}
|
|
271
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", sx: {
|
|
272
272
|
fontWeight: 600,
|
|
273
273
|
letterSpacing: "0.1em",
|
|
274
274
|
color: "text.primary",
|
|
275
275
|
fontSize: "14px",
|
|
276
|
-
}
|
|
276
|
+
}, children: (0, Tools_1.formatVehiclePlate)(vehicle.plate, vehicle.foreignPlate) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", sx: { p: 0.25 }, onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
277
277
|
return __generator(this, function (_a) {
|
|
278
278
|
switch (_a.label) {
|
|
279
279
|
case 0: return [4 /*yield*/, navigator.clipboard.writeText((0, Tools_1.formatVehiclePlate)(vehicle.plate, vehicle.foreignPlate))];
|
|
280
280
|
case 1: return [2 /*return*/, _a.sent()];
|
|
281
281
|
}
|
|
282
282
|
});
|
|
283
|
-
}); }, "aria-label": "Copier la plaque"
|
|
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: {
|
|
284
284
|
fontSize: 12,
|
|
285
285
|
borderColor: "divider",
|
|
286
|
-
}
|
|
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)
|
|
287
287
|
? form.currentMileage.error
|
|
288
|
-
: "Sur votre tableau de bord 😉", InputProps: { disableUnderline: false }, sx: { mt: 0.5, width: "100%" } }))] })
|
|
288
|
+
: "Sur votre tableau de bord 😉", InputProps: { disableUnderline: false }, sx: { mt: 0.5, width: "100%" } }))] }), (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: "Moyen annuel" }), !localEditMode ? ((0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body1", fontWeight: 500, children: [(_d = vehicle.averageMileagePerYear) !== null && _d !== void 0 ? _d : "-", " ", (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "span", variant: "caption", color: "text.secondary", children: "km" })] })) : ((0, jsx_runtime_1.jsxs)(material_1.FormControl, { fullWidth: true, variant: "standard", error: Boolean(form.averageMileagePerYear.error), children: [(0, jsx_runtime_1.jsxs)(material_1.Select, { name: "averageMileagePerYear", value: form.averageMileagePerYear.value ? String(form.averageMileagePerYear.value) : "", onChange: handleSelectChange, disableUnderline: false, sx: { mt: 0.5, fontSize: 14 }, children: [[5000, 10000, 15000, 20000, 25000, 30000, 50000, 75000, 100000].map(function (v) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: v, children: v.toLocaleString("fr-FR") }, v)); }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: 999999, children: "+100 000" })] }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: form.averageMileagePerYear.error })] }))] })] })] }), (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: "Identit\u00E9 technique" }), localEditMode && form.vehicleModel && vehicle.foreignPlate && ((0, jsx_runtime_1.jsx)(material_1.TextField, { label: "Mod\u00E8le de la voiture", name: "vehicleModel", variant: "outlined", type: "text", required: true, fullWidth: true, value: form.vehicleModel.value, onChange: handleInputChange, error: Boolean(form.vehicleModel.error), sx: { mb: 1.5, "& input": { textTransform: "uppercase" } } })), vehicle.firstRegistrationDate && ((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: "Mise en circulation" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: formatDate(vehicle.firstRegistrationDate) })] })), vehicle.vin && ((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: "VIN" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.vin }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", sx: { p: 0.25 }, onClick: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
289
289
|
switch (_a.label) {
|
|
290
290
|
case 0: return [4 /*yield*/, navigator.clipboard.writeText(vehicle.vin)];
|
|
291
291
|
case 1: return [2 /*return*/, _a.sent()];
|
|
292
292
|
}
|
|
293
|
-
}); }); }, "aria-label": "Copier le VIN"
|
|
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: {
|
|
294
294
|
fontWeight: 500,
|
|
295
295
|
fontSize: 12,
|
|
296
296
|
height: 24,
|
|
297
297
|
"& .MuiChip-label": { px: 1 },
|
|
298
|
-
} })) : ((0, jsx_runtime_1.jsx)(material_1.Typography,
|
|
298
|
+
} })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.disabled", children: "\u2014" }))] }), isVehicleSecondaryTireSizeDefined(vehicle) && ((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: "Arri\u00E8re" }), (0, jsx_runtime_1.jsx)(material_1.Chip, { label: (0, Tools_1.formatVehicleTire)(vehicle.secondaryTireSize), size: "small", color: "primary", sx: {
|
|
299
299
|
fontWeight: 500,
|
|
300
300
|
fontSize: 12,
|
|
301
301
|
height: 24,
|
|
302
302
|
"& .MuiChip-label": { px: 1 },
|
|
303
|
-
} })] }))
|
|
303
|
+
} })] })), (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: "Marque" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.tireBrand || "—" })] }), (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: "Mod\u00E8le" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: vehicle.tireProfile || "—" })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: { mt: 1 }, children: (0, jsx_runtime_1.jsx)(MovaVehicleTireField_1.default, { label: "AV", vehicleTire: form.tireSize.value, onChangeVehicleTire: handleOnChangeVehicleTire }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { mt: 1 }, children: (0, jsx_runtime_1.jsx)(MovaVehicleTireField_1.default, { label: "AR", vehicleTire: form.secondaryTireSize.value, onChangeVehicleTire: handleOnChangeVehicleSecondaryTire }) }), (0, jsx_runtime_1.jsx)(material_1.TextField, { label: "Marque pneumatique", name: "tireBrand", variant: "outlined", fullWidth: true, value: form.tireBrand.value, onChange: handleInputChange, error: Boolean(form.tireBrand.error), sx: { mt: 2, "& input": { textTransform: "uppercase" } } }), (0, jsx_runtime_1.jsx)(material_1.TextField, { label: "Mod\u00E8le pneumatique", name: "tireProfile", variant: "outlined", fullWidth: true, value: form.tireProfile.value, onChange: handleInputChange, error: Boolean(form.tireProfile.error), sx: { mt: 1, "& input": { textTransform: "uppercase" } } })] }))] }), (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: "Entretien" }), !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.jsxs)(material_1.Box, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
304
304
|
width: 6,
|
|
305
305
|
height: 6,
|
|
306
306
|
borderRadius: "50%",
|
|
307
307
|
bgcolor: vehicle.lastInspectionDate ? "success.main" : "warning.main",
|
|
308
308
|
flexShrink: 0,
|
|
309
|
-
} }), (0, jsx_runtime_1.jsx)(material_1.Typography,
|
|
309
|
+
} }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Contr\u00F4le technique" })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: formatDate(vehicle.lastInspectionDate) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: rowSx, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
310
310
|
width: 6,
|
|
311
311
|
height: 6,
|
|
312
312
|
borderRadius: "50%",
|
|
313
313
|
bgcolor: vehicle.lastMaintenanceDate ? "success.main" : "warning.main",
|
|
314
314
|
flexShrink: 0,
|
|
315
|
-
} }), (0, jsx_runtime_1.jsx)(material_1.Typography,
|
|
315
|
+
} }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Dernier entretien" })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, children: formatDate(vehicle.lastMaintenanceDate) })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, sx: { mt: 1.5 }, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DatePicker, { label: "Dernier contrôle technique", name: "lastInspectionDate", value: (form.lastInspectionDate.value
|
|
316
316
|
? (0, moment_1.default)(form.lastInspectionDate.value)
|
|
317
317
|
: null), onChange: function (e) {
|
|
318
318
|
return handleChange("lastInspectionDate", e ? (0, moment_1.default)(e).toISOString() : "");
|
|
319
|
-
}, format: "DD/MM/YYYY", formatDensity: "dense", views: ["day"], displayWeekNumber: true }) })
|
|
319
|
+
}, format: "DD/MM/YYYY", formatDensity: "dense", views: ["day"], displayWeekNumber: true }) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, sx: { mt: 2 }, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DatePicker, { label: "Dernier entretien", name: "lastMaintenanceDate", value: (form.lastMaintenanceDate.value
|
|
320
320
|
? (0, moment_1.default)(form.lastMaintenanceDate.value)
|
|
321
321
|
: null), format: "DD/MM/YYYY", formatDensity: "dense", views: ["day"], displayWeekNumber: true, onChange: function (e) {
|
|
322
322
|
var _a;
|
|
323
323
|
return handleChange("lastMaintenanceDate", (_a = e === null || e === void 0 ? void 0 : e.toDate()) !== null && _a !== void 0 ? _a : null);
|
|
324
|
-
} }) })
|
|
324
|
+
} }) })] }))] }), !localEditMode && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { px: 2, py: 1.5 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: sectionTitleSx, children: "Carnet du v\u00E9hicule" }), (_e = vehicle.documents) === null || _e === void 0 ? void 0 : _e.filter(function (doc) { return doc.fileSignedUrl; }).map(function (invoice, index) { return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
325
325
|
display: "flex",
|
|
326
326
|
alignItems: "center",
|
|
327
327
|
justifyContent: "space-between",
|
|
@@ -330,15 +330,15 @@ var VehicleFullCard = function (_a) {
|
|
|
330
330
|
px: 1.5,
|
|
331
331
|
py: 0.75,
|
|
332
332
|
mb: 0.75,
|
|
333
|
-
}
|
|
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: {
|
|
334
334
|
border: "1.5px dashed",
|
|
335
335
|
borderColor: "divider",
|
|
336
336
|
color: "text.secondary",
|
|
337
337
|
"&:hover": { borderColor: "text.secondary", bgcolor: "grey.50" },
|
|
338
|
-
}
|
|
338
|
+
}, children: "Ajouter un document" }), currentUpload && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "text.secondary", display: "block", textAlign: "center", sx: { mt: 0.75 }, children: "Document en cours d'importation..." })), sizeLimit ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "warning.dark", display: "block", textAlign: "center", sx: { mt: 0.5 }, children: "\u00C9chec : fichier sup\u00E9rieur \u00E0 10 Mo" })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "text.disabled", display: "block", textAlign: "center", sx: { mt: 0.5 }, children: "Taille maximale : 10 Mo" }))] })] }))] }), localEditMode && ((0, jsx_runtime_1.jsxs)(material_1.CardActions, { sx: { justifyContent: "center", px: 2, pb: 2, gap: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleOnClickCancel, variant: "outlined", startIcon: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, {}), sx: { width: "45%", color: "text.secondary", borderColor: "divider" }, children: "Annuler" }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleOnClickValidate, variant: "contained", startIcon: (0, jsx_runtime_1.jsx)(EditRounded_1.default, {}), sx: {
|
|
339
339
|
width: "45%",
|
|
340
340
|
bgcolor: (0, material_1.darken)(theme.palette.primary.main, 0.1),
|
|
341
341
|
"&:hover": { bgcolor: (0, material_1.darken)(theme.palette.primary.main, 0.25) },
|
|
342
|
-
}
|
|
342
|
+
}, children: "Valider" })] }))] })), isShowLinkedDocument && ((0, jsx_runtime_1.jsx)(LinkedDocumentDialog_1.LinkedDocumentDialog, { isVehicle: true, isShowLinkedDocument: isShowLinkedDocument, appType: appType, toggleShowLinkedDocument: toggleShowLinkedDocument, message: messageRGPD })), (0, jsx_runtime_1.jsx)(ConfirmationDialog_1.default, { open: openConfirmDocumentDelete, onClose: handleCloseConfirmDocumentDelete, onConfirm: handleConfirmDocumentDelete, message: "\u00CAtes-vous s\u00FBr de vouloir supprimer ce document ?" }), (0, jsx_runtime_1.jsx)(ConfirmationDialog_1.default, { open: openConfirmVehicleDelete, onClose: handleCloseConfirmVehicleDelete, onConfirm: handleConfirmVehicleDelete, message: "\u00CAtes-vous s\u00FBr de vouloir supprimer ce v\u00E9hicule ?" })] }));
|
|
343
343
|
};
|
|
344
344
|
exports.default = VehicleFullCard;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
@@ -154,7 +143,7 @@ var VehiclePlateField = function (_a) {
|
|
|
154
143
|
var newModel = event.target.value.toUpperCase();
|
|
155
144
|
onModelChange === null || onModelChange === void 0 ? void 0 : onModelChange(newModel); // ✅ callback vers parent
|
|
156
145
|
};
|
|
157
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box,
|
|
146
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "start", gap: 1, width: "100%", children: [(0, jsx_runtime_1.jsxs)(material_1.Select, { value: country, onChange: handleCountryChange, variant: "outlined", sx: {
|
|
158
147
|
minWidth: 70,
|
|
159
148
|
'.MuiSelect-select': {
|
|
160
149
|
display: 'flex',
|
|
@@ -166,12 +155,12 @@ var VehiclePlateField = function (_a) {
|
|
|
166
155
|
},
|
|
167
156
|
p: 0,
|
|
168
157
|
pb: '4px'
|
|
169
|
-
}
|
|
158
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "FR", children: "\uD83C\uDDEB\uD83C\uDDF7" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "INTL", children: "\uD83C\uDF10" })] }), (0, jsx_runtime_1.jsx)(TextField_1.default, { label: country === "INTL" ? "Plaque étrangère / non reconnue" : "Plaque d'immatriculation (FR)", variant: "outlined", value: value, onChange: handleChange, error: error, autoFocus: true, sx: {
|
|
170
159
|
width: '100%',
|
|
171
160
|
'& input': { textTransform: 'uppercase' } // CSS pour forcer les majuscules dans l'input
|
|
172
161
|
}, helperText: lastLength > 0 || country === 'INTL' ? helperText : '', InputProps: {
|
|
173
|
-
endAdornment: country === 'FR' && getPlateFormat(value) === Enums_1.VehiclePlateFormat.FRENCH_OLD ? ((0, jsx_runtime_1.jsx)(material_1.InputAdornment,
|
|
174
|
-
} })] })
|
|
162
|
+
endAdornment: country === 'FR' && getPlateFormat(value) === Enums_1.VehiclePlateFormat.FRENCH_OLD ? ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", sx: { mr: 1 }, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { edge: "end", onClick: validatePlate, children: (0, jsx_runtime_1.jsx)(SearchRounded_1.default, {}) }) })) : undefined,
|
|
163
|
+
} })] }), (country === 'INTL') && (0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(TextField_1.default, { label: "Pr\u00E9cisez le mod\u00E8le ...", variant: "outlined", value: model, onChange: handleModelChange, autoFocus: true, sx: {
|
|
175
164
|
width: '100%',
|
|
176
165
|
mt: 1,
|
|
177
166
|
'& input': { textTransform: 'uppercase' } // CSS pour forcer les majuscules dans l'input
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatDateByTimezone = exports.toUTCToLocaleDate = exports.countryTimeZones = void 0;
|
|
4
|
+
exports.isValidDate = isValidDate;
|
|
5
|
+
exports.getLongFormattedDateTime = getLongFormattedDateTime;
|
|
4
6
|
var date_fns_tz_1 = require("date-fns-tz");
|
|
5
7
|
var locale_1 = require("date-fns/locale");
|
|
6
8
|
var Enums_1 = require("./Enums");
|
|
@@ -8,7 +10,6 @@ var Tools_1 = require("./Tools");
|
|
|
8
10
|
function isValidDate(date) {
|
|
9
11
|
return date instanceof Date && !isNaN(date.getTime());
|
|
10
12
|
}
|
|
11
|
-
exports.isValidDate = isValidDate;
|
|
12
13
|
// Tableau de correspondance entre les codes de pays et les fuseaux horaires
|
|
13
14
|
exports.countryTimeZones = {
|
|
14
15
|
'FR': 'Europe/Paris',
|
|
@@ -18,7 +19,7 @@ var toUTCToLocaleDate = function (date, timeZone) {
|
|
|
18
19
|
var zonedDate = new Date(date !== null && date !== void 0 ? date : "");
|
|
19
20
|
if (date) {
|
|
20
21
|
// Convertir la date UTC en date du fuseau horaire local
|
|
21
|
-
zonedDate = (0, date_fns_tz_1.
|
|
22
|
+
zonedDate = (0, date_fns_tz_1.toZonedTime)(date, timeZone);
|
|
22
23
|
}
|
|
23
24
|
return zonedDate;
|
|
24
25
|
};
|
|
@@ -51,4 +52,3 @@ function getLongFormattedDateTime(date, timeZone, locale) {
|
|
|
51
52
|
}
|
|
52
53
|
return '';
|
|
53
54
|
}
|
|
54
|
-
exports.getLongFormattedDateTime = getLongFormattedDateTime;
|
|
@@ -5,19 +5,19 @@ var CustomerType;
|
|
|
5
5
|
(function (CustomerType) {
|
|
6
6
|
CustomerType["INDIVIDUAL"] = "INDIVIDUAL";
|
|
7
7
|
CustomerType["PROFESSIONAL"] = "PROFESSIONAL";
|
|
8
|
-
})(CustomerType
|
|
8
|
+
})(CustomerType || (exports.CustomerType = CustomerType = {}));
|
|
9
9
|
var SubscriptionType;
|
|
10
10
|
(function (SubscriptionType) {
|
|
11
11
|
SubscriptionType["PRO_FREE"] = "PRO_FREE";
|
|
12
12
|
SubscriptionType["PRO_STANDARD"] = "PRO_STANDARD";
|
|
13
|
-
})(SubscriptionType
|
|
13
|
+
})(SubscriptionType || (exports.SubscriptionType = SubscriptionType = {}));
|
|
14
14
|
var SubscriptionState;
|
|
15
15
|
(function (SubscriptionState) {
|
|
16
16
|
SubscriptionState["PENDING"] = "PENDING";
|
|
17
17
|
SubscriptionState["ACTIVE"] = "ACTIVE";
|
|
18
18
|
SubscriptionState["PAUSED"] = "PAUSED";
|
|
19
19
|
SubscriptionState["CANCELED"] = "CANCELED";
|
|
20
|
-
})(SubscriptionState
|
|
20
|
+
})(SubscriptionState || (exports.SubscriptionState = SubscriptionState = {}));
|
|
21
21
|
var SecondaryPartsApplicationType;
|
|
22
22
|
(function (SecondaryPartsApplicationType) {
|
|
23
23
|
SecondaryPartsApplicationType["HOOD"] = "HOOD";
|
|
@@ -28,16 +28,16 @@ var SecondaryPartsApplicationType;
|
|
|
28
28
|
SecondaryPartsApplicationType["UNDERBODY"] = "UNDERBODY";
|
|
29
29
|
SecondaryPartsApplicationType["BUMPER"] = "BUMPER";
|
|
30
30
|
SecondaryPartsApplicationType["TRUNK"] = "TRUNK";
|
|
31
|
-
})(SecondaryPartsApplicationType
|
|
31
|
+
})(SecondaryPartsApplicationType || (exports.SecondaryPartsApplicationType = SecondaryPartsApplicationType = {}));
|
|
32
32
|
var CountryCode;
|
|
33
33
|
(function (CountryCode) {
|
|
34
34
|
CountryCode["FR"] = "FR";
|
|
35
|
-
})(CountryCode
|
|
35
|
+
})(CountryCode || (exports.CountryCode = CountryCode = {}));
|
|
36
36
|
var PrestationState;
|
|
37
37
|
(function (PrestationState) {
|
|
38
38
|
PrestationState["NEW"] = "NEW";
|
|
39
39
|
PrestationState["VALIDATED"] = "VALIDATED";
|
|
40
|
-
})(PrestationState
|
|
40
|
+
})(PrestationState || (exports.PrestationState = PrestationState = {}));
|
|
41
41
|
var PrestationType;
|
|
42
42
|
(function (PrestationType) {
|
|
43
43
|
/**
|
|
@@ -60,7 +60,7 @@ var PrestationType;
|
|
|
60
60
|
* Pour les prestations qui ne rentrent dans aucune des catégories précédentes
|
|
61
61
|
*/
|
|
62
62
|
PrestationType["OTHER"] = "OTHER";
|
|
63
|
-
})(PrestationType
|
|
63
|
+
})(PrestationType || (exports.PrestationType = PrestationType = {}));
|
|
64
64
|
var SubscriptionPaymentInterval;
|
|
65
65
|
(function (SubscriptionPaymentInterval) {
|
|
66
66
|
/**
|
|
@@ -80,7 +80,7 @@ var SubscriptionPaymentInterval;
|
|
|
80
80
|
*/
|
|
81
81
|
SubscriptionPaymentInterval["TWO_YEARS"] = "TWO_YEARS";
|
|
82
82
|
SubscriptionPaymentInterval["THREE_YEARS"] = "THREE_YEARS";
|
|
83
|
-
})(SubscriptionPaymentInterval
|
|
83
|
+
})(SubscriptionPaymentInterval || (exports.SubscriptionPaymentInterval = SubscriptionPaymentInterval = {}));
|
|
84
84
|
var RegistrationState;
|
|
85
85
|
(function (RegistrationState) {
|
|
86
86
|
/**
|
|
@@ -103,13 +103,13 @@ var RegistrationState;
|
|
|
103
103
|
* Inscription active, le compte est opérationnel
|
|
104
104
|
*/
|
|
105
105
|
RegistrationState["ACTIVATED"] = "ACTIVATED";
|
|
106
|
-
})(RegistrationState
|
|
106
|
+
})(RegistrationState || (exports.RegistrationState = RegistrationState = {}));
|
|
107
107
|
var VehiclePlateFormat;
|
|
108
108
|
(function (VehiclePlateFormat) {
|
|
109
109
|
VehiclePlateFormat["FRENCH_NEW"] = "FRENCH_NEW";
|
|
110
110
|
VehiclePlateFormat["FRENCH_OLD"] = "FRENCH_OLD";
|
|
111
111
|
VehiclePlateFormat["FOREIGN"] = "FOREIGN";
|
|
112
|
-
})(VehiclePlateFormat
|
|
112
|
+
})(VehiclePlateFormat || (exports.VehiclePlateFormat = VehiclePlateFormat = {}));
|
|
113
113
|
var SlotAlgorithm;
|
|
114
114
|
(function (SlotAlgorithm) {
|
|
115
115
|
/**
|
|
@@ -124,7 +124,7 @@ var SlotAlgorithm;
|
|
|
124
124
|
* Calcul des créneaux à la période du jour (AM/PM)
|
|
125
125
|
*/
|
|
126
126
|
SlotAlgorithm["DAY_PERIOD"] = "DAY_PERIOD";
|
|
127
|
-
})(SlotAlgorithm
|
|
127
|
+
})(SlotAlgorithm || (exports.SlotAlgorithm = SlotAlgorithm = {}));
|
|
128
128
|
var OrderState;
|
|
129
129
|
(function (OrderState) {
|
|
130
130
|
OrderState["NEW"] = "NEW";
|
|
@@ -133,18 +133,18 @@ var OrderState;
|
|
|
133
133
|
OrderState["PARTIALLY_RECEIVED"] = "PARTIALLY_RECEIVED";
|
|
134
134
|
OrderState["DONE"] = "DONE";
|
|
135
135
|
OrderState["CANCELLED"] = "CANCELLED";
|
|
136
|
-
})(OrderState
|
|
136
|
+
})(OrderState || (exports.OrderState = OrderState = {}));
|
|
137
137
|
var OrderPreference;
|
|
138
138
|
(function (OrderPreference) {
|
|
139
139
|
OrderPreference["LOW_RANGE"] = "LOW_RANGE";
|
|
140
140
|
OrderPreference["MID_RANGE"] = "MID_RANGE";
|
|
141
141
|
OrderPreference["HIGH_RANGE"] = "HIGH_RANGE";
|
|
142
|
-
})(OrderPreference
|
|
142
|
+
})(OrderPreference || (exports.OrderPreference = OrderPreference = {}));
|
|
143
143
|
var ProductType;
|
|
144
144
|
(function (ProductType) {
|
|
145
145
|
ProductType["PART"] = "PART";
|
|
146
146
|
ProductType["CONSUMABLE"] = "CONSUMABLE";
|
|
147
|
-
})(ProductType
|
|
147
|
+
})(ProductType || (exports.ProductType = ProductType = {}));
|
|
148
148
|
var PartsApplicationType;
|
|
149
149
|
(function (PartsApplicationType) {
|
|
150
150
|
PartsApplicationType["FRONT"] = "FT";
|
|
@@ -157,7 +157,7 @@ var PartsApplicationType;
|
|
|
157
157
|
PartsApplicationType["FRONT_RIGHT"] = "FTRT";
|
|
158
158
|
PartsApplicationType["REAR_LEFT"] = "RRLT";
|
|
159
159
|
PartsApplicationType["REAR_RIGHT"] = "RRRT";
|
|
160
|
-
})(PartsApplicationType
|
|
160
|
+
})(PartsApplicationType || (exports.PartsApplicationType = PartsApplicationType = {}));
|
|
161
161
|
var APIMethod;
|
|
162
162
|
(function (APIMethod) {
|
|
163
163
|
APIMethod["GET"] = "GET";
|
|
@@ -165,26 +165,26 @@ var APIMethod;
|
|
|
165
165
|
APIMethod["PATCH"] = "PATCH";
|
|
166
166
|
APIMethod["POST"] = "POST";
|
|
167
167
|
APIMethod["DELETE"] = "DELETE";
|
|
168
|
-
})(APIMethod
|
|
168
|
+
})(APIMethod || (exports.APIMethod = APIMethod = {}));
|
|
169
169
|
var DateFormatTypes;
|
|
170
170
|
(function (DateFormatTypes) {
|
|
171
171
|
DateFormatTypes["TIME_ONLY"] = "HH:mm";
|
|
172
172
|
DateFormatTypes["SHORT_FORMAT_DATE"] = "dd/MM/yyyy";
|
|
173
173
|
DateFormatTypes["LONG_FORMAT_DATETIME"] = "dd/MM/yyyy HH:mm";
|
|
174
174
|
DateFormatTypes["LONG_FORMAT_DATETIME_LITERAL"] = "EEEE dd MMMM yyyy '\u00E0' HH:mm";
|
|
175
|
-
})(DateFormatTypes
|
|
175
|
+
})(DateFormatTypes || (exports.DateFormatTypes = DateFormatTypes = {}));
|
|
176
176
|
var Gender;
|
|
177
177
|
(function (Gender) {
|
|
178
178
|
Gender[Gender["MALE"] = 0] = "MALE";
|
|
179
179
|
Gender[Gender["FEMALE"] = 1] = "FEMALE";
|
|
180
180
|
Gender[Gender["OTHER"] = 2] = "OTHER";
|
|
181
|
-
})(Gender
|
|
181
|
+
})(Gender || (exports.Gender = Gender = {}));
|
|
182
182
|
var DigitalPassportIndex;
|
|
183
183
|
(function (DigitalPassportIndex) {
|
|
184
184
|
DigitalPassportIndex["A"] = "A";
|
|
185
185
|
DigitalPassportIndex["B"] = "B";
|
|
186
186
|
DigitalPassportIndex["C"] = "C";
|
|
187
|
-
})(DigitalPassportIndex
|
|
187
|
+
})(DigitalPassportIndex || (exports.DigitalPassportIndex = DigitalPassportIndex = {}));
|
|
188
188
|
var EventState;
|
|
189
189
|
(function (EventState) {
|
|
190
190
|
/**
|
|
@@ -223,7 +223,7 @@ var EventState;
|
|
|
223
223
|
* Le rendez-vous a été annulé (par le centre ou le client)
|
|
224
224
|
*/
|
|
225
225
|
EventState["CANCELLED"] = "CANCELLED";
|
|
226
|
-
})(EventState
|
|
226
|
+
})(EventState || (exports.EventState = EventState = {}));
|
|
227
227
|
var EventType;
|
|
228
228
|
(function (EventType) {
|
|
229
229
|
EventType["APPOINTMENT"] = "APPOINTMENT";
|
|
@@ -232,7 +232,7 @@ var EventType;
|
|
|
232
232
|
EventType["PENDING_APPOINTMENT"] = "PENDING_APPOINTMENT";
|
|
233
233
|
EventType["WAITING_VEHICLE"] = "WAITING_VEHICLE";
|
|
234
234
|
EventType["QUOTE"] = "QUOTE";
|
|
235
|
-
})(EventType
|
|
235
|
+
})(EventType || (exports.EventType = EventType = {}));
|
|
236
236
|
var DayOfWeek;
|
|
237
237
|
(function (DayOfWeek) {
|
|
238
238
|
DayOfWeek["MONDAY"] = "MONDAY";
|
|
@@ -242,13 +242,13 @@ var DayOfWeek;
|
|
|
242
242
|
DayOfWeek["FRIDAY"] = "FRIDAY";
|
|
243
243
|
DayOfWeek["SATURDAY"] = "SATURDAY";
|
|
244
244
|
DayOfWeek["SUNDAY"] = "SUNDAY";
|
|
245
|
-
})(DayOfWeek
|
|
245
|
+
})(DayOfWeek || (exports.DayOfWeek = DayOfWeek = {}));
|
|
246
246
|
var DocumentState;
|
|
247
247
|
(function (DocumentState) {
|
|
248
248
|
DocumentState["PENDING"] = "PENDING";
|
|
249
249
|
DocumentState["APPROVED"] = "APPROVED";
|
|
250
250
|
DocumentState["REJECTED"] = "REJECTED";
|
|
251
|
-
})(DocumentState
|
|
251
|
+
})(DocumentState || (exports.DocumentState = DocumentState = {}));
|
|
252
252
|
var QuoteState;
|
|
253
253
|
(function (QuoteState) {
|
|
254
254
|
QuoteState["QUOTE_DRAFT"] = "QUOTE_DRAFT";
|
|
@@ -256,7 +256,7 @@ var QuoteState;
|
|
|
256
256
|
QuoteState["QUOTE_ACCEPTED"] = "QUOTE_ACCEPTED";
|
|
257
257
|
QuoteState["QUOTE_REJECTED"] = "QUOTE_REJECTED";
|
|
258
258
|
QuoteState["QUOTE_CANCELLED"] = "CANCELLED";
|
|
259
|
-
})(QuoteState
|
|
259
|
+
})(QuoteState || (exports.QuoteState = QuoteState = {}));
|
|
260
260
|
var DocumentType;
|
|
261
261
|
(function (DocumentType) {
|
|
262
262
|
DocumentType["USER_BANK_DETAILS"] = "USER_BANK_DETAILS";
|
|
@@ -270,7 +270,7 @@ var DocumentType;
|
|
|
270
270
|
DocumentType["EVENT_VISUAL_PROOFS"] = "EVENT_VISUAL_PROOFS";
|
|
271
271
|
DocumentType["EVENT_MAINTENANCE"] = "EVENT_MAINTENANCE";
|
|
272
272
|
DocumentType["VEHICLE_MAINTENANCE_INVOICE_AVOID"] = "VEHICLE_MAINTENANCE_INVOICE_AVOID";
|
|
273
|
-
})(DocumentType
|
|
273
|
+
})(DocumentType || (exports.DocumentType = DocumentType = {}));
|
|
274
274
|
var MovaAppType;
|
|
275
275
|
(function (MovaAppType) {
|
|
276
276
|
/**
|
|
@@ -285,7 +285,7 @@ var MovaAppType;
|
|
|
285
285
|
* Application Administrateur (MovaTeam)
|
|
286
286
|
*/
|
|
287
287
|
MovaAppType["ADMIN"] = "ADMIN";
|
|
288
|
-
})(MovaAppType
|
|
288
|
+
})(MovaAppType || (exports.MovaAppType = MovaAppType = {}));
|
|
289
289
|
var RoleType;
|
|
290
290
|
(function (RoleType) {
|
|
291
291
|
/**
|
|
@@ -313,4 +313,4 @@ var RoleType;
|
|
|
313
313
|
*/
|
|
314
314
|
RoleType["SUPER_ADMIN"] = "ROLE_SUPER_ADMIN";
|
|
315
315
|
RoleType["CSM"] = "ROLE_CSM";
|
|
316
|
-
})(RoleType
|
|
316
|
+
})(RoleType || (exports.RoleType = RoleType = {}));
|
|
@@ -12,7 +12,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.validateField = exports.formatVehicleTireStr = exports.formatVehicleTire = exports.formatVehiclePlate = exports.isEmpty = exports.flexCenter = exports.flexEnd = exports.getApplicationSecondaryLabel = exports.getApplicationShortLabel = exports.capitalizeFirstLetter = exports.flexLeftRow = exports.getFrenchDayLabel = exports.getDayOfWeek = exports.findScheduleByDayOfWeek = exports.formatTime = exports.getFormattedIntervals = exports.getFormattedSchedule = exports.formatPhoneNumber = exports.getDayOfWeekIndex = exports.getDayOfWeekLabel = exports.FR_WEEK_DAYS = exports.isInvalidPhoneNumber = exports.isInvalidMobileNumber = exports.isSafariOniOS = exports.flexStart = exports.getApplicationsShortLabels = void 0;
|
|
16
|
+
exports.buildSelectedOperationsLabel = buildSelectedOperationsLabel;
|
|
17
|
+
exports.hasSecondaryApplication = hasSecondaryApplication;
|
|
18
|
+
exports.buildPositionsLabelFromShorts = buildPositionsLabelFromShorts;
|
|
16
19
|
var max_1 = __importDefault(require("libphonenumber-js/max"));
|
|
17
20
|
var Enums_1 = require("./Enums");
|
|
18
21
|
var getApplicationsShortLabels = function (applications) {
|
|
@@ -414,7 +417,7 @@ var CATEGORY = {
|
|
|
414
417
|
JAMB: { title: "MONTANT", useApp: true },
|
|
415
418
|
UNDERBODY: { title: "BAS DE CAISSE", useApp: true },
|
|
416
419
|
BUMPER: { title: "PARE-CHOCS", useApp: true },
|
|
417
|
-
HOOD: { title: "CAPOT", useApp: false },
|
|
420
|
+
HOOD: { title: "CAPOT", useApp: false }, // pas de position ni (xN)
|
|
418
421
|
TRUNK: { title: "COFFRE", useApp: false },
|
|
419
422
|
ROOF: { title: "TOIT", useApp: false },
|
|
420
423
|
};
|
|
@@ -491,7 +494,6 @@ function buildSelectedOperationsLabel(selectedOperationIds, allOperations, optio
|
|
|
491
494
|
}
|
|
492
495
|
return __spreadArray([prestationName], segments, true).filter(Boolean).join(" , ");
|
|
493
496
|
}
|
|
494
|
-
exports.buildSelectedOperationsLabel = buildSelectedOperationsLabel;
|
|
495
497
|
function hasSecondaryApplication(items, ids, needle, caseInsensitive) {
|
|
496
498
|
var _a;
|
|
497
499
|
if (caseInsensitive === void 0) { caseInsensitive = false; }
|
|
@@ -508,7 +510,6 @@ function hasSecondaryApplication(items, ids, needle, caseInsensitive) {
|
|
|
508
510
|
}
|
|
509
511
|
return false;
|
|
510
512
|
}
|
|
511
|
-
exports.hasSecondaryApplication = hasSecondaryApplication;
|
|
512
513
|
var ORDER = ["AVG", "AVD", "ARG", "ARD", "AV", "AR", "G", "D"];
|
|
513
514
|
function buildPositionsLabelFromShorts(selectedOperationIds, allOperations) {
|
|
514
515
|
var _a, _b;
|
|
@@ -539,4 +540,3 @@ function buildPositionsLabelFromShorts(selectedOperationIds, allOperations) {
|
|
|
539
540
|
var parts = Array.from(tokens).sort(function (a, b) { return ORDER.indexOf(a) - ORDER.indexOf(b); });
|
|
540
541
|
return parts.join(" + ");
|
|
541
542
|
}
|
|
542
|
-
exports.buildPositionsLabelFromShorts = buildPositionsLabelFromShorts;
|