🐛 Removing act type choose in ask documents
This commit is contained in:
parent
39cba4981f
commit
10f7f08121
@ -4,7 +4,7 @@ import CheckBox from "@Front/Components/DesignSystem/CheckBox";
|
||||
import Form, { IApiFormErrors } from "@Front/Components/DesignSystem/Form";
|
||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||
import Confirm from "@Front/Components/DesignSystem/Modal/Confirm";
|
||||
import Select, { IOption } from "@Front/Components/DesignSystem/Select";
|
||||
import { IOption } from "@Front/Components/DesignSystem/Select";
|
||||
import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||
import BackArrow from "@Front/Components/Elements/BackArrow";
|
||||
import DefaultNotaryDashboard from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
||||
@ -15,19 +15,12 @@ import classes from "./classes.module.scss";
|
||||
|
||||
type IProps = {};
|
||||
type IState = {
|
||||
actType: IOption | null;
|
||||
isCreateDocumentModalVisible: boolean;
|
||||
documentName: string;
|
||||
visibleDescription: string;
|
||||
};
|
||||
|
||||
export default class AskDocuments extends BasePage<IProps, IState> {
|
||||
private actsOptions: IOption[] = [
|
||||
{ label: "Divorce", value: "divorce" },
|
||||
{ label: "Succession", value: "succession" },
|
||||
{ label: "Vente immobilière", value: "vente_immobiliere" },
|
||||
];
|
||||
|
||||
private documentsType: IOption[] = [
|
||||
{ label: "Carte d'identité", value: "carte_identite" },
|
||||
{ label: "Diagnostic État Risques et Pollution", value: "diagnostic_erep" },
|
||||
@ -46,13 +39,11 @@ export default class AskDocuments extends BasePage<IProps, IState> {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
actType: null,
|
||||
isCreateDocumentModalVisible: false,
|
||||
documentName: "",
|
||||
visibleDescription: "",
|
||||
};
|
||||
|
||||
this.onActTypeChange = this.onActTypeChange.bind(this);
|
||||
this.onFormSubmit = this.onFormSubmit.bind(this);
|
||||
this.closeModal = this.closeModal.bind(this);
|
||||
this.openModal = this.openModal.bind(this);
|
||||
@ -73,18 +64,9 @@ export default class AskDocuments extends BasePage<IProps, IState> {
|
||||
</Typography>
|
||||
<Form onSubmit={this.onFormSubmit}>
|
||||
<div className={classes["form-container"]}>
|
||||
{!this.state.actType && (
|
||||
<Select options={this.actsOptions} placeholder={"Type d’acte"} onChange={this.onActTypeChange} />
|
||||
)}
|
||||
{this.state.actType && (
|
||||
<>
|
||||
<div className={classes["checkbox-container"]}>
|
||||
{this.documentsType.map((documentType) => (
|
||||
<CheckBox
|
||||
toolTip="Checkbox with tooltip"
|
||||
option={documentType}
|
||||
key={documentType.value as string}
|
||||
/>
|
||||
<CheckBox toolTip="Checkbox with tooltip" option={documentType} key={documentType.value as string} />
|
||||
))}
|
||||
</div>
|
||||
<div className={classes["add-document-container"]}>
|
||||
@ -103,8 +85,6 @@ export default class AskDocuments extends BasePage<IProps, IState> {
|
||||
</Button>
|
||||
<Button type="submit">Valider</Button>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</Form>
|
||||
<Confirm
|
||||
@ -166,7 +146,6 @@ export default class AskDocuments extends BasePage<IProps, IState> {
|
||||
|
||||
private cancel() {
|
||||
this.setState({
|
||||
actType: null,
|
||||
visibleDescription: "",
|
||||
documentName: "",
|
||||
});
|
||||
@ -188,12 +167,6 @@ export default class AskDocuments extends BasePage<IProps, IState> {
|
||||
});
|
||||
}
|
||||
|
||||
private onActTypeChange(selectedOption: IOption) {
|
||||
this.setState({
|
||||
actType: selectedOption,
|
||||
});
|
||||
}
|
||||
|
||||
private onFormSubmit(
|
||||
e: React.FormEvent<HTMLFormElement> | null,
|
||||
values: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user