fix: resize fields

This commit is contained in:
David Nguyen
2024-04-22 13:31:49 +07:00
parent f6e6dac46c
commit afaeba9739

View File

@@ -75,7 +75,7 @@ export const DocumentReadOnlyFields = ({ documentMeta, fields }: DocumentReadOnl
</PopoverHover> </PopoverHover>
</div> </div>
<div className="text-muted-foreground"> <div className="text-muted-foreground break-all text-sm">
{match(field) {match(field)
.with({ type: FieldType.SIGNATURE }, (field) => .with({ type: FieldType.SIGNATURE }, (field) =>
field.Signature?.signatureImageAsBase64 ? ( field.Signature?.signatureImageAsBase64 ? (
@@ -90,18 +90,17 @@ export const DocumentReadOnlyFields = ({ documentMeta, fields }: DocumentReadOnl
</p> </p>
), ),
) )
.with({ type: P.union(FieldType.NAME, FieldType.TEXT, FieldType.EMAIL) }, () => ( .with(
<p className="text-muted-foreground text-lg">{field.customText}</p> { type: P.union(FieldType.NAME, FieldType.TEXT, FieldType.EMAIL) },
)) () => field.customText,
.with({ type: FieldType.DATE }, () => ( )
<p> .with({ type: FieldType.DATE }, () =>
{convertToLocalSystemFormat( convertToLocalSystemFormat(
field.customText, field.customText,
documentMeta?.dateFormat ?? DEFAULT_DOCUMENT_DATE_FORMAT, documentMeta?.dateFormat ?? DEFAULT_DOCUMENT_DATE_FORMAT,
documentMeta?.timezone ?? DEFAULT_DOCUMENT_TIME_ZONE, documentMeta?.timezone ?? DEFAULT_DOCUMENT_TIME_ZONE,
)} ),
</p> )
))
.with({ type: FieldType.FREE_SIGNATURE }, () => null) .with({ type: FieldType.FREE_SIGNATURE }, () => null)
.exhaustive()} .exhaustive()}
</div> </div>