feat(fusion_helpdesk): Critical flag, KPI cards, colored stage pills
Three coordinated changes on top of the section grouping: 1. **Mark as Critical** — a red chip on the New tab sets priority='3' when submitted. The central post-create hook auto-applies a "Critical" helpdesk.tag (shipped via fusion_helpdesk_central data XML, noupdate=1 so support can recolor without losing it on upgrade), giving support a kanban-groupable signal that doesn't rely on remembering what priority='3' means. Scoped to in-app-channel tickets only, so a support agent manually setting Urgent on their own ticket isn't silently tagged. 2. **KPI cards above the sections** — Total / Open / Closed / Critical in a 4-up grid (auto-collapses to 2x2 under 540px). Each card uses its own saturated gradient so it reads on both light and dark mode — the dialog backdrop is irrelevant because the gradient brings its own background. Counts are computed in JS from state.tickets so they always match what's rendered below. 3. **Colored stage pills** — red Critical, green Solved, dark-yellow New, orange Cancelled, blue for In Progress / Testing / On Hold. Critical priority gets a *separate* red pill alongside the stage pill so you keep stage info even on escalated tickets. Stage matching is substring-based (lowercased) so a renamed "Resolved" or "Done" stage on central still maps to the green pill. Tests cover the new is_critical=True → priority='3' wiring and the default omission so SLA / stage defaults keep working for normal tickets. Bumps fusion_helpdesk to 19.0.1.7.0 and fusion_helpdesk_central to 19.0.1.2.0. End-to-end smoke test verified live: priority=3 + x_fc_client_label triggers the Critical tag.
This commit is contained in:
@@ -72,6 +72,23 @@
|
||||
placeholder="e.g. TypeError: Cannot read property 'foo' of undefined …"/>
|
||||
</div>
|
||||
|
||||
<div class="o_fhd_field">
|
||||
<label>Severity</label>
|
||||
<div class="o_fhd_critical_row">
|
||||
<button type="button"
|
||||
class="o_fhd_critical_chip"
|
||||
t-att-class="{ 'o_fhd_critical_active': state.isCritical }"
|
||||
t-on-click="() => state.isCritical = !state.isCritical">
|
||||
<i class="fa fa-exclamation-triangle me-1"/>
|
||||
<t t-if="state.isCritical">Marked Critical</t>
|
||||
<t t-else="">Mark as Critical</t>
|
||||
</button>
|
||||
<span class="o_fhd_hint">
|
||||
Flag this if it's blocking production work — support gets paged.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="o_fhd_field">
|
||||
<label>Attachments</label>
|
||||
<div class="o_fhd_actions_row">
|
||||
@@ -128,6 +145,32 @@
|
||||
t-on-click="() => this.setScope('all')">All (deployment)</button>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
KPI cards — Total / Open / Closed / Critical. Counts come from
|
||||
the same `state.tickets` the sections render, so the numbers
|
||||
always match what's on screen. The grid auto-wraps to two
|
||||
columns on narrow dialogs.
|
||||
-->
|
||||
<div t-if="!state.loadingList and !state.listError and state.tickets.length"
|
||||
class="o_fhd_kpi_grid">
|
||||
<div class="o_fhd_kpi_card o_fhd_kpi_total">
|
||||
<div class="o_fhd_kpi_label">Total</div>
|
||||
<div class="o_fhd_kpi_value" t-esc="ticketStats.total"/>
|
||||
</div>
|
||||
<div class="o_fhd_kpi_card o_fhd_kpi_open">
|
||||
<div class="o_fhd_kpi_label">Open</div>
|
||||
<div class="o_fhd_kpi_value" t-esc="ticketStats.open"/>
|
||||
</div>
|
||||
<div class="o_fhd_kpi_card o_fhd_kpi_closed">
|
||||
<div class="o_fhd_kpi_label">Closed</div>
|
||||
<div class="o_fhd_kpi_value" t-esc="ticketStats.closed"/>
|
||||
</div>
|
||||
<div class="o_fhd_kpi_card o_fhd_kpi_critical">
|
||||
<div class="o_fhd_kpi_label">Critical</div>
|
||||
<div class="o_fhd_kpi_value" t-esc="ticketStats.critical"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="state.loadingList" class="o_fhd_muted text-center p-3">
|
||||
<i class="fa fa-spinner fa-spin me-1"/> Loading your tickets…
|
||||
</div>
|
||||
@@ -153,13 +196,10 @@
|
||||
<span t-else="" class="o_fhd_unread_spacer"/>
|
||||
<span class="o_fhd_ticket_ref" t-esc="'#' + t.ref"/>
|
||||
<span class="o_fhd_ticket_subject" t-esc="t.subject"/>
|
||||
<span t-if="t.priority === '3'" class="o_fhd_priority_urgent" title="Urgent">
|
||||
<i class="fa fa-exclamation-triangle"/>
|
||||
<span t-if="isCriticalRow(t)" class="o_fhd_pill o_fhd_pill_critical" title="Critical priority">
|
||||
<i class="fa fa-exclamation-triangle me-1"/>Critical
|
||||
</span>
|
||||
<span t-elif="t.priority === '2'" class="o_fhd_priority_high" title="High">
|
||||
<i class="fa fa-arrow-up"/>
|
||||
</span>
|
||||
<span class="o_fhd_ticket_stage" t-esc="t.stage"/>
|
||||
<span t-att-class="pillClass(t)" t-esc="t.stage"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user