Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/dispatch/static/dispatch/src/case/BulkEditSheet.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<v-bottom-sheet v-model="showBulkEdit" hide-overlay persistent>
<handoff-dialog />
<closed-dialog />
<v-card :loading="bulkEditLoading" tile>
<v-list>
<v-list-item>
Expand All @@ -27,7 +28,7 @@
</v-btn>
</v-list-item-icon>
<v-list-item-icon>
<v-btn text @click="saveBulk({ status: 'Closed' })">
<v-btn text @click="showClosedDialog()">
<v-icon>mdi-close</v-icon>
Mark Closed
</v-btn>
Expand All @@ -49,12 +50,14 @@ import { mapFields } from "vuex-map-fields"
import { mapActions } from "vuex"

import HandoffDialog from "@/case/HandoffDialog.vue"
import ClosedDialog from "@/case/ClosedDialog.vue"

export default {
name: "CaseBulkEditSheet",

components: {
HandoffDialog,
ClosedDialog,
},

computed: {
Expand All @@ -66,7 +69,12 @@ export default {
},

methods: {
...mapActions("case_management", ["saveBulk", "deleteBulk", "showHandoffDialog"]),
...mapActions("case_management", [
"saveBulk",
"deleteBulk",
"showHandoffDialog",
"showClosedDialog",
]),
},
}
</script>
80 changes: 80 additions & 0 deletions src/dispatch/static/dispatch/src/case/ClosedDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<template>
<v-dialog v-model="showClosedDialog" persistent max-width="800px">
<v-card>
<v-card-title>
<span class="headline">Close Cases</span>
</v-card-title>
<v-card-text>
Closed cased require a resolution reason and a resolution summary.
</v-card-text>
<v-card-actions>
<v-container grid-list-md>
<v-layout wrap>
<v-flex xs12>
<v-select
v-model="resolutionReason"
label="Resolution Reason"
:items="resolutionReasons"
hint="The general reason why a given case was resolved."
/>
</v-flex>
<v-flex xs12>
<v-textarea
v-model="resolution"
label="Resolution"
hint="Description of the actions taken to resolve the case."
clearable
/>
</v-flex>
<v-btn color="blue en-1" text @click="closeClosedDialog()"> Cancel </v-btn>
<v-btn
color="red en-1"
text
:loading="loading"
@click="
saveBulk({
resolution_reason: resolutionReason,
resolution: resolution,
status: 'Closed',
})
"
>
Close
</v-btn>
</v-layout>
</v-container>
</v-card-actions>
</v-card>
</v-dialog>
</template>

<script>
import { mapFields } from "vuex-map-fields"
import { mapActions } from "vuex"

export default {
name: "CaseClosedDialog",

data() {
return {
resolutionReason: null,
resolution: null,
resolutionReasons: ["False Positive", "User Acknowledged", "Mitigated", "Escalated"],
}
},

components: {},

computed: {
...mapFields("case_management", [
"dialogs.showClosedDialog",
"selected.loading",
"selected.project",
]),
},

methods: {
...mapActions("case_management", ["closeClosedDialog", "saveBulk", "resetSelected"]),
},
}
</script>
12 changes: 12 additions & 0 deletions src/dispatch/static/dispatch/src/case/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const state = {
showEscalateDialog: false,
showExport: false,
showHandoffDialog: false,
showClosedDialog: false,
showNewSheet: false,
},
report: {
Expand Down Expand Up @@ -198,6 +199,14 @@ const actions = {
commit("SET_DIALOG_SHOW_HANDOFF", false)
commit("RESET_SELECTED")
},
showClosedDialog({ commit }, value) {
commit("SET_DIALOG_SHOW_CLOSED", true)
commit("SET_SELECTED", value)
},
closeClosedDialog({ commit }) {
commit("SET_DIALOG_SHOW_CLOSED", false)
commit("RESET_SELECTED")
},
showExport({ commit }) {
commit("SET_DIALOG_SHOW_EXPORT", true)
},
Expand Down Expand Up @@ -346,6 +355,9 @@ const mutations = {
SET_DIALOG_SHOW_HANDOFF(state, value) {
state.dialogs.showHandoffDialog = value
},
SET_DIALOG_SHOW_CLOSED(state, value) {
state.dialogs.showClosedDialog = value
},
SET_DIALOG_DELETE(state, value) {
state.dialogs.showDeleteDialog = value
},
Expand Down