]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.html
LP#1904244: Angular funds interface
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / admin / acq / funds / funding-source-transactions-dialog.component.html
1 <eg-string #successString i18n-text text="Funding Source Update Succeeded"></eg-string>
2 <eg-string #updateFailedString i18n-text text="Funding Source Update Failed"></eg-string>
3
4 <ng-template #summaryField let-field="field" let-value="value">
5   <div class="col-2">
6     <label style="font-weight: bold" for="fund-{{field}}">{{idlDef.field_map[field].label}}</label>
7   </div>
8   <div class="col-2">
9     <span id="fund-{{field}}">
10       {{value}}
11     </span>
12   </div>
13 </ng-template>
14 <ng-template #dialogContent>
15   <div class="modal-header bg-info">
16     <h3 class="modal-title" i18n>Funding Source: {{fundingSource?.name()}}</h3>
17     <button type="button" class="close"
18       i18n-aria-label aria-label="Close" (click)="close()">
19       <span aria-hidden="true">&times;</span>
20     </button>
21   </div>
22   <div class="modal-body" *ngIf="fundingSource">
23     <ul ngbNav #fundingSourceTransactionsNav="ngbNav" [(activeId)]="activeTab" class="nav-tabs">
24       <li [ngbNavItem]="'credits'">
25         <a ngbNavLink i18n>Credits</a>
26         <ng-template ngbNavContent>
27            <div class="mt-2">
28             <eg-grid #creditsGrid idlClass="acqfscred" [dataSource]="acqfscredDataSource"
29                 [sortable]="true" persistKey="acq.funding_source.credit"
30                 [filterable]="true" [stickyHeader]="true">
31
32               <eg-grid-toolbar-button label="Apply Credits" i18n-label (onClick)="createCredit(creditsGrid)">
33               </eg-grid-toolbar-button>
34               <eg-grid-column path="amount"></eg-grid-column>
35               <eg-grid-column path="effective_date" [datePlusTime]="true"></eg-grid-column>
36               <eg-grid-column path="deadline_date" [datePlusTime]="true"></eg-grid-column>
37               <eg-grid-column path="note"></eg-grid-column>
38               <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
39               <eg-grid-column path="funding_source" [hidden]="true" [filterable]="false"></eg-grid-column>
40             </eg-grid>
41           </div>
42         </ng-template>
43       </li>
44       <li [ngbNavItem]="'allocations'">
45         <a ngbNavLink i18n>Allocations</a>
46         <ng-template ngbNavContent>
47           <div class="mt-2">
48             <eg-grid #allocationsGrid idlClass="acqfa" [dataSource]="acqfaDataSource"
49                 [sortable]="true" persistKey="acq.funding_source.fund_allocation"
50                 [filterable]="true" [stickyHeader]="true" [cellTextGenerator]="cellTextGenerator">
51
52               <eg-grid-toolbar-button label="Allocate to Fund" i18n-label (onClick)="allocateToFund(allocationsGrid)">
53               </eg-grid-toolbar-button>
54               <ng-template #fundTmpl let-row="row">
55                 <a href="/eg2/staff/admin/acq/funds/fund/{{row.fund().id()}}" target="_blank">
56                   {{row.fund().code()}} ({{row.fund().year()}}) ({{getOrgShortname(row.fund().org())}})
57                 </a>
58               </ng-template>
59               <eg-grid-column path="fund" [cellTemplate]="fundTmpl"></eg-grid-column>
60               <eg-grid-column path="amount"></eg-grid-column>
61               <eg-grid-column path="create_time" [datePlusTime]="true"></eg-grid-column>
62               <eg-grid-column path="allocator"></eg-grid-column>
63               <eg-grid-column path="note"></eg-grid-column>
64               <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
65               <eg-grid-column path="funding_source" [hidden]="true" [filterable]="false"></eg-grid-column>
66             </eg-grid>
67           </div>
68         </ng-template>
69       </li>
70     </ul>
71     <div [ngbNavOutlet]="fundingSourceTransactionsNav"></div>
72   </div>
73   <div class="modal-footer">
74     <button type="button" class="btn btn-warning"
75       (click)="close()" i18n>Close</button>
76   </div>
77 </ng-template>
78
79 <eg-fm-record-editor #applyCreditDialog idlClass="acqfscred">
80 </eg-fm-record-editor>
81 <eg-fm-record-editor #allocateToFundDialog idlClass="acqfa"
82   [fieldOptions]="{fund:{linkedSearchConditions:{'active':'t'},preloadLinkedValues:true}}">
83 </eg-fm-record-editor>