diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 8c3d15d7..a568af4d 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/models.cpython-311.pyc b/osinaweb/osinacore/__pycache__/models.cpython-311.pyc index fc8d043e..22004f53 100644 Binary files a/osinaweb/osinacore/__pycache__/models.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/models.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/__pycache__/views.cpython-311.pyc index e154959d..83467eec 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/migrations/__pycache__/0050_projectrequirement_added_by_projectrequirement_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0050_projectrequirement_added_by_projectrequirement_date.cpython-311.pyc new file mode 100644 index 00000000..eda3d4f0 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0050_projectrequirement_added_by_projectrequirement_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0051_alter_task_requirement.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0051_alter_task_requirement.cpython-311.pyc new file mode 100644 index 00000000..3c7c317b Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0051_alter_task_requirement.cpython-311.pyc differ diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index ce74eb87..f0e3f775 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -317,6 +317,15 @@ def createtask_project(request, project_id): return render(request, 'add_pages/createtask-project.html', context) +@login_required +def create_user_story_task(request): + + context = { + + } + return render(request, 'add_pages/create-user-story-task.html', context) + + @login_required def create_project(request): staffs = StaffProfile.objects.all().order_by('-id') diff --git a/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc b/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc index 46bce095..44568f53 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 b540de66..8ee611c5 100644 --- a/osinaweb/osinaweb/urls.py +++ b/osinaweb/osinaweb/urls.py @@ -42,6 +42,7 @@ urlpatterns = [ path('createepic//', views.create_epic, name='createepic'), path('createtask/', views.create_task, name='createtask'), path('createtask//', views.createtask_project, name='createtaskproject'), + path('createuserstorytask/', views.create_user_story_task, name='createuserstorytask'), path('createtaskepic/', views.createtask_epic, name='createtaskepic'), path('projecttypes/', views.project_types, name='projecttypes'), path('businesstypes/', views.business_types, name='businesstypes'), diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index c2c1cc6c..57417685 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -774,6 +774,10 @@ video { margin-left: 0px; } +.ml-4 { + margin-left: 1rem; +} + .ml-\[300px\] { margin-left: 300px; } @@ -866,6 +870,10 @@ video { height: 3.5rem; } +.h-5 { + height: 1.25rem; +} + .h-\[100px\] { height: 100px; } @@ -874,6 +882,10 @@ video { height: 10px; } +.h-\[1283px\] { + height: 1283px; +} + .h-\[13px\] { height: 13px; } @@ -930,18 +942,10 @@ video { height: 60px; } -.h-\[630px\] { - height: 630px; -} - .h-\[70px\] { height: 70px; } -.h-\[80px\] { - height: 80px; -} - .h-fit { height: -moz-fit-content; height: fit-content; @@ -963,6 +967,10 @@ video { width: 12rem; } +.w-5 { + width: 1.25rem; +} + .w-\[120px\] { width: 120px; } @@ -1051,10 +1059,6 @@ video { width: 80%; } -.w-\[80px\] { - width: 80px; -} - .w-\[90\%\] { width: 90%; } @@ -2317,6 +2321,11 @@ video { color: rgb(59 130 246 / var(--tw-text-opacity)); } +.hover\:text-gray-700:hover { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} + .hover\:text-green-700:hover { --tw-text-opacity: 1; color: rgb(21 128 61 / var(--tw-text-opacity)); diff --git a/osinaweb/static/js/add-project.js b/osinaweb/static/js/add-project.js new file mode 100644 index 00000000..5a42ce41 --- /dev/null +++ b/osinaweb/static/js/add-project.js @@ -0,0 +1,18 @@ +const addReqButton = document.getElementById("addReqButton"); +const addReqContainerTemplate = document.getElementById("addReqContainerTemplate"); +const addReqContainer = document.getElementById("addReqContainer"); + +addReqButton.addEventListener("click", function () { + // Clone the template and remove the "hidden" class + const newContainer = addReqContainerTemplate.cloneNode(true); + newContainer.classList.remove("hidden"); + + // Add an event listener to the new container's remove button + const removeReqButton = newContainer.querySelector("#removeReqButton"); + removeReqButton.addEventListener("click", function () { + // Remove the clicked container when the remove button is clicked + newContainer.remove(); + }); + + addReqContainer.appendChild(newContainer); +}); \ No newline at end of file diff --git a/osinaweb/static/js/upload-image-tag.js b/osinaweb/static/js/upload-image-tag.js new file mode 100644 index 00000000..9de3cc43 --- /dev/null +++ b/osinaweb/static/js/upload-image-tag.js @@ -0,0 +1,33 @@ +// WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN AND THE UPLOADED IMAGE WILL APPEAR IN THE USER PROFILE IMAGE CONTAINER + +const fileInput = document.getElementById('actual-btn'); +const fileNameSpan = document.getElementById('file-name'); +const imageContainer = document.getElementById('image-container'); + +fileInput.addEventListener('change', (event) => { + const selectedFiles = event.target.files; + if (selectedFiles.length > 0) { + const file = selectedFiles[0]; + const fileReader = new FileReader(); + + fileReader.onload = function () { + const imgElement = document.createElement('img'); + imgElement.src = fileReader.result; + imgElement.alt = 'Uploaded Image'; + imgElement.classList.add('w-full', 'h-full', 'rounded-full', 'object-cover'); + + // Clear any previous images and append the new one + imageContainer.innerHTML = ''; + imageContainer.appendChild(imgElement); + + // Update the text in the file input + fileNameSpan.textContent = file.name; + }; + + // Read the selected file as a data URL + fileReader.readAsDataURL(file); + } else { + fileNameSpan.textContent = 'Upload Profile Picture'; + imageContainer.innerHTML = ''; // Clear the container if no file is selected + } +}); diff --git a/osinaweb/static/js/upload-input-tag.js b/osinaweb/static/js/upload-input-tag.js new file mode 100644 index 00000000..f96fc744 --- /dev/null +++ b/osinaweb/static/js/upload-input-tag.js @@ -0,0 +1,26 @@ + +// WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN + +document.addEventListener('DOMContentLoaded', function() { + const fileInputs = document.querySelectorAll('.file-input'); + + fileInputs.forEach(fileInput => { + const fileNameSpan = fileInput.parentElement.querySelector('.file-name'); + const fileLabel = fileInput.parentElement.querySelector('.file-label'); + + // Event listener to the label "file-label", which triggers a click on the hidden file input "file-input" + fileLabel.addEventListener('click', () => { + fileInput.click(); + }); + + fileInput.addEventListener('change', (event) => { + const selectedFiles = event.target.files; + if (selectedFiles.length > 0) { + const fileNames = Array.from(selectedFiles).map(file => file.name).join(', '); + fileNameSpan.textContent = fileNames; + } else { + fileNameSpan.textContent = 'Upload Documents (PDF, docx)'; + } + }); + }); +}); diff --git a/osinaweb/templates/add_pages/add-business.html b/osinaweb/templates/add_pages/add-business.html index f9e30c09..9f83fc79 100644 --- a/osinaweb/templates/add_pages/add-business.html +++ b/osinaweb/templates/add_pages/add-business.html @@ -12,79 +12,91 @@
{% csrf_token %} - - -
-
- - Upload Business - Logo - +
+
+ + +
+ +
+ +
+
+ + Upload + Logo + +
+
-
- - - +
+ + +
- +
+ + +
+
+ + +
-
- - -
+ - +
+ + +
- - +
+ + +
- +
+ + +
- +
+ + +
-
- +
+ +
+
@@ -100,7 +112,11 @@ + + + + {% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/add_pages/add-customer.html b/osinaweb/templates/add_pages/add-customer.html index dd70a826..136919cd 100644 --- a/osinaweb/templates/add_pages/add-customer.html +++ b/osinaweb/templates/add_pages/add-customer.html @@ -9,46 +9,68 @@
{% csrf_token %} -
+
- +
+ + +
- +
+ + +
- +
+ + +
- +
+ + +
+ +
+ + +
- - - - - - +
+ + +
+ +
+ + +
+ +
+ + +
-
+
+ {% csrf_token %} - - -
-
- - Upload - Business - Logo - +
+
+ +
-
- - - +
+ +
+
+ + Upload + Logo + +
+
+
- -
- - -
+
+ + +
+
+ + +
+ +
+ + +
- - + + +
+ + +
- +
+ + +
- +
+ + +
- +
+ + +
-
- +
+ +
+
@@ -281,7 +318,11 @@
+ + + +
{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/add_pages/add-staff.html b/osinaweb/templates/add_pages/add-staff.html index 3f7b81ba..6cb15db6 100644 --- a/osinaweb/templates/add_pages/add-staff.html +++ b/osinaweb/templates/add_pages/add-staff.html @@ -9,91 +9,66 @@

Add Staff

-
{% csrf_token %} -
-
+
+
-
-
- - Upload - Profile Picture - +
+ +
+
+ + Upload + Picture + +
+
+ + +
- - - - - - +
+ + +
- +
+ + +
- +
+ + +
- - +
+ + +
+
+ + +
- - - +
+ + +
+ + + + +
{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/add_pages/create-epic.html b/osinaweb/templates/add_pages/create-epic.html index 61d23ffe..ade51e6e 100644 --- a/osinaweb/templates/add_pages/create-epic.html +++ b/osinaweb/templates/add_pages/create-epic.html @@ -7,26 +7,34 @@

Create Epic For {{project.name}}

- + {% csrf_token %} - +
+ + +
- + - - +
+ + +
- +
+ + +
diff --git a/osinaweb/templates/add_pages/create-project.html b/osinaweb/templates/add_pages/create-project.html index d0711824..20cb1dc1 100644 --- a/osinaweb/templates/add_pages/create-project.html +++ b/osinaweb/templates/add_pages/create-project.html @@ -8,104 +8,104 @@ Create Project - {% csrf_token %} - - - - - - - - - - - - - - -
-
- -
- - +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
- +
+ +
- + + + + +
+
@@ -140,6 +140,9 @@
+ + +
diff --git a/osinaweb/templates/add_pages/create-task.html b/osinaweb/templates/add_pages/create-task.html index d9f2df18..fce30955 100644 --- a/osinaweb/templates/add_pages/create-task.html +++ b/osinaweb/templates/add_pages/create-task.html @@ -10,43 +10,57 @@ Create Task -
- - - - - - - - - - - - +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
@@ -69,34 +83,21 @@ class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
-
-
- - Upload - Document(s) - - +
+ +
+
+ + Upload + Document(s) + +
- - -
+ + + +
{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/add_pages/create-user-story-task.html b/osinaweb/templates/add_pages/create-user-story-task.html new file mode 100644 index 00000000..3fcdfff1 --- /dev/null +++ b/osinaweb/templates/add_pages/create-user-story-task.html @@ -0,0 +1,135 @@ +{% extends "main.html" %} +{%load static%} +{% block content %} + + + +
+
+

+ Create Task +

+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ + Upload + Document(s) + +
+
+
+
+ +
+ +
+
+
+
+
+ + + + + + + + + +
+ +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/add_pages/createtask-epic.html b/osinaweb/templates/add_pages/createtask-epic.html index e871b3eb..e3cf8cd0 100644 --- a/osinaweb/templates/add_pages/createtask-epic.html +++ b/osinaweb/templates/add_pages/createtask-epic.html @@ -10,39 +10,56 @@ Create Task -
- - - - - - - - - - - +
+
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
@@ -65,34 +82,21 @@ class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
-
-
- - Upload - Document(s) - - +
+ +
+
+ + Upload + Document(s) + +
- - -
+ + + + + +
{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/add_pages/createtask-project.html b/osinaweb/templates/add_pages/createtask-project.html index 77475946..bd0f8ed8 100644 --- a/osinaweb/templates/add_pages/createtask-project.html +++ b/osinaweb/templates/add_pages/createtask-project.html @@ -10,45 +10,55 @@ Create Task For {{project.name}} - {% csrf_token %} - +
+ + +
- +
+ + +
- +
+ + +
- +
+ + +
- +
+ + +
@@ -71,34 +81,21 @@ class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
-
-
- - Upload - Document(s) - - +
+ +
+
+ + Upload + Document(s) + +
- - -
+ + + +
{% endblock content %} \ 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 d5c2a8fb..99901f7d 100644 --- a/osinaweb/templates/details_pages/business-details.html +++ b/osinaweb/templates/details_pages/business-details.html @@ -181,7 +181,7 @@ {% if latest_statuses_time_ago %} -