@movalib/movalib-commons 1.2.27 → 1.2.29

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.
@@ -61,7 +61,7 @@ var AccountValidation = function (_a) {
61
61
  // Si cette variable est transmise, cela signifie que le compte a été créé sans mot de passe
62
62
  var localEmptyPwd = Boolean(params.get('emptyPwd'));
63
63
  setEmptyPwd(localEmptyPwd);
64
- if (token) {
64
+ if (token && !resetPassword) {
65
65
  setLoading(true);
66
66
  try {
67
67
  UserService_1.default.existsByToken(token)
@@ -81,8 +81,6 @@ var AccountValidation = function (_a) {
81
81
  finally {
82
82
  setLoading(false);
83
83
  }
84
- }
85
- if (token && !resetPassword) {
86
84
  if (!localEmptyPwd) {
87
85
  var req = {
88
86
  token: token
@@ -61,6 +61,7 @@ var material_1 = require("@mui/material");
61
61
  var Tools_1 = require("./helpers/Tools");
62
62
  var logo_large_png_1 = __importDefault(require("./assets/images/logo/logo_large.png"));
63
63
  var leafs_large_png_1 = __importDefault(require("./assets/images/leafs_large.png"));
64
+ var theme_1 = __importDefault(require("../theme"));
64
65
  var PrintSize;
65
66
  (function (PrintSize) {
66
67
  PrintSize[PrintSize["A3"] = 0] = "A3";
@@ -155,7 +156,8 @@ var PLVComponent = /** @class */ (function (_super) {
155
156
  this.props.printSize === PrintSize.A3 ? '297mm' : '0mm',
156
157
  height: this.props.printSize === PrintSize.A4 ? '297mm' :
157
158
  this.props.printSize === PrintSize.A3 ? '420mm' : '0mm',
158
- } }, { 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.jsxs)(material_1.Grid, __assign({ item: true, xs: 12, sx: { mt: this.props.printSize === PrintSize.A3 ? 12 : 8 }, 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 })] }))] })) })));
159
+ } }, { 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: { ml: this.props.printSize === PrintSize.A3 ? 8 : 7,
160
+ fontSize: this.props.printSize === PrintSize.A3 ? '1.6rem' : '1rem' } }, { 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 })] }))] })) })));
159
161
  };
160
162
  return PLVComponent;
161
163
  }(react_1.default.Component));
@@ -231,13 +231,13 @@ var MovaSignUp = function (_a) {
231
231
  }
232
232
  } }), 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", onChange: function (e) { return handleInputChange(e); }, value: userForm.phoneNumber.value, error: Boolean(userForm.phoneNumber.error), helperText: userForm.phoneNumber.error, InputProps: {
233
233
  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 setOpenPhoneNumberInfo(!openPhoneNumberInfo); } }, { children: (0, jsx_runtime_1.jsx)(Info_1.default, {}) })) }))),
234
- } }), openPhoneNumberInfo && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: "info", variant: 'standard' }, { children: "Indispensable pour votre garagiste, il doit pouvoir vous appeler en cas d'impr\u00E9vu avec votre v\u00E9hicule." }))] }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, id: "email", label: "Adresse email", name: "email", autoComplete: "email", onChange: function (e) { return handleInputChange(e); }, value: userForm.email.value, error: !userForm.email.isValid, helperText: userForm.email.error, sx: {
234
+ } }), openPhoneNumberInfo && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: "info", variant: 'standard' }, { children: "Indispensable en cas d'impr\u00E9vu avec votre v\u00E9hicule." }))] }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, id: "email", label: "Adresse email", name: "email", autoComplete: "email", onChange: function (e) { return handleInputChange(e); }, value: userForm.email.value, error: !userForm.email.isValid, helperText: userForm.email.error, sx: {
235
235
  '& .MuiOutlinedInput-notchedOutline': {
236
236
  borderColor: darkMode ? 'white' : 'default', // Couleur de la bordure
237
237
  }
238
238
  }, InputProps: {
239
239
  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, {}) })) }))),
240
- } }), 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 tous 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: {
240
+ } }), 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: {
241
241
  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, {}) })) }))),
242
242
  }, sx: {
243
243
  '& .MuiOutlinedInput-notchedOutline': {
@@ -130,7 +130,7 @@ var ScheduleFields = function (_a) {
130
130
  if (((_a = sortedIntervals[i].startTime) === null || _a === void 0 ? void 0 : _a.toString().localeCompare((_b = sortedIntervals[i].endTime) === null || _b === void 0 ? void 0 : _b.toString())) >= 0 ||
131
131
  (i < sortedIntervals.length - 1 &&
132
132
  ((_c = sortedIntervals[i].endTime) === null || _c === void 0 ? void 0 : _c.toString().localeCompare((_d = sortedIntervals[i + 1].startTime) === null || _d === void 0 ? void 0 : _d.toString())) > 0)) {
133
- return 'Attention vos intervales se chevauchent'; // start time is after or equal to end time, or end time of current interval is after start time of next interval
133
+ return 'Attention vos intervalles se chevauchent'; // start time is after or equal to end time, or end time of current interval is after start time of next interval
134
134
  }
135
135
  }
136
136
  return null; // all intervals are valid and there are no overlapping intervals
@@ -216,7 +216,7 @@ var VehicleFullCard = function (_a) {
216
216
  mt: 2,
217
217
  '& input': { textTransform: 'uppercase' } // CSS pour forcer les majuscules dans l'input
218
218
  }, helperText: Boolean(form.currentMileage.error && form.currentMileage.value > 0)
219
- ? form.currentMileage.error : "Sur ton tableau de bord 😉" }) })), !localEditMode && (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, textAlign: 'justify', sx: { pt: 2 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 8 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1", color: "text.secondary" }, { children: "Km moyen annuel :" })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 4, sx: { textAlign: 'right' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1", color: "text.secondary" }, { children: (0, jsx_runtime_1.jsxs)("b", { children: [vehicle.averageMileagePerYear, " km"] }) })) }))] })), localEditMode && (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ fullWidth: true, margin: "normal", error: Boolean(form.averageMileagePerYear.error) }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, __assign({ id: "averageMileagePerYear-label" }, { children: "Kilom\u00E9trage moyen annuel" })), (0, jsx_runtime_1.jsxs)(material_1.Select, __assign({ labelId: "averageMileagePerYear-label", id: "averageMileagePerYear", name: "averageMileagePerYear", value: form.averageMileagePerYear.value ?
219
+ ? form.currentMileage.error : "Sur votre tableau de bord 😉" }) })), !localEditMode && (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, textAlign: 'justify', sx: { pt: 2 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 8 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1", color: "text.secondary" }, { children: "Km moyen annuel :" })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 4, sx: { textAlign: 'right' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1", color: "text.secondary" }, { children: (0, jsx_runtime_1.jsxs)("b", { children: [vehicle.averageMileagePerYear, " km"] }) })) }))] })), localEditMode && (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ fullWidth: true, margin: "normal", error: Boolean(form.averageMileagePerYear.error) }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, __assign({ id: "averageMileagePerYear-label" }, { children: "Kilom\u00E9trage moyen annuel" })), (0, jsx_runtime_1.jsxs)(material_1.Select, __assign({ labelId: "averageMileagePerYear-label", id: "averageMileagePerYear", name: "averageMileagePerYear", value: form.averageMileagePerYear.value ?
220
220
  String(form.averageMileagePerYear.value) : '', onChange: function (e) { return handleSelectChange(e); }, label: "Kilom\u00E9trage moyen annuel" }, { children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 5000 }, { children: "5 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 10000 }, { children: "10 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 15000 }, { children: "15 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 20000 }, { children: "20 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 25000 }, { children: "25 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 30000 }, { children: "30 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 50000 }, { children: "50 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 75000 }, { children: "75 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 100000 }, { children: "100 000" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: 999999 }, { children: "+100 000" }))] })), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: form.averageMileagePerYear.error })] })) })), !localEditMode && (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, textAlign: 'justify', sx: { pt: 2 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1", color: "text.secondary" }, { children: "Pneumatiques :" })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6, sx: { textAlign: 'right' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1", color: "text.secondary" }, { children: isVehicleTireSizeDefined(vehicle) ? (0, jsx_runtime_1.jsx)("b", { children: (0, Tools_1.formatVehicleTire)(vehicle.tireSize) }) : '-' })) }))] })), localEditMode && (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12, sx: { mt: 1 } }, { children: (0, jsx_runtime_1.jsx)(MovaVehicleTireField_1.default, { vehicleTire: form.tireSize.value, onChangeVehicleTire: handleOnChangeVehicleTire }) }))] })), !localEditMode && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "h6", component: "div", align: "center", sx: { mt: 3, mb: 1 }, color: (0, material_1.darken)(theme.palette.primary.main, 0.2) }, { children: "CARNET DU V\u00C9HICULE" })) })), vehicle.documents && ((_b = vehicle.documents) === null || _b === void 0 ? void 0 : _b.filter(function (doc) { return doc.type === Enums_1.DocumentType.VEHICLE_MAINTENANCE_INVOICE; }).map(function (invoice, index) { return ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, sx: { justifyContent: 'space-between', alignItems: 'center' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 11, sx: { textAlign: 'left' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ color: (0, material_1.darken)('#F29ABA', 0.2), href: invoice.fileSignedUrl, target: "_blank", rel: "noopener" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body1" }, { children: ["Facture du ", (0, DateUtils_1.formatDateByCountryCode)(invoice.creationDate, 'fr', Enums_1.DateFormatTypes.SHORT_FORMAT_DATE)] })) })) }), (index + 1) * 50), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 1, sx: { textAlign: 'right' } }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ onClick: function (e) { return handleDeleteDocument(e, invoice.id); } }, { children: (0, jsx_runtime_1.jsx)(CloseRounded_2.default, {}) })) }), (index + 1) * 100)] }), index + 1)); })), vehicle.documents && ((_c = vehicle.documents) === null || _c === void 0 ? void 0 : _c.filter(function (doc) { return doc.type === Enums_1.DocumentType.VEHICLE_TIRE_PHOTO; }).map(function (tirePhoto, index) { return ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, sx: { justifyContent: 'space-between', alignItems: 'center' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 11, sx: { textAlign: 'left' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ color: (0, material_1.darken)('#F29ABA', 0.2), href: tirePhoto.fileSignedUrl, target: "_blank", rel: "noopener" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body1" }, { children: ["Photo pneu du ", (0, DateUtils_1.formatDateByCountryCode)(tirePhoto.creationDate, 'fr', Enums_1.DateFormatTypes.SHORT_FORMAT_DATE)] })) })) }), (index + 1) * 50), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 1, sx: { textAlign: 'right' } }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ onClick: function (e) { return handleDeleteDocument(e, tirePhoto.id); } }, { children: (0, jsx_runtime_1.jsx)(CloseRounded_2.default, {}) })) }), (index + 1) * 100)] }), index + 1)); })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6, sx: { mt: 2, textAlign: 'center' } }, { children: (0, jsx_runtime_1.jsxs)("div", { 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, Enums_1.DocumentType.VEHICLE_MAINTENANCE_INVOICE); } }), (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: "raised-button-invoice" }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, __assign({ size: 'large', component: "span", variant: "outlined", sx: { alignItems: 'normal', width: '90%', mt: 2, mb: 1, height: '70px', p: 1,
221
221
  color: (0, material_1.darken)(theme.palette.primary.main, 0.2) } }, { children: "Ajouter Facture" })) }))] }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6, sx: { mt: 2, textAlign: 'center' } }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", { accept: "image/*", type: "file", style: { display: 'none' }, ref: tirePictureInputRef, id: "raised-button-tire", onChange: function (e) { return handleFileChange(e, Enums_1.DocumentType.VEHICLE_TIRE_PHOTO); } }), (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: "raised-button-tire" }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, __assign({ component: "span", variant: "outlined", sx: { alignItems: 'normal', width: '90%', mt: 2, mb: 1, height: '70px', p: 1,
222
222
  color: (0, material_1.darken)(theme.palette.primary.main, 0.2) } }, { children: "Ajouter Photo Pneu" })) }))] }) }))] }))] })] })), (0, jsx_runtime_1.jsxs)(material_1.CardActions, __assign({ sx: { mt: 3, justifyContent: localEditMode ? 'center' : 'end' } }, { children: [!localEditMode &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.2.27",
3
+ "version": "1.2.29",
4
4
  "description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -60,7 +60,8 @@ const AccountValidation: FunctionComponent<AccountValidationProps> = ({ movaAppT
60
60
  let localEmptyPwd = Boolean(params.get('emptyPwd'));
61
61
  setEmptyPwd(localEmptyPwd);
62
62
 
63
- if(token){
63
+ if (token && !resetPassword) {
64
+
64
65
  setLoading(true);
65
66
 
66
67
  try {
@@ -82,9 +83,6 @@ const AccountValidation: FunctionComponent<AccountValidationProps> = ({ movaAppT
82
83
  }finally {
83
84
  setLoading(false);
84
85
  }
85
- }
86
-
87
- if (token && !resetPassword) {
88
86
 
89
87
  if(!localEmptyPwd){
90
88
 
package/src/GaragePLV.tsx CHANGED
@@ -2,7 +2,7 @@ import React, { CSSProperties, FC, useRef } from 'react';
2
2
  import QRCode from './QRCode';
3
3
  import { useReactToPrint } from 'react-to-print';
4
4
  import { Button, Grid, Typography, darken, useTheme } from '@mui/material';
5
- import { flexCenter } from './helpers/Tools';
5
+ import { flexCenter, flexStart } from './helpers/Tools';
6
6
  import LogoLarge from './assets/images/logo/logo_large.png';
7
7
  import LeafsLarge from './assets/images/leafs_large.png';
8
8
  import theme from '../theme';
@@ -155,7 +155,14 @@ class PLVComponent extends React.Component<GaragePLVProps> {
155
155
  </Typography>
156
156
  </Grid>
157
157
 
158
- <Grid item xs={12} sx={{ mt: this.props.printSize === PrintSize.A3 ? 12 : 8 }} style={PLVFooterLogo}>
158
+ <Grid item xs={12} style={flexStart}>
159
+ <Typography color={theme.palette.primary.dark} sx={{ml: this.props.printSize === PrintSize.A3 ? 8 : 7,
160
+ fontSize: this.props.printSize === PrintSize.A3 ? '1.6rem' : '1rem'}}>
161
+ Ou rendez-vous sur <b>app.movalib.com</b>
162
+ </Typography>
163
+ </Grid>
164
+
165
+ <Grid item xs={12} sx={{ mt: this.props.printSize === PrintSize.A3 ? 11 : 7 }} style={PLVFooterLogo}>
159
166
  <span style={this.props.printSize === PrintSize.A3 ? PVLFooterTextA3 : PVLFooterText}>WWW.MOVALIB.COM</span>
160
167
  <img src={LeafsLarge} style={PLVFooterLogo}/>
161
168
  </Grid>
@@ -302,7 +302,7 @@ const MovaSignUp: FunctionComponent<MovaSignUpProps> = ({ loading, movaAppType,
302
302
  ),
303
303
  }}
304
304
  />
305
- {openPhoneNumberInfo && <Alert severity="info" variant='standard'>Indispensable pour votre garagiste, il doit pouvoir vous appeler en cas d'imprévu avec votre véhicule.</Alert>}
305
+ {openPhoneNumberInfo && <Alert severity="info" variant='standard'>Indispensable en cas d'imprévu avec votre véhicule.</Alert>}
306
306
  </>
307
307
  }
308
308
  <TextField
@@ -333,7 +333,7 @@ const MovaSignUp: FunctionComponent<MovaSignUpProps> = ({ loading, movaAppType,
333
333
  </InputAdornment>
334
334
  ),
335
335
  }}
336
- />{openEmailInfo && <Alert severity="info" variant='standard'>Et si on arrêtait le papier ? En plus de vous notifier, l'email vous permet de recevoir tous vos documents au format numérique 😊🌿</Alert>}
336
+ />{openEmailInfo && <Alert severity="info" variant='standard'>Et si on arrêtait le papier ? En plus de vous notifier, l'email vous permet de recevoir vos documents au format numérique 😊🌿</Alert>}
337
337
  <TextField
338
338
  margin="normal"
339
339
  required
@@ -151,7 +151,7 @@ const ScheduleFields: FunctionComponent<ScheduleFieldsProps> = ({ timePickerStep
151
151
  (i < sortedIntervals.length - 1 &&
152
152
  sortedIntervals[i].endTime?.toString().localeCompare(sortedIntervals[i + 1].startTime?.toString()!)! > 0)
153
153
  ) {
154
- return 'Attention vos intervales se chevauchent'; // start time is after or equal to end time, or end time of current interval is after start time of next interval
154
+ return 'Attention vos intervalles se chevauchent'; // start time is after or equal to end time, or end time of current interval is after start time of next interval
155
155
  }
156
156
  }
157
157
  return null; // all intervals are valid and there are no overlapping intervals
@@ -290,7 +290,7 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
290
290
  '& input': { textTransform: 'uppercase' } // CSS pour forcer les majuscules dans l'input
291
291
  }}
292
292
  helperText={Boolean(form.currentMileage.error && form.currentMileage.value > 0)
293
- ? form.currentMileage.error : "Sur ton tableau de bord 😉"}
293
+ ? form.currentMileage.error : "Sur votre tableau de bord 😉"}
294
294
  />
295
295
  </Grid> }
296
296