Enhacement to management funds (#1735)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
452a1adc17
commit
bf700cc100
@@ -1,49 +1,46 @@
|
||||
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px">
|
||||
<div #buttonCreateCharge class="in-block">
|
||||
<button mat-raised-button color="primary" [routerLink]="['create']" *mifosxHasPermission="'CREATE_FUND'">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>
|
||||
Create Fund
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<mat-card>
|
||||
<div #filter fxLayout="row" fxLayoutGap="20px">
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>{{ 'labels.inputs.Filter' | translate }}</mat-label>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div #fundFormRef>
|
||||
<div #chargesTable class="mat-elevation-z8">
|
||||
|
||||
<form #formRef="ngForm" [formGroup]="fundForm" fxLayout="row" fxLayoutAlign="start baseline" fxLayoutGap="20px"
|
||||
(ngSubmit)="addFund()" *mifosxHasPermission="'CREATE_FUND'">
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<mat-form-field fxFlex="calc(90%-20px)">
|
||||
<textarea formControlName="name" matInput placeholder="New Fund"></textarea>
|
||||
<mat-error *ngIf="fundForm.controls.name.hasError('required')">
|
||||
<strong>Required field</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Name </th>
|
||||
<td mat-cell *matCellDef="let charge"> {{ charge.name }} </td>
|
||||
</ng-container>
|
||||
|
||||
<div #buttonAddFund fxFlex>
|
||||
<button mat-raised-button color="primary" [disabled]="!fundForm.valid">
|
||||
<fa-icon icon="plus"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
<ng-container matColumnDef="externalId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> External Id </th>
|
||||
<td mat-cell *matCellDef="let charge"> {{ charge.externalId }} </td>
|
||||
</ng-container>
|
||||
|
||||
</form>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [routerLink]="[row.id]" class="select-row"></tr>
|
||||
|
||||
</div>
|
||||
</table>
|
||||
|
||||
<mat-grid-list cols="2" rowHeight="50px">
|
||||
|
||||
<mat-grid-tile *ngFor="let fund of fundsData; index as i">
|
||||
|
||||
<input matInput [value]="fund.name">
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="flex-start">
|
||||
<button mat-button color="primary" (click)="editFund(fund.id,fund.name,i)" *mifosxHasPermission="'UPDATE_FUND'">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</mat-grid-tile>
|
||||
|
||||
</mat-grid-list>
|
||||
|
||||
</mat-card>
|
||||
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<ng-template #templateFundFormRef let-popover="popover">
|
||||
<h2>Manage Funds</h2>
|
||||
<p class="mw300">This form will be used to add fund. If you would like to add fund click on add funds button and fill the fund name then click on + button else click Next or Back. For more details click: <a href="https://mifosforge.jira.com/wiki/spaces/docs/pages/67141736/Manage+Funds" target="_blank">Manage Funds</a></p>
|
||||
|
||||
Reference in New Issue
Block a user