Data Permission bug fix
This commit is contained in:
parent
6063bf6cf9
commit
710f5ba9c4
|
@ -26,11 +26,12 @@
|
|||
<kendo-dropdownlist
|
||||
style="width:100%"
|
||||
[data]="users"
|
||||
[defaultItem]="{ userName: 'Select User', userID: null }"
|
||||
[defaultItem]="{ userName: 'Select User', id: null }"
|
||||
[textField]="'userName'"
|
||||
[valueField]="'userID'"
|
||||
[valueField]="'id'"
|
||||
[(ngModel)]="selectedUser"
|
||||
(valueChange)="onUserChange($event)"
|
||||
[disabled]="!(_selectedPayroll != null && _selectedRoleType != null) "
|
||||
>
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
@ -48,6 +49,7 @@
|
|||
[valueField]="'id'"
|
||||
[valuePrimitive]="true"
|
||||
(valueChange)="onPayrollChange($event)"
|
||||
[disabled]="!_selectedRoleType"
|
||||
>
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
@ -59,10 +61,11 @@
|
|||
<kendo-dropdownlist class="form-control form-control-sm input-sm"
|
||||
style="width:100%"
|
||||
[data]="permissionTypes"
|
||||
[defaultItem]="{ name: 'Select Permission Type', id: null }"
|
||||
[defaultItem]="{ name: 'Select Permission Type', value: null }"
|
||||
[textField]="'name'"
|
||||
[valueField]="'id'"
|
||||
[valueField]="'value'"
|
||||
(selectionChange)="EventPermissionType($event)"
|
||||
[disabled]="!_selectedPayroll"
|
||||
>
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
|
|
@ -52,6 +52,7 @@ export class DataPermssionComponent implements OnInit {
|
|||
public isLocation: boolean = false;
|
||||
|
||||
onUserTypeChange(_selectedRoleType: any): void {
|
||||
if (this._selectedRoleType.value != null) {
|
||||
this.utilityHandlerService.ShowLoadingPanel = true;
|
||||
this.userService.GetUsers(this._selectedRoleType.value).subscribe(
|
||||
(x) => {
|
||||
|
@ -66,6 +67,11 @@ export class DataPermssionComponent implements OnInit {
|
|||
this.utilityHandlerService.ShowLoadingPanel = false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.users = [];
|
||||
this.selectedUser = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
EventPermissionType(selectedPermissionType: any): void {
|
||||
this.isDepartment = false;
|
||||
|
@ -80,12 +86,14 @@ export class DataPermssionComponent implements OnInit {
|
|||
}
|
||||
|
||||
onUserChange(selectedUserID: any): void {
|
||||
if(selectedUserID.id != null){
|
||||
this._selectedUser = selectedUserID;
|
||||
this._userID = this._selectedUser.id;
|
||||
|
||||
if (this._userID != undefined && this._selectedPayroll != undefined)
|
||||
this.loadGridView()
|
||||
}
|
||||
}
|
||||
|
||||
onPayrollChange(selectedPayrollID: any): void {
|
||||
this._selectedPayroll = selectedPayrollID;
|
||||
|
|
|
@ -89,7 +89,11 @@ namespace HRM.UI.Controllers
|
|||
|
||||
param = new object[2];
|
||||
param[i] = EnumStatus.Active;
|
||||
|
||||
if(cty.PayrollTypeID == null)
|
||||
param[i + 1] = (int)CurrentUser.GetCurrentUser(HttpContext.User).PayrollTypeID;
|
||||
else
|
||||
param[i + 1] = (int)cty.PayrollTypeID;
|
||||
|
||||
paramtypes = new Type[2];
|
||||
paramtypes[i] = typeof(EnumStatus);
|
||||
|
|
Loading…
Reference in New Issue
Block a user