diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 3729612a..1ec15211 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/input.css b/osinaweb/input.css index 07af5fc2..f3ffb053 100644 --- a/osinaweb/input.css +++ b/osinaweb/input.css @@ -2,6 +2,7 @@ @tailwind components; @tailwind utilities; + ::-webkit-scrollbar { width: 5px; /* Width of the entire scrollbar */ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/__pycache__/views.cpython-311.pyc index a0536ed5..e154959d 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 4bd6f9b2..23a8b08d 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -109,6 +109,18 @@ def my_tasks(request, *args, **kwargs): return render(request, 'listing_pages/tasks.html', context) +@login_required +def my_notes(request): + + my_notes = Note.objects.filter(user=request.user).order_by('-id') + + context = { + 'my_notes': my_notes, + } + + return render(request, 'listing_pages/notes.html', context) + + @login_required def customers(request, *args, **kwargs): customers = CustomerProfile.objects.all().order_by('-customer_id') @@ -157,12 +169,12 @@ def tags(request): context = { 'tags' : tags, - - } + return render(request, 'listing_pages/tags.html', context) + def daily_reports(request): dailyreports = DailyReport.objects.all().order_by('-id') @@ -412,6 +424,13 @@ def add_note_modal(request, *args, **kwargs): return render(request, 'popup_modals/addnote-modal.html', context) +def add_project_note_modal(request, *args, **kwargs): + context = { + + } + return render(request, 'popup_modals/add-project-note-modal.html', context) + + def add_status_modal(request, *args, **kwargs): context = { @@ -1648,6 +1667,21 @@ def delete_customer_modal(request, customer_id): return render(request, "delete_modals/delete-customer-modal.html", context) +@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_modals/delete-note-modal.html", context) + + @login_required def delete_business_modal(request, business_id): business = get_object_or_404(Business, id=business_id) diff --git a/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc b/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc index b63d8b49..46bce095 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 f3c06861..80961565 100644 --- a/osinaweb/osinaweb/urls.py +++ b/osinaweb/osinaweb/urls.py @@ -28,6 +28,7 @@ urlpatterns = [ path('', login_required(views.home), name='home'), path('my-projects/', login_required(views.my_projects), name='my-projects'), path('my-tasks/', login_required(views.my_tasks), name='my-tasks'), + path('my-notes/', login_required(views.my_notes), name='my-notes'), path('customers/', views.customers, name='customers'), path('addcustomer/', views.add_customer, name='addcustomer'), path('add-business/', views.addbusiness, name='addbusiness'), @@ -70,6 +71,7 @@ urlpatterns = [ #Modals urls path('add-status/', views.add_status_modal, name='addstatus'), path('add-note/', views.add_note_modal, name='addnote'), + path('add-project-note/', views.add_project_note_modal, name='addprojectnote'), path('add-file/', views.add_file_modal, name='addfile'), path('add-user-story/', views.add_user_story_modal, name='adduserstory'), path('add-credentials/', views.add_credentials_modal, name='addcredentials'), @@ -94,6 +96,7 @@ urlpatterns = [ path('deletestaffmodal/', views.delete_staff_modal, name='deletestaffmodal'), path('deleteprojectmodal/', views.delete_project_modal, name='deleteprojectmodal'), path('deletetaskmodal/', views.delete_task_modal, name='deletetaskmodal'), + path('deletenotemodal/', views.delete_note_modal, name='deletenotemodal'), #Save Urls path('save_note/', views.save_note, name='save_note'), diff --git a/osinaweb/static/dist/.DS_Store b/osinaweb/static/dist/.DS_Store new file mode 100644 index 00000000..0298cc98 Binary files /dev/null and b/osinaweb/static/dist/.DS_Store differ diff --git a/osinaweb/static/dist/fonts/.DS_Store b/osinaweb/static/dist/fonts/.DS_Store new file mode 100644 index 00000000..f53b6a50 Binary files /dev/null and b/osinaweb/static/dist/fonts/.DS_Store differ diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index 22898fbf..136ea63c 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -693,6 +693,10 @@ video { right: 0px; } +.right-1 { + right: 0.25rem; +} + .right-10 { right: 2.5rem; } @@ -721,6 +725,10 @@ video { top: 2.5rem; } +.top-2 { + top: 0.5rem; +} + .top-3 { top: 0.75rem; } @@ -930,10 +938,6 @@ video { height: 70px; } -.h-\[800px\] { - height: 800px; -} - .h-\[80px\] { height: 80px; } @@ -959,6 +963,10 @@ video { width: 12rem; } +.w-\[100px\] { + width: 100px; +} + .w-\[120px\] { width: 120px; } @@ -1278,6 +1286,10 @@ video { white-space: nowrap; } +.whitespace-pre-wrap { + white-space: pre-wrap; +} + .rounded-full { border-radius: 9999px; } @@ -1300,6 +1312,11 @@ video { border-end-end-radius: 0.375rem; } +.rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; +} + .rounded-t-md { border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; @@ -1447,6 +1464,10 @@ video { border-color: rgb(234 179 8 / var(--tw-border-opacity)); } +.border-opacity-30 { + --tw-border-opacity: 0.3; +} + .bg-black { --tw-bg-opacity: 1; background-color: rgb(0 0 0 / var(--tw-bg-opacity)); @@ -2266,6 +2287,12 @@ video { } } +.hover\:scale-105:hover { + --tw-scale-x: 1.05; + --tw-scale-y: 1.05; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .hover\:bg-blue-500:hover { --tw-bg-opacity: 1; background-color: rgb(59 130 246 / var(--tw-bg-opacity)); @@ -2366,6 +2393,10 @@ video { width: fit-content; } + .s\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + .s\:flex-row { flex-direction: row; } @@ -2420,6 +2451,10 @@ video { width: fit-content; } + .md\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + .md\:flex-row { flex-direction: row; } @@ -2448,6 +2483,10 @@ video { width: fit-content; } + .l\:max-w-xl { + max-width: 36rem; + } + .l\:flex-row { flex-direction: row; } @@ -2523,6 +2562,10 @@ video { width: fit-content; } + .xl\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + .xl\:flex-row { flex-direction: row; } diff --git a/osinaweb/static/js/notes-pop-modal.js b/osinaweb/static/js/notes-pop-modal.js new file mode 100644 index 00000000..f7e1a3ec --- /dev/null +++ b/osinaweb/static/js/notes-pop-modal.js @@ -0,0 +1,22 @@ + +var modal = document.getElementById("notesModal"); +var modalContent = document.getElementById("noteContent"); + +function showModal(text, color) { + modalContent.innerHTML = text; + modalContent.style.backgroundColor = color; + + modal.style.display = "flex"; +} + +function closeModal() { + modal.style.display = "none"; +} + +// Close the modal when clicking outside the container +window.onclick = function (event) { + if (event.target == modal) { + modal.style.display = "none"; + } +} + diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index d69355c9..020c4e55 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -45,6 +45,7 @@ document.addEventListener("DOMContentLoaded", function () { // Add button click listeners with dimensions for specific class names addButtonClickListener("addStatusButton", "450px", "200px"); addButtonClickListener("addNoteButton", "400px", "225px"); + addButtonClickListener("addProjectNoteButton", "400px", "225px"); addButtonClickListener("updateStatusButton", "fit-content", "160px"); addButtonClickListener("showPointsButton", "600px", "450px"); addButtonClickListener("addPointButton", "500px", "225px"); @@ -62,7 +63,7 @@ document.addEventListener("DOMContentLoaded", function () { addButtonClickListener("usersActivityIcon", "400px", "600px"); addButtonClickListener("addStatusButtonMobile", "500px", "80px"); addButtonClickListener("userRecentActivitiesButton", "400px", "600px"); - addButtonClickListener("addUserStoryButton", "400px", "180px"); + addButtonClickListener("addUserStoryButton", "400px", "160px"); @@ -72,9 +73,8 @@ document.addEventListener("DOMContentLoaded", function () { addButtonClickListener("deleteStaffButton", "400px", "140px"); addButtonClickListener("deleteProjectButton", "400px", "140px"); addButtonClickListener("deleteTaskButton", "400px", "140px"); - - - + addButtonClickListener("deleteNoteButton", "400px", "140px"); + diff --git a/osinaweb/templates/delete_modals/delete-note-modal.html b/osinaweb/templates/delete_modals/delete-note-modal.html new file mode 100644 index 00000000..93ca884e --- /dev/null +++ b/osinaweb/templates/delete_modals/delete-note-modal.html @@ -0,0 +1,30 @@ +{%load static%} + + + + + + + + + + + + + + +
+ {% csrf_token %} + +
+

Are you sure you want to delete this note?

+ +
+ +
+
+
+ + + \ No newline at end of file diff --git a/osinaweb/templates/details_pages/business-details.html b/osinaweb/templates/details_pages/business-details.html index b84e7ddf..d5c2a8fb 100644 --- a/osinaweb/templates/details_pages/business-details.html +++ b/osinaweb/templates/details_pages/business-details.html @@ -9,6 +9,26 @@ Users + + + +
@@ -17,15 +37,13 @@

Recent Note:

-
- +
-

{{recent_note.text}}

+

{{recent_note.text}}

@@ -43,25 +61,34 @@
- +