feat: add permissions (#1198)
- add permission in centers, loans, recurring deposits, products and account transfer module - add charges action in loans view
This commit is contained in:
+4
-2
@@ -1,5 +1,5 @@
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column" class="container m-b-20">
|
||||
<button mat-raised-button color="primary" (click)="editTask(); backupCheckValues();">
|
||||
<button mat-raised-button color="primary" (click)="editTask(); backupCheckValues();" *mifosxHasPermission="'UPDATE_PERMISSION'">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
Edit
|
||||
</button>
|
||||
@@ -23,6 +23,8 @@
|
||||
</mat-list>
|
||||
</div>
|
||||
|
||||
<mat-divider [vertical]="true"></mat-divider>
|
||||
|
||||
<div fxFlex="70" fxLayout="column" class="listPermission">
|
||||
<form [formGroup]="formGroup" (submit)="submit()">
|
||||
|
||||
@@ -45,7 +47,7 @@
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px" *ngIf="!isDisabled">
|
||||
<mat-card-actions>
|
||||
<button type="button" mat-raised-button (click)="cancel(); restoreCheckboxes();">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()">Submit</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()" *mifosxHasPermission="'UPDATE_PERMISSION'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<ng-container matColumnDef="edit">
|
||||
<th mat-header-cell *matHeaderCellDef> </th>
|
||||
<td mat-cell *matCellDef="let listdata">
|
||||
<button type="button" color="primary" mat-icon-button matTooltip="Edit" matTooltipPosition="above"
|
||||
<button type="button" color="primary" mat-icon-button matTooltip="Edit" matTooltipPosition="above" *mifosxHasPermission="'UPDATE_ENTITYMAPPING'"
|
||||
(click)="showEditScreen(listdata.mapId, selectedMappingType)">
|
||||
<fa-icon icon="edit" size="lg"></fa-icon>
|
||||
</button>
|
||||
@@ -114,7 +114,7 @@
|
||||
<ng-container matColumnDef="delete">
|
||||
<th mat-header-cell *matHeaderCellDef> </th>
|
||||
<td mat-cell *matCellDef="let listdata">
|
||||
<button type="button" color="warn" mat-icon-button matTooltip="Delete" matTooltipPosition="above"
|
||||
<button type="button" color="warn" mat-icon-button matTooltip="Delete" matTooltipPosition="above" *mifosxHasPermission="'DELETE_ENTITYMAPPING'"
|
||||
(click)="delete(listdata.mapId)">
|
||||
<fa-icon icon="trash" size="lg"></fa-icon>
|
||||
</button>
|
||||
@@ -182,7 +182,7 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button mat-raised-button color="danger" (click)=cancelOperation()> Cancel </button>
|
||||
<button mat-raised-button color="primary" [disabled]="!addMappingForm.valid">Submit</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!addMappingForm.valid" *mifosxHasPermission="'CREATE_ENTITYMAPPING'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
</ng-container>
|
||||
@@ -242,7 +242,7 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button mat-raised-button color="danger" (click)=cancelOperation()> Cancel </button>
|
||||
<button mat-raised-button color="primary" [disabled]="!editMappingForm.valid">Submit</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!editMappingForm.valid" *mifosxHasPermission="'CREATE_ENTITYMAPPING'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
</ng-container>
|
||||
|
||||
@@ -48,8 +48,8 @@ export class EntityToEntityMappingComponent implements OnInit {
|
||||
/**
|
||||
* stores the data for clicked mapType
|
||||
*/
|
||||
firstEntityData: string[] = [];
|
||||
secondEntityData: string[] = [];
|
||||
firstEntityData: any = [];
|
||||
secondEntityData: any = [];
|
||||
firstMappingEntity: string;
|
||||
secondMappingEntity: string;
|
||||
|
||||
|
||||
@@ -21,22 +21,42 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="container m-b-20">
|
||||
|
||||
<mat-card class="mat-elevation-z8">
|
||||
|
||||
<mat-card-content>
|
||||
|
||||
<div fxLayout="row wrap" class="content">
|
||||
|
||||
<div fxFlex="40%" fxFlex.lt-md="50%" class="header">
|
||||
<b>Name:</b>
|
||||
</div>
|
||||
|
||||
<div fxFlex="60%" fxFlex.lt-md="50%">
|
||||
{{ rolePermissionService.name }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="40%" fxFlex.lt-md="50%" class="header">
|
||||
<b>Description:</b>
|
||||
</div>
|
||||
|
||||
<div fxFlex="60%" fxFlex.lt-md="50%">
|
||||
{{ rolePermissionService.description }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mat-elevation-z8 container">
|
||||
|
||||
<mat-card>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="30%">Name:</span>
|
||||
<span fxFlex="70%">{{ rolePermissionService.name }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="30%">Description:</span>
|
||||
<span fxFlex="70%">{{ rolePermissionService.description }}</span>
|
||||
</div>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<ng-container>
|
||||
|
||||
<div fxLayout="row" class="permissionSelected">
|
||||
@@ -66,6 +86,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<mat-divider [vertical]="true"></mat-divider>
|
||||
|
||||
<div fxFlex="70" fxLayout="column" class="listPermission">
|
||||
|
||||
<form [formGroup]="formGroup" (submit)="submit()">
|
||||
@@ -73,8 +95,7 @@
|
||||
<div *ngFor="let permission of permissions.permissions" class="displayPermissions">
|
||||
<div formArrayName="roster">
|
||||
<div [formGroupName]="permission.id">
|
||||
<mat-checkbox name="cp" id="{{ permission.code }}" formControlName="selected"
|
||||
>
|
||||
<mat-checkbox name="cp" id="{{ permission.code }}" formControlName="selected">
|
||||
{{ permissionName(permission.code) }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
|
||||
@@ -38,3 +38,13 @@ mat-list-item {
|
||||
.inactive:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.content {
|
||||
div {
|
||||
line-height: 3rem;
|
||||
|
||||
&.header {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
import { SystemRoutingModule } from './system-routing.module';
|
||||
import { PipesModule } from '../pipes/pipes.module';
|
||||
import { DirectivesModule } from '../directives/directives.module';
|
||||
|
||||
/** Component Imports */
|
||||
import { CodesComponent } from './codes/codes.component';
|
||||
@@ -61,7 +62,8 @@ import { ConfigureMakerCheckerTasksComponent } from './configure-maker-checker-t
|
||||
imports: [
|
||||
SystemRoutingModule,
|
||||
SharedModule,
|
||||
PipesModule
|
||||
PipesModule,
|
||||
DirectivesModule
|
||||
],
|
||||
declarations: [
|
||||
SystemComponent,
|
||||
|
||||
Reference in New Issue
Block a user