Bug 32030: Show on the title list view if titles are selected in KB
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 4 Aug 2022 12:46:33 +0000 (14:46 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2022 12:44:24 +0000 (09:44 -0300)
Same as packages, but for titles here.

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/ERM/Providers/EBSCO.pm
api/v1/swagger/definitions/erm_eholdings_title.yaml
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOTitlesList.vue

index fbb6cff..fea500c 100644 (file)
@@ -67,6 +67,13 @@ sub build_title {
             $title->{online_identifier} = $identifier->{id};
         }
     }
+    for my $r ( @{ $result->{customerResourcesList} } ) {
+        if ( $r->{isSelected} ) {
+            $title->{is_selected} = 1;
+            last;
+        }
+    }
+
     return $title;
 }
 
index 3d80db9..7387a18 100644 (file)
@@ -134,6 +134,11 @@ properties:
     type:
       - string
       - "null"
+  is_selected:
+    description: if the title is selected in the KB
+    type:
+      - boolean
+      - "null"
   resources:
     type: array
     description: Resource containing this title
index eb2a7d2..dd94a46 100644 (file)
@@ -240,10 +240,10 @@ export default {
                         },
                             `${row.publication_title} (#${row.title_id})`
                         )
-                        // TODO? We don't have is_selected at title level
-                        //if (row.is_selected) {
-                        //    n = createVNode('span', {}, [n, " ", createVNode("i", { class: "fa fa-check-square-o", style: { color: "green" }, title: __("Is selected") })])
-                        //}
+
+                        if (row.is_selected) {
+                            n = createVNode('span', {}, [n, " ", createVNode("i", { class: "fa fa-check-square-o", style: { color: "green" }, title: __("Is selected") })])
+                        }
                         render(n, e)
                     })
                 },