Skip to content

Commit

Permalink
fix intended use issue for readonly perms (#516)
Browse files Browse the repository at this point in the history
* fix intended use issue for readonly perms

tried to render an object which is not possible as text.

* add textarea to be viewable as readonly in edit mode

field `note` was not showing up in edit mode for users that only had readonly perms for it
  • Loading branch information
henrinie-nc authored Aug 29, 2024
1 parent 24cf60d commit 009e006
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/form/FormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,12 @@ const FormFieldInput = ({
case FieldTypeOptions.STRING:
case FieldTypeOptions.HIDDEN:
case FieldTypeOptions.FRACTIONAL:
case FieldTypeOptions.INTENDED_USE:
case FieldTypeOptions.TEXTAREA:
return value;

case FieldTypeOptions.INTENDED_USE:
return value?.name ?? '-';

case FieldTypeOptions.REFERENCE_NUMBER:
return value ? <ExternalLink href={getReferenceNumberLink(value)} text={value} /> : null;

Expand Down

0 comments on commit 009e006

Please sign in to comment.