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