import React from "react"; import classes from "./classes.module.scss"; import classNames from "classnames"; import Image from "next/image"; import PenICon from "@Assets/Icons/pen.svg"; import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; import Typography, { ITypo } from "../Typography"; type IProps = { folder: IDashBoardFolder; isDescription?: boolean; }; export default function FolderBoxInformation(props: IProps) { const { isDescription = false } = props; return
{isDescription ?
Note dossier : {props.folder.description ?? "..."}
: <>
Intitulé du dossier {props.folder.name ?? "..."}
Numéro de dossier {props.folder.folder_number ?? "..."}
Type d’acte {props.folder.deed.deed_type.name ?? "..."}
Ouverture du dossier {formatDate(props.folder.created_at)}
}
edit informations
; } function formatDate(date: Date | null): string { if (!date) return "..."; return date.toLocaleDateString("fr-FR", { year: "numeric", month: "long", day: "numeric", }); }