🎨 add back arrow to folde/uid on add client page
This commit is contained in:
parent
f9ec6a47bd
commit
bdc690600e
@ -19,6 +19,7 @@ type IProps = {
|
|||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
type?: "button" | "submit";
|
type?: "button" | "submit";
|
||||||
isloading?: string;
|
isloading?: string;
|
||||||
|
iconPosition?: "left" | "right";
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Button(props: IProps) {
|
export default function Button(props: IProps) {
|
||||||
@ -28,6 +29,7 @@ export default function Button(props: IProps) {
|
|||||||
type = "button",
|
type = "button",
|
||||||
isloading = "false",
|
isloading = "false",
|
||||||
fullwidth = "false",
|
fullwidth = "false",
|
||||||
|
iconPosition = "right",
|
||||||
onClick,
|
onClick,
|
||||||
children,
|
children,
|
||||||
icon,
|
icon,
|
||||||
@ -38,8 +40,9 @@ export default function Button(props: IProps) {
|
|||||||
delete attributes.icon;
|
delete attributes.icon;
|
||||||
return (
|
return (
|
||||||
<button {...attributes} onClick={onClick} className={classes["root"]} type={type}>
|
<button {...attributes} onClick={onClick} className={classes["root"]} type={type}>
|
||||||
|
{icon && iconPosition === "left" && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
||||||
{children}
|
{children}
|
||||||
{icon && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
{icon && iconPosition === "right" && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -10,15 +10,19 @@ import { IOption } from "@Front/Components/DesignSystem/Select";
|
|||||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||||
import Form from "@Front/Components/DesignSystem/Form";
|
import Form from "@Front/Components/DesignSystem/Form";
|
||||||
import ChevonIcon from "@Assets/icons/chevron.svg";
|
import ChevonIcon from "@Assets/icons/chevron.svg";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
type IProps = {};
|
type IProps = {
|
||||||
|
selectedFolderUid: string;
|
||||||
|
};
|
||||||
type IState = {
|
type IState = {
|
||||||
selectedFolder: IDashBoardFolder | null;
|
selectedFolder: IDashBoardFolder | null;
|
||||||
isExistingClientSelected: boolean;
|
isExistingClientSelected: boolean;
|
||||||
isNewClientSelected: boolean;
|
isNewClientSelected: boolean;
|
||||||
hasNewClientSelected: boolean;
|
hasNewClientSelected: boolean;
|
||||||
};
|
};
|
||||||
export default class AddClientToFolder extends BasePage<IProps, IState> {
|
class AddClientToFolderClass extends BasePage<IProps, IState> {
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -32,7 +36,6 @@ export default class AddClientToFolder extends BasePage<IProps, IState> {
|
|||||||
this.onNewClientSelected = this.onNewClientSelected.bind(this);
|
this.onNewClientSelected = this.onNewClientSelected.bind(this);
|
||||||
this.onMutiSelectChange = this.onMutiSelectChange.bind(this);
|
this.onMutiSelectChange = this.onMutiSelectChange.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
const selectOptions = [
|
const selectOptions = [
|
||||||
{ value: "adazzdsqaad", label: "john Doe" },
|
{ value: "adazzdsqaad", label: "john Doe" },
|
||||||
@ -42,9 +45,15 @@ export default class AddClientToFolder extends BasePage<IProps, IState> {
|
|||||||
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"]}>
|
||||||
<Button icon={ChevonIcon} variant={EButtonVariant.LINE}>
|
<Link href={"/dossier/".concat(this.props.selectedFolderUid)}>
|
||||||
|
<Button
|
||||||
|
icon={ChevonIcon}
|
||||||
|
iconPosition={"left"}
|
||||||
|
iconStyle={{ transform: "rotate(180deg)", width: "22px", height: "22px" }}
|
||||||
|
variant={EButtonVariant.LINE}>
|
||||||
Retour
|
Retour
|
||||||
</Button>
|
</Button>
|
||||||
|
</Link>
|
||||||
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
|
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
|
||||||
<Form>
|
<Form>
|
||||||
<div className={classes["radiobox-container"]}>
|
<div className={classes["radiobox-container"]}>
|
||||||
@ -109,3 +118,10 @@ export default class AddClientToFolder extends BasePage<IProps, IState> {
|
|||||||
this.setState({ isExistingClientSelected: false, isNewClientSelected: true });
|
this.setState({ isExistingClientSelected: false, isNewClientSelected: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default function AddClientToFolder() {
|
||||||
|
const router = useRouter();
|
||||||
|
let { uid } = router.query;
|
||||||
|
uid = uid as string;
|
||||||
|
return <AddClientToFolderClass selectedFolderUid={uid} />;
|
||||||
|
}
|
||||||
|
@ -31,6 +31,7 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Message if the user has not created any folder yet
|
// TODO: Message if the user has not created any folder yet
|
||||||
|
// TODO: get the selected folder from the api in componentDidMount
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={this.onSelectedFolder}>
|
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={this.onSelectedFolder}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user