|
|
|
@ -11,10 +11,10 @@ from django.db.models import Q
|
|
|
|
|
from django.http import JsonResponse
|
|
|
|
|
from .models import Task, Epic
|
|
|
|
|
from datetime import date
|
|
|
|
|
from django.http import HttpResponseRedirect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Pages views
|
|
|
|
|
|
|
|
|
|
def signin(request):
|
|
|
|
|
if request.user.is_authenticated:
|
|
|
|
|
return redirect('home')
|
|
|
|
@ -74,6 +74,7 @@ def home(request, *args, **kwargs):
|
|
|
|
|
return render(request, 'index.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Listing Pages
|
|
|
|
|
@login_required
|
|
|
|
|
def my_projects(request, *args, **kwargs):
|
|
|
|
|
user = request.user
|
|
|
|
@ -91,7 +92,7 @@ def my_projects(request, *args, **kwargs):
|
|
|
|
|
'projects' : projects,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'projects.html', context)
|
|
|
|
|
return render(request, 'listing_pages/projects.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
@ -107,7 +108,7 @@ def my_tasks(request, *args, **kwargs):
|
|
|
|
|
'my_tasks' : my_tasks
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'tasks.html', context)
|
|
|
|
|
return render(request, 'listing_pages/tasks.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
@ -118,152 +119,129 @@ def customers(request, *args, **kwargs):
|
|
|
|
|
'customers' : customers,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'customers.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'listing_pages/customers.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def detailed_project(request, project_id):
|
|
|
|
|
project = get_object_or_404(Project, project_id=project_id)
|
|
|
|
|
epics = Epic.objects.filter(project=project)
|
|
|
|
|
|
|
|
|
|
selected_epic_id = request.GET.get('epic_id') # Get the selected epic_id from the query parameters
|
|
|
|
|
|
|
|
|
|
if selected_epic_id:
|
|
|
|
|
selected_epic = get_object_or_404(Epic, id=selected_epic_id)
|
|
|
|
|
related_tasks = Task.objects.filter(epic=selected_epic)
|
|
|
|
|
else:
|
|
|
|
|
selected_epic = None
|
|
|
|
|
related_tasks = []
|
|
|
|
|
def project_types(request):
|
|
|
|
|
projecttypes = ProjectType.objects.all().order_by('-id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'project': project,
|
|
|
|
|
'epics': epics,
|
|
|
|
|
'selected_epic': selected_epic, # Pass the selected epic to the template
|
|
|
|
|
'related_tasks': related_tasks, # Pass the related tasks to the template
|
|
|
|
|
'projecttypes' : projecttypes,
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'listing_pages/project-types.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'project-details.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def createtask_project(request, project_id):
|
|
|
|
|
project = get_object_or_404(Project, project_id=project_id)
|
|
|
|
|
epics_of_my_project = Epic.objects.filter(project=project)
|
|
|
|
|
staffs = StaffProfile.objects.all().order_by('-id')
|
|
|
|
|
context = {
|
|
|
|
|
def references(request):
|
|
|
|
|
references = Reference.objects.all().order_by('-id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'references' : references,
|
|
|
|
|
|
|
|
|
|
'project' : project,
|
|
|
|
|
'epics_of_my_project' : epics_of_my_project,
|
|
|
|
|
'staffs' : staffs,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'createtask-project.html', context)
|
|
|
|
|
return render(request, 'listing_pages/references.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def create_project(request):
|
|
|
|
|
staffs = StaffProfile.objects.all().order_by('-first_name')
|
|
|
|
|
project_types = ProjectType.objects.all()
|
|
|
|
|
customers = CustomerProfile.objects.all().order_by('-first_name')
|
|
|
|
|
context = {
|
|
|
|
|
'staffs' : staffs,
|
|
|
|
|
'project_types' : project_types,
|
|
|
|
|
'customers' : customers,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'create-project.html', context)
|
|
|
|
|
def tags(request):
|
|
|
|
|
tags = Tag.objects.all().order_by('-id')
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def create_epic(request, project_id):
|
|
|
|
|
project = get_object_or_404(Project, project_id=project_id)
|
|
|
|
|
context = {
|
|
|
|
|
'tags' : tags,
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'project' : project,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'create-epic.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def create_task(request):
|
|
|
|
|
context = {
|
|
|
|
|
return render(request, 'listing_pages/tags.html', context)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'create-task.html', context)
|
|
|
|
|
|
|
|
|
|
def daily_reports(request):
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def createtask_epic(request):
|
|
|
|
|
context = {
|
|
|
|
|
dailyreports = DailyReport.objects.all().order_by('-id')
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'createtask-epic.html', context)
|
|
|
|
|
context = {
|
|
|
|
|
'dailyreports' : dailyreports,
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def add_customer(request):
|
|
|
|
|
businesses = Business.objects.all().order_by('-id')
|
|
|
|
|
references = Reference.objects.all().order_by('-id')
|
|
|
|
|
context = {
|
|
|
|
|
'businesses' : businesses,
|
|
|
|
|
'references' :references
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add-customer.html', context)
|
|
|
|
|
return render(request, 'listing_pages/daily-reports.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def customerdetails(request, customer_id):
|
|
|
|
|
customer = get_object_or_404(CustomerProfile, customer_id=customer_id)
|
|
|
|
|
context = {
|
|
|
|
|
'customer' : customer,
|
|
|
|
|
def businesses(request):
|
|
|
|
|
businesses = Business.objects.all().order_by('-business_id')
|
|
|
|
|
context = {
|
|
|
|
|
'businesses' : businesses,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'customer-details.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'listing_pages/businesses.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def addbusiness(request):
|
|
|
|
|
def staffs(request):
|
|
|
|
|
staffs = StaffProfile.objects.all().order_by('-staff_id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
'staffs' : staffs,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add-business.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'listing_pages/staffs.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def businessdetails(request, business_id):
|
|
|
|
|
business = get_object_or_404(Business, business_id=business_id)
|
|
|
|
|
context = {
|
|
|
|
|
'business' : business,
|
|
|
|
|
def staff_positions(request):
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'business-details.html', context)
|
|
|
|
|
staffpositions = StaffPosition.objects.all().order_by('-id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
'staffpositions' : staffpositions,
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def businesses(request):
|
|
|
|
|
businesses = Business.objects.all().order_by('-business_id')
|
|
|
|
|
context = {
|
|
|
|
|
'businesses' : businesses,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'businesses.html', context)
|
|
|
|
|
return render(request, 'listing_pages/staff-positions.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Details pages
|
|
|
|
|
@login_required
|
|
|
|
|
def addstaff(request):
|
|
|
|
|
def detailed_project(request, project_id):
|
|
|
|
|
project = get_object_or_404(Project, project_id=project_id)
|
|
|
|
|
epics = Epic.objects.filter(project=project)
|
|
|
|
|
|
|
|
|
|
staffpositions = StaffPosition.objects.all().order_by('-id')
|
|
|
|
|
selected_epic_id = request.GET.get('epic_id') # Get the selected epic_id from the query parameters
|
|
|
|
|
|
|
|
|
|
if selected_epic_id:
|
|
|
|
|
selected_epic = get_object_or_404(Epic, id=selected_epic_id)
|
|
|
|
|
related_tasks = Task.objects.filter(epic=selected_epic)
|
|
|
|
|
else:
|
|
|
|
|
selected_epic = None
|
|
|
|
|
related_tasks = []
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'project': project,
|
|
|
|
|
'epics': epics,
|
|
|
|
|
'selected_epic': selected_epic, # Pass the selected epic to the template
|
|
|
|
|
'related_tasks': related_tasks, # Pass the related tasks to the template
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
'staffpositions' : staffpositions,
|
|
|
|
|
return render(request, 'details_pages/project-details.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def customerdetails(request, customer_id):
|
|
|
|
|
customer = get_object_or_404(CustomerProfile, customer_id=customer_id)
|
|
|
|
|
context = {
|
|
|
|
|
'customer' : customer,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add-staff.html', context)
|
|
|
|
|
return render(request, 'details_pages/customer-details.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def businessdetails(request, business_id):
|
|
|
|
|
business = get_object_or_404(Business, business_id=business_id)
|
|
|
|
|
context = {
|
|
|
|
|
'business' : business,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'details_pages/business-details.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def staffdetails( request, staff_id):
|
|
|
|
@ -272,97 +250,115 @@ def staffdetails( request, staff_id):
|
|
|
|
|
context = {
|
|
|
|
|
'staff' : staff,
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'staff-details.html', context)
|
|
|
|
|
return render(request, 'details_pages/staff-details.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def staff_positions(request):
|
|
|
|
|
|
|
|
|
|
staffpositions = StaffPosition.objects.all().order_by('-id')
|
|
|
|
|
def detailed_task(request, task_id):
|
|
|
|
|
task = get_object_or_404(Task, task_id=task_id)
|
|
|
|
|
points = Point.objects.filter(task=task).order_by('-id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
'staffpositions' : staffpositions,
|
|
|
|
|
|
|
|
|
|
'task': task,
|
|
|
|
|
'points' : points,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'staff-positions.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'details_pages/task-details.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Add Pages
|
|
|
|
|
@login_required
|
|
|
|
|
def staffs(request):
|
|
|
|
|
staffs = StaffProfile.objects.all().order_by('-staff_id')
|
|
|
|
|
def createtask_project(request, project_id):
|
|
|
|
|
project = get_object_or_404(Project, project_id=project_id)
|
|
|
|
|
epics_of_my_project = Epic.objects.filter(project=project)
|
|
|
|
|
staffs = StaffProfile.objects.all().order_by('-id')
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'project' : project,
|
|
|
|
|
'epics_of_my_project' : epics_of_my_project,
|
|
|
|
|
'staffs' : staffs,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'staffs.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'add_pages/createtask-project.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def detailed_task(request, task_id):
|
|
|
|
|
task = get_object_or_404(Task, task_id=task_id)
|
|
|
|
|
points = Point.objects.filter(task=task).order_by('-id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'task': task,
|
|
|
|
|
'points' : points,
|
|
|
|
|
def create_project(request):
|
|
|
|
|
staffs = StaffProfile.objects.all().order_by('-first_name')
|
|
|
|
|
project_types = ProjectType.objects.all()
|
|
|
|
|
customers = CustomerProfile.objects.all().order_by('-first_name')
|
|
|
|
|
context = {
|
|
|
|
|
'staffs' : staffs,
|
|
|
|
|
'project_types' : project_types,
|
|
|
|
|
'customers' : customers,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add_pages/create-project.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'task-details.html', context)
|
|
|
|
|
@login_required
|
|
|
|
|
def create_epic(request, project_id):
|
|
|
|
|
project = get_object_or_404(Project, project_id=project_id)
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'project' : project,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add_pages/create-epic.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def project_types(request):
|
|
|
|
|
projecttypes = ProjectType.objects.all().order_by('-id')
|
|
|
|
|
def create_task(request):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'projecttypes' : projecttypes,
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'project-types.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'add_pages/create-task.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def references(request):
|
|
|
|
|
references = Reference.objects.all().order_by('-id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'references' : references,
|
|
|
|
|
|
|
|
|
|
def createtask_epic(request):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'references.html', context)
|
|
|
|
|
return render(request, 'add_pages/createtask-epic.html', context)
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def add_customer(request):
|
|
|
|
|
businesses = Business.objects.all().order_by('-id')
|
|
|
|
|
references = Reference.objects.all().order_by('-id')
|
|
|
|
|
context = {
|
|
|
|
|
'businesses' : businesses,
|
|
|
|
|
'references' :references
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add_pages/add-customer.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def tags(request):
|
|
|
|
|
tags = Tag.objects.all().order_by('-id')
|
|
|
|
|
def addbusiness(request):
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'tags' : tags,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'tags.html', context)
|
|
|
|
|
return render(request, 'add_pages/add-business.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def daily_reports(request):
|
|
|
|
|
|
|
|
|
|
dailyreports = DailyReport.objects.all().order_by('-id')
|
|
|
|
|
@login_required
|
|
|
|
|
def addstaff(request):
|
|
|
|
|
|
|
|
|
|
staffpositions = StaffPosition.objects.all().order_by('-id')
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'dailyreports' : dailyreports,
|
|
|
|
|
|
|
|
|
|
'staffpositions' : staffpositions,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'daily-reports.html', context)
|
|
|
|
|
return render(request, 'add_pages/add-staff.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def add_daily_report(request):
|
|
|
|
@ -375,7 +371,7 @@ def add_daily_report(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add-daily-report.html', context)
|
|
|
|
|
return render(request, 'add_pages/add-daily-report.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -388,26 +384,26 @@ def add_note_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addnote-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addnote-modal.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def add_status_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addstatus-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addstatus-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def add_file_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addfile-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addfile-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def add_credentials_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addcredentials-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addcredentials-modal.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def add_point_modal(request, task_id):
|
|
|
|
@ -416,19 +412,19 @@ def add_point_modal(request, task_id):
|
|
|
|
|
'task' : task,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addpoint-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addpoint-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def add_time_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addtime-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addtime-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def delete_task_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'deletetask-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/deletetask-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def show_points_modal(request, task_id):
|
|
|
|
|
task = get_object_or_404(Task, task_id=task_id)
|
|
|
|
@ -438,55 +434,57 @@ def show_points_modal(request, task_id):
|
|
|
|
|
'points' : points,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'showpoints-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/showpoints-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def timeline_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'timeline-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/timeline-modal.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def update_status_modal(request, *, task_id):
|
|
|
|
|
task = get_object_or_404(Task, task_id=task_id)
|
|
|
|
|
|
|
|
|
|
if request.method == 'POST':
|
|
|
|
|
status = request.POST.get('status')
|
|
|
|
|
|
|
|
|
|
task.status = status
|
|
|
|
|
task.save()
|
|
|
|
|
|
|
|
|
|
# Reload the parent page using JavaScript
|
|
|
|
|
response = HttpResponse('<script>window.top.location.reload();</script>')
|
|
|
|
|
return response
|
|
|
|
|
|
|
|
|
|
task.save()
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'task' : task,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'update-status-modal.html', context)
|
|
|
|
|
|
|
|
|
|
return render(request, 'popup_modals/update-status-modal.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def add_projecttype_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addprojecttype-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addprojecttype-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def add_reference_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addreference-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addreference-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def add_tag_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addtag-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addtag-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def add_business_modal(request, *args, **kwargs):
|
|
|
|
|
context = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'addbusiness-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/addbusiness-modal.html', context)
|
|
|
|
|
|
|
|
|
|
def staff_position_modal(request):
|
|
|
|
|
|
|
|
|
@ -494,7 +492,7 @@ def staff_position_modal(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return render(request, 'add-staffposition-modal.html', context)
|
|
|
|
|
return render(request, 'popup_modals/add-staffposition-modal.html', context)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -637,7 +635,7 @@ def save_epic(request):
|
|
|
|
|
# Redirect to the detailed project page
|
|
|
|
|
redirect_url = reverse('detailed-project', args=[project.project_id])
|
|
|
|
|
return redirect(redirect_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def save_task(request):
|
|
|
|
@ -692,9 +690,11 @@ def save_task(request):
|
|
|
|
|
# Save the Task object to the database
|
|
|
|
|
task.save()
|
|
|
|
|
|
|
|
|
|
# Redirect to the detailed project page
|
|
|
|
|
redirect_url = reverse('detailed-project', args=[project.project_id])
|
|
|
|
|
return redirect(redirect_url)
|
|
|
|
|
task_id = task.id
|
|
|
|
|
|
|
|
|
|
# Redirect to the task detailed page
|
|
|
|
|
task_details_url = reverse('detailed-task', args=[task.task_id])
|
|
|
|
|
return HttpResponseRedirect(task_details_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -979,6 +979,9 @@ def save_point(request):
|
|
|
|
|
status='Not Completed'
|
|
|
|
|
)
|
|
|
|
|
point.save()
|
|
|
|
|
|
|
|
|
|
# Redirect back to the same page
|
|
|
|
|
return redirect(request.META.get('HTTP_REFERER', ''))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return render(request, 'addpoint-modal.html')
|
|
|
|
@ -986,7 +989,8 @@ def save_point(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def mark_point_working_on(request, point_id):
|
|
|
|
|
def mark_point_working_on(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()
|
|
|
|
@ -1001,12 +1005,17 @@ def mark_point_working_on(request, point_id):
|
|
|
|
|
status.save()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
task_id_str = task.task_id
|
|
|
|
|
|
|
|
|
|
return redirect(request, 'showpoints-modal.html')
|
|
|
|
|
# Redirect to the task detailed page
|
|
|
|
|
showpoints_url = reverse('showpoints', args=[task_id_str])
|
|
|
|
|
return HttpResponseRedirect(showpoints_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def mark_point_completed(request, point_id):
|
|
|
|
|
def mark_point_completed(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()
|
|
|
|
@ -1022,7 +1031,11 @@ def mark_point_completed(request, point_id):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return redirect(request, 'showpoints-modal.html')
|
|
|
|
|
task_id_str = task.task_id
|
|
|
|
|
|
|
|
|
|
# Redirect to the task detailed page
|
|
|
|
|
showpoints_url = reverse('showpoints', args=[task_id_str])
|
|
|
|
|
return HttpResponseRedirect(showpoints_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|