|
@@ -141,7 +141,6 @@ class StaffLeaderBoard(View):
|
|
|
return render(request, 'staff_list.html', context)
|
|
|
|
|
|
def post(self, request, *args, **kwargs):
|
|
|
- staffs = Staff.objects.filter(location=request.user.useraccount.location).order_by('-total_units')
|
|
|
form = StaffRegistrationForm(request.POST)
|
|
|
if form.is_valid():
|
|
|
name = form.cleaned_data.get('name')
|
|
@@ -155,9 +154,4 @@ class StaffLeaderBoard(View):
|
|
|
nick_names=nick_names
|
|
|
)
|
|
|
messages.success(request, f'A new staff {staff} has been created!')
|
|
|
-
|
|
|
- context = {
|
|
|
- 'staffs': staffs,
|
|
|
- 'form': form
|
|
|
- }
|
|
|
- return render(request, 'staff_list.html', context)
|
|
|
+ return redirect('location-analytics')
|