refactor: accounting module (#1202)

See: #1196
This commit is contained in:
Karan Takalkar
2020-08-14 14:46:06 +05:30
committed by GitHub
parent 572a07bf45
commit 8208f6bb01
23 changed files with 49 additions and 42 deletions
@@ -1,21 +1,29 @@
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column" class="container m-b-20">
<button mat-raised-button color="primary" *ngIf="glAccount.usage.value === 'HEADER'" [routerLink]="['/accounting/chart-of-accounts/gl-accounts/create']" [queryParams]="{ parent: glAccount.id, accountType: glAccount.type.id }">
<fa-icon icon="plus"></fa-icon>&nbsp;&nbsp;
Subledger Account
</button>
<button mat-raised-button color="primary" [routerLink]="['edit']">
<fa-icon icon="edit"></fa-icon>&nbsp;&nbsp;
Edit
</button>
<button mat-raised-button color="warn" *ngIf="!glAccount.disabled" (click)="changeGlAccountState()">
<fa-icon icon="lock"></fa-icon>&nbsp;&nbsp;
Disable
</button>
<button mat-raised-button color="accent" *ngIf="glAccount.disabled" (click)="changeGlAccountState()">
<fa-icon icon="lock-open"></fa-icon>&nbsp;&nbsp;
Enable
</button>
<button mat-raised-button color="warn" (click)="deleteGlAccount()">
<span *mifosxHasPermission="'CREATE_GLACCOUNT'">
<button mat-raised-button color="primary" *ngIf="glAccount.usage.value === 'HEADER'" [routerLink]="['/accounting/chart-of-accounts/gl-accounts/create']" [queryParams]="{ parent: glAccount.id, accountType: glAccount.type.id }">
<fa-icon icon="plus"></fa-icon>&nbsp;&nbsp;
Subledger Account
</button>
</span>
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
<button mat-raised-button color="primary" [routerLink]="['edit']">
<fa-icon icon="edit"></fa-icon>&nbsp;&nbsp;
Edit
</button>
</span>
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
<button mat-raised-button color="warn" *ngIf="!glAccount.disabled" (click)="changeGlAccountState()">
<fa-icon icon="lock"></fa-icon>&nbsp;&nbsp;
Disable
</button>
</span>
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
<button mat-raised-button color="accent" *ngIf="glAccount.disabled" (click)="changeGlAccountState()">
<fa-icon icon="lock-open"></fa-icon>&nbsp;&nbsp;
Enable
</button>
</span>
<button mat-raised-button color="warn" (click)="deleteGlAccount()" *mifosxHasPermission="'DELETE_GLACCOUNT'">
<fa-icon icon="trash"></fa-icon>&nbsp;&nbsp;
Delete
</button>