LP#1929749: fix some LI actions from the LI search results page
authorGalen Charlton <gmc@equinoxOLI.org>
Sat, 5 Feb 2022 22:47:49 +0000 (17:47 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Sat, 5 Feb 2022 22:47:49 +0000 (17:47 -0500)
Actions were being applied to all of the selected LIs, not
just the ones that also meant preconditions for the action.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/acq/search/lineitem-results.component.ts

index 913d352..c170e50 100644 (file)
@@ -288,7 +288,7 @@ export class LineitemResultsComponent implements OnInit {
             this.noActionableLIs.open();
             return;
         }
-        const ids = rows.map(x => Number(x.id()));
+        const ids = lis.map(x => Number(x.id()));
 
         this.orderReadyConfirmDialog.open().subscribe(doIt => {
             if (!doIt) { return; }
@@ -320,7 +320,7 @@ export class LineitemResultsComponent implements OnInit {
             this.noActionableLIs.open();
             return;
         }
-        const ids = rows.map(x => Number(x.id()));
+        const ids = lis.map(x => Number(x.id()));
 
         this.selectorReadyConfirmDialog.open().subscribe(doIt => {
             if (!doIt) { return; }
@@ -354,7 +354,7 @@ export class LineitemResultsComponent implements OnInit {
             return;
         }
 
-        const ids = rows.map(x => Number(x.id()));
+        const ids = lis.map(x => Number(x.id()));
         this.net.request(
             'open-ils.acq',
             'open-ils.acq.lineitem.receive.batch',
@@ -374,7 +374,7 @@ export class LineitemResultsComponent implements OnInit {
             return;
         }
 
-        const ids = rows.map(x => Number(x.id()));
+        const ids = lis.map(x => Number(x.id()));
         this.net.request(
             'open-ils.acq',
             'open-ils.acq.lineitem.receive.rollback.batch',