Cannot modify folder after anchoring

This commit is contained in:
Maxime Lalo 2023-10-04 17:28:26 +02:00
parent 575700761e
commit 9c14c1df3b
2 changed files with 5 additions and 1 deletions

View File

@ -8,11 +8,13 @@ import React from "react";
import Typography, { ITypo } from "../Typography";
import classes from "./classes.module.scss";
import { AnchorStatus } from "@Front/Components/Layouts/Folder/FolderInformation";
type IProps = {
folder: OfficeFolder;
type: EFolderBoxInformationType;
isArchived?: boolean;
anchorStatus: AnchorStatus;
};
export enum EFolderBoxInformationType {
@ -34,7 +36,7 @@ export default function FolderBoxInformation(props: IProps) {
return (
<div className={classNames(classes["root"], type !== EFolderBoxInformationType.INFORMATIONS && classes["single-information"])}>
<div className={classes["content"]}>{renderContentByType(props.folder, type)}</div>
{!isArchived && (
{!isArchived && props.anchorStatus === AnchorStatus.NOT_ANCHORED && (
<Link href={path} className={classes["edit-icon-container"]}>
<Image src={PenICon} alt="edit informations" />
</Link>

View File

@ -97,11 +97,13 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
</Link>
</div>
<FolderBoxInformation
anchorStatus={this.props.isAnchored}
folder={this.props.selectedFolder}
type={EFolderBoxInformationType.INFORMATIONS}
/>
<div className={classes["second-box"]}>
<FolderBoxInformation
anchorStatus={this.props.isAnchored}
folder={this.props.selectedFolder}
type={EFolderBoxInformationType.DESCRIPTION}
/>