Commit 7dcda807 authored by Alicia.DeDiosFuente's avatar Alicia.DeDiosFuente Committed by Florent Poittevin
Browse files

feat: highlight connected user in admin user list

parent 10c9c15c
......@@ -4,6 +4,7 @@ import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnInit,
} from "@angular/core";
import {MatDialog} from "@angular/material/dialog";
import {ActivatedRoute} from "@angular/router";
......@@ -20,6 +21,7 @@ import {
OrderEnum,
TRANSLATE,
} from "solidify-frontend";
import {AppState} from "@app/stores/app.state";
@Component({
selector: "dlcm-admin-user-list-routable",
......@@ -27,7 +29,7 @@ import {
styleUrls: ["../../../../../../shared/components/routables/shared-abstract-list/shared-abstract-list.routable.scss"],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AdminUserListRoutable extends SharedAbstractListRoutable<UserExtended, AdminUserStateModel> {
export class AdminUserListRoutable extends SharedAbstractListRoutable<UserExtended, AdminUserStateModel> implements OnInit {
readonly KEY_CREATE_BUTTON: string = TRANSLATE("admin.user.button.new");
readonly KEY_REFRESH_BUTTON: string = TRANSLATE("admin.user.button.refresh");
readonly KEY_BACK_BUTTON: string | undefined = TRANSLATE("admin.button.goBackToAdminHome");
......@@ -42,6 +44,12 @@ export class AdminUserListRoutable extends SharedAbstractListRoutable<UserExtend
super(_store, _changeDetector, _route, _routerExt, _actions$, _dialog, LocalStateEnum.admin_user, adminUserActionNameSpace, {}, LocalStateEnum.admin);
}
ngOnInit(): void {
super.ngOnInit();
const currentUser: UserExtended = this._store.selectSnapshot(AppState.currentUser);
this.listNewId = [currentUser.resId];
}
conditionDisplayEditButton(model: UserExtended | undefined): boolean {
return true;
}
......@@ -78,4 +86,5 @@ export class AdminUserListRoutable extends SharedAbstractListRoutable<UserExtend
},
];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment