funds: improve CSV export in fund details dialog
authorGalen Charlton <gmc@equinoxOLI.org>
Thu, 3 Jun 2021 19:54:43 +0000 (15:54 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 3 Jun 2021 19:54:43 +0000 (15:54 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.html
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.ts

index 87ee598..ec9618b 100644 (file)
 
               <ng-template #sourcefundTmpl let-row="row">
                 <ng-container *ngIf="row.src_fund().id() === fundId">
-                  {{row.src_fund().code()}}  ({{row.src_fund().year()}}) ({{getOrgShortname(row.src_fund().org())}})
+                  {{row.src_fund().code()}} ({{row.src_fund().year()}}) ({{getOrgShortname(row.src_fund().org())}})
                 </ng-container>
                 <ng-container *ngIf="row.src_fund().id() !== fundId">
                   <a href="/eg2/staff/admin/acq/funds/fund/{{row.src_fund().id()}}" target="_blank">
-                    {{row.src_fund().code()}}  ({{row.src_fund().year()}}) ({{getOrgShortname(row.src_fund().org())}})
+                    {{row.src_fund().code()}} ({{row.src_fund().year()}}) ({{getOrgShortname(row.src_fund().org())}})
                   </a>
                 </ng-container>
               </ng-template>
                 </ng-container>
                 <ng-container *ngIf="row.dest_fund().id() !== fundId">
                   <a href="/eg2/staff/admin/acq/funds/fund/{{row.dest_fund().id()}}" target="_blank">
-                    {{row.dest_fund().code()}}  ({{row.dest_fund().year()}}) ({{getOrgShortname(row.dest_fund().org())}})
+                    {{row.dest_fund().code()}} ({{row.dest_fund().year()}}) ({{getOrgShortname(row.dest_fund().org())}})
                   </a>
                 </ng-container>
               </ng-template>
index f254e60..f4e0524 100644 (file)
@@ -75,9 +75,20 @@ export class FundDetailsDialogComponent
         this.fieldOrder = 'name,code,year,org,active,currency_type,balance_stop_percentage,balance_warning_percentage,propagate,rollover';
 
         this.cellTextGenerator = {
-            src_fund: row => row().code(),
-            dest_fund: row => row().code(),
-            funding_source: row => row().code(),
+            src_fund: row =>
+                row.src_fund().code() + ' (' +
+                row.src_fund().year() + ') (' +
+                this.getOrgShortname(row.src_fund().org()) + ')',
+            dest_fund: row =>
+                row.dest_fund().code() + ' (' +
+                row.dest_fund().year() + ') (' +
+                this.getOrgShortname(row.dest_fund().org()) + ')',
+            funding_source: row =>
+                row.funding_source().code() + ' (' + 
+                    this.getOrgShortname(row.funding_source().owner()) + ')',
+            funding_source_credit: row =>
+                row.funding_source_credit().funding_source().code() + ' (' + 
+                    this.getOrgShortname(row.funding_source_credit().funding_source().owner()) + ')',
             li: row => row.li_id,
             po: row => row.po_name,
             invoice: row => row.vendor_invoice_id