LP#2019032: restore functionality of two line item actions
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 10 May 2023 14:21:35 +0000 (10:21 -0400)
committerJeff Godin <jgodin@tadl.org>
Wed, 10 May 2023 15:00:03 +0000 (11:00 -0400)
The "Add Brief Record" and "Load Bibs and Items" actions in the
Angular line item manager stopped working after the upgrade
to Angular 15. It turns out that the routerLink values associated
with those two actions were always incorrect, but for some
reason Angular 12's router worked around the error. Angular 15
does not, hence this patch.

To test
-------
[1] Navigate to a pending purchase order.
[2] Attempt the "Add Brief Record" and "Load Bibs and Items" items
    from the Actions drop-down. Note that the request forms
    do not display and the purchase order title becomes
    "Purchase Order #NaN (pending)".
[3] Apply the patch and repeat step 2. This time, the two
    actions should bring up the correct forms.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.html

index 5845599..8cedee1 100644 (file)
@@ -43,7 +43,7 @@
     <div ngbDropdown>
       <button class="btn btn-info btn-sm" ngbDropdownToggle i18n>Actions</button>
       <div ngbDropdownMenu>
-        <a ngbDropdownItem routerLink="../brief-record"
+        <a ngbDropdownItem routerLink="./brief-record"
           [disabled]="isActivatedPo()"
           queryParamsHandling="merge" i18n>Add Brief Record</a>
         <button ngbDropdownItem (click)="deleteLineitems()" 
@@ -66,7 +66,7 @@
           [disabled]="!picklistId" i18n>Create Purchase Order from All Line Items</button>
         <div class="dropdown-divider"></div>
         <h6 class="dropdown-header" i18n>Purchase Order Actions</h6>
-        <a ngbDropdownItem routerLink="../create-assets"
+        <a ngbDropdownItem routerLink="./create-assets"
           [disabled]="!isPendingPo()"
           queryParamsHandling="merge" i18n>Load Bibs and Items</a>
         <button ngbDropdownItem (click)="receiveSelected()"