chore: hide empty accordion for documents without date field (#800)
This commit is contained in:
@@ -160,14 +160,14 @@ export const AddSubjectFormPartial = ({
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Accordion type="multiple" className="mt-8 border-none">
|
{hasDateField && (
|
||||||
<AccordionItem value="advanced-options" className="border-none">
|
<Accordion type="multiple" className="mt-8 border-none">
|
||||||
<AccordionTrigger className="mb-2 border-b text-left hover:no-underline">
|
<AccordionItem value="advanced-options" className="border-none">
|
||||||
Advanced Options
|
<AccordionTrigger className="mb-2 border-b text-left hover:no-underline">
|
||||||
</AccordionTrigger>
|
Advanced Options
|
||||||
|
</AccordionTrigger>
|
||||||
|
|
||||||
<AccordionContent className="text-muted-foreground -mx-1 flex max-w-prose flex-col px-1 text-sm leading-relaxed">
|
<AccordionContent className="text-muted-foreground -mx-1 flex max-w-prose flex-col px-1 text-sm leading-relaxed">
|
||||||
{hasDateField && (
|
|
||||||
<div className="mt-2 flex flex-col">
|
<div className="mt-2 flex flex-col">
|
||||||
<Label htmlFor="date-format">
|
<Label htmlFor="date-format">
|
||||||
Date Format <span className="text-muted-foreground">(Optional)</span>
|
Date Format <span className="text-muted-foreground">(Optional)</span>
|
||||||
@@ -194,9 +194,7 @@ export const AddSubjectFormPartial = ({
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
|
|
||||||
{hasDateField && (
|
|
||||||
<div className="mt-4 flex flex-col">
|
<div className="mt-4 flex flex-col">
|
||||||
<Label htmlFor="time-zone">
|
<Label htmlFor="time-zone">
|
||||||
Time Zone <span className="text-muted-foreground">(Optional)</span>
|
Time Zone <span className="text-muted-foreground">(Optional)</span>
|
||||||
@@ -216,10 +214,10 @@ export const AddSubjectFormPartial = ({
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</AccordionContent>
|
||||||
</AccordionContent>
|
</AccordionItem>
|
||||||
</AccordionItem>
|
</Accordion>
|
||||||
</Accordion>
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</DocumentFlowFormContainerContent>
|
</DocumentFlowFormContainerContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user