1 <ng-template #successStrTmpl i18n>{{idlClassDef.label}} Update Succeeded</ng-template>
2 <eg-string #successString [template]="successStrTmpl"></eg-string>
4 <ng-template #updateFailedStrTmpl i18n>Update of {{idlClassDef.label}} failed</ng-template>
5 <eg-string #updateFailedString [template]="updateFailedStrTmpl"></eg-string>
7 <ng-template #deleteFailedStrTmpl i18n>Delete of {{idlClassDef.label}} failed or was not allowed</ng-template>
8 <eg-string #deleteFailedString [template]="deleteFailedStrTmpl"></eg-string>
10 <ng-template #deleteSuccessStrTmpl i18n>{{idlClassDef.label}} Successfully Deleted</ng-template>
11 <eg-string #deleteSuccessString [template]="deleteSuccessStrTmpl"></eg-string>
13 <ng-template #createStrTmpl i18n>{{idlClassDef.label}} Successfully Created</ng-template>
14 <eg-string #createString [template]="createStrTmpl"></eg-string>
16 <ng-template #createErrStrTmpl i18n>Failed to create new {{idlClassDef.label}}</ng-template>
17 <eg-string #createErrString [template]="createErrStrTmpl"></eg-string>
19 <ng-container *ngIf="orgField">
21 <div class="col-lg-6">
22 <ng-container *ngIf="orgField">
24 ariaLabel="Org Unit" i18n-ariaLabel
25 [limitPerms]="viewPerms"
26 [selectedOrgId]="contextOrg.id()"
27 [(ngModel)]="searchOrgs"
28 (ngModelChange)="grid.reload()">
29 </eg-org-family-select>
36 <!-- idlObject and fieldName applied programmatically -->
37 <eg-translate #translator></eg-translate>
39 <ng-container *ngIf="helpTemplate">
40 <ng-container *ngTemplateOutlet="helpTemplate"></ng-container>
43 <ng-template #configFieldLink let-row="row" let-col="col">
44 <a i18n-title title="Link To {{col.label}}"
45 [attr.href]="configFieldLinkUrl(row, col)">{{configLinkLabel(row, col)}}</a>
48 <eg-grid #grid idlClass="{{idlClass}}" [dataSource]="dataSource" hideFields="{{hideGridFields}}"
49 [sortable]="true" persistKey="{{persistKey}}" autoGeneratedColumnOrder="{{fieldOrder}}"
50 [filterable]="true" [stickyHeader]="true"
51 (onRowActivate)="editSelected([$event])"
52 [cellTextGenerator]="cellTextGenerator">
53 <eg-grid-toolbar-button [disabled]="!canCreate"
54 label="New {{idlClassDef.label}}" i18n-label (onClick)="createNew()">
55 </eg-grid-toolbar-button>
56 <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)"
57 group="Selected" i18n-group [disableOnRows]="notOneSelectedRow">
58 </eg-grid-toolbar-action>
59 <eg-grid-toolbar-action label="Delete Selected" i18n-label (onClick)="deleteSelected($event)"
60 group="Selected" i18n-group [disableOnRows]="notOneSelectedRow">
61 </eg-grid-toolbar-action>
62 <eg-grid-toolbar-action label="Apply Credit" i18n-label (onClick)="createCredit($event)"
63 group="Credits" i18n-group [disableOnRows]="notOneSelectedActiveRow">
64 </eg-grid-toolbar-action>
65 <eg-grid-toolbar-action label="Allocate to Fund" i18n-label (onClick)="allocateToFund($event)"
66 group="Allocations" i18n-group [disableOnRows]="notOneSelectedActiveRow">
67 </eg-grid-toolbar-action>
68 <eg-grid-toolbar-action label="View Credits" i18n-label (onClick)="openTransactionsDialog($event, 'credits')"
69 group="Credits" i18n-groups [disableOnRows]="notOneSelectedRow">
70 </eg-grid-toolbar-action>
71 <eg-grid-toolbar-action label="View Allocations" i18n-label (onClick)="openTransactionsDialog($event, 'allocations')"
72 group="Allocations" i18n-group [disableOnRows]="notOneSelectedRow">
73 </eg-grid-toolbar-action>
75 <ng-template #nameTmpl let-row="row">
76 <a href="" (click)="openTransactionsDialog([row], 'credits'); false">
80 <eg-grid-column path="name" [cellTemplate]="nameTmpl"></eg-grid-column>
81 <eg-grid-column path="owner"></eg-grid-column>
82 <eg-grid-column path="code"></eg-grid-column>
83 <eg-grid-column path="currency_type"></eg-grid-column>
84 <eg-grid-column path="active" [initialFilterValue]="'t'"></eg-grid-column>
85 <eg-grid-column path="balance" datatype="money" [filterable]="false" [sortable]="false"
86 i18n-label label="Balance"></eg-grid-column>
87 <eg-grid-column path="total_credits" datatype="money" [filterable]="false" [sortable]="false"
88 i18n-label label="Total Credits"></eg-grid-column>
89 <eg-grid-column path="total_allocations" datatype="money" [filterable]="false" [sortable]="false"
90 i18n-label label="Total Allocations"></eg-grid-column>
91 <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
96 <eg-fm-record-editor #editDialog idlClass="{{idlClass}}"
97 [fieldOptions]="fieldOptions"
98 [fieldOrder]="fieldOrder"
99 [defaultNewRecord]="defaultNewRecord"
100 [preloadLinkedValues]="true"
101 [readonlyFields]="readonlyFields">
102 </eg-fm-record-editor>
104 <eg-funding-source-transactions-dialog #fundingSourceTransactionsDialog></eg-funding-source-transactions-dialog>
106 <eg-confirm-dialog #confirmDel
107 dialogTitle="Delete?" i18n-dialogTitle
108 dialogBody="Delete funding source?" i18n-dialogBody>
110 <eg-alert-dialog #alertDialog
112 dialogBody="Funding source cannot deleted as it is in use">
116 <eg-fm-record-editor #applyCreditDialog idlClass="acqfscred">
117 </eg-fm-record-editor>
118 <eg-fm-record-editor #allocateToFundDialog idlClass="acqfa"
119 [fieldOptions]="{fund:{linkedSearchConditions:{'active':'t'},preloadLinkedValues:true}}">
120 </eg-fm-record-editor>