Port booking admin to Angular

Bug #1809288 reported by Jane Sandberg on 2018-12-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Wishlist
Unassigned

Bug Description

After all the great work Bill Erickson did on the acq admin interfaces in Angular, it seems like the booking admin will be low-hanging fruit.

Branch forthcoming.

Jane Sandberg (sandbej) wrote :

Here's a start to it: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/lp1809288_port_booking_admin_to_angular

It still needs some work, specifically the booking resource type editor should have catalog item and bibliographic record as read-only fields (the dropdown of every single bib record is not that helpful)

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!

Jane Sandberg (sandbej) on 2018-12-30
tags: added: pullrequest
Jane Sandberg (sandbej) wrote :

Thanks for the guidance, Bill; that helped a lot. I pushed two new commits to that same branch:
1) Adding migrations for the grid settings.
2) Adding a readonlyFields @Input to admin-page. The basic-admin-page component can now take readonlyFields through routes. And I changed the fm-editor component so that it does not retrieve every single possible value for read-only links.

Let me know what you think!

Changed in evergreen:
assignee: Jane Sandberg (sandbej) → nobody
Jane Sandberg (sandbej) on 2018-12-30
Changed in evergreen:
milestone: none → 3.3-beta1
Bill Erickson (berick) on 2019-01-03
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
status: New → Confirmed
Bill Erickson (berick) wrote :

Thanks, Jane. I've pushed a new branch:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1809288-angular-booking-admin

1. Sign-offs for existing commits
2. Adds a commit improving read-only display support for fm-editor and some minor refactoring (largely based on ng-lint feedback)
3. Adds a commit to avoid the duplicate "eg.grid.booking.booking.*" grid prefixes.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Jane Sandberg (sandbej) wrote :

Thanks for reviewing this so quickly, Bill. And thanks for the additional commits. I've signed off on them.

I'm pushed another commit that resolves an error I got when going to eg2/en-US/staff/admin/booking/resource_type in my browser (without first having added any resource types yet).

The branch is called: user/sandbergja/lp1809288-angular-booking-admin-updated

Here's a link: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/lp1809288-angular-booking-admin-updated

Bill Erickson (berick) wrote :

Thanks, Jane. Sign-off to Jane's latest commit pushed. All commits are now signed off.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1809288-angular-booking-admin-2

I'll give this a little time in case others want to test before merging. I do plan to merge sooner than later, though, since the branch has fm-editor changes that will affect other development.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
tags: added: signedoff
Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Bill Erickson (berick) on 2019-01-25
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Bill Erickson (berick) wrote :

Added a small release notes entry and merged to master for 3.3. Thanks, Jane!

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Bill Erickson (berick) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
Dan Wells (dbw2) on 2019-03-06
Changed in evergreen:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers