✨ Cannot modify folder after anchoring
This commit is contained in:
parent
575700761e
commit
9c14c1df3b
@ -8,11 +8,13 @@ import React from "react";
|
|||||||
|
|
||||||
import Typography, { ITypo } from "../Typography";
|
import Typography, { ITypo } from "../Typography";
|
||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
|
import { AnchorStatus } from "@Front/Components/Layouts/Folder/FolderInformation";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
folder: OfficeFolder;
|
folder: OfficeFolder;
|
||||||
type: EFolderBoxInformationType;
|
type: EFolderBoxInformationType;
|
||||||
isArchived?: boolean;
|
isArchived?: boolean;
|
||||||
|
anchorStatus: AnchorStatus;
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum EFolderBoxInformationType {
|
export enum EFolderBoxInformationType {
|
||||||
@ -34,7 +36,7 @@ export default function FolderBoxInformation(props: IProps) {
|
|||||||
return (
|
return (
|
||||||
<div className={classNames(classes["root"], type !== EFolderBoxInformationType.INFORMATIONS && classes["single-information"])}>
|
<div className={classNames(classes["root"], type !== EFolderBoxInformationType.INFORMATIONS && classes["single-information"])}>
|
||||||
<div className={classes["content"]}>{renderContentByType(props.folder, type)}</div>
|
<div className={classes["content"]}>{renderContentByType(props.folder, type)}</div>
|
||||||
{!isArchived && (
|
{!isArchived && props.anchorStatus === AnchorStatus.NOT_ANCHORED && (
|
||||||
<Link href={path} className={classes["edit-icon-container"]}>
|
<Link href={path} className={classes["edit-icon-container"]}>
|
||||||
<Image src={PenICon} alt="edit informations" />
|
<Image src={PenICon} alt="edit informations" />
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -97,11 +97,13 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<FolderBoxInformation
|
<FolderBoxInformation
|
||||||
|
anchorStatus={this.props.isAnchored}
|
||||||
folder={this.props.selectedFolder}
|
folder={this.props.selectedFolder}
|
||||||
type={EFolderBoxInformationType.INFORMATIONS}
|
type={EFolderBoxInformationType.INFORMATIONS}
|
||||||
/>
|
/>
|
||||||
<div className={classes["second-box"]}>
|
<div className={classes["second-box"]}>
|
||||||
<FolderBoxInformation
|
<FolderBoxInformation
|
||||||
|
anchorStatus={this.props.isAnchored}
|
||||||
folder={this.props.selectedFolder}
|
folder={this.props.selectedFolder}
|
||||||
type={EFolderBoxInformationType.DESCRIPTION}
|
type={EFolderBoxInformationType.DESCRIPTION}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user