diff --git a/src/pages/CreateContactPage.tsx b/src/pages/CreateContactPage.tsx index b7d6cfb..980d647 100644 --- a/src/pages/CreateContactPage.tsx +++ b/src/pages/CreateContactPage.tsx @@ -6,12 +6,14 @@ import { Row } from "../ui/Row"; import Button from "@mui/material/Button"; import PersonAddAltOutlinedIcon from "@mui/icons-material/PersonAddAltOutlined"; import Typography from "@mui/material/Typography"; -import { Step, StepLabel, Stepper, Divider } from "@mui/material"; +import { Step, StepLabel, Stepper, Divider, Card } from "@mui/material"; import { InformationsForm } from "../ui/Contact/CreateContact/InformationsForm"; -import { AddressForm } from "../ui/Contact/CreateContact/AddressForm"; import { RightsManagementForm } from "../ui/Contact/CreateContact/RightsManagementForm"; +import { Breadcrumbs } from "../ui/Breadcrumbs"; -const steps = ["Informations du contact", "Adresse du contact", "Gestion des droits"]; +// const steps = ["Informations du contact", "Adresse du contact", "Gestion des droits"]; + +const steps = ["Informations du contact", "Gestion des droits"]; export const CreateContactPage = () => { const { register, control, errors } = useForm(schema); @@ -41,44 +43,57 @@ export const CreateContactPage = () => { handleNext(); }; + const breadcrumbs = [ + { href: "/", title: "Accueil" }, + { href: "/search", title: "Recherche" }, + "Nouveau contact", + ]; + return ( - + Nouveau contact - + {steps.map(label => { return ( - + {label} ); })} - - + +
{activeStep === 0 && ( )} - {activeStep === 1 && } - {activeStep === 2 && } - - - + -
+
); diff --git a/src/ui/Contact/ContactFormDialog.tsx b/src/ui/Contact/ContactFormDialog.tsx index 4b6b29d..f65dca4 100644 --- a/src/ui/Contact/ContactFormDialog.tsx +++ b/src/ui/Contact/ContactFormDialog.tsx @@ -1,5 +1,15 @@ -import { Box, Button, Dialog, DialogActions, DialogContent, DialogTitle, Divider } from "@mui/material"; -import { z } from "zod"; +import { + Box, + Button, + Checkbox, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Divider, + FormControlLabel, +} from "@mui/material"; +import { Schema, z } from "zod"; import { useForm } from "../../hooks/useForm.ts"; import { APISchemas } from "../../types/api.ts"; import { Field } from "../Form/Field.tsx"; @@ -8,6 +18,7 @@ import { Row } from "../Row.tsx"; import StarIcon from "@mui/icons-material/Star"; import { useFetchMutation } from "../../hooks/useFetchQuery.ts"; import { AddressFormFields } from "../Form/AddressFormFields.tsx"; +import { UseFormRegister, UseFormReturn } from "react-hook-form"; type Props = { open: boolean; @@ -110,50 +121,7 @@ export const ContactFormDialog = ({ open, onClose, contact, onSave }: Props) =>
Modification des coordonnées - - - - - - - - - - - - - - - - - - - - - +