05/22 Enhance codes and fix bugs 2
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user