Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Maxime Lalo 2023-04-19 12:07:32 +02:00
commit b09d052c89
16 changed files with 180 additions and 21 deletions

View File

@ -46,9 +46,10 @@
@media (max-width: $screen-s) { @media (max-width: $screen-s) {
flex-wrap: wrap; flex-wrap: wrap;
.edit-icon { .edit-icon-container {
margin-left: 0px; margin-left: 0px;
margin-top: 24px; margin-top: 24px;
} }
} }
} }

View File

@ -15,8 +15,8 @@ type IProps = {
export default function FolderBoxInformation(props: IProps) { export default function FolderBoxInformation(props: IProps) {
const { isDescription = false } = props; const { isDescription = false } = props;
const path = isDescription const path = isDescription
? "/dossier/".concat(props.folder.uid).concat("/todo") ? "/folder/".concat(props.folder.uid).concat("/update-description")
: "/dossier/".concat(props.folder.uid).concat("/modifier"); : "/folder/".concat(props.folder.uid).concat("/update-metadata");
return ( return (
<div className={classNames(classes["root"], isDescription && classes["isSignleDescription"])}> <div className={classNames(classes["root"], isDescription && classes["isSignleDescription"])}>

View File

@ -19,7 +19,7 @@ export default class FolderList extends React.Component<IProps, IState> {
{this.props.folders.map((folder) => { {this.props.folders.map((folder) => {
return ( return (
<div onClick={this.props.onCloseLeftSide} key={folder.uid}> <div onClick={this.props.onCloseLeftSide} key={folder.uid}>
<Link href={"/dossier/".concat(folder.uid)}> <Link href={"/folder/".concat(folder.uid)}>
<FolderContainer folder={folder} onSelectedFolder={this.props.onSelectedFolder} />; <FolderContainer folder={folder} onSelectedFolder={this.props.onSelectedFolder} />;
</Link> </Link>
</div> </div>

View File

@ -26,6 +26,7 @@ export default class FolderListContainer extends React.Component<IProps, IState>
} }
public override render(): JSX.Element { public override render(): JSX.Element {
const navigatePath = "/folder/create";
return ( return (
<div className={classes["root"]}> <div className={classes["root"]}>
<div> <div>
@ -39,7 +40,7 @@ export default class FolderListContainer extends React.Component<IProps, IState>
/> />
</div> </div>
<div> <div>
<Link href={"/dossier/creer-dossier"}> <Link href={navigatePath}>
<Button fullwidth={true}>Créer un dossier</Button> <Button fullwidth={true}>Créer un dossier</Button>
</Link> </Link>
</div> </div>

View File

@ -42,11 +42,12 @@ class AddClientToFolderClass extends BasePage<IProps, IState> {
{ value: "rijgreipgje", label: "jane Doe" }, { value: "rijgreipgje", label: "jane Doe" },
{ value: "gipjerpogkzfe", label: "Marcelino Doe" }, { value: "gipjerpogkzfe", label: "Marcelino Doe" },
]; ];
const backwardPath = "/folder/".concat(this.props.selectedFolderUid);
return ( return (
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}> <DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
<div className={classes["root"]}> <div className={classes["root"]}>
<div className={classes["back-arrow"]}> <div className={classes["back-arrow"]}>
<BackArrow url={"/dossier/".concat(this.props.selectedFolderUid)} /> <BackArrow url={backwardPath} />
</div> </div>
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography> <Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
<Form> <Form>

View File

@ -14,12 +14,13 @@ type IState = {};
export default class ClientSection extends React.Component<IProps, IState> { export default class ClientSection extends React.Component<IProps, IState> {
public override render(): JSX.Element { public override render(): JSX.Element {
const navigatePath = "/folder/".concat(this.props.folder.uid).concat("/ajouter-client");
return ( return (
<div className={classes["root"]}> <div className={classes["root"]}>
{this.doesFolderHaveCustomer() ? ( {this.doesFolderHaveCustomer() ? (
<> <>
<div className={classes["client"]}>{this.renderCustomerFolders()}</div> <div className={classes["client"]}>{this.renderCustomerFolders()}</div>
<Link href={"/dossier/".concat(this.props.folder.uid).concat("/ajouter-client")}> <Link href={navigatePath}>
<Button variant={EButtonVariant.LINE} icon={PlusIcon}> <Button variant={EButtonVariant.LINE} icon={PlusIcon}>
Ajouter un client Ajouter un client
</Button> </Button>
@ -32,7 +33,7 @@ export default class ClientSection extends React.Component<IProps, IState> {
Aucun client nest associé au dossier. Aucun client nest associé au dossier.
</Typography> </Typography>
</div> </div>
<Link href={"/dossier/".concat(this.props.folder.uid).concat("/ajouter-client")}> <Link href={navigatePath}>
<Button variant={EButtonVariant.LINE} icon={PlusIcon}> <Button variant={EButtonVariant.LINE} icon={PlusIcon}>
Ajouter un client Ajouter un client
</Button> </Button>

View File

@ -0,0 +1,56 @@
@import "@Themes/constants.scss";
.root {
display: flex;
flex-direction: column;
min-height: 100%;
align-items: flex-start;
width: fit-content;
.back-arrow {
margin-bottom: 24px;
}
.form {
width: 100%;
.content {
margin-top: 32px;
>:not(:last-child) {
margin-bottom: 24px;
}
}
.button-container {
width: 100%;
display: flex;
text-align: center;
margin-top: 24px;
.cancel-button {
display: flex;
margin-right: 12px;
}
@media (max-width: $screen-m) {
display: flex;
flex-direction: column-reverse;
.cancel-button {
margin-left: 0;
margin-top: 12px;
>* {
flex: 1;
}
}
>* {
width: 100%;
}
}
}
}
}

View File

@ -0,0 +1,64 @@
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
import Form from "@Front/Components/DesignSystem/Form";
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography";
import BackArrow from "@Front/Components/Elements/BackArrow";
import DefaultNotaryDashboard, { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
import { useRouter } from "next/router";
import BasePage from "../../Base";
import classes from "./classes.module.scss";
import Link from "next/link";
type IProps = {
selectedFolderUid: string;
};
type IState = {
selectedFolder: IDashBoardFolder | null;
};
class UpdateFolderDescriptionClass extends BasePage<IProps, IState> {
constructor(props: IProps) {
super(props);
this.state = {
selectedFolder: null,
};
this.onSelectedFolder = this.onSelectedFolder.bind(this);
}
public override render(): JSX.Element {
const backwardPath = "/folder/".concat(this.props.selectedFolderUid);
return (
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
<div className={classes["root"]}>
<div className={classes["back-arrow"]}>
<BackArrow url={backwardPath} />
</div>
<Typography typo={ITypo.H1Bis}>Modifier la note du dossier</Typography>
<Form className={classes["form"]}>
<div className={classes["content"]}>
<InputField name="input field" fakeplaceholder="Intitulé du dossier" textarea />
</div>
<div className={classes["button-container"]}>
<Link href={backwardPath} className={classes["cancel-button"]}>
<Button variant={EButtonVariant.GHOST}>Annuler</Button>
</Link>
<Button type="submit">Enregistrer</Button>
</div>
</Form>
</div>
</DefaultNotaryDashboard>
);
}
private onSelectedFolder(folder: IDashBoardFolder): void {
this.setState({ selectedFolder: folder });
}
}
export default function UpdateFolderDescription() {
const router = useRouter();
let { uid } = router.query;
uid = uid as string;
return <UpdateFolderDescriptionClass selectedFolderUid={uid} />;
}

View File

@ -5,25 +5,52 @@
flex-direction: column; flex-direction: column;
min-height: 100%; min-height: 100%;
align-items: flex-start; align-items: flex-start;
width: fit-content;
.back-arrow { .back-arrow {
margin-bottom: 24px; margin-bottom: 24px;
} }
.content { .form {
margin-top: 32px; width: 100%;
.content {
margin-top: 32px;
>:not(:last-child) {
margin-bottom: 24px;
}
>:not(:last-child) {
margin-bottom: 24px;
} }
} .button-container {
width: 100%;
display: flex;
text-align: center;
margin-top: 24px;
.button-container { .cancel-button {
margin-top: 24px; display: flex;
margin-right: 12px;
}
:first-child { @media (max-width: $screen-m) {
margin-right: 32px; display: flex;
flex-direction: column-reverse;
.cancel-button {
margin-left: 0;
margin-top: 12px;
>* {
flex: 1;
}
}
>* {
width: 100%;
}
}
} }
} }
} }

View File

@ -9,6 +9,7 @@ import { useRouter } from "next/router";
import BasePage from "../../Base"; import BasePage from "../../Base";
import classes from "./classes.module.scss"; import classes from "./classes.module.scss";
import Link from "next/link";
type IProps = { type IProps = {
selectedFolderUid: string; selectedFolderUid: string;
@ -32,16 +33,16 @@ class UpdateFolderMetadataClass extends BasePage<IProps, IState> {
{ value: "adazzqsdaad", label: "Vente immobilière" }, { value: "adazzqsdaad", label: "Vente immobilière" },
{ value: "adazzqsdaad", label: "Acte de divorce" }, { value: "adazzqsdaad", label: "Acte de divorce" },
]; ];
const backwardPath = "/folder/".concat(this.props.selectedFolderUid);
return ( return (
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}> <DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
<div className={classes["root"]}> <div className={classes["root"]}>
<div className={classes["back-arrow"]}> <div className={classes["back-arrow"]}>
<BackArrow url={"/dossier/".concat(this.props.selectedFolderUid)} /> <BackArrow url={backwardPath} />
</div> </div>
<Typography typo={ITypo.H1Bis}>Modifier les informations du dossier</Typography> <Typography typo={ITypo.H1Bis}>Modifier les informations du dossier</Typography>
<Form> <Form className={classes["form"]}>
<div className={classes["content"]}> <div className={classes["content"]}>
<InputField name="input field" fakeplaceholder="Intitulé du dossier" /> <InputField name="input field" fakeplaceholder="Intitulé du dossier" />
<InputField name="input field" fakeplaceholder="Numéro de dossier" /> <InputField name="input field" fakeplaceholder="Numéro de dossier" />
@ -55,7 +56,9 @@ class UpdateFolderMetadataClass extends BasePage<IProps, IState> {
</div> </div>
<div className={classes["button-container"]}> <div className={classes["button-container"]}>
<Button variant={EButtonVariant.GHOST}>Annuler</Button> <Link href={backwardPath} className={classes["cancel-button"]}>
<Button variant={EButtonVariant.GHOST}>Annuler</Button>
</Link>
<Button type="submit">Enregistrer</Button> <Button type="submit">Enregistrer</Button>
</div> </div>
</Form> </Form>

View File

@ -0,0 +1,5 @@
import UpdateFolderDescription from "@Front/Components/Layouts/Folder/UpdateFolderDescription";
export default function Route() {
return <UpdateFolderDescription />;
}