Skip to content
Extraits de code Groupes Projets
Valider ee814917 rédigé par zineb.ammar's avatar zineb.ammar
Parcourir les fichiers

update sidebar

parent 71b41026
Branches
1 requête de fusion!21update sidebar
Pipeline #3733 réussi avec l'étape
in 4 minutes et 36 secondes
......@@ -17,6 +17,8 @@ export type SignUpParams = {
password: string;
firstName: string;
lastName: string;
phoneNumber: string;
country: string;
};
/** **************************************
......
import { useState } from 'react';
import { _mock } from 'src/shared/_mock';
......
......@@ -67,6 +67,7 @@ export const paths = {
root: `${ROOTS.DASHBOARD}/user`,
new: `${ROOTS.DASHBOARD}/user/new`,
profile: `${ROOTS.DASHBOARD}/user/profile`,
account: `${ROOTS.DASHBOARD}/user/account`,
list: `${ROOTS.DASHBOARD}/user/list`,
exprience: `${ROOTS.DASHBOARD}/user/add-experience`,
......
import { common, createLowlight } from 'lowlight';
import LinkExtension from '@tiptap/extension-link';
import ImageExtension from '@tiptap/extension-image';
......
......@@ -49,8 +49,8 @@ export const navData = [
path: paths.dashboard.user.root,
icon: ICONS.user,
children: [
{ title: 'Profile', path: paths.dashboard.user.root },
{ title: 'Account', path: paths.dashboard.user.account },
{ title: 'Profile', path: paths.dashboard.user.profile },
{ title: 'Account', path: paths.dashboard.user.account },
{ title: 'liste', path: paths.dashboard.user.list}
],
},
......
......@@ -40,6 +40,11 @@ export const SignUpSchema = zod.object({
.string()
.min(1, { message: 'Password is required!' })
.min(6, { message: 'Password must be at least 6 characters!' }),
phoneNumber: zod
.string()
.min(1, { message: 'Phone number is required!' })
.regex(/^\+?\d{10,15}$/, { message: 'Phone number must be valid!' }),
country: zod.string().min(1, { message: 'Country is required!' }),
});
// ----------------------------------------------------------------------
......@@ -58,6 +63,8 @@ export function JwtSignUpView() {
lastName: 'Friend',
email: 'hello@gmail.com',
password: '@demo1',
phoneNumber: '+1234567890',
country: 'USA',
};
const methods = useForm<SignUpSchemaType>({
......@@ -77,6 +84,8 @@ export function JwtSignUpView() {
password: data.password,
firstName: data.firstName,
lastName: data.lastName,
phoneNumber: data.phoneNumber,
country: data.country,
});
await checkUserSession?.();
......@@ -112,6 +121,10 @@ export function JwtSignUpView() {
<Field.Text name="email" label="Email address" InputLabelProps={{ shrink: true }} />
<Field.Text name="phoneNumber" label="Phone number" InputLabelProps={{ shrink: true }} />
<Field.Text name="country" label="Country" InputLabelProps={{ shrink: true }} />
<Field.Text
name="password"
label="Password"
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter