Skip to content

Commit

Permalink
fix intended use issue for readonly perms
Browse files Browse the repository at this point in the history
tried to render an object which is not possible as text.
  • Loading branch information
henrinie-nc committed Aug 28, 2024
1 parent 7b84973 commit ed9129d
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,8 +171,10 @@ const FormFieldInput = ({
case FieldTypeOptions.STRING:
case FieldTypeOptions.HIDDEN:
case FieldTypeOptions.FRACTIONAL:
return value

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

case FieldTypeOptions.REFERENCE_NUMBER:
return value ? <ExternalLink href={getReferenceNumberLink(value)} text={value} /> : null;
Expand All @@ -191,6 +193,7 @@ const FormFieldInput = ({

default:
console.error(`Field type ${type} is not implemented`);
console.log(type, value)
return 'NOT IMPLEMENTED';
}
};
Expand Down

0 comments on commit ed9129d

Please sign in to comment.