@movalib/movalib-commons 1.2.22 → 1.2.24
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
|
};
|
|
@@ -3,6 +3,7 @@ import { MovaAppType } from "../helpers/Enums";
|
|
|
3
3
|
import Garage from "../models/Garage";
|
|
4
4
|
import User from "../models/User";
|
|
5
5
|
export default class UserService {
|
|
6
|
+
static existsByToken(token: string): Promise<APIResponse<User>>;
|
|
6
7
|
static existsByPhoneNumber(phoneNumber: string): Promise<APIResponse<User>>;
|
|
7
8
|
static reestPassword(req: any): Promise<APIResponse<string>>;
|
|
8
9
|
static resendSecurityCode(req: any): Promise<APIResponse<string>>;
|
|
@@ -45,6 +45,12 @@ var Logger_1 = __importDefault(require("../helpers/Logger"));
|
|
|
45
45
|
var UserService = /** @class */ (function () {
|
|
46
46
|
function UserService() {
|
|
47
47
|
}
|
|
48
|
+
UserService.existsByToken = function (token) {
|
|
49
|
+
return (0, ApiHelper_1.request)({
|
|
50
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/user/token/").concat(token),
|
|
51
|
+
method: Enums_1.APIMethod.GET
|
|
52
|
+
});
|
|
53
|
+
};
|
|
48
54
|
UserService.existsByPhoneNumber = function (phoneNumber) {
|
|
49
55
|
return (0, ApiHelper_1.request)({
|
|
50
56
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/user/phone-number/").concat(phoneNumber),
|
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={
|
|
@@ -6,6 +6,13 @@ import User from "../models/User";
|
|
|
6
6
|
|
|
7
7
|
export default class UserService {
|
|
8
8
|
|
|
9
|
+
static existsByToken(token: string): Promise<APIResponse<User>> {
|
|
10
|
+
return request({
|
|
11
|
+
url: `${API_BASE_URL}/user/token/${token}`,
|
|
12
|
+
method: APIMethod.GET
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
static existsByPhoneNumber(phoneNumber: string): Promise<APIResponse<User>> {
|
|
10
17
|
return request({
|
|
11
18
|
url: `${API_BASE_URL}/user/phone-number/${phoneNumber}`,
|