HRM-10/HRM.UI/ClientApp/src/app/_models/Authentication/UserRole.js

24 lines
668 B
JavaScript
Raw Normal View History

2026-11-11 16:17:24 +06:00
import { BaseObject } from '../Basic/baseObject';
export class UserRole extends BaseObject {
constructor() {
super();
this.isOld = true;
this.newRoleName = "";
this.userID = 0;
2026-11-03 13:06:00 +06:00
}
2026-11-11 16:17:24 +06:00
getRoleNames(users, useRoles) {
2026-11-03 13:06:00 +06:00
var useRole;
var str = '';
2026-11-11 16:17:24 +06:00
users.forEach(u => {
2026-11-03 13:06:00 +06:00
str = '';
2026-11-11 16:17:24 +06:00
var temproles = useRoles.filter(x => u.id == x.userID);
2026-11-03 13:06:00 +06:00
if (temproles = undefined) {
2026-11-11 16:17:24 +06:00
temproles.forEach(y => {
2026-11-03 13:06:00 +06:00
str = str + y.roleNameView;
});
}
u.roleNames = str;
});
2026-11-11 16:17:24 +06:00
}
}
2026-11-03 13:06:00 +06:00
//# sourceMappingURL=UserRole.js.map