no hardcode in web
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
@ -17,7 +17,7 @@ import { customElement, property } from "lit/decorators.js";
|
|||||||
|
|
||||||
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
||||||
|
|
||||||
import { Schedule, TasksApi } from "@goauthentik/api";
|
import { ModelEnum, Schedule, TasksApi } from "@goauthentik/api";
|
||||||
|
|
||||||
@customElement("ak-schedule-list")
|
@customElement("ak-schedule-list")
|
||||||
export class ScheduleList extends Table<Schedule> {
|
export class ScheduleList extends Table<Schedule> {
|
||||||
@ -153,14 +153,13 @@ export class ScheduleList extends Table<Schedule> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderExpanded(item: Schedule): TemplateResult {
|
renderExpanded(item: Schedule): TemplateResult {
|
||||||
// TODO: no hardcoded things
|
const [appLabel, modelName] = ModelEnum.AuthentikTasksSchedulesSchedule.split(".");
|
||||||
// grep authentik_tasks_schedules.schedule gen-ts-api
|
|
||||||
return html` <td role="cell" colspan="3">
|
return html` <td role="cell" colspan="3">
|
||||||
<div class="pf-c-table__expandable-row-content">
|
<div class="pf-c-table__expandable-row-content">
|
||||||
<div class="pf-c-content">
|
<div class="pf-c-content">
|
||||||
<ak-task-list
|
<ak-task-list
|
||||||
.relObjAppLabel="authentik_tasks_schedules"
|
.relObjAppLabel=${appLabel}
|
||||||
.relObjModel="schedule"
|
.relObjModel=${modelName}
|
||||||
.relObjId="${item.id}"
|
.relObjId="${item.id}"
|
||||||
></ak-task-list>
|
></ak-task-list>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user