🐛 Folder name in view document

This commit is contained in:
Maxime Lalo 2023-05-11 17:50:16 +02:00
parent fdd7d2ca79
commit 480fff082f

View File

@ -74,7 +74,7 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
{this.state.document && this.state.document.files && this.state.selectedFile && ( {this.state.document && this.state.document.files && this.state.selectedFile && (
<div className={classes["root"]}> <div className={classes["root"]}>
<Typography typo={ITypo.H1} color={ITypoColor.BLACK} className={classes["title"]}> <Typography typo={ITypo.H1} color={ITypoColor.BLACK} className={classes["title"]}>
{this.state.document.document_type?.name} {this.state.document.folder?.name}
</Typography> </Typography>
<Typography typo={ITypo.H3} color={ITypoColor.BLACK} className={classes["subtitle"]}> <Typography typo={ITypo.H3} color={ITypoColor.BLACK} className={classes["subtitle"]}>
{this.state.document.document_type?.name} {this.state.document.document_type?.name}
@ -188,6 +188,7 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
const document = await Documents.getInstance().getByUid(this.props.documentUid, { const document = await Documents.getInstance().getByUid(this.props.documentUid, {
files: true, files: true,
document_type: true, document_type: true,
folder: true,
}); });
this.setState({ this.setState({
document, document,