add slot_id to various fetches
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 26 May 2020 23:01:55 +0000 (19:01 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 26 May 2020 23:01:55 +0000 (19:01 -0400)
Needed by the AngularJS egGrid to uniquely identify rows, as
otherwise selecting one row will select them all.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm

index 60cbf5f..80e060a 100644 (file)
@@ -168,7 +168,7 @@ sub fetch_arrived {
             fulfillment_time => undef
         });
 
-        $conn->respond({slot => $s, holds => $holds});
+        $conn->respond({slot_id => $s->id, slot => $s, holds => $holds});
     }
 
     return undef;
@@ -255,7 +255,7 @@ sub fetch_staged {
             fulfillment_time => undef
         });
 
-        $conn->respond({slot => $s, holds => $holds});
+        $conn->respond({slot_id => $s->id, slot => $s, holds => $holds});
     }
 
     return undef;
@@ -357,7 +357,7 @@ sub fetch_to_be_staged {
             ($_->id => $e->retrieve_metabib_wide_display_entry( $_->bib_record))
         } @$rhrr_list;
 
-        $conn->respond({slot => $s, holds => $holds, bib_data_by_hold => \%bib_data});
+        $conn->respond({slot_id => $s->id, slot => $s, holds => $holds, bib_data_by_hold => \%bib_data});
     }
 
     return undef;