diff --git a/.DS_Store b/.DS_Store index 64e88bb6..bb919ea2 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/osinaweb/.DS_Store b/osinaweb/.DS_Store index 8b9af095..ccb02c8a 100644 Binary files a/osinaweb/.DS_Store and b/osinaweb/.DS_Store differ diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index dcc9f2de..05c51d67 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/.DS_Store b/osinaweb/osinacore/.DS_Store index fec57147..44d53759 100644 Binary files a/osinaweb/osinacore/.DS_Store and b/osinaweb/osinacore/.DS_Store differ diff --git a/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc index 34705951..5b1a5f84 100644 Binary files a/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index 7bc0d61b..af612537 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/delete/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/delete/__pycache__/urls.cpython-310.pyc new file mode 100644 index 00000000..e3235997 Binary files /dev/null and b/osinaweb/osinacore/delete/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc new file mode 100644 index 00000000..091905d5 Binary files /dev/null and b/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/delete/urls.py b/osinaweb/osinacore/delete/urls.py new file mode 100644 index 00000000..a3cb02ca --- /dev/null +++ b/osinaweb/osinacore/delete/urls.py @@ -0,0 +1,18 @@ + +from django.urls import path +from . import views + + +urlpatterns = [ + + path('deletecustomermodal/', views.delete_customer_modal, name='deletecustomermodal'), + path('deletebusinessmodal/', views.delete_business_modal, name='deletebusinessmodal'), + path('deletestaffmodal/', views.delete_staff_modal, name='deletestaffmodal'), + path('deleteprojectmodal/', views.delete_project_modal, name='deleteprojectmodal'), + path('deleteprojectnotemodal//', views.delete_project_note_modal, name='deleteprojectnotemodal'), + path('deletetaskmodal/', views.delete_task_modal, name='deletetaskmodal'), + path('deletepointmodal///', views.delete_point_modal, name='deletepointmodal'), + path('deletetaskpointmodal///', views.delete_task_point_modal, name='deletetaskpointmodal'), + path('deletenotemodal/', views.delete_note_modal, name='deletenotemodal') + +] \ No newline at end of file diff --git a/osinaweb/osinacore/delete/views.py b/osinaweb/osinacore/delete/views.py new file mode 100644 index 00000000..be206dc1 --- /dev/null +++ b/osinaweb/osinacore/delete/views.py @@ -0,0 +1,141 @@ +from django.shortcuts import render, redirect, get_object_or_404 +from osinacore.models import * +from django.contrib.auth.decorators import login_required +from django.urls import reverse +from django.http import HttpResponseRedirect + + +@login_required +def delete_customer_modal(request, customer_id): + customer = get_object_or_404(CustomerProfile, id=customer_id) + + if request.method == 'POST': + customer.delete() + return redirect('customers') + + context = { + 'customer': customer, + } + return render(request, "delete_templates/delete-customer-modal.html", context) + + +@login_required +def delete_business_modal(request, business_id): + business = get_object_or_404(Business, id=business_id) + + if request.method == 'POST': + business.delete() + return redirect('businesses') + + context = { + 'business': business, + } + return render(request, "delete_templates/delete-business-modal.html", context) + + +@login_required +def delete_staff_modal(request, staff_id): + staff = get_object_or_404(StaffProfile, id=staff_id) + + if request.method == 'POST': + staff.delete() + return redirect('users') + + context = { + 'staff': staff, + } + return render(request, "delete_templates/delete-staff-modal.html", context) + + +@login_required +def delete_project_modal(request, project_id): + project = get_object_or_404(Project, id=project_id) + + if request.method == 'POST': + project.delete() + return redirect('my-projects') + + context = { + 'project': project, + } + return render(request, "delete_templates/delete-project-modal.html", context) + + +@login_required +def delete_project_note_modal(request, note_id): + note = get_object_or_404(Note, id=note_id) + + if request.method == 'POST': + project_id = note.project_id + project = get_object_or_404(Project, id=project_id) + note.delete() + + return redirect('detailed-project', project_id=project.project_id) + + context = { + 'note': note, + } + + return render(request, "delete_templates/delete-project-note-modal.html", context) + + + +@login_required +def delete_task_modal(request, task_id): + task = get_object_or_404(Task, id=task_id) + + if request.method == 'POST': + task.delete() + return redirect('my-tasks') + + context = { + 'task': task, + } + return render(request, "delete_templates/delete-task-modal.html", context) + + + +@login_required +def delete_point_modal(request, point_id, task_id): + task = get_object_or_404(Task, id=task_id) + point = get_object_or_404(Point, id=point_id) + + if request.method == 'POST': + point.delete() + + task_id_str = task.task_id + + showpoints_url = reverse('showpoints', args=[task_id_str]) + return HttpResponseRedirect(showpoints_url) + + + +@login_required +def delete_task_point_modal(request, point_id, task_id): + task = get_object_or_404(Task, id=task_id) + point = get_object_or_404(Point, id=point_id) + + if request.method == 'POST': + point.delete() + + task_id_str = task.task_id + + task_details_url = reverse('detailed-task', args=[task_id_str]) + return HttpResponseRedirect(task_details_url) + + + +@login_required +def delete_note_modal(request, note_id): + note = get_object_or_404(Note, id=note_id) + + if request.method == 'POST': + note.delete() + return redirect('my-notes') + + context = { + 'note': note, + } + + return render(request, "delete_templates/delete-note-modal.html", context) + diff --git a/osinaweb/osinacore/edit/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/edit/__pycache__/urls.cpython-310.pyc new file mode 100644 index 00000000..a0cfccb7 Binary files /dev/null and b/osinaweb/osinacore/edit/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc new file mode 100644 index 00000000..442e5dce Binary files /dev/null and b/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/edit/urls.py b/osinaweb/osinacore/edit/urls.py new file mode 100644 index 00000000..f2390bf2 --- /dev/null +++ b/osinaweb/osinacore/edit/urls.py @@ -0,0 +1,28 @@ +from django.urls import path +from . import views + + +urlpatterns = [ + + path('customer//', views.edit_customer, name='editcustomer'), + path('business//', views.edit_business, name='editbusiness'), + path('staff//', views.edit_staff, name='editstaff'), + path('project//', views.edit_project, name='editproject'), + path('task/', views.edit_task, name='edittask'), + path('task-status/', views.edit_task_status_modal, name='edittaskstatusmodal'), + path('epic/', views.edit_epic, name='editepic'), + path('projecttype/', views.edit_project_type, name='editprojecttype'), + path('staffposition/', views.edit_staff_position, name='editstaffposition'), + path('businesstype/', views.edit_business_type, name='editbusinesstype'), + path('reference/', views.edit_reference, name='editreference'), + path('tag/', views.edit_tag, name='edittag'), + + + #Mark Points + path('mark_point_working_on///', views.mark_point_working_on, name='mark_point_working_on'), + path('mark_point_working_on_task_page///', views.mark_point_working_on_task_page, name='mark_point_working_on_task_page'), + path('mark_point_completed///', views.mark_point_completed, name='mark_point_completed'), + path('mark_point_completed_task_page///', views.mark_point_completed_task_page, name='mark_point_completed_task_page'), + path('mark_point_paused///', views.mark_point_paused, name='mark_point_paused'), + +] \ No newline at end of file diff --git a/osinaweb/osinacore/edit/views.py b/osinaweb/osinacore/edit/views.py new file mode 100644 index 00000000..f898fc53 --- /dev/null +++ b/osinaweb/osinacore/edit/views.py @@ -0,0 +1,522 @@ +from osinacore.models import * +from django.shortcuts import render, redirect, get_object_or_404 +from django.contrib.auth.decorators import login_required +from django.http import HttpResponseRedirect +from django.urls import reverse +from django.http import HttpResponse + + +@login_required +def edit_customer(request, customer_id): + customer = get_object_or_404(CustomerProfile, customer_id=customer_id) + + #Utilities + references = Reference.objects.all() + businesses = Business.objects.all + customer_status = customer.status + customer_reference = customer.reference + customer_business = customer.business + + + if request.method == 'POST': + + customer.user.first_name = request.POST.get('first_name') + customer.user.last_name = request.POST.get('last_name') + customer.user.email = request.POST.get('email') + customer.user.save() + customer.mobile_number = request.POST.get('mobile_number') + customer.personal_website = request.POST.get('personal_website') + customer.status = request.POST.get('status') + + customer_reference = request.POST.get('reference') + reference = get_object_or_404(Reference, id=customer_reference) + customer.reference = reference + + if customer.business: + new_business = request.POST.get('business') + business = get_object_or_404(Business, id=new_business) + customer.business = business + + + + customer.save() + + + return redirect('customerdetails', customer_id=customer.customer_id) + + + context = { + + 'customer' : customer, + 'references' : references, + 'businesses' : businesses, + 'customer_status' : customer_status, + 'customer_reference' : customer_reference, + 'customer_business' : customer_business, + + } + return render(request, 'edit_templates/edit-customer.html', context) + + + + +@login_required +def edit_business(request, business_id): + business = get_object_or_404(Business, business_id=business_id) + business_types = BusinessType.objects.all().order_by('name') + current_business_type = None + if business.type: + current_business_type = business.type + + + if request.method == 'POST': + + business.name= request.POST.get('name') + business.financial_number = request.POST.get('financial_number') + business.commercial_registration = request.POST.get('commercial_registration') + business.vat = request.POST.get('vat') + business.phone_number = request.POST.get('phone_number') + business.website = request.POST.get('website') + + + business_type = request.POST.get('business_type') + type = get_object_or_404(BusinessType, id=business_type) + business.type = type + + new_logo = request.FILES.get('logo') + if new_logo: + business.logo = new_logo + + + business.save() + + + return redirect('businessdetails', business_id=business.business_id) + + context = { + 'business' : business, + 'business_types' : business_types, + 'current_business_type' : current_business_type, + + } + return render(request, 'edit_templates/edit-business.html', context) + + +@login_required +def edit_staff(request, staff_id): + staff = get_object_or_404(StaffProfile, staff_id=staff_id) + positions = StaffPosition.objects.all().order_by('name') + current_position = staff.staff_position + + + if request.method == 'POST': + + staff.user.first_name= request.POST.get('first_name') + staff.user.last_name = request.POST.get('last_name') + staff.user.email = request.POST.get('email') + staff.user.save() + + staff.mobile_number = request.POST.get('mobile_number') + staff.active = request.POST.get('active') + staff.intern = request.POST.get('intern') + + new_position_id = request.POST.get('staff_position') + new_position = get_object_or_404(StaffPosition, id=new_position_id) + staff.staff_position = new_position + + + new_image = request.FILES.get('image') + if new_image: + staff.image = new_image + + staff.active = request.POST.get('active') == 'on' + staff.intern = request.POST.get('intern') == 'on' + + + staff.save() + + + return redirect('userdetails', staff_id=staff.staff_id) + + context = { + 'staff' : staff, + 'positions' : positions, + 'current_position' : current_position, + + } + return render(request, 'edit_templates/edit-staff.html', context) + + + +@login_required +def edit_project(request, project_id): + project = get_object_or_404(Project, project_id=project_id) + + staffs = StaffProfile.objects.all().order_by('-id') + current_manager = project.manager + customers = CustomerProfile.objects.all().order_by('-id') + current_client = project.customer + types = ProjectType.objects.all().order_by('-id') + + + if request.method == 'POST': + + project.name = request.POST.get('name') + + new_customer_id = request.POST.get('customer') + customer = get_object_or_404(CustomerProfile, id=new_customer_id) + project.customer = customer + + new_manager_id = request.POST.get('manager') + manager = get_object_or_404(StaffProfile, id=new_manager_id) + project.manager = manager + + + members_ids = request.POST.getlist('members') + members_profiles = StaffProfile.objects.filter(id__in=members_ids) + project.members.set(members_profiles) + + + project.status = request.POST.get('status') + + + type_ids = request.POST.getlist('types') + types = ProjectType.objects.filter(id__in=type_ids) + project.project_type.set(type_ids) + + + project.details = request.POST.get('details') + project.start_date = request.POST.get('start_date') + project.end_date = request.POST.get('end_date') + + + project.save() + return redirect('detailed-project', project_id=project.project_id) + + + + context = { + + 'project' : project, + 'staffs' : staffs, + 'current_manager' : current_manager, + 'customers' : customers, + 'current_client' : current_client, + 'types' : types, + + + } + return render(request, 'edit_templates/edit-project.html', context) + + + +@login_required +def edit_task(request, task_id): + task = get_object_or_404(Task, task_id=task_id) + projects = Project.objects.all().order_by('-id') + staffs = StaffProfile.objects.all().order_by('-id') + + selected_project_id = request.POST.get('project', task.project.id) if request.method == 'POST' else task.project.id + epics_of_my_project = Epic.objects.filter(project_id=selected_project_id) + + if request.method == 'POST': + task.name = request.POST.get('name') + + project_id = request.POST.get('project') + project = get_object_or_404(Project, id=project_id) + task.project = project + + + task.extra = request.POST.get('extra') + + + epic_id = request.POST.get('epic') + epic = get_object_or_404(Epic, id=epic_id) + task.epic = epic + + task.requirement = request.POST.get('requirement') + task.status = request.POST.get('status') + + # Convert assigned_to ID to a StaffProfile instance + assigned_to_id = request.POST.get('assigned_to') + assigned_to = get_object_or_404(StaffProfile, id=assigned_to_id) + task.assigned_to = assigned_to + + task.description = request.POST.get('description') + task.start_date = request.POST.get('start_date') + task.end_date = request.POST.get('end_date') + + task.save() + return redirect('detailed-task', task_id=task.task_id) + + context = { + 'task': task, + 'projects': projects, + 'epics_of_my_project': epics_of_my_project, + 'staffs': staffs, + } + return render(request, 'edit_templates/edit-task.html', context) + + + + +def edit_task_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('') + return response + + context = { + 'task' : task, + } + + return render(request, 'edit_templates/edit-taskstatus-modal.html', context) + + + +@login_required +def edit_epic(request, *args, **kwargs): + + context = { + + } + return render(request, 'edit_templates/edit-epic.html', context) + + + +@login_required +def edit_project_type(request, projecttype_id): + + projecttype = get_object_or_404(ProjectType, id=projecttype_id) + + if request.method == 'POST': + projecttype.name = request.POST.get('name') + projecttype.save() + + return redirect('projecttypes') + + return render(request, 'edit_templates/edit-project-type.html', {'projecttype': projecttype}) + + +@login_required +def edit_staff_position(request): + + context = { + + + } + return render(request, 'edit_templates/edit-staff-position.html', context) + + + + +@login_required +def edit_business_type(request, businesstype_id): + + businesstype = get_object_or_404(BusinessType, id=businesstype_id) + + if request.method == 'POST': + businesstype.name = request.POST.get('name') + businesstype.save() + + return redirect('businesstypes') + + return render(request, 'edit_templates/edit-business-type.html', {'businesstype': businesstype}) + + +@login_required +def edit_reference(request, reference_id): + reference = get_object_or_404(Reference, id=reference_id) + + if request.method == 'POST': + reference.name = request.POST.get('name') + reference.date = request.POST.get('date') + reference.save() + + return redirect('references') + + return render(request, 'edit_templates/edit-reference.html', {'reference': reference}) + + + +@login_required +def edit_tag(request, tag_id): + tag = get_object_or_404(Tag, id=tag_id) + + if request.method == 'POST': + tag.name = request.POST.get('name') + tag.save() + + return redirect('tags') + + return render(request, 'edit_templates/edit-tag.html', {'tag': tag}) + + + + + + + + + + +#Mark points + +@login_required +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() + + point.save() + + activity = PointActivity( + point = point, + start_time = datetime.now(), + ) + activity.save() + + if PointActivity.objects.filter(point=point).count() == 1: + status_text = f'Started 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() + else: + status_text = f'Resumed 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() + + + + task_id_str = task.task_id + + showpoints_url = reverse('showpoints', args=[task_id_str]) + 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.save() + + activity = PointActivity( + point = point, + start_time = datetime.now(), + ) + activity.save() + + if PointActivity.objects.filter(point=point).count() == 1: + status_text = f'Started 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() + else: + status_text = f'Resumed 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 +def mark_point_paused(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 = 'Paused' + current_datetime = datetime.now() + + point.save() + + last_activity = PointActivity.objects.filter(point=point).last() + if last_activity: + last_activity.end_time = timezone.make_aware(current_datetime, timezone.get_current_timezone()) + last_activity.save() + + status_text = f'{point.text} - Paused' + 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 + + showpoints_url = reverse('showpoints', args=[task_id_str]) + return HttpResponseRedirect(showpoints_url) + + + +@login_required +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() + + point.save() + + # Update the end time of the last activity to the current time + last_activity = PointActivity.objects.filter(point=point).last() + if last_activity: + last_activity.end_time = timezone.make_aware(current_datetime, timezone.get_current_timezone()) + last_activity.save() + + + total_time_hours, total_time_minutes, total_time_seconds = point.total_activity_time() + + formatted_time = "" + if total_time_hours > 0: + formatted_time += f"{total_time_hours}{'hr' if total_time_hours == 1 else 'hrs'}" + if total_time_minutes > 0: + formatted_time += f" {total_time_minutes}{'min' if total_time_minutes == 1 else 'mins'}" + if total_time_seconds > 0: + formatted_time += f" {total_time_seconds}{'sec' if total_time_seconds == 1 else 'secs'}" + + status_text = f'{point.text} - Completed' + if formatted_time: + status_text += f' in {formatted_time}' + + 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 + showpoints_url = reverse('showpoints', args=[task_id_str]) + 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.save() + + + last_activity = PointActivity.objects.filter(point=point).last() + last_activity.end_time = datetime.now() + last_activity.save() + + + 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() + + return redirect('detailed-task', task_id=task.task_id) + + diff --git a/osinaweb/osinacore/templates/.DS_Store b/osinaweb/osinacore/templates/.DS_Store index 29ace2ca..2c3a5855 100644 Binary files a/osinaweb/osinacore/templates/.DS_Store and b/osinaweb/osinacore/templates/.DS_Store differ diff --git a/osinaweb/osinacore/templates/delete_modals/delete-business-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-business-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-business-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-business-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-customer-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-customer-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-note-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-note-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-note-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-note-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-project-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-project-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-project-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-project-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-project-note-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-project-note-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-staff-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-staff-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-task-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-task-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-task-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-task-modal.html diff --git a/osinaweb/osinacore/templates/details_pages/business-details.html b/osinaweb/osinacore/templates/details_templates/business-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/business-details.html rename to osinaweb/osinacore/templates/details_templates/business-details.html diff --git a/osinaweb/osinacore/templates/details_pages/customer-details.html b/osinaweb/osinacore/templates/details_templates/customer-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/customer-details.html rename to osinaweb/osinacore/templates/details_templates/customer-details.html diff --git a/osinaweb/osinacore/templates/details_pages/project-details.html b/osinaweb/osinacore/templates/details_templates/project-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/project-details.html rename to osinaweb/osinacore/templates/details_templates/project-details.html diff --git a/osinaweb/osinacore/templates/popup_modals/showpoints-modal.html b/osinaweb/osinacore/templates/details_templates/showpoints-modal.html similarity index 100% rename from osinaweb/osinacore/templates/popup_modals/showpoints-modal.html rename to osinaweb/osinacore/templates/details_templates/showpoints-modal.html diff --git a/osinaweb/osinacore/templates/details_pages/staff-details.html b/osinaweb/osinacore/templates/details_templates/staff-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/staff-details.html rename to osinaweb/osinacore/templates/details_templates/staff-details.html diff --git a/osinaweb/osinacore/templates/popup_modals/status-on-mobile-modal.html b/osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html similarity index 100% rename from osinaweb/osinacore/templates/popup_modals/status-on-mobile-modal.html rename to osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html diff --git a/osinaweb/osinacore/templates/details_pages/task-details.html b/osinaweb/osinacore/templates/details_templates/task-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/task-details.html rename to osinaweb/osinacore/templates/details_templates/task-details.html diff --git a/osinaweb/osinacore/templates/popup_modals/timeline-modal.html b/osinaweb/osinacore/templates/details_templates/timeline-modal.html similarity index 100% rename from osinaweb/osinacore/templates/popup_modals/timeline-modal.html rename to osinaweb/osinacore/templates/details_templates/timeline-modal.html diff --git a/osinaweb/osinacore/templates/popup_modals/.DS_Store b/osinaweb/osinacore/templates/edit_templates/.DS_Store similarity index 70% rename from osinaweb/osinacore/templates/popup_modals/.DS_Store rename to osinaweb/osinacore/templates/edit_templates/.DS_Store index fa066f82..02e90256 100644 Binary files a/osinaweb/osinacore/templates/popup_modals/.DS_Store and b/osinaweb/osinacore/templates/edit_templates/.DS_Store differ diff --git a/osinaweb/osinacore/templates/edit_pages/edit-business-type.html b/osinaweb/osinacore/templates/edit_templates/edit-business-type.html similarity index 100% rename from osinaweb/osinacore/templates/edit_pages/edit-business-type.html rename to osinaweb/osinacore/templates/edit_templates/edit-business-type.html diff --git a/osinaweb/osinacore/templates/edit_pages/edit-business.html b/osinaweb/osinacore/templates/edit_templates/edit-business.html similarity index 96% rename from osinaweb/osinacore/templates/edit_pages/edit-business.html rename to osinaweb/osinacore/templates/edit_templates/edit-business.html index 3a612989..146b883d 100644 --- a/osinaweb/osinacore/templates/edit_pages/edit-business.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-business.html @@ -92,14 +92,13 @@ class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"> {% if not business.type %} - {% endif %} - + {% else %} {% for type in business_types %} - {% endfor %} + {% endif %} diff --git a/osinaweb/osinacore/templates/edit_pages/edit-customer.html b/osinaweb/osinacore/templates/edit_templates/edit-customer.html similarity index 76% rename from osinaweb/osinacore/templates/edit_pages/edit-customer.html rename to osinaweb/osinacore/templates/edit_templates/edit-customer.html index 0e038588..dbf96c0a 100644 --- a/osinaweb/osinacore/templates/edit_pages/edit-customer.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-customer.html @@ -96,47 +96,14 @@ required> {% for business in businesses %} {% endfor %} {% endif %} - - - - -