feat(fusion_helpdesk): group My Tickets into Critical/New/Solved sections
The flat write_date-sorted list was hard to scan with 50+ tickets — solved ones were intermixed with active ones, and there was no signal for priority. Bucket each ticket server-side into 'critical' (open + priority High/Urgent), 'solved' (stage marked fold=True on central) or 'open' (everything else), and render three labelled sections in the dialog with sticky headers, count badges, and per-group accent colours. Backend keeps its write_date desc order so latest is always at top within each bucket. Bucketing uses helpdesk.stage.fold (not the stage name) so renaming "Solved" to "Done" on the central won't quietly mis-categorise rows. Adds bucket_ticket() in utils.py with unit tests covering the folded-wins-over-priority precedence and the missing-priority fallback. Also surfaces a small Urgent (triangle) / High (arrow) icon on each row so a critical ticket reads at a glance even after a user scrolls past the section header. Bumps fusion_helpdesk to 19.0.1.6.0.
This commit is contained in:
@@ -138,14 +138,30 @@
|
||||
<i class="fa fa-inbox fa-2x d-block mb-2"/>
|
||||
No tickets yet. Use the <b>New</b> tab to report a bug or request a feature.
|
||||
</div>
|
||||
<div t-else="" class="o_fhd_ticket_list">
|
||||
<div t-foreach="state.tickets" t-as="t" t-key="t.id"
|
||||
class="o_fhd_ticket_row" t-on-click="() => this.openTicket(t.id)">
|
||||
<span t-if="t.has_unread" class="o_fhd_unread_dot" title="New reply"/>
|
||||
<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 class="o_fhd_ticket_stage" t-esc="t.stage"/>
|
||||
<div t-else="" class="o_fhd_ticket_groups">
|
||||
<div t-foreach="groupedTickets" t-as="group" t-key="group.key"
|
||||
t-attf-class="o_fhd_group {{ group.className }}">
|
||||
<div class="o_fhd_group_header">
|
||||
<i t-att-class="group.iconClass"/>
|
||||
<span class="o_fhd_group_title" t-esc="group.title"/>
|
||||
<span class="o_fhd_group_count" t-esc="group.tickets.length"/>
|
||||
</div>
|
||||
<div class="o_fhd_ticket_list">
|
||||
<div t-foreach="group.tickets" t-as="t" t-key="t.id"
|
||||
class="o_fhd_ticket_row" t-on-click="() => this.openTicket(t.id)">
|
||||
<span t-if="t.has_unread" class="o_fhd_unread_dot" title="New reply"/>
|
||||
<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>
|
||||
<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"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user