|
|
@ -1008,11 +1008,29 @@ def mark_point_working_on(request, point_id, task_id):
|
|
|
|
|
|
|
|
|
|
|
|
task_id_str = task.task_id
|
|
|
|
task_id_str = task.task_id
|
|
|
|
|
|
|
|
|
|
|
|
# Redirect to the task detailed page
|
|
|
|
|
|
|
|
showpoints_url = reverse('showpoints', args=[task_id_str])
|
|
|
|
showpoints_url = reverse('showpoints', args=[task_id_str])
|
|
|
|
return HttpResponseRedirect(showpoints_url)
|
|
|
|
return HttpResponseRedirect(showpoints_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
|
|
|
def mark_point_working_on_task_page(request, point_id, task_id):
|
|
|
|
|
|
|
|
task = get_object_or_404(Task, id=task_id)
|
|
|
|
|
|
|
|
point = get_object_or_404(Point, id=point_id)
|
|
|
|
|
|
|
|
point.status = 'Working On'
|
|
|
|
|
|
|
|
current_datetime = datetime.now()
|
|
|
|
|
|
|
|
point.date_workingon = current_datetime.date()
|
|
|
|
|
|
|
|
point.time_workingon = current_datetime.strftime("%I:%M %p")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
point.save()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Create a new Status object
|
|
|
|
|
|
|
|
status_text = f'Working On: {point.text}'
|
|
|
|
|
|
|
|
status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile)
|
|
|
|
|
|
|
|
status.save()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return redirect('detailed-task', task_id=task.task_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
@login_required
|
|
|
|
def mark_point_completed(request, point_id, task_id):
|
|
|
|
def mark_point_completed(request, point_id, task_id):
|
|
|
|
task = get_object_or_404(Task, id=task_id)
|
|
|
|
task = get_object_or_404(Task, id=task_id)
|
|
|
@ -1033,12 +1051,37 @@ def mark_point_completed(request, point_id, task_id):
|
|
|
|
|
|
|
|
|
|
|
|
task_id_str = task.task_id
|
|
|
|
task_id_str = task.task_id
|
|
|
|
|
|
|
|
|
|
|
|
# Redirect to the task detailed page
|
|
|
|
|
|
|
|
showpoints_url = reverse('showpoints', args=[task_id_str])
|
|
|
|
showpoints_url = reverse('showpoints', args=[task_id_str])
|
|
|
|
return HttpResponseRedirect(showpoints_url)
|
|
|
|
return HttpResponseRedirect(showpoints_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
|
|
|
def mark_point_completed_task_page(request, point_id, task_id):
|
|
|
|
|
|
|
|
task = get_object_or_404(Task, id=task_id)
|
|
|
|
|
|
|
|
point = get_object_or_404(Point, id=point_id)
|
|
|
|
|
|
|
|
point.status = 'Completed'
|
|
|
|
|
|
|
|
current_datetime = datetime.now()
|
|
|
|
|
|
|
|
point.date_workingon = current_datetime.date()
|
|
|
|
|
|
|
|
point.time_workingon = current_datetime.strftime("%I:%M %p")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
point.save()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Create a new Status object
|
|
|
|
|
|
|
|
status_text = f'{point.text} - Completed'
|
|
|
|
|
|
|
|
status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile)
|
|
|
|
|
|
|
|
status.save()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
task_id_str = task.task_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return redirect('detailed-task', task_id=task.task_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
@login_required
|
|
|
|
def save_dailyreport(request):
|
|
|
|
def save_dailyreport(request):
|
|
|
|
if request.method == 'POST':
|
|
|
|
if request.method == 'POST':
|
|
|
|