diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index df2bfa4f..b86864c9 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 6bf6fe3a..798637de 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 c30d778e..df1b7642 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -13,6 +13,7 @@ from django.http import JsonResponse from .models import Task, Epic + # Pages views def signin(request): @@ -282,10 +283,32 @@ def detailed_task(request, task_id): return render(request, 'task-details.html', context) +@login_required +def project_types(request): + + context = { + + + } + return render(request, 'project-types.html', context) +@login_required +def references(request): + + context = { + + + } + return render(request, 'references.html', context) + +@login_required +def tags(request): + context = { + } + return render(request, 'tags.html', context) @@ -361,6 +384,30 @@ def update_status_modal(request, *args, **kwargs): } return render(request, 'update-status-modal.html', context) +def add_projecttype_modal(request, *args, **kwargs): + context = { + + } + return render(request, 'addprojecttype-modal.html', context) + +def add_reference_modal(request, *args, **kwargs): + context = { + + } + return render(request, 'addreference-modal.html', context) + +def add_tag_modal(request, *args, **kwargs): + context = { + + } + return render(request, 'addtag-modal.html', context) + +def add_business_modal(request, *args, **kwargs): + context = { + + } + return render(request, 'addbusiness-modal.html', context) + @@ -577,10 +624,36 @@ def save_business(request): phone_number = phone_number, ) business.save() + + return render(request, 'add-business.html') + +@login_required +def save_business_modal(request): + if request.method == 'POST': + name = request.POST.get('name') + email= request.POST.get('email') + financial_number = request.POST.get('financial_number') + phone_number = request.POST.get('phone_number') + vat = request.POST.get('vat') + commercial_registration = request.POST.get('commercial_registration') + website = request.POST.get('website') + business_type = request.POST.get('business_type') + logo = request.POST.get('logo') + business = Business( + name = name, + email = email, + financial_number = financial_number, + vat = vat, + commercial_registration = commercial_registration, + website = website, + business_type = business_type, + logo = logo, + phone_number = phone_number, + ) + business.save() - - return render(request, 'add-business.html') + return render(request, 'addbusiness-modal.html') def save_customer(request): diff --git a/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc b/osinaweb/osinaweb/__pycache__/urls.cpython-311.pyc index 658ea88b..bd506fa8 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 96b76956..24619eb4 100644 --- a/osinaweb/osinaweb/urls.py +++ b/osinaweb/osinaweb/urls.py @@ -42,6 +42,9 @@ urlpatterns = [ path('createtask//', views.createtask_project, name='createtaskproject'), path('createtaskepic/', views.createtask_epic, name='createtaskepic'), path('taskdetails//', views.detailed_task, name='detailed-task'), + path('projecttypes/', views.project_types, name='projecttypes'), + path('references/', views.references, name='references'), + path('tags/', views.tags, name='tags'), path("fetch_related_tasks/", views.fetch_related_tasks, name="fetch_related_tasks"), @@ -57,6 +60,10 @@ urlpatterns = [ path('addtime/', views.add_time_modal, name='addtime'), path('timeline/', views.timeline_modal, name='timeline'), path('deletetask/', views.delete_task_modal, name='deletetask'), + path('addprojecttype/', views.add_projecttype_modal, name='addprojecttype'), + path('addreference/', views.add_reference_modal, name='addreference'), + path('addtag/', views.add_tag_modal, name='addtag'), + path('addbusinesscustomer/', views.add_business_modal, name='addbusinesscustomer'), # Save Urls path('save_note/', views.save_note, name='save_note'), @@ -64,6 +71,7 @@ urlpatterns = [ path('save_epic/', views.save_epic, name='save_epic'), path('save_task/', views.save_task, name='save_task'), path('save_business/', views.save_business, name='save_business'), + path('save_business_modal/', views.save_business_modal, name='save_business_modal'), path('save_customer/', views.save_customer, name='save_customer'), path('save_status/', views.save_status, name='save_status'), ] diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index 4bf46954..f95c28a4 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -840,6 +840,10 @@ video { height: 70px; } +.h-\[80px\] { + height: 80px; +} + .h-fit { height: -moz-fit-content; height: fit-content; @@ -993,8 +997,8 @@ video { width: 55%; } -.w-\[55px\] { - width: 55px; +.w-\[60\%\] { + width: 60%; } .w-\[60px\] { @@ -1009,6 +1013,10 @@ video { width: 80%; } +.w-\[80px\] { + width: 80px; +} + .w-\[95\%\] { width: 95%; } @@ -1489,6 +1497,11 @@ video { padding-right: 1.25rem; } +.px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} + .px-8 { padding-left: 2rem; padding-right: 2rem; diff --git a/osinaweb/static/images/default-user.png b/osinaweb/static/images/default-user.png new file mode 100644 index 00000000..d0220395 Binary files /dev/null and b/osinaweb/static/images/default-user.png differ diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index 266177e5..b94d7e95 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -1,5 +1,5 @@ document.addEventListener("DOMContentLoaded", function () { - + // Function to open a modal with dimensions function openModalWithDimensions(url, width, height) { const modalUrl = url; openModal(modalUrl); @@ -9,6 +9,7 @@ document.addEventListener("DOMContentLoaded", function () { iframe.style.width = width; } + // Function to open a modal function openModal(url) { const modalContainer = document.getElementById("popUpModal"); const iframe = document.getElementById("popupModalFrame"); @@ -19,6 +20,7 @@ document.addEventListener("DOMContentLoaded", function () { modalContainer.style.display = "flex"; } + // Function to close the modal function closeModal() { const modalContainer = document.getElementById("popUpModal"); const iframe = document.getElementById("popupModalFrame"); @@ -29,27 +31,32 @@ document.addEventListener("DOMContentLoaded", function () { modalContainer.style.display = "none"; } - function addButtonClickListener(buttonId, width, height) { - const button = document.getElementById(buttonId); - if (button) { + // Function to add a click listener to buttons by class name + function addButtonClickListener(className, width, height) { + const buttons = document.querySelectorAll(`.${className}`); + buttons.forEach(button => { button.addEventListener("click", () => { const modalUrl = button.getAttribute("data-modal-url"); openModalWithDimensions(modalUrl, width, height); }); - } + }); } - // Add button click listeners with dimensions + // Add button click listeners with dimensions for specific class names addButtonClickListener("addStatusButton", "450px", "200px"); addButtonClickListener("addNoteButton", "400px", "225px"); - addButtonClickListener("addFileButton", "500px", "320px"); - addButtonClickListener("addCredentialsButton", "500px", "300px"); addButtonClickListener("updateStatusButton", "fit-content", "160px"); addButtonClickListener("showPointsButton", "600px", "450px"); addButtonClickListener("addPointButton", "500px", "225px"); addButtonClickListener("timelineButton", "600px", "450px"); addButtonClickListener("addTimeButton", "300px", "270px"); addButtonClickListener("deleteTaskButton", "fit-content", "130px"); + addButtonClickListener("addFileButton", "500px", "320px"); + addButtonClickListener("addCredentialsButton", "500px", "300px"); + addButtonClickListener("addProjectTypeButton", "fit-content", "160px"); + addButtonClickListener("addReferenceButton", "fit-content", "160px"); + addButtonClickListener("addTagButton", "fit-content", "160px"); + addButtonClickListener("addBusinessButton", "550px", "500px"); const closeButton = document.getElementById("closeModalButton"); closeButton.addEventListener("click", () => { @@ -62,7 +69,4 @@ document.addEventListener("DOMContentLoaded", function () { closeModal(); } }); - - // TO RELOAD THE TOP WINDOW AFTER ADDING - // window.top.location.reload(); }); diff --git a/osinaweb/templates/add-business.html b/osinaweb/templates/add-business.html index 639bc57a..62534e46 100644 --- a/osinaweb/templates/add-business.html +++ b/osinaweb/templates/add-business.html @@ -100,7 +100,7 @@ - + diff --git a/osinaweb/templates/main.html b/osinaweb/templates/main.html index e61ace82..c97b33b8 100644 --- a/osinaweb/templates/main.html +++ b/osinaweb/templates/main.html @@ -31,15 +31,50 @@ Home -
-
- -

Sales

-
-
- + + -
@@ -100,7 +132,6 @@
-

My Projects

@@ -108,14 +139,12 @@
-

My Tasks

-

My Tickets

@@ -180,8 +209,7 @@ class="text-slate-700 font-semibold">Working on Osina

diff --git a/osinaweb/templates/project-details.html b/osinaweb/templates/project-details.html index dc881a8c..de7a028a 100644 --- a/osinaweb/templates/project-details.html +++ b/osinaweb/templates/project-details.html @@ -236,8 +236,7 @@ {%endfor%}
- +
@@ -280,8 +279,7 @@
-
diff --git a/osinaweb/templates/project-types.html b/osinaweb/templates/project-types.html new file mode 100644 index 00000000..5cdccdcb --- /dev/null +++ b/osinaweb/templates/project-types.html @@ -0,0 +1,252 @@ +{% extends "main.html" %} +{%load static%} +{% block content %} + +
+
+
+
+

Recent Note:

+

Send an Email to Salim.

+
+
+ + +
+
+ + + +
+
+ + +
+ +
+
+

Project Types

+ + +
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+

Project Type

+
+
+ Actions +
+
+ + +
+ +
+
+

Development

+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ + +
+

USERS ACTIVITY

+
+ + + +
+
+
+
+
+ user profile +
+
+

Nataly

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+
+
+ user profile +
+
+

Salim

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+
+
+ user profile +
+
+

Emile

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+ + + + + + + + + + + + + + +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/references.html b/osinaweb/templates/references.html new file mode 100644 index 00000000..a0cb7f87 --- /dev/null +++ b/osinaweb/templates/references.html @@ -0,0 +1,258 @@ +{% extends "main.html" %} +{%load static%} +{% block content %} + +
+
+
+
+

Recent Note:

+

Send an Email to Salim.

+
+
+ + +
+
+ + + +
+
+ + +
+ +
+
+

References

+ + +
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+

Reference

+
+
+

Date

+
+
+ Actions +
+
+ + +
+ +
+
+

Nat

+
+
+

28-2-2023

+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ + +
+

USERS ACTIVITY

+
+ + + +
+
+
+
+
+ user profile +
+
+

Nataly

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+
+
+ user profile +
+
+

Salim

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+
+
+ user profile +
+
+

Emile

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+ + + + + + + + + + + + + + +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/showpoints-modal.html b/osinaweb/templates/showpoints-modal.html index cbb31b20..1cc2a940 100644 --- a/osinaweb/templates/showpoints-modal.html +++ b/osinaweb/templates/showpoints-modal.html @@ -59,41 +59,6 @@ - - diff --git a/osinaweb/templates/tags.html b/osinaweb/templates/tags.html new file mode 100644 index 00000000..94bb8507 --- /dev/null +++ b/osinaweb/templates/tags.html @@ -0,0 +1,252 @@ +{% extends "main.html" %} +{%load static%} +{% block content %} + +
+
+
+
+

Recent Note:

+

Send an Email to Salim.

+
+
+ + +
+
+ + + +
+
+ + +
+ +
+
+

Tags

+ + +
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+

Tag Name

+
+
+ Actions +
+
+ + +
+ +
+
+

Web Development

+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ + +
+

USERS ACTIVITY

+
+ + + +
+
+
+
+
+ user profile +
+
+

Nataly

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+
+
+ user profile +
+
+

Salim

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+
+
+ user profile +
+
+

Emile

+

11:30 AM

+
+
+
+ +
+
+ + +
+

Closed - Create the Osina home page

+
+ + +
+ + +
+
+
+ + +
+
+
+ + + + + + + + + + + + + + +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/task-details.html b/osinaweb/templates/task-details.html index c3e501ba..eef1439c 100644 --- a/osinaweb/templates/task-details.html +++ b/osinaweb/templates/task-details.html @@ -56,14 +56,17 @@
-
-

Task Details - Start - with Osina main - page

-
- +
+

Task Name

+
+
+
+ +
@@ -110,7 +113,7 @@

Points:

-
+ +
+
+
+

Fix the LaylNhar Header Lorem ipsum dolor sit amet consectetur, + adipisicing elit. Mollitia, dolorum. Earum error atÍb dol

+
+
+ + +
+
+ +
+
+

Fix the LaylNhar Header

+
+
+ + +
+
+ +
+
+

Fix the LaylNhar Header Lorem ipsum dolor sit amet + consectetur + adipisicing elit. Autem sit esse, cupiditate voluptas, dolorem nisi sunt, molestiae eaque neque + cumque ex amet! Sequi aliquid quos ullam, sapiente iste impedit explicabo?

+
+
+ +
+
diff --git a/osinaweb/templates/user-details.html b/osinaweb/templates/user-details.html index 014f75bd..95d8dba8 100644 --- a/osinaweb/templates/user-details.html +++ b/osinaweb/templates/user-details.html @@ -58,16 +58,13 @@
-
-
-
- user-image -
-
-

Nataly

-
+
+
+
+

Nataly Ab

+
+
+
+

Position: Developer

+
+

First Name: Nataly

@@ -107,7 +108,18 @@

Email: nataly.aw@ositcom.net

- +
+

Mobile Number: 71196733

+
+
+

Active: True

+
+
+

Intern: False

+
diff --git a/osinaweb/templates/users.html b/osinaweb/templates/users.html index 09ff19ce..6397fed2 100644 --- a/osinaweb/templates/users.html +++ b/osinaweb/templates/users.html @@ -75,7 +75,7 @@ + Staff