diff --git a/src/dispatch/static/dispatch/src/dashboard/incident/IncidentDialogFilter.vue b/src/dispatch/static/dispatch/src/dashboard/incident/IncidentDialogFilter.vue index 4c9bc4394fd8..28532489bf0a 100644 --- a/src/dispatch/static/dispatch/src/dashboard/incident/IncidentDialogFilter.vue +++ b/src/dispatch/static/dispatch/src/dashboard/incident/IncidentDialogFilter.vue @@ -45,6 +45,28 @@ + + + + Incident Participant + Show only incidents with this participant + + + + + @@ -70,6 +92,7 @@ import ProjectCombobox from "@/project/ProjectCombobox.vue" import RouterUtils from "@/router/utils" import SearchUtils from "@/search/utils" import TagFilterAutoComplete from "@/tag/TagFilterAutoComplete.vue" +import ParticipantSelect from "@/incident/ParticipantSelect.vue" let today = function () { let now = new Date() @@ -86,6 +109,7 @@ export default { IncidentTypeCombobox, ProjectCombobox, TagFilterAutoComplete, + ParticipantSelect, }, props: { @@ -118,6 +142,8 @@ export default { end: null, }, }, + local_participant_is_commander: false, + local_participant: null, } }, @@ -130,6 +156,7 @@ export default { this.filters.project.length, this.filters.status.length, this.filters.tag.length, + this.local_participant == null ? 0 : 1, 1, ]) }, @@ -138,6 +165,15 @@ export default { methods: { applyFilters() { + if (this.local_participant) { + if (this.local_participant_is_commander) { + this.filters.commander = this.local_participant + this.filters.participant = null + } else { + this.filters.commander = null + this.filters.participant = this.local_participant + } + } RouterUtils.updateURLFilters(this.filters) this.fetchData() // we close the dialog