Comment 2 for bug 1809288

Revision history for this message
Bill Erickson (berick) wrote :

Jane, FmRecordEditorComponent has the ability to set fields read-only (as you probably saw) so we'll need a way to indicate what fields are read-only for each page (when needed) and that data will have to be propagated down to BasicAdminPageComponent -> AdminPageComponent -> FmRecordEditorComponent. (I don't believe there's any reasonable way to tell from the IDL alone that all of the potential values for a given field should never be requested...)

One option would be to add specific route entries for UI's that have fields that need to be marked as read-only, and in the route definition add additional metadata about which fields to set as read-only (similar to how the :schema value is set now).

{
  path: ':table/resource_type'
  component: BasicAdminPageComponent,
  data: [{schema: 'booking', readOnlyFields: 'record,...'}] // or readOnlyFieldsList: [...]
{
  path: ':table', // fall-thru catch all path
  component: BasicAdminPageComponent,
  data: [{schema: 'booking'}]
}

... Then teach the intermediate components to propagate the values down to fm-editor.

In this particular instance, loading every bib record ID would not only make the edit UI unusable, it would cause a lot of server load.

----

I've already tested the code and will sign-off once this issue is addressed. Let me know if my suggestions make sense. Thanks!