Commit 87dbc773 authored by Alicia.DeDiosFuente's avatar Alicia.DeDiosFuente
Browse files

feat: add actions to contributors list

parent 00bac591
......@@ -25,6 +25,8 @@ import {
Override,
TRANSLATE,
} from "solidify-frontend";
import {DataTableActions} from "@shared/models/data-table-actions.model";
import {IconNameEnum} from "@shared/enums/icon-name.enum";
@Component({
selector: "dlcm-contributor-list-routable",
......@@ -114,6 +116,31 @@ export class ContributorListRoutable extends SharedAbstractListRoutable<Contribu
];
}
protected defineActions(): DataTableActions<Contributor>[] {
return [
{
logo: IconNameEnum.edit,
callback: model => this.goToPerson(model),
placeholder: TRANSLATE("crud.list.action.goToEdit"),
displayOnCondition: model => true,
},
{
logo: IconNameEnum.deposit,
callback: model => this.goToDeposit(model),
placeholder: TRANSLATE("crud.list.action.goToDeposit"),
displayOnCondition: model => true,
},
];
}
goToPerson(contributor: Contributor): void {
this._store.dispatch(new Navigate([RoutesEnum.adminPersonDetail, contributor.resId]));
}
goToDeposit(contributor: Contributor): void {
this._store.dispatch(new Navigate([RoutesEnum.preservationSpaceContributorDetail, contributor.resId]));
}
@Override()
showDetail(model: Aip): void {
this._store.dispatch(new Navigate([RoutesEnum.preservationSpaceContributorDetail, model.resId]));
......
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