1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

(feat) hide child supporting document if dont any type of supporting document

This commit is contained in:
Du Peng 2023-07-28 14:28:54 +02:00
parent c9f17309f9
commit 4f26f52d85

View File

@ -108,7 +108,7 @@ export const ChildForm: React.FC<ChildFormProps> = ({ child, onSubmit, supportin
label={t('app.public.child_form.email')} label={t('app.public.child_form.email')}
/> />
{!isPrivileged() && <> {!isPrivileged() && supportingDocumentsTypes?.length > 0 && <>
<h3 className="missing-file">{t('app.public.child_form.supporting_documents')}</h3> <h3 className="missing-file">{t('app.public.child_form.supporting_documents')}</h3>
{output.supporting_document_files_attributes.map((sf, index) => { {output.supporting_document_files_attributes.map((sf, index) => {
return ( return (
@ -132,7 +132,7 @@ export const ChildForm: React.FC<ChildFormProps> = ({ child, onSubmit, supportin
</FabButton> </FabButton>
</div> </div>
{isPrivileged() && <> {isPrivileged() && supportingDocumentsTypes?.length > 0 && <>
<h3 className="missing-file">{t('app.public.child_form.supporting_documents')}</h3> <h3 className="missing-file">{t('app.public.child_form.supporting_documents')}</h3>
<div className="document-list"> <div className="document-list">
{output.supporting_document_files_attributes.map((sf, index) => { {output.supporting_document_files_attributes.map((sf, index) => {
@ -158,7 +158,7 @@ export const ChildForm: React.FC<ChildFormProps> = ({ child, onSubmit, supportin
</div> </div>
</>} </>}
{isPrivileged() && <> {isPrivileged() && supportingDocumentsTypes?.length > 0 && <>
<FabAlert level='info'> <FabAlert level='info'>
<p>{t('app.public.child_form.refuse_documents_info')}</p> <p>{t('app.public.child_form.refuse_documents_info')}</p>
</FabAlert> </FabAlert>