✨ Create and edit ready
This commit is contained in:
parent
af7d26ffe7
commit
f5ac3cc9f0
@ -15,7 +15,8 @@
|
||||
}
|
||||
|
||||
.folderlist-container {
|
||||
height: 100%;
|
||||
max-height: calc(100vh - 290px);
|
||||
overflow: auto;
|
||||
border-right: 1px solid var(--grey-medium);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
@import "@Themes/constants.scss";
|
||||
|
||||
.root {
|
||||
width: calc(100vh - 83px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
position: relative;
|
||||
.header {
|
||||
flex: 1;
|
||||
}
|
||||
@ -15,7 +15,15 @@
|
||||
}
|
||||
|
||||
.folderlist-container {
|
||||
height: 100%;
|
||||
max-height: calc(100vh - 290px);
|
||||
overflow: auto;
|
||||
border-right: 1px solid var(--grey-medium);
|
||||
}
|
||||
|
||||
.create-container {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList";
|
||||
import Button from "@Front/Components/DesignSystem/Button";
|
||||
import SearchBar from "@Front/Components/DesignSystem/SearchBar";
|
||||
import Module from "@Front/Config/Module";
|
||||
import { DocumentType } from "le-coffre-resources/dist/SuperAdmin";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import React, { useCallback, useState } from "react";
|
||||
|
||||
@ -57,6 +59,11 @@ export default function DocumentTypeListContainer(props: IProps) {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className={classes["create-container"]}>
|
||||
<Link href={Module.getInstance().get().modules.pages.DocumentTypes.pages.Create.props.path}>
|
||||
<Button fullwidth={true}>Créer un type de document</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -1,32 +1,33 @@
|
||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
import Form from "@Front/Components/DesignSystem/Form";
|
||||
import TextAreaField from "@Front/Components/DesignSystem/Form/TextareaField";
|
||||
import TextField from "@Front/Components/DesignSystem/Form/TextField";
|
||||
import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography";
|
||||
import DefaultDeedTypesDashboard from "@Front/Components/LayoutTemplates/DefaultDeedTypeDashboard";
|
||||
import DefaultDocumentTypesDashboard from "@Front/Components/LayoutTemplates/DefaultDocumentTypesDashboard";
|
||||
import { useCallback } from "react";
|
||||
|
||||
import classes from "./classes.module.scss";
|
||||
import TextField from "@Front/Components/DesignSystem/Form/TextField";
|
||||
import TextAreaField from "@Front/Components/DesignSystem/Form/TextareaField";
|
||||
|
||||
type IProps = {};
|
||||
export default function DeedTypesCreate(props: IProps) {
|
||||
export default function DocumentTypesCreate(props: IProps) {
|
||||
const onSubmitHandler = useCallback(async (e: React.FormEvent<HTMLFormElement> | null, values: { [key: string]: string }) => {}, []);
|
||||
|
||||
return (
|
||||
<DefaultDeedTypesDashboard mobileBackText={"Liste des types d'actes"} hasBackArrow title="Créer un type d'acte">
|
||||
<DefaultDocumentTypesDashboard mobileBackText={"Liste des types d'actes"} hasBackArrow title="Créer un type d'acte">
|
||||
<div className={classes["root"]}>
|
||||
<div className={classes["header"]}>
|
||||
<Typography typo={ITypo.H1Bis}>Créer un type d'acte</Typography>
|
||||
<Typography typo={ITypo.H1Bis}>Créer un nouveau document</Typography>
|
||||
</div>
|
||||
<Form onSubmit={onSubmitHandler} className={classes["form-container"]}>
|
||||
<TextField name="name" placeholder="Nom de l'acte" />
|
||||
<TextAreaField name="description" placeholder="Description" />
|
||||
<TextField name="name" placeholder="Nom du document" />
|
||||
<TextAreaField name="private_description" placeholder="Description visible par les collaborateurs de l'office" />
|
||||
<TextAreaField name="public_description" placeholder="Description visible par les clients de l'office" />
|
||||
<div className={classes["buttons-container"]}>
|
||||
<Button variant={EButtonVariant.GHOST}>Annuler</Button>
|
||||
<Button type="submit">Créer le type d'acte</Button>
|
||||
<Button type="submit">Créer le document</Button>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
</DefaultDeedTypesDashboard>
|
||||
</DefaultDocumentTypesDashboard>
|
||||
);
|
||||
}
|
||||
|
@ -20,7 +20,9 @@ export default function DocumentTypesEdit() {
|
||||
useEffect(() => {
|
||||
async function getDocumentType() {
|
||||
if (!documentTypeUid) return;
|
||||
const documentType = await DocumentTypes.getInstance().getByUid(documentTypeUid as string);
|
||||
const documentType = await DocumentTypes.getInstance().getByUid(documentTypeUid as string, {
|
||||
_count: true,
|
||||
});
|
||||
setDocumentTypeSelected(documentType);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user