@movalib/movalib-commons 1.2.21 → 1.2.23
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.
|
@@ -246,7 +246,7 @@ var AccountValidation = function (_a) {
|
|
|
246
246
|
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 (e) { return setShowPassword(function (prev) { return !prev; }); } }, { children: showPassword ? (0, jsx_runtime_1.jsx)(VisibilityOff_1.default, {}) : (0, jsx_runtime_1.jsx)(Visibility_1.default, {}) })) }))),
|
|
247
247
|
} }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, name: "confirmation", label: "Confirmation mot de passe", type: showPassword ? 'text' : 'password', id: "confirmation", onChange: function (e) { return handleInputChange(e); }, value: validationForm.confirmation.value, error: !validationForm.confirmation.isValid, helperText: Boolean(validationForm.confirmation.error) ? validationForm.confirmation.error : "", InputProps: {
|
|
248
248
|
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 (e) { return setShowPassword(function (prev) { return !prev; }); } }, { children: showPassword ? (0, jsx_runtime_1.jsx)(VisibilityOff_1.default, {}) : (0, jsx_runtime_1.jsx)(Visibility_1.default, {}) })) }))),
|
|
249
|
-
} }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12, sx: { mt: 2, display: 'flex', justifyContent: 'start' } }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ error: !validationForm.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: validationForm.acceptsTerms.value, onChange: function (e, checked) { return handleCheckboxChange(e, checked); }, sx: { pr:
|
|
249
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12, sx: { mt: 2, display: 'flex', justifyContent: 'start' } }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ error: !validationForm.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: validationForm.acceptsTerms.value, onChange: function (e, checked) { return handleCheckboxChange(e, checked); }, sx: { pr: 2 } }), label: (0, jsx_runtime_1.jsxs)("span", { children: ["J'accepte ", movaAppType === Enums_1.MovaAppType.GARAGE ? "sans réserve" : '', " les", ' ', (0, jsx_runtime_1.jsx)("a", __assign({ href: movaAppType === Enums_1.MovaAppType.GARAGE ? proCGUPath : CGUPath, target: "_blank", style: { color: theme.palette.primary.main } }, { children: "Conditions G\u00E9n\u00E9rales d'Utilisation" })), movaAppType === Enums_1.MovaAppType.GARAGE &&
|
|
250
250
|
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["\u00A0", (0, jsx_runtime_1.jsx)("br", {}), "et les ", ' ', (0, jsx_runtime_1.jsx)("a", __assign({ href: proCGVPath, target: "_blank", style: { color: theme.palette.primary.main } }, { children: "Conditions G\u00E9n\u00E9rales de Vente" }))] })] }) }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: validationForm.acceptsTerms.error })] })) }))] })) })), loading &&
|
|
251
251
|
(0, jsx_runtime_1.jsx)(material_1.Box, __assign({ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "100vh" }, { children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {}) })), openPhoneNumberInput && (0, jsx_runtime_1.jsx)(ConfirmationDialog_1.default, { open: openPhoneNumberInput, confirmLabel: "Envoyer", closeLabel: "Annuler", onClose: function () { return setOpenPhoneNumberInput(false); }, onConfirm: resendCode, message: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Indiquez nous votre num\u00E9ro de t\u00E9l\u00E9phone" }), (0, jsx_runtime_1.jsx)("br", {})] }), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", fullWidth: true, required: true, id: "phoneNumber", label: "N\u00B0 de t\u00E9l\u00E9phone", name: "phoneNumber", autoComplete: "tel", onChange: function (e) { return handleInputChange(e); }, value: validationForm.phoneNumber.value, error: Boolean(validationForm.phoneNumber.error), helperText: validationForm.phoneNumber.error }) }))] }) })] }));
|
|
252
252
|
};
|
package/dist/src/MovaDialog.js
CHANGED
|
@@ -51,7 +51,9 @@ var MovaDialog = function (_a) {
|
|
|
51
51
|
onClose();
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, __assign({ fullScreen: fullScreen, fullWidth: true,
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, __assign({ fullScreen: fullScreen, fullWidth: true,
|
|
55
|
+
//TransitionComponent={getTransition()}
|
|
56
|
+
open: open, "aria-labelledby": "garage-dialog-title", "aria-describedby": "garage-dialog-description", onClose: handleOnClose, maxWidth: maxWidth, sx: __assign(__assign({}, sx), { textAlign: 'center' }) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: getLeafImage(), style: {
|
|
55
57
|
position: 'absolute',
|
|
56
58
|
float: 'left',
|
|
57
59
|
width: '150px',
|
|
@@ -18,7 +18,7 @@ export default class User {
|
|
|
18
18
|
vehicles?: Vehicle[];
|
|
19
19
|
isActive?: Boolean;
|
|
20
20
|
hasPassword?: Boolean;
|
|
21
|
-
constructor(id: string, roles: Role[], firstname?: string, lastname?: string, avatar?: string, password?: string, created?: Date, email?: string, gender?: Gender, birthDate?: Date, addresses?: Address[], phoneNumber?: string, vehicles?: Vehicle[]);
|
|
21
|
+
constructor(id: string, roles: Role[], firstname?: string, lastname?: string, avatar?: string, password?: string, created?: Date, email?: string, gender?: Gender, birthDate?: Date, addresses?: Address[], phoneNumber?: string, vehicles?: Vehicle[], isActive?: Boolean, hasPassword?: Boolean);
|
|
22
22
|
static getFirstLetter: (user: User) => string;
|
|
23
23
|
static isGarageCustomer: (user: User) => boolean;
|
|
24
24
|
static isGarageTechnician: (user: User) => boolean;
|
package/dist/src/models/User.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Enums_1 = require("../helpers/Enums");
|
|
4
4
|
var User = /** @class */ (function () {
|
|
5
|
-
function User(id, roles, firstname, lastname, avatar, password, created, email, gender, birthDate, addresses, phoneNumber, vehicles) {
|
|
5
|
+
function User(id, roles, firstname, lastname, avatar, password, created, email, gender, birthDate, addresses, phoneNumber, vehicles, isActive, hasPassword) {
|
|
6
6
|
if (firstname === void 0) { firstname = ''; }
|
|
7
7
|
if (lastname === void 0) { lastname = ''; }
|
|
8
8
|
if (avatar === void 0) { avatar = ''; }
|
|
@@ -21,6 +21,8 @@ var User = /** @class */ (function () {
|
|
|
21
21
|
this.addresses = addresses;
|
|
22
22
|
this.phoneNumber = phoneNumber;
|
|
23
23
|
this.vehicles = vehicles;
|
|
24
|
+
this.isActive = isActive;
|
|
25
|
+
this.hasPassword = hasPassword;
|
|
24
26
|
}
|
|
25
27
|
User.getFirstLetter = function (user) {
|
|
26
28
|
var firstLetter = user.lastname[0].toUpperCase();
|
package/package.json
CHANGED
|
@@ -408,7 +408,7 @@ const AccountValidation: FunctionComponent<AccountValidationProps> = ({ movaAppT
|
|
|
408
408
|
color="primary"
|
|
409
409
|
checked={validationForm.acceptsTerms.value}
|
|
410
410
|
onChange={(e, checked) => handleCheckboxChange(e, checked)}
|
|
411
|
-
sx={{pr:
|
|
411
|
+
sx={{pr: 2}}
|
|
412
412
|
/>
|
|
413
413
|
}
|
|
414
414
|
label={
|
package/src/MovaDialog.tsx
CHANGED
|
@@ -70,7 +70,7 @@ const MovaDialog: FC<MovaDialogProps> = ({fullScreen, open, onClose, closable =
|
|
|
70
70
|
<Dialog
|
|
71
71
|
fullScreen={fullScreen}
|
|
72
72
|
fullWidth
|
|
73
|
-
TransitionComponent={getTransition()}
|
|
73
|
+
//TransitionComponent={getTransition()}
|
|
74
74
|
open={open}
|
|
75
75
|
aria-labelledby="garage-dialog-title"
|
|
76
76
|
aria-describedby="garage-dialog-description"
|
package/src/models/User.ts
CHANGED
|
@@ -35,7 +35,9 @@ export default class User {
|
|
|
35
35
|
birthDate?: Date,
|
|
36
36
|
addresses?: Address[],
|
|
37
37
|
phoneNumber?: string ,
|
|
38
|
-
vehicles?: Vehicle[]
|
|
38
|
+
vehicles?: Vehicle[],
|
|
39
|
+
isActive?: Boolean,
|
|
40
|
+
hasPassword?: Boolean
|
|
39
41
|
) {
|
|
40
42
|
this.id = id;
|
|
41
43
|
this.roles = roles;
|
|
@@ -50,6 +52,8 @@ export default class User {
|
|
|
50
52
|
this.addresses = addresses;
|
|
51
53
|
this.phoneNumber = phoneNumber;
|
|
52
54
|
this.vehicles = vehicles;
|
|
55
|
+
this.isActive = isActive;
|
|
56
|
+
this.hasPassword = hasPassword;
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
static getFirstLetter = (user: User) : string => {
|