7225ac4166456e3fd5ca95b37e2313228d62a300
[evergreen-equinox.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" [keyboard]="true" [roles]="false" role="tablist">
24       <li role="presentation" [ngbNavItem]="'credits'">
25         <a role="tab" 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
33                 [disabled]="fundingSource?.active() !== 't'" (onClick)="createCredit(creditsGrid)">
34               </eg-grid-toolbar-button>
35               <eg-grid-column path="amount"></eg-grid-column>
36               <eg-grid-column path="effective_date" [datePlusTime]="true"></eg-grid-column>
37               <eg-grid-column path="deadline_date" [datePlusTime]="true"></eg-grid-column>
38               <eg-grid-column path="note"></eg-grid-column>
39               <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
40               <eg-grid-column path="funding_source" [hidden]="true" [filterable]="false"></eg-grid-column>
41             </eg-grid>
42           </div>
43         </ng-template>
44       </li>
45       <li role="presentation" [ngbNavItem]="'allocations'">
46         <a role="tab" ngbNavLink i18n>Allocations</a>
47         <ng-template ngbNavContent>
48           <div class="mt-2">
49             <eg-grid #allocationsGrid idlClass="acqfa" [dataSource]="acqfaDataSource"
50                 [sortable]="true" persistKey="acq.funding_source.fund_allocation"
51                 [filterable]="true" [stickyHeader]="true" [cellTextGenerator]="cellTextGenerator">
52
53               <eg-grid-toolbar-button label="Allocate to Fund" i18n-label
54                 [disabled]="fundingSource?.active() !== 't'" (onClick)="allocateToFund(allocationsGrid)">
55               </eg-grid-toolbar-button>
56               <ng-template #fundTmpl let-row="row">
57                 <a href="/eg2/staff/admin/acq/funds/fund/{{row.fund().id()}}" target="_blank">
58                   {{row.fund().code()}} ({{row.fund().year()}}) ({{getOrgShortname(row.fund().org())}})
59                 </a>
60               </ng-template>
61               <eg-grid-column path="fund" [cellTemplate]="fundTmpl"></eg-grid-column>
62               <eg-grid-column path="amount"></eg-grid-column>
63               <eg-grid-column path="create_time" [datePlusTime]="true"></eg-grid-column>
64               <eg-grid-column path="allocator"></eg-grid-column>
65               <eg-grid-column path="note"></eg-grid-column>
66               <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
67               <eg-grid-column path="funding_source" [hidden]="true" [filterable]="false"></eg-grid-column>
68             </eg-grid>
69           </div>
70         </ng-template>
71       </li>
72     </ul>
73     <div [ngbNavOutlet]="fundingSourceTransactionsNav"></div>
74   </div>
75   <div class="modal-footer">
76     <button type="button" class="btn btn-warning"
77       (click)="close()" i18n>Close</button>
78   </div>
79 </ng-template>
80
81 <eg-fm-record-editor #applyCreditDialog idlClass="acqfscred">
82 </eg-fm-record-editor>
83 <eg-fm-record-editor #allocateToFundDialog idlClass="acqfa"
84   [fieldOptions]="{fund:{linkedSearchConditions:{'active':'t'},preloadLinkedValues:true}}">
85 </eg-fm-record-editor>