fix(login) penyesuaian response login
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
parent
f4ddbe08a8
commit
cf46b2fd4c
|
@ -37,6 +37,10 @@ export class LoginManager extends BaseCustomManager<UserEntity> {
|
|||
username: this.data.username,
|
||||
status: STATUS.ACTIVE,
|
||||
},
|
||||
relations: [
|
||||
'user_privilege',
|
||||
'user_privilege.user_privilege_configurations',
|
||||
],
|
||||
});
|
||||
if (!this.userLogin) this.throwError();
|
||||
|
||||
|
@ -89,6 +93,22 @@ export class LoginManager extends BaseCustomManager<UserEntity> {
|
|||
role: this.userLogin.role,
|
||||
user_privilege_id: this.userLogin.user_privilege_id,
|
||||
token: this.token,
|
||||
user_privilege:
|
||||
this.userLogin.user_privilege?.user_privilege_configurations
|
||||
?.filter((item) => item.module != 'POS')
|
||||
?.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
menu: item.menu,
|
||||
menu_label: item.menu_label,
|
||||
view: item.view,
|
||||
create: item.create,
|
||||
edit: item.edit,
|
||||
delete: item.delete,
|
||||
cancel: item.cancel,
|
||||
confirm: item.confirm,
|
||||
};
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue