From a944ac1e20f855d948823d0366471122430d81ab Mon Sep 17 00:00:00 2001 From: nataly Date: Fri, 21 Jun 2024 09:51:44 +0300 Subject: [PATCH] Add staff position. --- .../add/__pycache__/urls.cpython-312.pyc | Bin 1070 -> 1068 bytes .../add/__pycache__/views.cpython-312.pyc | Bin 12211 -> 12211 bytes .../add-payment-comment-modal.html | 2 +- .../add-payment-method-modal.html | 2 +- .../add_templates/add-payment-modal.html | 2 +- .../delete-payment-method-modal.html | 2 +- .../edit_templates/edit-payment-method.html | 2 +- .../edit_templates/edit-payment-modal.html | 2 +- .../update-order-status-modal.html | 2 +- .../delete/__pycache__/urls.cpython-312.pyc | Bin 1704 -> 1836 bytes .../delete/__pycache__/views.cpython-312.pyc | Bin 6009 -> 6262 bytes osinaweb/osinacore/delete/urls.py | 1 + osinaweb/osinacore/delete/views.py | 9 ++ .../edit/__pycache__/views.cpython-312.pyc | Bin 28721 -> 28254 bytes osinaweb/osinacore/edit/views.py | 39 +++----- .../add_templates/add-businesstype-modal.html | 2 +- .../add_templates/add-credentials-modal.html | 2 +- .../add_templates/add-department-modal.html | 2 +- .../add_templates/add-file-modal.html | 2 +- .../add_templates/add-jobposition-modal.html | 2 +- .../add_templates/add-note-modal.html | 2 +- .../add_templates/add-projecttype-modal.html | 2 +- .../add_templates/add-reference-modal.html | 2 +- .../templates/add_templates/add-staff.html | 19 ++-- .../add_templates/add-status-modal.html | 2 +- .../add_templates/add-tag-modal.html | 2 +- .../add_templates/add-time-modal.html | 2 +- .../add_templates/add-userstory-modal.html | 2 +- .../delete-business-modal.html | 2 +- .../delete-customer-modal.html | 2 +- .../delete_templates/delete-note-modal.html | 2 +- .../delete-payment-modal.html | 2 +- .../delete-project-modal.html | 2 +- .../delete-project-note-modal.html | 2 +- .../delete_templates/delete-staff-modal.html | 2 +- .../delete-staff-position-modal.html | 30 +++++++ .../delete_templates/delete-task-modal.html | 2 +- .../delete_templates/delete-ticket-modal.html | 2 +- .../details_templates/showpoints-modal.html | 2 +- .../details_templates/staff-details.html | 84 ++++++++++++++++++ .../status-on-mobile-modal.html | 2 +- .../details_templates/timeline-modal.html | 2 +- .../edit_templates/edit-business-type.html | 2 +- .../edit_templates/edit-department.html | 2 +- .../edit_templates/edit-job-position.html | 2 +- .../edit-project-status-modal.html | 2 +- .../edit_templates/edit-project-type.html | 2 +- .../edit_templates/edit-reference.html | 2 +- .../templates/edit_templates/edit-staff.html | 13 +-- .../templates/edit_templates/edit-tag.html | 2 +- .../edit_templates/edit-taskstatus-modal.html | 2 +- .../edit-ticket-status-modal.html | 2 +- osinaweb/static/dist/output.css | 4 + osinaweb/static/js/inputs/staff-positions.js | 15 ++++ osinaweb/static/js/pop-modals.js | 2 + 55 files changed, 211 insertions(+), 85 deletions(-) create mode 100644 osinaweb/osinacore/templates/delete_templates/delete-staff-position-modal.html create mode 100644 osinaweb/static/js/inputs/staff-positions.js diff --git a/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc b/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc index b72a1f728813a00df31d70f9a99d6a6eba764788..e540cc73b28d8a4108e637402f72419d61c36dbe 100644 GIT binary patch delta 48 zcmZ3-v4(^9G%qg~0}%A^mZr_z$XmTck++taarWeHW>?ma91N_SlP@#-af|cvGc|G-i31e@ E09~{UOaK4? diff --git a/osinaweb/billing/add/__pycache__/views.cpython-312.pyc b/osinaweb/billing/add/__pycache__/views.cpython-312.pyc index 00ad91ee14978257c2cc3850b0974a3eb226695c..99efe06c21cdccb5057cff104d5ac93aee0b4b23 100644 GIT binary patch delta 20 acmdlSzd4@!G%qg~0}#AXD&5GvLLUG`TLv`% delta 20 acmdlSzd4@!G%qg~0}ynZmTcr+p$`B;AqD0D diff --git a/osinaweb/billing/templates/add_templates/add-payment-comment-modal.html b/osinaweb/billing/templates/add_templates/add-payment-comment-modal.html index 0057e055..b0b83326 100644 --- a/osinaweb/billing/templates/add_templates/add-payment-comment-modal.html +++ b/osinaweb/billing/templates/add_templates/add-payment-comment-modal.html @@ -14,7 +14,7 @@ -
+ {% csrf_token %}

Add Comment

diff --git a/osinaweb/billing/templates/add_templates/add-payment-method-modal.html b/osinaweb/billing/templates/add_templates/add-payment-method-modal.html index 2ee4bc0f..9dbc037a 100644 --- a/osinaweb/billing/templates/add_templates/add-payment-method-modal.html +++ b/osinaweb/billing/templates/add_templates/add-payment-method-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Add Payment Method

diff --git a/osinaweb/billing/templates/add_templates/add-payment-modal.html b/osinaweb/billing/templates/add_templates/add-payment-modal.html index 15f4d90b..acf2e410 100644 --- a/osinaweb/billing/templates/add_templates/add-payment-modal.html +++ b/osinaweb/billing/templates/add_templates/add-payment-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Add Payment

diff --git a/osinaweb/billing/templates/delete_templates/delete-payment-method-modal.html b/osinaweb/billing/templates/delete_templates/delete-payment-method-modal.html index 93ef8a3f..821de70d 100644 --- a/osinaweb/billing/templates/delete_templates/delete-payment-method-modal.html +++ b/osinaweb/billing/templates/delete_templates/delete-payment-method-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/billing/templates/edit_templates/edit-payment-method.html b/osinaweb/billing/templates/edit_templates/edit-payment-method.html index 42520df2..1a6a3cec 100644 --- a/osinaweb/billing/templates/edit_templates/edit-payment-method.html +++ b/osinaweb/billing/templates/edit_templates/edit-payment-method.html @@ -8,7 +8,7 @@ Edit Payment Method - + {% csrf_token %}
diff --git a/osinaweb/billing/templates/edit_templates/edit-payment-modal.html b/osinaweb/billing/templates/edit_templates/edit-payment-modal.html index b34d5952..4b87a0a5 100644 --- a/osinaweb/billing/templates/edit_templates/edit-payment-modal.html +++ b/osinaweb/billing/templates/edit_templates/edit-payment-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Edit Payment

diff --git a/osinaweb/billing/templates/edit_templates/update-order-status-modal.html b/osinaweb/billing/templates/edit_templates/update-order-status-modal.html index 19e5b604..6f75878a 100644 --- a/osinaweb/billing/templates/edit_templates/update-order-status-modal.html +++ b/osinaweb/billing/templates/edit_templates/update-order-status-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Update Order Status

diff --git a/osinaweb/osinacore/delete/__pycache__/urls.cpython-312.pyc b/osinaweb/osinacore/delete/__pycache__/urls.cpython-312.pyc index 87156196ac76f8afaf9b06d404403ed86208a4ae..5aad379e0160b2cf629e2da360a93e880faf5f10 100644 GIT binary patch delta 231 zcmZ3%yM|BWG%qg~0}vP~mZmLcVPJR+;=q6al<}E?X`{v!Mgt~>RK^tPROT!>m6IL>SrNQ?7 x;;;c4U7C|>R}=}9X9VJ6`OO((Y>bK@nAjMD7(WOxFo}HxG9wv3GsBr+0{}>YOUwWO delta 99 zcmexn@KcZPG%qg~0}wc$OiS|@n8+u=$hA?On~|kbP*Z5L8{>9i4o$`)W}pJi$*iJ! wjNX$?M0J?`G$kjSihTg`w8f>kLV>c3KwQkZ*//', views.delete_task_point_modal, name='deletetaskpointmodal'), path('note/', views.delete_note_modal, name='deletenotemodal'), path('payment/', views.delete_payment_modal, name='deletepaymentmodal'), + path('staff-position/', views.delete_staff_position_modal, name='deletestaffpositionmodal'), ] \ No newline at end of file diff --git a/osinaweb/osinacore/delete/views.py b/osinaweb/osinacore/delete/views.py index 55f2adb0..b48f5035 100644 --- a/osinaweb/osinacore/delete/views.py +++ b/osinaweb/osinacore/delete/views.py @@ -164,3 +164,12 @@ def delete_payment_modal(request): return render(request, "delete_templates/delete-payment-modal.html", context) +@staff_login_required +def delete_staff_position_modal(request): + + context = { + + } + + return render(request, "delete_templates/delete-staff-position-modal.html", context) + diff --git a/osinaweb/osinacore/edit/__pycache__/views.cpython-312.pyc b/osinaweb/osinacore/edit/__pycache__/views.cpython-312.pyc index 42d34ace2b944e9c0471ace7a6075d39b0eb1d92..a85cab83b368d280b6e40b22da0461ee417afc5a 100644 GIT binary patch delta 3076 zcmb`Jd2ka|9LKXsHfhcRO=+73n|A22DAEd|R4IYBwv?;WR;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pHgv~ur_=|x~CJh5d?mw34U;87!3e)1`lMjTR}179Rou#9WtK9WhKMc1V$UOym=N6vEp1$qcH A)c^nh diff --git a/osinaweb/osinacore/edit/views.py b/osinaweb/osinacore/edit/views.py index b8321d68..698a62dc 100644 --- a/osinaweb/osinacore/edit/views.py +++ b/osinaweb/osinacore/edit/views.py @@ -107,56 +107,41 @@ def edit_business(request, business_id): @staff_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.first_name = request.POST.get('first_name') staff.user.last_name = request.POST.get('last_name') staff.user.email = request.POST.get('email') - if request.POST.get('active'): - active = True - else: - active = False + + active = True if request.POST.get('active') else False staff.user.is_active = active staff.user.save() staff.mobile_number = request.POST.get('mobile_number') - new_position_id = request.POST.get('staff_position') - new_position = get_object_or_404(StaffPosition, id=new_position_id) - staff.staff_position = new_position + staff.active = active - new_image = request.FILES.get('image') - if new_image: + if new_image: staff.image = new_image - - if request.POST.get('intern'): - intern = True - else: - intern = False + intern = True if request.POST.get('intern') else False staff.intern = intern - staff.save() - - return redirect('userdetails', staff_id=staff.staff_id) + return redirect('userdetails', staff_id=staff.staff_id) context = { - 'staff' : staff, - 'positions' : positions, - 'current_position' : current_position, - + 'staff': staff, } + + return render(request, 'edit_templates/edit-staff.html', context) + @staff_login_required def edit_project(request, project_id): project = get_object_or_404(Project, project_id=project_id) diff --git a/osinaweb/osinacore/templates/add_templates/add-businesstype-modal.html b/osinaweb/osinacore/templates/add_templates/add-businesstype-modal.html index 63c60221..78fe4046 100644 --- a/osinaweb/osinacore/templates/add_templates/add-businesstype-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-businesstype-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Add Business Type

diff --git a/osinaweb/osinacore/templates/add_templates/add-credentials-modal.html b/osinaweb/osinacore/templates/add_templates/add-credentials-modal.html index 0f4bff0f..6a9d8a52 100644 --- a/osinaweb/osinacore/templates/add_templates/add-credentials-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-credentials-modal.html @@ -14,7 +14,7 @@ -
+

Add Credential

diff --git a/osinaweb/osinacore/templates/add_templates/add-department-modal.html b/osinaweb/osinacore/templates/add_templates/add-department-modal.html index 645485f9..ce34e408 100644 --- a/osinaweb/osinacore/templates/add_templates/add-department-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-department-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Add Department

diff --git a/osinaweb/osinacore/templates/add_templates/add-file-modal.html b/osinaweb/osinacore/templates/add_templates/add-file-modal.html index ff6dd06a..f42f834e 100644 --- a/osinaweb/osinacore/templates/add_templates/add-file-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-file-modal.html @@ -14,7 +14,7 @@ -
+

Add File

diff --git a/osinaweb/osinacore/templates/add_templates/add-jobposition-modal.html b/osinaweb/osinacore/templates/add_templates/add-jobposition-modal.html index 1faa4f37..eb296733 100644 --- a/osinaweb/osinacore/templates/add_templates/add-jobposition-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-jobposition-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Add Job Position

diff --git a/osinaweb/osinacore/templates/add_templates/add-note-modal.html b/osinaweb/osinacore/templates/add_templates/add-note-modal.html index 2d1d9080..66dad5f7 100644 --- a/osinaweb/osinacore/templates/add_templates/add-note-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-note-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Add Note

diff --git a/osinaweb/osinacore/templates/add_templates/add-projecttype-modal.html b/osinaweb/osinacore/templates/add_templates/add-projecttype-modal.html index 436a7e2e..791a9385 100644 --- a/osinaweb/osinacore/templates/add_templates/add-projecttype-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-projecttype-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Add Project Type

diff --git a/osinaweb/osinacore/templates/add_templates/add-reference-modal.html b/osinaweb/osinacore/templates/add_templates/add-reference-modal.html index 0e96345e..35346474 100644 --- a/osinaweb/osinacore/templates/add_templates/add-reference-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-reference-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Add Reference

diff --git a/osinaweb/osinacore/templates/add_templates/add-staff.html b/osinaweb/osinacore/templates/add_templates/add-staff.html index ce2b2df7..00b5f5cf 100644 --- a/osinaweb/osinacore/templates/add_templates/add-staff.html +++ b/osinaweb/osinacore/templates/add_templates/add-staff.html @@ -68,17 +68,22 @@
-
-
+
+
- +
+ class="w-[30px] h-[30px] rounded-full bg-secondosiblue border border-secondosiblue flex justify-center items-center gap-1 text-white cursor-pointer hover:bg-transparent hover:text-secondosiblue duration-300 hidden removePositionOption"> @@ -87,7 +92,7 @@
-
+
+ + {% endblock content %} \ No newline at end of file diff --git a/osinaweb/osinacore/templates/add_templates/add-status-modal.html b/osinaweb/osinacore/templates/add_templates/add-status-modal.html index facfb06b..923229c4 100644 --- a/osinaweb/osinacore/templates/add_templates/add-status-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-status-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Add Status

diff --git a/osinaweb/osinacore/templates/add_templates/add-tag-modal.html b/osinaweb/osinacore/templates/add_templates/add-tag-modal.html index bcb0dee5..2569fd3e 100644 --- a/osinaweb/osinacore/templates/add_templates/add-tag-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-tag-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Add Tag

diff --git a/osinaweb/osinacore/templates/add_templates/add-time-modal.html b/osinaweb/osinacore/templates/add_templates/add-time-modal.html index 1e2375de..b96baf89 100644 --- a/osinaweb/osinacore/templates/add_templates/add-time-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-time-modal.html @@ -13,7 +13,7 @@ -
+

Add Timeline

diff --git a/osinaweb/osinacore/templates/add_templates/add-userstory-modal.html b/osinaweb/osinacore/templates/add_templates/add-userstory-modal.html index a18ac2ae..64f067f8 100644 --- a/osinaweb/osinacore/templates/add_templates/add-userstory-modal.html +++ b/osinaweb/osinacore/templates/add_templates/add-userstory-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Add User Story

diff --git a/osinaweb/osinacore/templates/delete_templates/delete-business-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-business-modal.html index 777a5b3c..6793e700 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-business-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-business-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html index 444a6a6e..95be7b49 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-note-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-note-modal.html index d2ab5521..9faa5906 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-note-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-note-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-payment-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-payment-modal.html index 8abd9bf4..98e494bd 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-payment-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-payment-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-project-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-project-modal.html index 38af5abf..f561fbf6 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-project-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-project-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html index 04d3859b..c9cb8228 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html index 136ddd4f..1f784523 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-staff-position-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-staff-position-modal.html new file mode 100644 index 00000000..f955fc82 --- /dev/null +++ b/osinaweb/osinacore/templates/delete_templates/delete-staff-position-modal.html @@ -0,0 +1,30 @@ +{%load static%} + + + + + + + + + + + + + + + + {% csrf_token %} + +
+

Are you sure you want to delete this staff position?

+ +
+ +
+
+ + + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/delete_templates/delete-task-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-task-modal.html index bb6e9d11..08582d03 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-task-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-task-modal.html @@ -13,7 +13,7 @@ -
+ {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/delete_templates/delete-ticket-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-ticket-modal.html index 08cc9203..0891feae 100644 --- a/osinaweb/osinacore/templates/delete_templates/delete-ticket-modal.html +++ b/osinaweb/osinacore/templates/delete_templates/delete-ticket-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/details_templates/showpoints-modal.html b/osinaweb/osinacore/templates/details_templates/showpoints-modal.html index 51a4c1fd..680b42b0 100644 --- a/osinaweb/osinacore/templates/details_templates/showpoints-modal.html +++ b/osinaweb/osinacore/templates/details_templates/showpoints-modal.html @@ -15,7 +15,7 @@ -
+

Points

diff --git a/osinaweb/osinacore/templates/details_templates/staff-details.html b/osinaweb/osinacore/templates/details_templates/staff-details.html index 3774e955..a28c3fc9 100644 --- a/osinaweb/osinacore/templates/details_templates/staff-details.html +++ b/osinaweb/osinacore/templates/details_templates/staff-details.html @@ -63,9 +63,93 @@

Intern: {{staff.intern}}

+ + +
+
+
+

Positions

+
+
+ +
+
+
+

Position: Junior Software Engineer

+

Date: 20-1-2020

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

Add New Position

+
+
+ + diff --git a/osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html b/osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html index 163e76c9..d6e9170a 100644 --- a/osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html +++ b/osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html @@ -13,7 +13,7 @@ -
+

You are only allowed to add a status on Desktop.

diff --git a/osinaweb/osinacore/templates/details_templates/timeline-modal.html b/osinaweb/osinacore/templates/details_templates/timeline-modal.html index 5552f777..480dc0ef 100644 --- a/osinaweb/osinacore/templates/details_templates/timeline-modal.html +++ b/osinaweb/osinacore/templates/details_templates/timeline-modal.html @@ -14,7 +14,7 @@ -
+

Timeline

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-business-type.html b/osinaweb/osinacore/templates/edit_templates/edit-business-type.html index 6c122cde..ca67cc7c 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-business-type.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-business-type.html @@ -8,7 +8,7 @@ Edit Business Type - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-department.html b/osinaweb/osinacore/templates/edit_templates/edit-department.html index bb601cf7..2cda6e7c 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-department.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-department.html @@ -8,7 +8,7 @@ Edit Department - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-job-position.html b/osinaweb/osinacore/templates/edit_templates/edit-job-position.html index 58365d00..144b8506 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-job-position.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-job-position.html @@ -8,7 +8,7 @@ Edit Job Position - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-project-status-modal.html b/osinaweb/osinacore/templates/edit_templates/edit-project-status-modal.html index 14b6e49f..495ae4f2 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-project-status-modal.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-project-status-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Update Project Status

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-project-type.html b/osinaweb/osinacore/templates/edit_templates/edit-project-type.html index b513c3c1..dbebb964 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-project-type.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-project-type.html @@ -8,7 +8,7 @@ Edit Project Type - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-reference.html b/osinaweb/osinacore/templates/edit_templates/edit-reference.html index 86dfa476..e3fffb2b 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-reference.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-reference.html @@ -8,7 +8,7 @@ Edit Reference - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-staff.html b/osinaweb/osinacore/templates/edit_templates/edit-staff.html index 1316e513..8a78138e 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-staff.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-staff.html @@ -22,7 +22,7 @@
@@ -67,17 +67,6 @@ class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
-
- - -
- -

Active

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-tag.html b/osinaweb/osinacore/templates/edit_templates/edit-tag.html index f177b44c..74cc17e4 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-tag.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-tag.html @@ -8,7 +8,7 @@ Edit Tag - + {% csrf_token %}
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-taskstatus-modal.html b/osinaweb/osinacore/templates/edit_templates/edit-taskstatus-modal.html index e27a4ac1..e1d756e7 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-taskstatus-modal.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-taskstatus-modal.html @@ -13,7 +13,7 @@ - + {% csrf_token %}

Update Status

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-ticket-status-modal.html b/osinaweb/osinacore/templates/edit_templates/edit-ticket-status-modal.html index e109ff32..aadd2c3e 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-ticket-status-modal.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-ticket-status-modal.html @@ -14,7 +14,7 @@ - + {% csrf_token %}

Update Ticket Status

diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index e6d6c33f..d7b33055 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -3736,6 +3736,10 @@ video { color: rgb(255 255 255 / var(--tw-text-opacity)); } +.hover\:underline:hover { + text-decoration-line: underline; +} + .focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; diff --git a/osinaweb/static/js/inputs/staff-positions.js b/osinaweb/static/js/inputs/staff-positions.js new file mode 100644 index 00000000..53e06740 --- /dev/null +++ b/osinaweb/static/js/inputs/staff-positions.js @@ -0,0 +1,15 @@ +document.getElementById('addNewPosition').addEventListener('click', function () { + const container = document.getElementById('positionsContainer'); + const initialPositionContainer = document.querySelector('.initialPositionContainer'); + + const newPositionContainer = initialPositionContainer.cloneNode(true); + newPositionContainer.classList.remove('hidden'); + + const removeButton = newPositionContainer.querySelector('.removePositionOption'); + removeButton.classList.remove('hidden'); + removeButton.addEventListener('click', function() { + newPositionContainer.remove(); + }); + + container.appendChild(newPositionContainer); +}); \ No newline at end of file diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index 22d26c06..140c4875 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -100,6 +100,8 @@ function initializeModalButtons() { addButtonClickListener("deleteTicketButton", "400px", "140px"); addButtonClickListener("deletePaymentButton", "400px", "140px"); addButtonClickListener("deletePaymentMethodButton", "400px", "140px"); + addButtonClickListener("delete", "400px", "140px"); + // KNOWLEDGE BASE