diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 051849d6..ca83b831 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/__pycache__/views.cpython-311.pyc index d54a0c71..3011f72c 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index 0cf2b9cd..c746c5fa 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -1739,6 +1739,36 @@ def delete_note_modal(request, note_id): return render(request, "delete_modals/delete-note-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_project_note_modal(request, note_id): note = get_object_or_404(Note, id=note_id) diff --git a/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc b/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc index fa089b97..40406abf 100644 Binary files a/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc and b/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/osinaweb/urls.py b/osinaweb/osinaweb/urls.py index 9a111e28..c675ad54 100644 --- a/osinaweb/osinaweb/urls.py +++ b/osinaweb/osinaweb/urls.py @@ -98,7 +98,11 @@ urlpatterns = [ path('deleteprojectmodal/', views.delete_project_modal, name='deleteprojectmodal'), path('deletetaskmodal/', views.delete_task_modal, name='deletetaskmodal'), path('deletenotemodal/', views.delete_note_modal, name='deletenotemodal'), - path('deleteprojectnotemodal/', views.delete_project_note_modal, name='deleteprojectnotemodal'), + path('deleteprojectnotemodal//', views.delete_project_note_modal, name='deleteprojectnotemodal'), + + path('deletepointmodal///', views.delete_point_modal, name='deletepointmodal'), + path('deletetaskpointmodal///', views.delete_task_point_modal, name='deletetaskpointmodal'), + #Save Urls path('save_note/', views.save_note, name='save_note'), diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index 1cf35dbe..694192fa 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -2311,6 +2311,11 @@ video { background-color: rgb(59 130 246 / var(--tw-bg-opacity)); } +.hover\:bg-red-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(239 68 68 / var(--tw-bg-opacity)); +} + .hover\:bg-transparent:hover { background-color: transparent; } @@ -2366,12 +2371,12 @@ video { } @media (min-width: 650px) { - .s\:mt-\[-63px\] { - margin-top: -63px; + .s\:mt-5 { + margin-top: 1.25rem; } - .s\:flex { - display: flex; + .s\:mt-\[-63px\] { + margin-top: -63px; } .s\:hidden { @@ -2485,6 +2490,11 @@ video { padding-top: 0.25rem; padding-bottom: 0.25rem; } + + .md\:text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; + } } @media (min-width: 960px) { diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index 456b5873..1103ed9f 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -75,6 +75,8 @@ document.addEventListener("DOMContentLoaded", function () { addButtonClickListener("deleteTaskButton", "400px", "140px"); addButtonClickListener("deleteNoteButton", "400px", "140px"); addButtonClickListener("deleteProjectNoteButton", "400px", "140px"); + addButtonClickListener("deletePointButton", "400px", "140px"); + diff --git a/osinaweb/templates/details_pages/business-details.html b/osinaweb/templates/details_pages/business-details.html index 32a80899..7f74779e 100644 --- a/osinaweb/templates/details_pages/business-details.html +++ b/osinaweb/templates/details_pages/business-details.html @@ -68,7 +68,7 @@ -