tweak columns for picklist and purchase order grids
authorJason Etheridge <jason@EquinoxInitiative.org>
Wed, 20 Nov 2019 04:56:41 +0000 (23:56 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 16 Jan 2020 21:38:28 +0000 (16:38 -0500)
to better match the spec (unmandated columns hidden by default)

virtual columns such as picklist's entry_count have to be specified with eg-grid

hiding fleshed user columns was causing some uncaught errors and the grid to
misrender when manually unhidden. Adding a label helped, but would render the
cell as [object Object].  Using a cell template to handle that object was
providing different errors (.id() was accessible, but not .usrname()).  So,
unfleshing those for now.

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.service.ts
Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.html
Open-ILS/src/eg2/src/app/staff/acq/search/purchase-order-results.component.html

index 9e21871..38040a2 100644 (file)
@@ -45,15 +45,15 @@ const searchOptions = {
     purchase_order: {
         no_flesh_cancel_reason: true,
         flesh_provider: true,
-        flesh_owner: true,
-        flesh_creator: true,
-        flesh_editor: true
+        flesh_owner: false,
+        flesh_creator: false,
+        flesh_editor: false
     },
     picklist: {
         flesh_lineitem_count: true,
         flesh_owner: true,
-        flesh_creator: true,
-        flesh_editor: true
+        flesh_creator: false,
+        flesh_editor: false
     },
     invoice: {
         no_flesh_misc: true
index 5464399..b6c528d 100644 (file)
   </eg-grid-toolbar-action>
 
   <eg-grid-column path="name" [cellTemplate]="nameTmpl"></eg-grid-column>
+  <eg-grid-column path="entry_count"></eg-grid-column>
+
+  <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
+  <eg-grid-column path="creator" [hidden]="true"></eg-grid-column>
+  <eg-grid-column path="editor" [hidden]="true"></eg-grid-column>
+
 </eg-grid>
index b6262cd..7b3300b 100644 (file)
 
 <eg-grid #acqSearchPurchaseOrdersGrid
   persistKey="acq.search.purchaseorders"
-  [stickyHeader]="true"
+  [stickyHeader]="true" 
   idlClass="acqpo" [dataSource]="gridSource">
 
   <eg-grid-column path="name" [cellTemplate]="nameTmpl"></eg-grid-column>
   <eg-grid-column path="provider" [cellTemplate]="providerTmpl"></eg-grid-column>
+
+  <eg-grid-column path="creator" [hidden]="true"></eg-grid-column>
+  <eg-grid-column path="editor" [hidden]="true"></eg-grid-column>
+  <eg-grid-column path="owner" [hidden]="true"></eg-grid-column>
+
 </eg-grid>