Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui/ux): show zero escalated cases if there are none #5458

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
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
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
whitdog47 marked this conversation as resolved.
Show resolved Hide resolved
})
},
totalCasesEscalated() {
return sumBy(this.items, function (item) {
if (item.escalated_at && item.incidents.length > 0) {
return 1
}
return 0
whitdog47 marked this conversation as resolved.
Show resolved Hide resolved
})
},
totalHours() {
Expand Down
Loading