Role Permission
This commit is contained in:
parent
8b452c2bbd
commit
17ffe30ae8
|
|
@ -73,8 +73,8 @@ namespace HRM.DA
|
|||
//" WHERE RoleID = %n", item.Code, item.Name, item.ModifiedBy, item.ModifiedDate, item.Sequence, (int)item.RoleStatus, item.ApproveBy, item.ApproveDate, (int)item.RoleStatus, item.Description, item.ID);
|
||||
|
||||
tc.ExecuteNonQuery(
|
||||
"UPDATE Role SET Code=%s, name = %s, Sequence = %n, ApproveBy = %n,ApproveDate=%D,Status=%n , AUTHORIZEDBY=%n, AUTHORIZEDDATE=%D" +
|
||||
" WHERE RoleID = %n", item.Code, item.Name, item.Sequence, item.ApproveBy, item.ApproveDate,
|
||||
"UPDATE Role SET Code=%s, name = %s, Description = %s, ROLETYPE = %n, Sequence = %n, ApproveBy = %n,ApproveDate=%D,Status=%n , AUTHORIZEDBY=%n, AUTHORIZEDDATE=%D" +
|
||||
" WHERE RoleID = %n", item.Code, item.Name, item.Description, (int)item.RoleType, item.Sequence, item.ApproveBy, item.ApproveDate,
|
||||
(int)item.RoleStatus, item.ModifiedBy, item.ModifiedDate, item.ID);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ export class RolePermissionEntryComponent implements OnInit {
|
|||
},
|
||||
(err: any) => {
|
||||
//ON ERROR
|
||||
this.loadingpanelService.ShowLoadingPanel = true;
|
||||
this.loadingpanelService.ShowLoadingPanel = false;
|
||||
|
||||
},
|
||||
() => {
|
||||
|
|
@ -378,7 +378,7 @@ export class RolePermissionEntryComponent implements OnInit {
|
|||
(err: any) => {
|
||||
//ON ERROR
|
||||
this.loadingpanelService.ShowLoadingPanel = false;
|
||||
this.notificationService.showSuccess(err.error);
|
||||
this.notificationService.showError(err.error);
|
||||
},
|
||||
() => {
|
||||
this.loadingpanelService.ShowLoadingPanel = false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
<app-loading-panel></app-loading-panel>
|
||||
<kendo-grid [kendoGridBinding]="gridView"
|
||||
class="rl-grid"
|
||||
kendoGridSelectBy="id"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { HRMNotificationService } from '../../../app.notification.service';
|
|||
import { UntilityHandlerService } from '../../../utility.hanldler.service';
|
||||
import { ApiService } from '../../../app.api.service';
|
||||
import { EnumAuthStatus, EnumExtension, EnumRoleType } from '../../../_models/enums';
|
||||
import { loadingPanelService } from '../../../hrm-loding panel/loding.panel.service';
|
||||
|
||||
import { ButtonModule } from '@progress/kendo-angular-buttons';
|
||||
import { DropDownListModule } from '@progress/kendo-angular-dropdowns';
|
||||
|
|
@ -39,9 +40,10 @@ export class RolePermissionListComponent implements OnInit {
|
|||
selectedRole: Role;
|
||||
viewMode: number =1; //1 new, 2 edit ,3 approve
|
||||
constructor(public useService: AuthService,public apiService: ApiService,
|
||||
public router: Router, public utilityService: UntilityHandlerService, public apiservice: ApiService) {
|
||||
public router: Router, public utilityService: UntilityHandlerService, public apiservice: ApiService,
|
||||
public loadingPanel: loadingPanelService) {
|
||||
this.setSelectableSettings();
|
||||
this.utilityService.ShowLoadingPanel = true;
|
||||
this.loadingPanel.ShowLoadingPanel = true;
|
||||
this.apiservice.selectedMenuName="Role Entry"
|
||||
this.allData = this.allData.bind(this);
|
||||
}
|
||||
|
|
@ -64,10 +66,10 @@ export class RolePermissionListComponent implements OnInit {
|
|||
(err: any) => {
|
||||
//ON ERROR
|
||||
console.log(err);
|
||||
this.utilityService.ShowLoadingPanel = false;
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
},
|
||||
() => {
|
||||
this.utilityService.ShowLoadingPanel = false;
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1309,6 +1309,8 @@ namespace HRM.UI.Controllers
|
|||
}
|
||||
role.CreatedBy = existingRole.CreatedBy;
|
||||
role.CreatedDate = existingRole.CreatedDate;
|
||||
// The browser does not send Sequence either; keep the role's own value instead of 0.
|
||||
role.Sequence = existingRole.Sequence;
|
||||
role.ApproveDate = null;
|
||||
role.ApproveBy = null;
|
||||
if (role.RoleStatus == EnumAuthStatus.Approved)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user