@movalib/movalib-commons 1.68.16 → 1.68.18

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 (52) hide show
  1. package/devIndex.tsx +5 -3
  2. package/dist/devIndex.js +29 -30
  3. package/dist/src/AccountValidation.js +11 -11
  4. package/dist/src/AddressFields.js +1 -12
  5. package/dist/src/ConfirmationDialog.js +3 -3
  6. package/dist/src/DialogForgotPassword.js +4 -15
  7. package/dist/src/DownloadedQRCode.js +4 -15
  8. package/dist/src/GaragePLV.js +3 -14
  9. package/dist/src/GenderSelector.js +1 -1
  10. package/dist/src/IbanInput.js +1 -1
  11. package/dist/src/Loader.js +1 -12
  12. package/dist/src/MovaCopyright.js +1 -1
  13. package/dist/src/MovaDialog.js +2 -2
  14. package/dist/src/MovaLogin.js +9 -9
  15. package/dist/src/MovaSignUp.js +12 -12
  16. package/dist/src/MovaSnackbar.js +1 -12
  17. package/dist/src/QRCode.js +5 -16
  18. package/dist/src/ScheduleFields.js +5 -5
  19. package/dist/src/components/LinkedDocumentDialog.d.ts +0 -1
  20. package/dist/src/components/LinkedDocumentDialog.js +6 -17
  21. package/dist/src/components/MovaTable/MovaTable.js +2 -2
  22. package/dist/src/components/MovaTableBack/MovaTableBack.js +9 -20
  23. package/dist/src/components/QrCodePLVContainer/PLVComponent.js +6 -17
  24. package/dist/src/components/QrCodePLVContainer/QrCodePLVContainer.js +28 -28
  25. package/dist/src/components/singup/ActivateAccount.js +3 -3
  26. package/dist/src/components/vehicle/VehicleFullCard.js +23 -22
  27. package/dist/src/components/vehicle/VehiclePlateField.js +4 -15
  28. package/dist/src/helpers/DateUtils.d.ts +1 -0
  29. package/dist/src/helpers/DateUtils.js +4 -4
  30. package/dist/src/helpers/Enums.js +27 -27
  31. package/dist/src/helpers/Tools.js +5 -5
  32. package/dist/src/helpers/Validator.js +3 -4
  33. package/dist/src/models/Garage.js +2 -3
  34. package/dist/src/models/Settings.js +1 -1
  35. package/dist/src/services/AuthenticationService.js +2 -2
  36. package/dist/src/services/UserService.js +2 -2
  37. package/dist/src/style/styled.d.ts +4 -6
  38. package/dist/src/style/styled.js +1 -0
  39. package/dist/src/style/styled.ts +11 -3
  40. package/dist/src/utils/DialogPrint.js +1 -2
  41. package/dist/src/utils/getQRCodeBase64.d.ts +1 -3
  42. package/dist/src/utils/getQRCodeBase64.js +2 -2
  43. package/dist/theme.js +2 -2
  44. package/package.json +15 -22
  45. package/src/GaragePLV.tsx +3 -3
  46. package/src/components/LinkedDocumentDialog.tsx +1 -1
  47. package/src/components/MovaTableBack/MovaTableBack.tsx +1 -1
  48. package/src/components/QrCodePLVContainer/QrCodePLVContainer.tsx +6 -4
  49. package/src/components/vehicle/VehicleFullCard.tsx +3 -1
  50. package/src/helpers/DateUtils.ts +3 -3
  51. package/src/react-app-env.d.ts +34 -1
  52. package/src/style/styled.ts +11 -3
@@ -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 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), 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.");
@@ -242,19 +242,19 @@ var MovaSignUp = function (_a) {
242
242
  var handleClickShowPassword = function () {
243
243
  setShowPassword(function (prev) { return !prev; });
244
244
  };
245
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: styles }, { children: [showLeafs && (0, jsx_runtime_1.jsx)("img", { src: leaf_green_large_png_1.default, style: { position: 'fixed',
245
+ return ((0, jsx_runtime_1.jsxs)("div", { style: styles, children: [showLeafs && (0, jsx_runtime_1.jsx)("img", { src: leaf_green_large_png_1.default, style: { position: 'fixed',
246
246
  float: 'left',
247
247
  width: '250px',
248
248
  height: '400px',
249
249
  top: '-20%',
250
250
  left: '0%',
251
251
  opacity: '0.3',
252
- zIndex: -8 }, alt: 'Feuille Verte Movalib' }), (0, jsx_runtime_1.jsxs)(material_1.Container, __assign({ component: "main", maxWidth: "sm", disableGutters: disableGutters }, { children: [(0, jsx_runtime_1.jsx)(material_1.CssBaseline, {}), (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ sx: {
252
+ zIndex: -8 }, alt: 'Feuille Verte Movalib' }), (0, jsx_runtime_1.jsxs)(material_1.Container, { component: "main", maxWidth: "sm", disableGutters: disableGutters, children: [(0, jsx_runtime_1.jsx)(material_1.CssBaseline, {}), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
253
253
  marginTop: showHeaderLogo ? 6 : 0,
254
254
  display: 'flex',
255
255
  flexDirection: 'column',
256
256
  alignItems: 'center',
257
- } }, { children: [showHeaderLogo && (0, jsx_runtime_1.jsx)("img", { src: getMovaLogo(), style: { width: '60%' } }), headerText && (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "button", sx: { pt: 3, width: '100%' } }, { children: headerText }))] })), (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ component: "form", onSubmit: handleSubmit, noValidate: true, sx: { mt: headerText ? 2 : 0 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, autoFocus: true, fullWidth: true, id: "firstname", label: "Pr\u00E9nom", name: "firstname", autoComplete: "given-name", onChange: function (e) { return handleInputChange(e); }, value: userForm.firstname.value, error: Boolean(userForm.firstname.error), helperText: userForm.firstname.error, sx: {
257
+ }, children: [showHeaderLogo && (0, jsx_runtime_1.jsx)("img", { src: getMovaLogo(), style: { width: '60%' } }), headerText && (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "button", sx: { pt: 3, width: '100%' }, children: headerText })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "form", onSubmit: handleSubmit, noValidate: true, sx: { mt: headerText ? 2 : 0 }, children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, autoFocus: true, fullWidth: true, id: "firstname", label: "Pr\u00E9nom", name: "firstname", autoComplete: "given-name", onChange: function (e) { return handleInputChange(e); }, value: userForm.firstname.value, error: Boolean(userForm.firstname.error), helperText: userForm.firstname.error, sx: {
258
258
  '& .MuiOutlinedInput-notchedOutline': {
259
259
  borderColor: darkMode ? 'white' : 'default', // Couleur de la bordure
260
260
  }
@@ -264,26 +264,26 @@ var MovaSignUp = function (_a) {
264
264
  }
265
265
  } }), usePhoneNumber && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { type: "tel", margin: "normal", required: true, fullWidth: true, id: "phoneNumber", label: "N\u00B0 de t\u00E9l\u00E9phone", name: "phoneNumber", autoComplete: "tel", disabled: userToEdit && userToEdit.phoneNumber ? true : false, onChange: function (e) { return handleInputChange(e); }, value: userForm.phoneNumber.value, error: Boolean(userForm.phoneNumber.error), helperText: userForm.phoneNumber.error ||
266
266
  "Saisir l’indicatif pour un numéro étranger (ex : +32 …)", InputProps: {
267
- endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, __assign({ position: "end" }, { children: !userExist && (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ edge: "end", onClick: function () { return setOpenPhoneNumberInfo(!openPhoneNumberInfo); } }, { children: (0, jsx_runtime_1.jsx)(Info_1.default, {}) })) }))),
268
- } }), openPhoneNumberInfo && !userExist && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: "info", variant: 'standard' }, { children: "Entrez le num\u00E9ro de t\u00E9l\u00E9phone que vous avez utilis\u00E9 pour r\u00E9server, afin de suivre facilement vos rendez-vous." })), userExist && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: "success", variant: 'standard' }, { children: "Rendez-vous trouv\u00E9(s) pour ce num\u00E9ro ! Vous pourrez le(s) consulter apr\u00E8s avoir cr\u00E9\u00E9 votre compte." })), userIsAlreadyActive && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: "error", sx: { marginTop: '5px' }, variant: 'standard' }, { children: "Il semble qu\u2019un compte existe d\u00E9j\u00E0 avec ce num\u00E9ro. Connectez-vous ou utilisez \"Mot de passe oubli\u00E9\" pour y acc\u00E9der facilement." }))] }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, id: "email", label: "Adresse email", name: "email", autoComplete: "email", disabled: userToEdit && userToEdit.email ? true : false, onChange: function (e) { return handleInputChange(e); }, value: userForm.email.value, error: !userForm.email.isValid, helperText: userForm.email.error, sx: {
267
+ endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, { position: "end", children: !userExist && (0, jsx_runtime_1.jsx)(material_1.IconButton, { edge: "end", onClick: function () { return setOpenPhoneNumberInfo(!openPhoneNumberInfo); }, children: (0, jsx_runtime_1.jsx)(Info_1.default, {}) }) })),
268
+ } }), openPhoneNumberInfo && !userExist && (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "info", variant: 'standard', children: "Entrez le num\u00E9ro de t\u00E9l\u00E9phone que vous avez utilis\u00E9 pour r\u00E9server, afin de suivre facilement vos rendez-vous." }), userExist && (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "success", variant: 'standard', children: "Rendez-vous trouv\u00E9(s) pour ce num\u00E9ro ! Vous pourrez le(s) consulter apr\u00E8s avoir cr\u00E9\u00E9 votre compte." }), userIsAlreadyActive && (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "error", sx: { marginTop: '5px' }, variant: 'standard', children: "Il semble qu\u2019un compte existe d\u00E9j\u00E0 avec ce num\u00E9ro. Connectez-vous ou utilisez \"Mot de passe oubli\u00E9\" pour y acc\u00E9der facilement." })] }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, id: "email", label: "Adresse email", name: "email", autoComplete: "email", disabled: userToEdit && userToEdit.email ? true : false, onChange: function (e) { return handleInputChange(e); }, value: userForm.email.value, error: !userForm.email.isValid, helperText: userForm.email.error, sx: {
269
269
  '& .MuiOutlinedInput-notchedOutline': {
270
270
  borderColor: darkMode ? 'white' : 'default', // Couleur de la bordure
271
271
  }
272
272
  }, InputProps: {
273
- endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, __assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ edge: "end", onClick: function () { return setOpenEmailInfo(!openEmailInfo); } }, { children: (0, jsx_runtime_1.jsx)(Info_1.default, {}) })) }))),
274
- } }), openEmailInfo && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: "info", variant: 'standard' }, { children: "Et si on arr\u00EAtait le papier ? En plus de vous notifier, l'email vous permet de recevoir vos documents au format num\u00E9rique \uD83D\uDE0A\uD83C\uDF3F" })), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, name: "password", label: "Mot de passe", type: showPassword ? 'text' : 'password', id: "password", autoComplete: "current-password", onChange: function (e) { return handleInputChange(e); }, value: userForm.password.value, error: !userForm.password.isValid, helperText: Boolean(userForm.password.error) ? userForm.password.error : "10 caractères minimum, 1 majuscule, 1 minuscule", InputProps: {
275
- endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, __assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ edge: "end", onClick: handleClickShowPassword }, { children: showPassword ? (0, jsx_runtime_1.jsx)(VisibilityOff_1.default, {}) : (0, jsx_runtime_1.jsx)(Visibility_1.default, {}) })) }))),
273
+ endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, { position: "end", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { edge: "end", onClick: function () { return setOpenEmailInfo(!openEmailInfo); }, children: (0, jsx_runtime_1.jsx)(Info_1.default, {}) }) })),
274
+ } }), openEmailInfo && (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "info", variant: 'standard', children: "Et si on arr\u00EAtait le papier ? En plus de vous notifier, l'email vous permet de recevoir vos documents au format num\u00E9rique \uD83D\uDE0A\uD83C\uDF3F" }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, name: "password", label: "Mot de passe", type: showPassword ? 'text' : 'password', id: "password", autoComplete: "current-password", onChange: function (e) { return handleInputChange(e); }, value: userForm.password.value, error: !userForm.password.isValid, helperText: Boolean(userForm.password.error) ? userForm.password.error : "10 caractères minimum, 1 majuscule, 1 minuscule", InputProps: {
275
+ endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, { position: "end", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { edge: "end", onClick: handleClickShowPassword, children: showPassword ? (0, jsx_runtime_1.jsx)(VisibilityOff_1.default, {}) : (0, jsx_runtime_1.jsx)(Visibility_1.default, {}) }) })),
276
276
  }, sx: {
277
277
  '& .MuiOutlinedInput-notchedOutline': {
278
278
  borderColor: darkMode ? 'white' : 'default', // Couleur de la bordure
279
279
  }
280
- } }), (0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ error: !userForm.acceptsTerms.isValid }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { name: "acceptsTerms", color: "primary", checked: userForm.acceptsTerms.value, onChange: function (e, checked) { return handleCheckboxChange(e, checked); } }), label: (0, jsx_runtime_1.jsxs)("span", { children: ["J'accepte les", ' ', (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ href: CGUPath, target: "_blank" }, { children: "Conditions G\u00E9n\u00E9rales d'Utilisation" }))] }) }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: userForm.acceptsTerms.error })] })), alertMessage && alertSeverity && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: alertSeverity, sx: { mb: 2 } }, { children: alertMessage })), (0, jsx_runtime_1.jsx)(material_1.Button, __assign({ loading: loading, type: "submit", fullWidth: true, variant: "contained", sx: { mt: 3, mb: 2, backgroundColor: darkMode ? theme.palette.primary.dark : theme.palette.primary.main } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "Cr\u00E9er mon compte" }) })), showLoginButton && (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ container: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ variant: "body2", color: "text.secondary", onClick: function (e) { return handleOnClickLogin(e); }, sx: { cursor: 'pointer' } }, { children: "Se connecter" })) })) }))] })), showCopyright && (0, jsx_runtime_1.jsx)(MovaCopyright_1.default, { sx: { mt: 8, mb: 4 } })] })), showLeafs && (0, jsx_runtime_1.jsx)("img", { src: leaf_pink_large_png_1.default, style: { position: 'fixed',
280
+ } }), (0, jsx_runtime_1.jsxs)(material_1.FormControl, { error: !userForm.acceptsTerms.isValid, children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { name: "acceptsTerms", color: "primary", checked: userForm.acceptsTerms.value, onChange: function (e, checked) { return handleCheckboxChange(e, checked); } }), label: (0, jsx_runtime_1.jsxs)("span", { children: ["J'accepte les", ' ', (0, jsx_runtime_1.jsx)(material_1.Link, { href: CGUPath, target: "_blank", children: "Conditions G\u00E9n\u00E9rales d'Utilisation" })] }) }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: userForm.acceptsTerms.error })] }), alertMessage && alertSeverity && (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: alertSeverity, sx: { mb: 2 }, children: alertMessage }), (0, jsx_runtime_1.jsx)(material_1.Button, { loading: loading, type: "submit", fullWidth: true, variant: "contained", sx: { mt: 3, mb: 2, backgroundColor: darkMode ? theme.palette.primary.dark : theme.palette.primary.main }, children: (0, jsx_runtime_1.jsx)("span", { children: "Cr\u00E9er mon compte" }) }), showLoginButton && (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: true, children: (0, jsx_runtime_1.jsx)(material_1.Link, { variant: "body2", color: "text.secondary", onClick: function (e) { return handleOnClickLogin(e); }, sx: { cursor: 'pointer' }, children: "Se connecter" }) }) })] }), showCopyright && (0, jsx_runtime_1.jsx)(MovaCopyright_1.default, { sx: { mt: 8, mb: 4 } })] }), showLeafs && (0, jsx_runtime_1.jsx)("img", { src: leaf_pink_large_png_1.default, style: { position: 'fixed',
281
281
  float: 'right',
282
282
  width: '250px',
283
283
  height: '400px',
284
284
  bottom: '-20%',
285
285
  right: '0%',
286
286
  opacity: '0.3',
287
- zIndex: '-10' }, alt: 'Feuille Rose Movalib' })] })));
287
+ zIndex: '-10' }, alt: 'Feuille Rose Movalib' })] }));
288
288
  };
289
289
  exports.default = MovaSignUp;
@@ -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
  };
@@ -34,6 +23,6 @@ var MovaSnackbar = function (_a) {
34
23
  var handleCloseAlert = function (event) {
35
24
  setSnackbar({ open: false, message: '', severity: undefined });
36
25
  };
37
- return ((0, jsx_runtime_1.jsx)(material_1.Snackbar, __assign({ open: snackbar.open, autoHideDuration: 5000, onClose: handleClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: snackbar.severity, variant: "filled", sx: { width: '100%' }, action: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ size: "small", "aria-label": "close", color: "inherit", onClick: handleCloseAlert }, { children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, { fontSize: "small" }) })) }) }, { children: snackbar.message })) })));
26
+ return ((0, jsx_runtime_1.jsx)(material_1.Snackbar, { open: snackbar.open, autoHideDuration: 5000, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: snackbar.severity, variant: "filled", sx: { width: '100%' }, action: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", "aria-label": "close", color: "inherit", onClick: handleCloseAlert, children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, { fontSize: "small" }) }) }), children: snackbar.message }) }));
38
27
  };
39
28
  exports.default = MovaSnackbar;
@@ -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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -20,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
9
  });
21
10
  };
22
11
  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 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ 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);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
14
  function verb(n) { return function (v) { return step([n, v]); }; }
26
15
  function step(op) {
27
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -147,11 +136,11 @@ var QRCode = function (_a) {
147
136
  // re-append the QR Code to the initial container
148
137
  qrCode.append(ref.current);
149
138
  };
150
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: {
139
+ return ((0, jsx_runtime_1.jsxs)("div", { style: {
151
140
  display: 'flex',
152
141
  flexDirection: 'column',
153
142
  alignItems: 'center'
154
- } }, { children: [(0, jsx_runtime_1.jsx)("div", { ref: ref, style: { height: "".concat(size, "px"), width: "".concat(size, "px"), maxWidth: "".concat(size, "px !important") }, className: 'qr-code' }), showDownload &&
155
- (0, jsx_runtime_1.jsx)(material_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'center' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, __assign({ variant: 'outlined', onClick: onDownloadClick, sx: { color: (0, material_1.darken)(theme.palette.primary.main, 0.2) } }, { children: "T\u00E9l\u00E9charger" })) })), (0, jsx_runtime_1.jsx)(DownloadedQRCode_1.DownloadedQRCode, {})] })));
143
+ }, children: [(0, jsx_runtime_1.jsx)("div", { ref: ref, style: { height: "".concat(size, "px"), width: "".concat(size, "px"), maxWidth: "".concat(size, "px !important") }, className: 'qr-code' }), showDownload &&
144
+ (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: 'flex', justifyContent: 'center' }, children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: 'outlined', onClick: onDownloadClick, sx: { color: (0, material_1.darken)(theme.palette.primary.main, 0.2) }, children: "T\u00E9l\u00E9charger" }) }), (0, jsx_runtime_1.jsx)(DownloadedQRCode_1.DownloadedQRCode, {})] }));
156
145
  };
157
146
  exports.default = QRCode;
@@ -84,7 +84,7 @@ var ScheduleFields = function (_a) {
84
84
  }); });
85
85
  return {
86
86
  day: s.dayOfWeek,
87
- checked: iList.length > 0,
87
+ checked: iList.length > 0, // le checked est à true si il y a au moins un interval de saisi
88
88
  intervals: iList,
89
89
  };
90
90
  });
@@ -190,7 +190,7 @@ var ScheduleFields = function (_a) {
190
190
  onChange(newSchedule);
191
191
  setSchedule(newSchedule);
192
192
  }; };
193
- return ((0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ container: true, spacing: 1, sx: { minWidth: '650px', maxWidth: '800px' } }, { children: schedule.map(function (daySchedule, dayIndex) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: daySchedule.checked, onChange: handleDayChecked(dayIndex) }), label: (0, Tools_1.getDayOfWeekLabel)(daySchedule.day) }) }), dayIndex + 1), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 7 }, { children: daySchedule.intervals.map(function (interval, intervalIndex) { return ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, style: { paddingTop: intervalIndex > 0 ? theme_1.default.spacing(1) : 0 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6, sx: { textAlign: 'center' } }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.TimePicker, { views: ['hours', 'minutes'], minutesStep: timePickerStep !== null && timePickerStep !== void 0 ? timePickerStep : 30, disabled: !daySchedule.checked, value: interval.startTime ? new Date(interval.startTime) : null, formatDensity: 'dense', closeOnSelect: false, onChange: handleIntervalChange(dayIndex, intervalIndex, 'startTime'), slotProps: {
193
+ return ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, spacing: 1, sx: { minWidth: '650px', maxWidth: '800px' }, children: schedule.map(function (daySchedule, dayIndex) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: daySchedule.checked, onChange: handleDayChecked(dayIndex) }), label: (0, Tools_1.getDayOfWeekLabel)(daySchedule.day) }) }, dayIndex + 1), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 7, children: daySchedule.intervals.map(function (interval, intervalIndex) { return ((0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, style: { paddingTop: intervalIndex > 0 ? theme_1.default.spacing(1) : 0 }, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, sx: { textAlign: 'center' }, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.TimePicker, { views: ['hours', 'minutes'], minutesStep: timePickerStep !== null && timePickerStep !== void 0 ? timePickerStep : 30, disabled: !daySchedule.checked, value: interval.startTime ? new Date(interval.startTime) : null, formatDensity: 'dense', closeOnSelect: false, onChange: handleIntervalChange(dayIndex, intervalIndex, 'startTime'), slotProps: {
194
194
  textField: {
195
195
  size: 'small',
196
196
  sx: {
@@ -202,7 +202,7 @@ var ScheduleFields = function (_a) {
202
202
  actionBar: {
203
203
  sx: { display: 'none' },
204
204
  },
205
- } }) }), (intervalIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6, sx: { display: 'contents' } }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.TimePicker, { minutesStep: timePickerStep !== null && timePickerStep !== void 0 ? timePickerStep : 30, disabled: !(interval.startTime instanceof Date), value: interval.endTime ? new Date(interval.endTime) : null, formatDensity: 'dense', onChange: handleIntervalChange(dayIndex, intervalIndex, 'endTime'), closeOnSelect: false, slotProps: {
205
+ } }) }, (intervalIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, sx: { display: 'contents' }, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.TimePicker, { minutesStep: timePickerStep !== null && timePickerStep !== void 0 ? timePickerStep : 30, disabled: !(interval.startTime instanceof Date), value: interval.endTime ? new Date(interval.endTime) : null, formatDensity: 'dense', onChange: handleIntervalChange(dayIndex, intervalIndex, 'endTime'), closeOnSelect: false, slotProps: {
206
206
  textField: {
207
207
  size: 'small',
208
208
  sx: {
@@ -214,7 +214,7 @@ var ScheduleFields = function (_a) {
214
214
  actionBar: {
215
215
  sx: { display: 'none' },
216
216
  },
217
- } }) }), (intervalIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 1, sx: { pl: 0 }, style: { display: 'flex', justifyContent: 'center', alignItems: 'start' } }, { children: intervalIndex > 0 &&
218
- (0, jsx_runtime_1.jsx)(material_1.Tooltip, __assign({ title: 'Supprimer intervalle', placement: 'top' }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ onClick: deleteInterval(dayIndex, intervalIndex), disabled: !daySchedule.checked, sx: { ml: 2 } }, { children: (0, jsx_runtime_1.jsx)(DeleteRounded_1.default, {}) })) })) }), (dayIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: interval.error && (0, jsx_runtime_1.jsx)(material_1.FormHelperText, __assign({ error: true, sx: { mb: 1 } }, { children: interval.error })) }), (intervalIndex + 1) * Math.random())] }), intervalIndex + 1)); }) }), (dayIndex + 1) * Math.random()), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 1, sx: { pl: 0 }, style: { display: 'flex', justifyContent: 'center', alignItems: 'start' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, __assign({ title: 'Dupliquer', placement: 'top' }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ onClick: copySchedule(dayIndex), disabled: !daySchedule.checked }, { children: (0, jsx_runtime_1.jsx)(ContentCopy_1.default, {}) })) })), (0, jsx_runtime_1.jsx)(material_1.Tooltip, __assign({ title: 'Ajouter intervalle', placement: 'top' }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ onClick: addInterval(dayIndex), disabled: !daySchedule.checked }, { children: (0, jsx_runtime_1.jsx)(AddRounded_1.default, {}) })) }))] }), (dayIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1 })] })); }) })));
217
+ } }) }, (intervalIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1, sx: { pl: 0 }, style: { display: 'flex', justifyContent: 'center', alignItems: 'start' }, children: intervalIndex > 0 &&
218
+ (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: 'Supprimer intervalle', placement: 'top', children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: deleteInterval(dayIndex, intervalIndex), disabled: !daySchedule.checked, sx: { ml: 2 }, children: (0, jsx_runtime_1.jsx)(DeleteRounded_1.default, {}) }) }) }, (dayIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, children: interval.error && (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { error: true, sx: { mb: 1 }, children: interval.error }) }, (intervalIndex + 1) * Math.random())] }, intervalIndex + 1)); }) }, (dayIndex + 1) * Math.random()), (0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 1, sx: { pl: 0 }, style: { display: 'flex', justifyContent: 'center', alignItems: 'start' }, children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: 'Dupliquer', placement: 'top', children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: copySchedule(dayIndex), disabled: !daySchedule.checked, children: (0, jsx_runtime_1.jsx)(ContentCopy_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: 'Ajouter intervalle', placement: 'top', children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: addInterval(dayIndex), disabled: !daySchedule.checked, children: (0, jsx_runtime_1.jsx)(AddRounded_1.default, {}) }) })] }, (dayIndex + 1) * Math.random()), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1 })] })); }) }));
219
219
  };
220
220
  exports.default = ScheduleFields;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DocumentType, MovaAppType } from "../helpers/Enums";
3
2
  type LinkedDocumentDialog = {
4
3
  isShowLinkedDocument: boolean;
@@ -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
  };
@@ -21,7 +10,7 @@ var Toolbar_1 = __importDefault(require("@mui/material/Toolbar"));
21
10
  var theme_1 = __importDefault(require("../../theme"));
22
11
  var DialogTitle_1 = __importDefault(require("@mui/material/DialogTitle"));
23
12
  var Box_1 = __importDefault(require("@mui/material/Box"));
24
- var icons_material_1 = require("@mui/icons-material");
13
+ var FindInPage_1 = __importDefault(require("@mui/icons-material/FindInPage"));
25
14
  var Typography_1 = __importDefault(require("@mui/material/Typography"));
26
15
  var IconButton_1 = __importDefault(require("@mui/material/IconButton"));
27
16
  var CloseRounded_1 = __importDefault(require("@mui/icons-material/CloseRounded"));
@@ -36,20 +25,20 @@ var LinkedDocumentDialog = function (_a) {
36
25
  var isShowLinkedDocument = _a.isShowLinkedDocument, toggleShowLinkedDocument = _a.toggleShowLinkedDocument, isVehicle = _a.isVehicle, message = _a.message, appType = _a.appType;
37
26
  var _b = (0, react_1.useState)(null), selectedTypeDocument = _b[0], setSelectedTypeDocument = _b[1];
38
27
  var isMobile = (0, material_1.useMediaQuery)(theme_1.default.breakpoints.down('md'));
39
- return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, __assign({ open: isShowLinkedDocument, fullWidth: true, maxWidth: 'md', onClose: function () { return toggleShowLinkedDocument(null); }, "aria-labelledby": 'alert-dialog-title', "aria-describedby": 'alert-dialog-description' }, { children: [(0, jsx_runtime_1.jsx)(Toolbar_1.default, __assign({ disableGutters: true, sx: {
28
+ return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: isShowLinkedDocument, fullWidth: true, maxWidth: 'md', onClose: function () { return toggleShowLinkedDocument(null); }, "aria-labelledby": 'alert-dialog-title', "aria-describedby": 'alert-dialog-description', children: [(0, jsx_runtime_1.jsx)(Toolbar_1.default, { disableGutters: true, sx: {
40
29
  display: 'block',
41
30
  background: theme_1.default.palette.grey[200],
42
31
  minHeight: 3,
43
32
  p: 0,
44
- } }, { children: (0, jsx_runtime_1.jsx)(DialogTitle_1.default, __assign({ id: 'search-dialog-title' }, { children: (0, jsx_runtime_1.jsxs)(Box_1.default, __assign({ 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, __assign({ 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)(FindInPage_1.default, { sx: { height: '30px', width: '30px' } }), (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: 'h6', sx: {
45
34
  textTransform: 'uppercase',
46
35
  fontStyle: 'bold',
47
36
  textAlign: 'center',
48
- } }, { children: "Quel type de document ?" })), (0, jsx_runtime_1.jsx)(IconButton_1.default, __assign({ size: 'small', "aria-label": 'close', onClick: function () { return toggleShowLinkedDocument(null); }, title: 'Fermer' }, { children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, {}) }))] })) })) })), (0, jsx_runtime_1.jsxs)(DialogContent_1.default, __assign({ sx: { textAlign: 'center' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.ToggleButtonGroup, __assign({ orientation: isMobile ? 'vertical' : 'horizontal', size: 'small', value: selectedTypeDocument, exclusive: true, onChange: function (_, value) {
37
+ }, children: "Quel type de document ?" }), (0, jsx_runtime_1.jsx)(IconButton_1.default, { size: 'small', "aria-label": 'close', onClick: function () { return toggleShowLinkedDocument(null); }, title: 'Fermer', children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, {}) })] }) }) }), (0, jsx_runtime_1.jsxs)(DialogContent_1.default, { sx: { textAlign: 'center' }, children: [(0, jsx_runtime_1.jsx)(material_1.ToggleButtonGroup, { orientation: isMobile ? 'vertical' : 'horizontal', size: 'small', value: selectedTypeDocument, exclusive: true, onChange: function (_, value) {
49
38
  setSelectedTypeDocument(value);
50
- }, "aria-label": 'update-scheduling-alert', sx: { gap: 3, flexWrap: 'wrap', justifyContent: 'center' } }, { children: isVehicle ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, __assign({ size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_TIRE_PHOTO, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_TIRE_PHOTO, "aria-label": 'document tire' }, { children: (0, jsx_runtime_1.jsx)("b", { children: "Photo pneu" }) })), appType === Enums_1.MovaAppType.INDIVIDUAL && ((0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, __assign({ size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_MAINTENANCE_INVOICE, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_MAINTENANCE_INVOICE, "aria-label": 'invoice document' }, { children: (0, jsx_runtime_1.jsx)("b", { children: "Facture" }) }))), (0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, __assign({ size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_INSPECTION, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_INSPECTION, "aria-label": 'vehicule inspection docuemnt' }, { children: (0, jsx_runtime_1.jsx)("b", { children: "Contr\u00F4le technique" }) })), (0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, __assign({ size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_OTHER, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_OTHER, "aria-label": 'vehicule document other' }, { children: (0, jsx_runtime_1.jsx)("b", { children: "Autre" }) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, __assign({ size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.EVENT_VISUAL_PROOFS, selected: selectedTypeDocument === Enums_1.DocumentType.EVENT_VISUAL_PROOFS, "aria-label": 'event visual proof document' }, { children: (0, jsx_runtime_1.jsx)("b", { children: "Photos et Preuves Visuelles" }) })), (0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, __assign({ size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.EVENT_OTHER, selected: selectedTypeDocument === Enums_1.DocumentType.EVENT_OTHER, "aria-label": 'event document other' }, { children: (0, jsx_runtime_1.jsx)("b", { children: "Autre" }) }))] })) })), message && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: message }))] })), (0, jsx_runtime_1.jsxs)(DialogActions_1.default, __assign({ sx: {
39
+ }, "aria-label": 'update-scheduling-alert', sx: { gap: 3, flexWrap: 'wrap', justifyContent: 'center' }, children: isVehicle ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, { size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_TIRE_PHOTO, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_TIRE_PHOTO, "aria-label": 'document tire', children: (0, jsx_runtime_1.jsx)("b", { children: "Photo pneu" }) }), appType === Enums_1.MovaAppType.INDIVIDUAL && ((0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, { size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_MAINTENANCE_INVOICE, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_MAINTENANCE_INVOICE, "aria-label": 'invoice document', children: (0, jsx_runtime_1.jsx)("b", { children: "Facture" }) })), (0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, { size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_INSPECTION, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_INSPECTION, "aria-label": 'vehicule inspection docuemnt', children: (0, jsx_runtime_1.jsx)("b", { children: "Contr\u00F4le technique" }) }), (0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, { size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.VEHICLE_OTHER, selected: selectedTypeDocument === Enums_1.DocumentType.VEHICLE_OTHER, "aria-label": 'vehicule document other', children: (0, jsx_runtime_1.jsx)("b", { children: "Autre" }) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, { size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.EVENT_VISUAL_PROOFS, selected: selectedTypeDocument === Enums_1.DocumentType.EVENT_VISUAL_PROOFS, "aria-label": 'event visual proof document', children: (0, jsx_runtime_1.jsx)("b", { children: "Photos et Preuves Visuelles" }) }), (0, jsx_runtime_1.jsx)(styled_1.StyledToggleButton, { size: 'small', sx: { width: '230px' }, customSelectedBackgroundColor: theme_1.default.palette.primary.main, customHoverColor: theme_1.default.palette.primary.light, value: Enums_1.DocumentType.EVENT_OTHER, selected: selectedTypeDocument === Enums_1.DocumentType.EVENT_OTHER, "aria-label": 'event document other', children: (0, jsx_runtime_1.jsx)("b", { children: "Autre" }) })] })) }), message && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: message }))] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.default, { sx: {
51
40
  py: 1,
52
41
  backgroundColor: theme_1.default.palette.grey[200],
53
- } }, { children: [(0, jsx_runtime_1.jsx)(Button_1.default, __assign({ color: 'inherit', onClick: function () { return toggleShowLinkedDocument(null); } }, { children: "Annuler" })), (0, jsx_runtime_1.jsx)(Box_1.default, { sx: { flexGrow: 1 } }), (0, jsx_runtime_1.jsx)(Button_1.default, __assign({ color: 'primary', autoFocus: true, sx: { ml: 1 }, disabled: !selectedTypeDocument, onClick: function () { return toggleShowLinkedDocument(selectedTypeDocument); } }, { children: (0, jsx_runtime_1.jsx)("b", { children: "Valider" }) }))] }))] })));
42
+ }, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { color: 'inherit', onClick: function () { return toggleShowLinkedDocument(null); }, children: "Annuler" }), (0, jsx_runtime_1.jsx)(Box_1.default, { sx: { flexGrow: 1 } }), (0, jsx_runtime_1.jsx)(Button_1.default, { color: 'primary', autoFocus: true, sx: { ml: 1 }, disabled: !selectedTypeDocument, onClick: function () { return toggleShowLinkedDocument(selectedTypeDocument); }, children: (0, jsx_runtime_1.jsx)("b", { children: "Valider" }) })] })] }));
54
43
  };
55
44
  exports.LinkedDocumentDialog = LinkedDocumentDialog;
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.default = MovaTable;
14
15
  var jsx_runtime_1 = require("react/jsx-runtime");
15
16
  var react_1 = require("react");
16
17
  var material_1 = require("@mui/material");
@@ -73,6 +74,5 @@ function MovaTable(_a) {
73
74
  (0, react_1.useEffect)(function () {
74
75
  setCurrentPageIndex(0);
75
76
  }, [search]);
76
- return ((0, jsx_runtime_1.jsx)(material_1.TableContainer, __assign({ sx: __assign({ height: '100%' }, sx), component: material_1.Paper }, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, __assign({ 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.jsxs)(material_1.TableCell, { children: [column.displayName, (0, jsx_runtime_1.jsx)(material_1.TableSortLabel, { active: selectedSorting.column === column.propName, direction: selectedSorting.order, onClick: function () { handleSorting(column.propName); } })] }, index)); }) }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, __assign({ sx: { overflowY: 'auto' } }, { children: [isLoading && ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, __assign({ colSpan: 5, sx: { padding: 0 } }, { children: (0, jsx_runtime_1.jsx)(material_1.LinearProgress, {}) })) })), data.length !== 0 && paginatedElements.map(function (element, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableRow, __assign({ onClick: function () { return handleRowClick(element); }, onContextMenu: function (event) { return onRowRightClick && onRowRightClick(element, event); }, sx: { cursor: isClickable ? (isClickable(element) ? 'pointer' : 'default') : 'pointer', height: 'auto' }, hover: true }, { children: displayedColumns.map(function (column, index) { return ((0, jsx_runtime_1.jsxs)(material_1.TableCell, { children: [column.component && (0, jsx_runtime_1.jsx)(column.component, { element: element }), !column.component && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: element[column.propName] })] }, index)); }) }), index)); }), (0, jsx_runtime_1.jsx)(material_1.TableRow, { sx: { height: '100%' } })] })), pagination !== undefined && ((0, jsx_runtime_1.jsx)(material_1.TableFooter, __assign({ sx: { position: 'sticky', bottom: 0, backgroundColor: 'white' } }, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TablePagination, { count: rowCount, onPageChange: handlePageChange, page: currentPageIndex, rowsPerPage: rowsPerPage, labelRowsPerPage: "Lignes par page :", onRowsPerPageChange: handleRowsPerPageChange, rowsPerPageOptions: [25, 50, 100] }) }) })))] })) })));
77
+ return ((0, jsx_runtime_1.jsx)(material_1.TableContainer, { sx: __assign({ height: '100%' }, sx), 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.jsxs)(material_1.TableCell, { children: [column.displayName, (0, jsx_runtime_1.jsx)(material_1.TableSortLabel, { active: selectedSorting.column === column.propName, direction: selectedSorting.order, onClick: function () { handleSorting(column.propName); } })] }, 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.length !== 0 && paginatedElements.map(function (element, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableRow, { onClick: function () { return handleRowClick(element); }, onContextMenu: function (event) { return onRowRightClick && onRowRightClick(element, event); }, sx: { cursor: isClickable ? (isClickable(element) ? 'pointer' : 'default') : 'pointer', height: 'auto' }, hover: true, children: displayedColumns.map(function (column, index) { return ((0, jsx_runtime_1.jsxs)(material_1.TableCell, { children: [column.component && (0, jsx_runtime_1.jsx)(column.component, { element: element }), !column.component && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: element[column.propName] })] }, index)); }) }, index)); }), (0, jsx_runtime_1.jsx)(material_1.TableRow, { sx: { height: '100%' } })] }), pagination !== undefined && ((0, jsx_runtime_1.jsx)(material_1.TableFooter, { sx: { position: 'sticky', bottom: 0, backgroundColor: 'white' }, children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TablePagination, { count: rowCount, onPageChange: handlePageChange, page: currentPageIndex, rowsPerPage: rowsPerPage, labelRowsPerPage: "Lignes par page :", onRowsPerPageChange: handleRowsPerPageChange, rowsPerPageOptions: [25, 50, 100] }) }) }))] }) }));
77
78
  }
78
- exports.default = MovaTable;
@@ -1,21 +1,11 @@
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
  };
16
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = MovaTableBack;
17
7
  var jsx_runtime_1 = require("react/jsx-runtime");
18
- var icons_material_1 = require("@mui/icons-material");
8
+ var Refresh_1 = __importDefault(require("@mui/icons-material/Refresh"));
19
9
  var Search_1 = __importDefault(require("@mui/icons-material/Search"));
20
10
  var material_1 = require("@mui/material");
21
11
  var react_1 = require("react");
@@ -63,16 +53,16 @@ function MovaTableBack(_a) {
63
53
  setCurrentPageIndex(0);
64
54
  }
65
55
  }, 700);
66
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { height: "100%", display: "flex", flexDirection: "column" } }, { children: [asSearchSection && (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ sx: {
56
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [asSearchSection && (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
67
57
  width: "50%",
68
58
  my: 2,
69
59
  px: 2,
70
60
  display: "flex",
71
61
  gap: 2,
72
- } }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", type: "search", onChange: handleSearchChange, inputProps: {
73
- startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, __assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(Search_1.default, {}) }))),
74
- }, sx: { width: "100%" }, placeholder: "Rechercher" }), refresh && ((0, jsx_runtime_1.jsx)(material_1.Button, __assign({ 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, __assign({ sx: { height: "100%" }, component: material_1.Paper }, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, __assign({ 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, __assign({ sx: { overflowY: "auto" } }, { children: [isLoading && ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, __assign({ colSpan: 5, sx: { padding: 0 } }, { children: (0, jsx_runtime_1.jsx)(material_1.LinearProgress, {}) })) })), (data === null || data === void 0 ? void 0 : data.length) !== 0 &&
75
- (data === null || data === void 0 ? void 0 : data.map(function (element, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableRow, __assign({ onDoubleClick: function () {
62
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", type: "search", onChange: handleSearchChange, inputProps: {
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 &&
65
+ (data === null || data === void 0 ? void 0 : data.map(function (element, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableRow, { onDoubleClick: function () {
76
66
  handleDoubleClick(element);
77
67
  }, onClick: function () { return handleRowClick(element); }, onContextMenu: function (event) {
78
68
  return onRowRightClick && onRowRightClick(element, event);
@@ -84,12 +74,11 @@ function MovaTableBack(_a) {
84
74
  : "default"
85
75
  : "pointer",
86
76
  height: "auto",
87
- }, hover: true }, { children: displayedColumns.map(function (column, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableCell, __assign({ sx: column.autoWidth
77
+ }, hover: true, children: displayedColumns.map(function (column, index) { return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { sx: column.autoWidth
88
78
  ? {
89
79
  whiteSpace: "nowrap",
90
80
  width: "1%",
91
81
  maxWidth: "fit-content",
92
82
  }
93
- : {} }, { children: column.component && ((0, jsx_runtime_1.jsx)(column.component, { element: element })) }), index)); }) }), index)); })), (0, jsx_runtime_1.jsx)(material_1.TableRow, { sx: { height: "100%" } })] })), pagination && pagination.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.TableFooter, __assign({ sx: { position: "sticky", bottom: 0, backgroundColor: "white" } }, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TablePagination, { count: totalElements, onPageChange: handlePageChange, page: currentPageIndex, rowsPerPage: rowsPerPage, labelRowsPerPage: "Lignes par page :", onRowsPerPageChange: handleRowsPerPageChange, rowsPerPageOptions: pagination }) }) })))] })) }))] })));
83
+ : {}, children: column.component && ((0, jsx_runtime_1.jsx)(column.component, { element: element })) }, index)); }) }, index)); })), (0, jsx_runtime_1.jsx)(material_1.TableRow, { sx: { height: "100%" } })] }), pagination && pagination.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.TableFooter, { sx: { position: "sticky", bottom: 0, backgroundColor: "white" }, children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TablePagination, { count: totalElements, onPageChange: handlePageChange, page: currentPageIndex, rowsPerPage: rowsPerPage, labelRowsPerPage: "Lignes par page :", onRowsPerPageChange: handleRowsPerPageChange, rowsPerPageOptions: pagination }) }) }))] }) })] }));
94
84
  }
95
- exports.default = MovaTableBack;
@@ -14,17 +14,6 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
17
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
19
  };
@@ -117,7 +106,7 @@ var PrintSize;
117
106
  (function (PrintSize) {
118
107
  PrintSize["A3"] = "A3";
119
108
  PrintSize["A4"] = "A4";
120
- })(PrintSize = exports.PrintSize || (exports.PrintSize = {}));
109
+ })(PrintSize || (exports.PrintSize = PrintSize = {}));
121
110
  /**
122
111
  * PLV Garage au format A4
123
112
  */
@@ -127,13 +116,13 @@ var PLVComponent = /** @class */ (function (_super) {
127
116
  return _super !== null && _super.apply(this, arguments) || this;
128
117
  }
129
118
  PLVComponent.prototype.render = function () {
130
- return ((0, jsx_runtime_1.jsx)("div", __assign({ className: 'printable-content', style: {
119
+ return ((0, jsx_runtime_1.jsx)("div", { className: 'printable-content', style: {
131
120
  width: this.props.printSize === PrintSize.A4 ? '210mm' : this.props.printSize === PrintSize.A3 ? '297mm' : '0mm',
132
121
  height: this.props.printSize === PrintSize.A4 ? '297mm' : this.props.printSize === PrintSize.A3 ? '420mm' : '0mm',
133
- } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12, style: PLVHeaderLogo, sx: { m: 2, mt: 6, mb: 4 } }, { children: (0, jsx_runtime_1.jsx)("img", { src: logo_large_png_1.default, style: PLVHeaderLogo }) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 12, sx: { ml: 6, mt: 4 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ className: 'highlight' }, { children: "Prenez rendez-vous " })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ className: 'highlight' }, { children: " en un clic ! " })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 12, sx: { ml: 6, mt: 4 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ className: 'not-highlight' }, { children: " Votre entretien " })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ className: 'not-highlight' }, { children: " auto ne sera plus " })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ className: 'not-highlight' }, { children: " un casse-t\u00EAte. " })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6, sx: { pl: 0, mt: this.props.printSize === PrintSize.A3 ? 11 : 7 }, style: PLVQRCode }, { children: (0, jsx_runtime_1.jsx)(QRCode_1.default, { data: this.props.url, size: this.props.printSize === PrintSize.A4 ? 300 : 450 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6, style: PLVBaseLine }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ style: this.props.printSize === PrintSize.A3 ? PLVBaseLineA3 : PLVBaseLine }, { children: ["Vos rendez-vous et factures en un clic", (0, jsx_runtime_1.jsx)("br", {}), "Alertes et suivi en temps r\u00E9\u00E9l", (0, jsx_runtime_1.jsx)("br", {}), "Regroupez 100% de vos documents", (0, jsx_runtime_1.jsx)("br", {}), "Movalib vous r\u00E9concilie avec votre auto !"] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12, style: Tools_1.flexStart }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ color: theme_1.default.palette.primary.dark, sx: {
122
+ }, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, style: PLVHeaderLogo, sx: { m: 2, mt: 6, mb: 4 }, children: (0, jsx_runtime_1.jsx)("img", { src: logo_large_png_1.default, style: PLVHeaderLogo }) }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 12, sx: { ml: 6, mt: 4 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle, children: (0, jsx_runtime_1.jsx)("span", { className: 'highlight', children: "Prenez rendez-vous " }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle, children: (0, jsx_runtime_1.jsx)("span", { className: 'highlight', children: " en un clic ! " }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 12, sx: { ml: 6, mt: 4 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle, children: (0, jsx_runtime_1.jsx)("span", { className: 'not-highlight', children: " Votre entretien " }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle, children: (0, jsx_runtime_1.jsx)("span", { className: 'not-highlight', children: " auto ne sera plus " }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { style: this.props.printSize === PrintSize.A3 ? PLVTitleA3 : PLVTitle, children: (0, jsx_runtime_1.jsx)("span", { className: 'not-highlight', children: " un casse-t\u00EAte. " }) })] }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, sx: { pl: 0, mt: this.props.printSize === PrintSize.A3 ? 11 : 7 }, style: PLVQRCode, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, { data: this.props.url, size: this.props.printSize === PrintSize.A4 ? 300 : 450 }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, style: PLVBaseLine, children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { style: this.props.printSize === PrintSize.A3 ? PLVBaseLineA3 : PLVBaseLine, children: ["Vos rendez-vous et factures en un clic", (0, jsx_runtime_1.jsx)("br", {}), "Alertes et suivi en temps r\u00E9\u00E9l", (0, jsx_runtime_1.jsx)("br", {}), "Regroupez 100% de vos documents", (0, jsx_runtime_1.jsx)("br", {}), "Movalib vous r\u00E9concilie avec votre auto !"] }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, style: Tools_1.flexStart, children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { color: theme_1.default.palette.primary.dark, sx: {
134
123
  ml: this.props.printSize === PrintSize.A3 ? 8 : 7,
135
124
  fontSize: this.props.printSize === PrintSize.A3 ? '1.6rem' : '1rem',
136
- } }, { children: ["Ou rendez-vous sur ", (0, jsx_runtime_1.jsx)("b", { children: "app.movalib.com" })] })) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 12, sx: { mt: this.props.printSize === PrintSize.A3 ? 11 : 7 }, style: PLVFooterLogo }, { children: [(0, jsx_runtime_1.jsx)("span", __assign({ style: this.props.printSize === PrintSize.A3 ? PVLFooterTextA3 : PVLFooterText }, { children: "WWW.MOVALIB.COM" })), (0, jsx_runtime_1.jsx)("img", { src: leafs_large_png_1.default, style: PLVFooterLogo })] }))] })) })));
125
+ }, children: ["Ou rendez-vous sur ", (0, jsx_runtime_1.jsx)("b", { children: "app.movalib.com" })] }) }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 12, sx: { mt: this.props.printSize === PrintSize.A3 ? 11 : 7 }, style: PLVFooterLogo, children: [(0, jsx_runtime_1.jsx)("span", { style: this.props.printSize === PrintSize.A3 ? PVLFooterTextA3 : PVLFooterText, children: "WWW.MOVALIB.COM" }), (0, jsx_runtime_1.jsx)("img", { src: leafs_large_png_1.default, style: PLVFooterLogo })] })] }) }));
137
126
  };
138
127
  return PLVComponent;
139
128
  }(react_1.default.Component));
@@ -144,10 +133,10 @@ var PLVComponentV2 = /** @class */ (function (_super) {
144
133
  return _super !== null && _super.apply(this, arguments) || this;
145
134
  }
146
135
  PLVComponentV2.prototype.render = function () {
147
- return ((0, jsx_runtime_1.jsx)("div", __assign({ className: 'printable-content', style: {
136
+ return ((0, jsx_runtime_1.jsx)("div", { className: 'printable-content', style: {
148
137
  width: this.props.printSize === PrintSize.A4 ? '210mm' : this.props.printSize === PrintSize.A3 ? '297mm' : '0mm',
149
138
  height: this.props.printSize === PrintSize.A4 ? '297mm' : this.props.printSize === PrintSize.A3 ? '420mm' : '0mm',
150
- } }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ container: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)("img", { src: this.props.url, style: { display: 'block', width: '100%', height: '100%', objectFit: 'cover' } }) })) })) })));
139
+ }, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, children: (0, jsx_runtime_1.jsx)("img", { src: this.props.url, style: { display: 'block', width: '100%', height: '100%', objectFit: 'cover' } }) }) }) }));
151
140
  };
152
141
  return PLVComponentV2;
153
142
  }(react_1.default.Component));
@@ -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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -26,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
26
15
  }) : function(o, v) {
27
16
  o["default"] = v;
28
17
  });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
36
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -43,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
42
  });
44
43
  };
45
44
  var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
+ 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);
46
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
47
  function verb(n) { return function (v) { return step([n, v]); }; }
49
48
  function step(op) {
50
49
  if (f) throw new TypeError("Generator is already executing.");
@@ -75,7 +74,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
75
74
  Object.defineProperty(exports, "__esModule", { value: true });
76
75
  exports.QrCodePLVContainer = exports.getPdfDocument = void 0;
77
76
  var jsx_runtime_1 = require("react/jsx-runtime");
78
- var icons_material_1 = require("@mui/icons-material");
77
+ var DocumentScanner_1 = __importDefault(require("@mui/icons-material/DocumentScanner"));
78
+ var QrCode2_1 = __importDefault(require("@mui/icons-material/QrCode2"));
79
79
  var material_1 = require("@mui/material");
80
80
  require("../../style/QRCode.css");
81
81
  var html2canvas_1 = __importDefault(require("html2canvas"));
@@ -200,7 +200,7 @@ var QrCodePLVContainer = function (_a) {
200
200
  return [4 /*yield*/, pdfDoc.save()];
201
201
  case 7:
202
202
  modifiedPdfBytes = _b.sent();
203
- blob = new Blob([modifiedPdfBytes], { type: "application/pdf" });
203
+ blob = new Blob([modifiedPdfBytes.buffer], { type: "application/pdf" });
204
204
  url = URL.createObjectURL(blob);
205
205
  loadingTask = (0, exports.getPdfDocument)(url);
206
206
  return [4 /*yield*/, loadingTask.promise];
@@ -271,11 +271,11 @@ var QrCodePLVContainer = function (_a) {
271
271
  setSelectedChoice(e.target.value);
272
272
  };
273
273
  var printA3PLV = (0, react_to_print_1.useReactToPrint)({
274
- content: function () { return PLVrefA3.current; },
274
+ contentRef: PLVrefA3,
275
275
  documentTitle: "Movalib_PLV_A3",
276
276
  });
277
277
  var printA4PLV = (0, react_to_print_1.useReactToPrint)({
278
- content: function () { return PLVrefA4.current; },
278
+ contentRef: PLVrefA4,
279
279
  documentTitle: "Movalib_PLV_A4",
280
280
  });
281
281
  var onClickDownload = (0, react_1.useMemo)(function () {
@@ -298,17 +298,17 @@ var QrCodePLVContainer = function (_a) {
298
298
  printA3PLV,
299
299
  printA4PLV,
300
300
  ]);
301
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ 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, __assign({ container: true, justifyContent: "center", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 7 }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ fullWidth: true, size: "small" }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, __assign({ id: "qrcode-plv-select" }, { children: "Choisissez votre support" })), (0, jsx_runtime_1.jsxs)(material_1.Select, __assign({ 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, __assign({ value: "A4" }, { children: "\uD83E\uDDFE\u00A0\u00A0PLV format A4" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "A3" }, { children: "\uD83E\uDDFE\u00A0\u00A0PLV format A3" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "QR_Google" }, { children: "QR Code format GoogleMyBusiness" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "QR_Headless" }, { children: "QR Code seul" }))] }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ 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, __assign({ 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 ||
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 ||
302
302
  ((selectedChoice === "A3" || selectedChoice === "A4") &&
303
303
  !isReady), sx: {
304
304
  color: (0, material_1.darken)(theme.palette.primary.main, 0.2),
305
305
  borderRadius: "10rem",
306
- } }, { children: selectedChoice === "A3" || selectedChoice === "A4"
306
+ }, children: selectedChoice === "A3" || selectedChoice === "A4"
307
307
  ? "Imprimer"
308
- : "Télécharger" }))) }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ id: "qr-code-container", style: Tools_1.flexCenter }, { children: (0, jsx_runtime_1.jsx)("div", { ref: qrCodeRef, style: {
308
+ : "Télécharger" })) })] }), (0, jsx_runtime_1.jsx)("div", { id: "qr-code-container", style: Tools_1.flexCenter, children: (0, jsx_runtime_1.jsx)("div", { ref: qrCodeRef, style: {
309
309
  height: "300px",
310
310
  width: "300px",
311
311
  maxWidth: "300px !important",
312
- }, className: "qr-code" }) })), (0, jsx_runtime_1.jsx)(DownloadedQRCode_1.DownloadedQRCode, {})] })));
312
+ }, className: "qr-code" }) }), (0, jsx_runtime_1.jsx)(DownloadedQRCode_1.DownloadedQRCode, {})] }));
313
313
  };
314
314
  exports.QrCodePLVContainer = QrCodePLVContainer;