mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00
feat: Add SLA reports overview component (#9167)
This commit is contained in:
@@ -505,5 +505,18 @@
|
|||||||
"THURSDAY": "Thursday",
|
"THURSDAY": "Thursday",
|
||||||
"FRIDAY": "Friday",
|
"FRIDAY": "Friday",
|
||||||
"SATURDAY": "Saturday"
|
"SATURDAY": "Saturday"
|
||||||
|
},
|
||||||
|
"SLA_REPORTS": {
|
||||||
|
"HEADER": "SLA Reports",
|
||||||
|
"METRICS": {
|
||||||
|
"HIT_RATE": {
|
||||||
|
"LABEL": "Hit Rate",
|
||||||
|
"TOOLTIP": "Percentage of SLAs created were completed successfully"
|
||||||
|
},
|
||||||
|
"NO_OF_BREACHES": {
|
||||||
|
"LABEL": "Number of Breaches",
|
||||||
|
"TOOLTIP": "The total SLA breaches in a certain period."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-col gap-2 items-start justify-center min-w-[10rem]">
|
||||||
|
<span
|
||||||
|
class="inline-flex items-center gap-1 text-sm text-slate-700 dark:text-slate-200 font-medium"
|
||||||
|
>
|
||||||
|
{{ label }}
|
||||||
|
<fluent-icon
|
||||||
|
v-tooltip.right="toolTip"
|
||||||
|
size="14"
|
||||||
|
icon="information"
|
||||||
|
type="outline"
|
||||||
|
class="flex-shrink-0 text-sm font-normal flex sm:font-medium text-slate-500 dark:text-slate-500"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
v-if="isLoading"
|
||||||
|
class="w-12 h-6 mb-0.5 rounded-md bg-slate-50 animate-pulse"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<span v-else class="text-2xl font-medium text-slate-900 dark:text-slate-25">
|
||||||
|
{{ value }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
toolTip: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
isLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="flex sm:flex-row flex-col w-full gap-4 sm:gap-14 bg-white dark:bg-slate-900 rounded-xl border border-slate-75 dark:border-slate-700/50 px-6 py-4"
|
||||||
|
>
|
||||||
|
<SLAMetricCard
|
||||||
|
:label="$t('SLA_REPORTS.METRICS.HIT_RATE.LABEL')"
|
||||||
|
:value="hitRate"
|
||||||
|
:tool-tip="$t('SLA_REPORTS.METRICS.HIT_RATE.TOOLTIP')"
|
||||||
|
:is-loading="isLoading"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="w-full sm:w-px h-full border border-slate-75 dark:border-slate-700/50"
|
||||||
|
/>
|
||||||
|
<SLAMetricCard
|
||||||
|
:label="$t('SLA_REPORTS.METRICS.NO_OF_BREACHES.LABEL')"
|
||||||
|
:value="noOfBreaches"
|
||||||
|
:tool-tip="$t('SLA_REPORTS.METRICS.NO_OF_BREACHES.TOOLTIP')"
|
||||||
|
:is-loading="isLoading"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import SLAMetricCard from './SLAMetricCard.vue';
|
||||||
|
defineProps({
|
||||||
|
hitRate: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
noOfBreaches: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
isLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user