tweaks to line-item results display
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 1 Nov 2019 15:37:53 +0000 (11:37 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 16 Jan 2020 21:38:28 +0000 (16:38 -0500)
- The line item ID now links to either to the Dojo purchase
  order display (with that line item highlighted), or, if there
  is no purchase order, to the Dojo selection list display (again,
  with that line item highlighted).
- The "Catalog" link is now dispayed only when the line item
  is linked to a bib record
- Fix a display issue if the line item is not linked to a provider.

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

index ba4e9d7..86c7d96 100644 (file)
@@ -1,5 +1,9 @@
 <ng-template #idTmpl let-lineitem="row">
-  <a href="/eg/staff/acq/legacy/po/view/{{lineitem.purchase_order()}}?focus_li={{lineitem.id()}}"
+  <a *ngIf="lineitem.purchase_order()" href="/eg/staff/acq/legacy/po/view/{{lineitem.purchase_order()}}?focus_li={{lineitem.id()}}"
+     target="_blank">
+    {{lineitem.id()}}
+  </a>
+  <a *ngIf="lineitem.picklist() && !lineitem.purchase_order()" href="/eg/staff/acq/legacy/picklist/view/{{lineitem.picklist()}}?focus_li={{lineitem.id()}}"
      target="_blank">
     {{lineitem.id()}}
   </a>
@@ -14,7 +18,7 @@
 </ng-template>
 
 <ng-template #providerTmpl let-lineitem="row">
-  <a href="/eg/staff/admin/acq/conify/provider/{{lineitem.provider().id()}}"
+  <a *ngIf="lineitem.provider()" href="/eg/staff/admin/acq/conify/provider/{{lineitem.provider().id()}}"
      target="_blank">
     {{lineitem.provider().name()}}
   </a>
@@ -22,8 +26,9 @@
 
 <ng-template #liLinksTmpl let-lineitem="row">
   <ul>
-    <li><a href="/eg/staff/cat/catalog/record/{{lineitem.eg_bib_id()}}"
-     target="_blank" i18n>Catalog</a></li>
+    <li *ngIf="lineitem.eg_bib_id()">
+      <a href="/eg/staff/cat/catalog/record/{{lineitem.eg_bib_id()}}"
+         target="_blank" i18n>Catalog</a></li>
     <li><a href="/eg/staff/acq/legacy/lineitem/worksheet/{{lineitem.id()}}"
            target="_blank" i18n>Worksheet</a></li>
     <li *ngIf="lineitem.purchase_order()">