diff --git a/src/components/panels/History/HistoryListEntryMaintenance.vue b/src/components/panels/History/HistoryListEntryMaintenance.vue index 3aad89391..8d5037f98 100644 --- a/src/components/panels/History/HistoryListEntryMaintenance.vue +++ b/src/components/panels/History/HistoryListEntryMaintenance.vue @@ -9,14 +9,14 @@ - {{ mdiNotebook }} + {{ icon }} {{ item.name }} - +
@@ -61,8 +61,17 @@ import { Component, Mixins, Prop } from 'vue-property-decorator' import Panel from '@/components/ui/Panel.vue' import BaseMixin from '@/components/mixins/base' -import { mdiAdjust, mdiAlarm, mdiCalendar, mdiDelete, mdiNotebook, mdiTextBoxSearch } from '@mdi/js' -import { HistoryListPanelRow } from '@/components/panels/HistoryListPanel.vue' +import { + mdiAdjust, + mdiAlarm, + mdiAlarmMultiple, + mdiCalendar, + mdiDelete, + mdiNotebook, + mdiNotebookCheck, + mdiTextBoxSearch, +} from '@mdi/js' +import { HistoryListPanelCol } from '@/components/panels/HistoryListPanel.vue' import { GuiMaintenanceStateEntry } from '@/store/gui/maintenance/types' import HistoryListPanelDetailMaintenance from '@/components/dialogs/HistoryListPanelDetailMaintenance.vue' @@ -84,7 +93,7 @@ export default class HistoryListPanel extends Mixins(BaseMixin) { contextMenuY = 0 @Prop({ type: Object, required: true }) readonly item!: GuiMaintenanceStateEntry - @Prop({ type: Array, required: true }) readonly tableFields!: HistoryListPanelRow[] + @Prop({ type: Array, required: true }) readonly tableFields!: HistoryListPanelCol[] @Prop({ type: Boolean, required: true }) readonly isSelected!: boolean get cssClasses() { @@ -162,6 +171,22 @@ export default class HistoryListPanel extends Mixins(BaseMixin) { return `${this.restDays.toFixed(0)} / ${value} days` } + get reminder() { + return this.item.reminder?.type ?? null + } + + get alarmIcon() { + if (this.reminder === 'repeat') return mdiAlarmMultiple + + return mdiAlarm + } + + get icon() { + if (this.item.end_time !== null) return mdiNotebookCheck + + return mdiNotebook + } + select(newVal: boolean) { this.$emit('select', newVal) }