diff --git a/app/routes/tickets.py b/app/routes/tickets.py index d20e1c3..a09d510 100644 --- a/app/routes/tickets.py +++ b/app/routes/tickets.py @@ -134,7 +134,7 @@ def dashboard(): return render_template('tickets/dashboard_employee.html', my_tickets=my_tickets, open_count=open_count, active_count=active_count, resolved_count=resolved_count, - articles=articles, + articles=articles, now=datetime.utcnow(), ) @@ -538,6 +538,12 @@ def update_ticket(ticket_id): if new_status == TicketStatus.RESOLVED: send_satisfaction_survey(ticket) + if request.headers.get('X-Requested-With') == 'XMLHttpRequest': + from flask import jsonify + return jsonify({'ok': True, 'changes': changes, + 'status': ticket.status, 'priority': ticket.priority, + 'assigned_to_id': ticket.assigned_to_id}) + flash('Ticket updated successfully.', 'success') return redirect(url_for('tickets.ticket_detail', ticket_id=ticket.id)) diff --git a/app/templates/admin/activity_logs.html b/app/templates/admin/activity_logs.html index 9bd7acc..417a38d 100644 --- a/app/templates/admin/activity_logs.html +++ b/app/templates/admin/activity_logs.html @@ -93,6 +93,7 @@
| Title | Category | Author | Published | Views | 👍 / 👎 | Updated | Actions |
|---|
| Ticket # | Title | -Status | +Progress | Priority | Date | |||
|---|---|---|---|---|---|---|---|---|
| {{ t.ticket_number }} | -{{ t.title[:45] }}{% if t.title|length > 45 %}…{% endif %} | -{{ t.status.replace('_',' ').upper() }} | ++ {{ t.ticket_number }} + | +
+
+ {{ t.title[:40] }}{% if t.title|length > 40 %}…{% endif %}
+
+
+ {% if is_overdue %}
+
+ Overdue
+
+ {% endif %}
+ {% if t.priority == 'critical' %}
+ Critical
+ {% elif t.priority == 'high' %}
+ High
+ {% endif %}
+
+ |
+
+
+ {{ t.status.replace('_',' ').title() }}
+
+
+ {% for i in range(4) %}
+
+ {% endfor %}
+
+ |
{{ t.priority.upper() }} | -{{ t.created_at | localtime("%b %d") }} | +{{ t.created_at | localtime("%b %d") }} |
| Ticket # | Title | Priority | Status |
|---|
| Ticket # | User | Priority | Status | Assignee |
|---|