🎨 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;
|
||||
type?: "button" | "submit";
|
||||
isloading?: string;
|
||||
iconPosition?: "left" | "right";
|
||||
};
|
||||
|
||||
export default function Button(props: IProps) {
|
||||
@ -28,6 +29,7 @@ export default function Button(props: IProps) {
|
||||
type = "button",
|
||||
isloading = "false",
|
||||
fullwidth = "false",
|
||||
iconPosition = "right",
|
||||
onClick,
|
||||
children,
|
||||
icon,
|
||||
@ -38,8 +40,9 @@ export default function Button(props: IProps) {
|
||||
delete attributes.icon;
|
||||
return (
|
||||
<button {...attributes} onClick={onClick} className={classes["root"]} type={type}>
|
||||
{icon && iconPosition === "left" && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
||||
{children}
|
||||
{icon && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
||||
{icon && iconPosition === "right" && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
@ -10,15 +10,19 @@ import { IOption } from "@Front/Components/DesignSystem/Select";
|
||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||
import Form from "@Front/Components/DesignSystem/Form";
|
||||
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 = {
|
||||
selectedFolder: IDashBoardFolder | null;
|
||||
isExistingClientSelected: boolean;
|
||||
isNewClientSelected: boolean;
|
||||
hasNewClientSelected: boolean;
|
||||
};
|
||||
export default class AddClientToFolder extends BasePage<IProps, IState> {
|
||||
class AddClientToFolderClass extends BasePage<IProps, IState> {
|
||||
constructor(props: IProps) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@ -32,7 +36,6 @@ export default class AddClientToFolder extends BasePage<IProps, IState> {
|
||||
this.onNewClientSelected = this.onNewClientSelected.bind(this);
|
||||
this.onMutiSelectChange = this.onMutiSelectChange.bind(this);
|
||||
}
|
||||
|
||||
public override render(): JSX.Element {
|
||||
const selectOptions = [
|
||||
{ value: "adazzdsqaad", label: "john Doe" },
|
||||
@ -42,9 +45,15 @@ export default class AddClientToFolder extends BasePage<IProps, IState> {
|
||||
return (
|
||||
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
|
||||
<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
|
||||
</Button>
|
||||
</Link>
|
||||
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
|
||||
<Form>
|
||||
<div className={classes["radiobox-container"]}>
|
||||
@ -109,3 +118,10 @@ export default class AddClientToFolder extends BasePage<IProps, IState> {
|
||||
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: get the selected folder from the api in componentDidMount
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={this.onSelectedFolder}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user