Skip to content

Commit c809f60

Browse files
committed
Clean up
1 parent a6a3070 commit c809f60

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

clock/shifts/urls.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
app_name = 'shift'
1414
urlpatterns = [
1515
# Shift URLs
16-
path(
17-
'ajax/get_contract_id/', get_contract_end_date, name="get_contract_id"
18-
),
1916
# Display the ShiftMonthView as default with the current year-month
2017
path('', ShiftMonthContractView.as_view(month_format='%m', ), name="list"),
2118
# View to handle all the quick-actions from the dashboard

clock/shifts/views.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from django.conf import settings
44
from django.contrib import messages
55
from django.contrib.auth.decorators import login_required
6-
from django.http import HttpResponse, JsonResponse
76
from django.shortcuts import redirect
87
from django.utils import timezone
98
from django.utils.decorators import method_decorator
@@ -14,7 +13,6 @@
1413
from django.views.generic.list import ListView
1514
from pytz import timezone as p_timezone
1615

17-
from clock.contracts.models import Contract
1816
from clock.pages.mixins import UserObjectOwnerMixin
1917
from clock.shifts.forms import ClockInForm, ClockOutForm, ShiftForm
2018
from clock.shifts.models import Shift
@@ -27,21 +25,6 @@
2725
)
2826

2927

30-
@login_required
31-
def get_contract_end_date(request):
32-
if request.method == 'POST':
33-
contract_id = request.POST.get('contract', 0)
34-
contract = Contract.objects.get(pk=contract_id)
35-
36-
# Only show data to users that own the requested contract
37-
if contract.employee.pk == request.user.pk:
38-
return JsonResponse({'end_date': contract.end_date})
39-
40-
return HttpResponse(status=404)
41-
42-
return HttpResponse(status=403)
43-
44-
4528
@require_POST
4629
@login_required
4730
def shift_action(request):

0 commit comments

Comments
 (0)