0.1.19
support tickets routines
This commit is contained in:
@@ -40,14 +40,23 @@ def support_tickets_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
from ChatServiceApp.models import MsgGroup
|
||||
tickets = MsgGroup.objects.filter(enable=True, owner=request.user)
|
||||
if request.user.is_staff:
|
||||
from ChatServiceApp.funcs import get_tickets_for_manager, get_tickets_wo_manager
|
||||
Dict = {
|
||||
'tickets_wo_manager': get_tickets_wo_manager(),
|
||||
'tickets_for_manager': get_tickets_for_manager(request.user),
|
||||
}
|
||||
tpl_name = 'blocks/profile/b_support_chat.html'
|
||||
else:
|
||||
from ChatServiceApp.models import MsgGroup
|
||||
tickets = MsgGroup.objects.filter(enable=True, owner=request.user)
|
||||
|
||||
Dict = {
|
||||
'tickets': tickets
|
||||
}
|
||||
Dict = {
|
||||
'tickets': tickets
|
||||
}
|
||||
tpl_name = 'blocks/profile/b_support_tickets.html'
|
||||
|
||||
html = render_to_string('blocks/profile/b_support_tickets.html', Dict, request=request)
|
||||
html = render_to_string(tpl_name, Dict, request=request)
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user