Skip to content

Commit

Permalink
fix(ui/ux): show zero escalated cases if there are none (#5458)
Browse files Browse the repository at this point in the history
Co-authored-by: David Whittaker <[email protected]>
  • Loading branch information
mvilanova and whitdog47 authored Nov 14, 2024
1 parent 1971a33 commit 5ccb12a
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions src/dispatch/static/dispatch/src/dashboard/case/CaseOverview.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<template>
<v-container fluid>
<!-- <cases-drill-down-sheet -->
<!-- :show="showDrillDown" -->
<!-- :items="detailItems" -->
<!-- @close="showDrillDown = false" -->
<!-- /> -->
<v-row>
<v-col class="d-flex justify-start" cols="12" sm="6">
<v-btn color="info" @click="copyView"> Share View </v-btn>
Expand Down Expand Up @@ -59,13 +54,6 @@
@details-selected="detailsSelected($event)"
/>
</v-col>
<!-- <v-col cols="12" sm="6"> -->
<!-- <case-priority-bar-chart-card -->
<!-- v-model="groupedItems" -->
<!-- :loading="loading" -->
<!-- @details-selected="detailsSelected($event)" -->
<!-- /> -->
<!-- </v-col> -->
<v-col cols="12" sm="6">
<case-new-triage-average-time-card v-model="groupedItems" :loading="loading" />
</v-col>
Expand All @@ -84,17 +72,14 @@
</template>

<script>
import { mapFields } from "vuex-map-fields"
import { groupBy, sumBy } from "lodash"
import { mapFields } from "vuex-map-fields"
import { toNumberString } from "@/filters"
import parseISO from "date-fns/parseISO"
import differenceInHours from "date-fns/differenceInHours"
import { toNumberString } from "@/filters"
import parseISO from "date-fns/parseISO"
import CaseDialogFilter from "@/dashboard/case/CaseDialogFilter.vue"
// import CasesDrillDownSheet from "@/dashboard/case/CasesDrillDownSheet.vue"
// import CasePriorityBarChartCard from "@/dashboard/case/CasePriorityBarChartCard.vue"
import CaseEscalatedClosedAverageTimeCard from "@/dashboard/case/CaseEscalatedClosedAverageTimeCard.vue"
import CaseNewClosedAverageTimeCard from "@/dashboard/case/CaseNewClosedAverageTimeCard.vue"
import CaseNewTriageAverageTimeCard from "@/dashboard/case/CaseNewTriageAverageTimeCard.vue"
Expand All @@ -108,14 +93,12 @@ export default {
components: {
CaseDialogFilter,
// CasePriorityBarChartCard,
CaseSeverityBarChartCard,
CaseTypeBarChartCard,
// CasesDrillDownSheet,
CaseEscalatedClosedAverageTimeCard,
CaseNewClosedAverageTimeCard,
CaseNewTriageAverageTimeCard,
CaseSeverityBarChartCard,
CaseTriageEscalatedAverageTimeCard,
CaseTypeBarChartCard,
StatWidget,
},
Expand Down Expand Up @@ -216,13 +199,15 @@ export default {
if (item.triage_at) {
return 1
}
return 0
})
},
totalCasesEscalated() {
return sumBy(this.items, function (item) {
if (item.escalated_at && item.incidents.length > 0) {
return 1
}
return 0
})
},
totalHours() {
Expand Down

0 comments on commit 5ccb12a

Please sign in to comment.