From 44aaae49f502bd3269896f75db071e2ddbf3489d Mon Sep 17 00:00:00 2001 From: emile Date: Wed, 20 Mar 2024 20:37:03 +0200 Subject: [PATCH] Files adjuctments done --- .DS_Store | Bin 6148 -> 6148 bytes osinaweb/.DS_Store | Bin 8196 -> 8196 bytes osinaweb/db.sqlite3 | Bin 909312 -> 909312 bytes osinaweb/osinacore/.DS_Store | Bin 10244 -> 10244 bytes .../__pycache__/urls.cpython-310.pyc | Bin 5738 -> 3260 bytes .../__pycache__/views.cpython-310.pyc | Bin 22440 -> 10537 bytes .../delete/__pycache__/urls.cpython-310.pyc | Bin 0 -> 1166 bytes .../delete/__pycache__/views.cpython-310.pyc | Bin 0 -> 2928 bytes osinaweb/osinacore/delete/urls.py | 18 + osinaweb/osinacore/delete/views.py | 141 +++ .../edit/__pycache__/urls.cpython-310.pyc | Bin 0 -> 1655 bytes .../edit/__pycache__/views.cpython-310.pyc | Bin 0 -> 10156 bytes osinaweb/osinacore/edit/urls.py | 28 + osinaweb/osinacore/edit/views.py | 522 ++++++++++ osinaweb/osinacore/templates/.DS_Store | Bin 10244 -> 10244 bytes .../delete-business-modal.html | 0 .../delete-customer-modal.html | 0 .../delete-note-modal.html | 0 .../delete-project-modal.html | 0 .../delete-project-note-modal.html | 0 .../delete-staff-modal.html | 0 .../delete-task-modal.html | 0 .../business-details.html | 0 .../customer-details.html | 0 .../project-details.html | 0 .../showpoints-modal.html | 0 .../staff-details.html | 0 .../status-on-mobile-modal.html | 0 .../task-details.html | 0 .../timeline-modal.html | 0 .../.DS_Store | Bin 6148 -> 6148 bytes .../edit-business-type.html | 0 .../edit-business.html | 7 +- .../edit-customer.html | 35 +- .../edit-epic.html | 0 .../edit-project-type.html | 0 .../edit-project.html | 0 .../edit-reference.html | 0 .../edit-staff-position.html | 0 .../edit-staff.html | 0 .../edit-tag.html | 0 .../edit-task.html | 0 .../edit-taskstatus-modal.html} | 0 osinaweb/osinacore/templates/index.html | 4 +- .../templates/listing_pages/tasks.html | 4 +- osinaweb/osinacore/urls.py | 84 +- osinaweb/osinacore/views.py | 938 +++--------------- 47 files changed, 864 insertions(+), 917 deletions(-) create mode 100644 osinaweb/osinacore/delete/__pycache__/urls.cpython-310.pyc create mode 100644 osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc create mode 100644 osinaweb/osinacore/delete/urls.py create mode 100644 osinaweb/osinacore/delete/views.py create mode 100644 osinaweb/osinacore/edit/__pycache__/urls.cpython-310.pyc create mode 100644 osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc create mode 100644 osinaweb/osinacore/edit/urls.py create mode 100644 osinaweb/osinacore/edit/views.py rename osinaweb/osinacore/templates/{delete_modals => delete_templates}/delete-business-modal.html (100%) rename osinaweb/osinacore/templates/{delete_modals => delete_templates}/delete-customer-modal.html (100%) rename osinaweb/osinacore/templates/{delete_modals => delete_templates}/delete-note-modal.html (100%) rename osinaweb/osinacore/templates/{delete_modals => delete_templates}/delete-project-modal.html (100%) rename osinaweb/osinacore/templates/{delete_modals => delete_templates}/delete-project-note-modal.html (100%) rename osinaweb/osinacore/templates/{delete_modals => delete_templates}/delete-staff-modal.html (100%) rename osinaweb/osinacore/templates/{delete_modals => delete_templates}/delete-task-modal.html (100%) rename osinaweb/osinacore/templates/{details_pages => details_templates}/business-details.html (100%) rename osinaweb/osinacore/templates/{details_pages => details_templates}/customer-details.html (100%) rename osinaweb/osinacore/templates/{details_pages => details_templates}/project-details.html (100%) rename osinaweb/osinacore/templates/{popup_modals => details_templates}/showpoints-modal.html (100%) rename osinaweb/osinacore/templates/{details_pages => details_templates}/staff-details.html (100%) rename osinaweb/osinacore/templates/{popup_modals => details_templates}/status-on-mobile-modal.html (100%) rename osinaweb/osinacore/templates/{details_pages => details_templates}/task-details.html (100%) rename osinaweb/osinacore/templates/{popup_modals => details_templates}/timeline-modal.html (100%) rename osinaweb/osinacore/templates/{popup_modals => edit_templates}/.DS_Store (70%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-business-type.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-business.html (96%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-customer.html (76%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-epic.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-project-type.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-project.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-reference.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-staff-position.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-staff.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-tag.html (100%) rename osinaweb/osinacore/templates/{edit_pages => edit_templates}/edit-task.html (100%) rename osinaweb/osinacore/templates/{popup_modals/update-status-modal.html => edit_templates/edit-taskstatus-modal.html} (100%) diff --git a/.DS_Store b/.DS_Store index 64e88bb626a1668e5d7374ff6661a663308c8f80..bb919ea2f3e8101c5b4b9c542fd144924d2b4ee1 100644 GIT binary patch delta 20 bcmZoMXffE}$;xhMsiR9{oQb)ni(s1($Asb!*M}P)8 delta 20 bcmZp1XmQwZP>9{cQb)ni%xLooAsb!*N0kOU diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index dcc9f2de5d24efa86c3292176d83e1d5982597cc..05c51d67a994fe8a28b8148be7cc45e52755ec22 100644 GIT binary patch delta 1786 zcmah}Yiv|S6uxukKK5?+-m`2ieeSDa10imE_tkByq%A0xnwAPggN@KGZEgD6QX2ap zkyZ?i8WF8@1eDY!5MM#1G^4~q(HIK?fr$Ljf+Z>x1iKJKP(q#E0yP0+PG;ujp6@$n z&NpYKb2!*J9Nd(OuD_nP0A2sI+~h`%fd+RgLL)uDW^6*;1J7k{Y{KQdvq$cGm*<@W z@Ab7J*DPF&TH2aJjTKEAZ@}5X=qexwm#D>zTTL^e8~Hiwi#XYdP^xoT)tVMZI9x}X zoMH;G?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csQDC1%NMS~hCnG45-YbFO5BM2o;R+}isc zCh=>#$l|7~E~5{@J@|#0$8nsECrMB?`pgFeWk6>GH|6{J_)W4-6743?LiOu#g*)cR zmkXY#X$jZn$zlPzk}f7r!%dipJLD;#GND*aeR^(y%x{3Q$W9)_L9Uf36;Y+f*bHPoP>Ab0PGZPgu#`ss;B@{&-!pnOQcMkjw-Je^aiY4MMeDZ zsjSEv`Le7cb}XPx$FI^EiB-sSHP4pm!7Mz?-qz_6X70*b#2+!}xP&)z(@q0`J#4L; zx^lM#iz#w0D-@@wu&OE$6v;Lf(_FsCOvBekSaaF??$NI!ak-A&=Twu*IlKqddoz4c{ESl1MEa=Jssipj@oFrH8t{$@6pkG z(q$at+8BMqkX3>u-Zw#8B(ln^W!fZtK^QP$u+@nmMSY*Y=~A! QL5p1)qT6}>Sz|coFG=-^x&QzG diff --git a/osinaweb/osinacore/.DS_Store b/osinaweb/osinacore/.DS_Store index fec5714753cda8387697f7f3f28554668d7fec6f..44d53759acedd2dde5f212c9e85af07dbf3d2ad6 100644 GIT binary patch delta 86 zcmZn(XbG6$&nUk!U^hRb{AM13Q%tff456yf}y41=7%ExxHhvZ{9@rSMhN|80sz~R7cBq) delta 49 zcmZn(XbG6$&nUMsU^hRb+-4quQ%sxx39&FuzA5Ow*;8~M*Te>m&Fl)lSSAT60QrxZ E0JAm`T>t<8 diff --git a/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc index 347059514acf698d4eb704863bfb1b3ba790b929..5b1a5f849408bd324349153b67c146933ab1240f 100644 GIT binary patch delta 1022 zcmYMy%TE(Q90%}rO4+t_hrYHgQ0Rk4DU=owsq*lRh(JvA)`LyuH<(sJo89F=JygRP z6EcZ6x#=IESFav4G4YvrP<)&ez3A15{tEJQH}jkQd}rpD-DG#tkJ@-eRb3Xm=F`8# zgu2NiY=v#6FV=0~T(_>XO{-ww5;kZdxrM##0u}g%ZEv*|-2xu67wrZg*^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SjIqBoklp2rl_3KHytoF5ZHVF?e{RxJ&g3;^PsbW5L6d1q7Hw zWfm^pik9PON$skIHO60F-NnAypv|t#yLK~wZT`ZQb3VMPHVdkF^Tv(apUTDiut|Kp z?z?yJ^~dE^h#+36ge%;=z?1v%g}}WPRKlurHK-%pfNg_c5aecdYkXN2)K*qP_{O0M z`1&Y6D-`Q1&CWSk%SMHtX@Tw%0?)QwUtf0%{v!nb{zu!$e`z~;gKi?P(+=_<+DZOR z^WkU)$UkT|`8(|)f1{NAmG+Xq&_42K+E4yO2go1kAo&9wBfq0t$#3a6`3>Dh zUZdN|ujyX$E4q&~>3;G{dVu_bPLrS08S*pglAqFpTjY`3il8e3@P)U!vE@ z7wL8K1$u*go<2)HN1r2~r8miE=q>VT`aJn0eSv&}zDPbseezMt$VVt|`|#$a{{yj> BwYLBO diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index 7bc0d61b70377481ec7c06b58938cbc98eda23c2..af61253744d37f283298c3ce391c16ecf5f2c079 100644 GIT binary patch delta 4858 zcma)AYit|G5#}9VC%!~V)PoXfk(6YKdRl(THf71NB{_;5S+M0eW?VBA_arkWdCcC? z57h=;$7#~KY2$3+#C;@&(F7Gzr)UebP7ycgkD@2T+r$164NPiSDkalKC zi3&xz6|vvV&Fs$1&dl!Z>c>A7mXEj;r_*MDzs9}?a{KUgmtXu?xZXEbClX`YK4%~X zVo5tP&X`lUerZ#|m8px>2?in(TiTSVkJV?qF)zFuh&|nqX^b^;nIqklX^u4m?IfePq?yY$0qr9#oNfcUmH0UwEWk^E zY~n8=pxa20(_x@PB+Th{(oQ-+VF&O!$!5;$1iFiKb9yt-5z@oyE}(l!AE?k5AB zjsQJKws5)!=pnL|(}iAm*+#bWmp-6(ke!_FC&OeH7#$$H$sTwPf-Fi#xNHmAOGbe= zM8?QIcy1++kp1x7Mh=j1cy1>XWD=e`V9Y`CC?B&E=qd6Tr-#Y(QA6a=KO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zWtJ2^;fIq!ZEUf*l7hl;Ax+~XNO0kM_|AfSSZ`^=$IH7$7iXg+jTG^RMJea;;X{eH z1W_l{xg|rb`IHhv|Hg?;4~LeWgX{z5!Z!UX z3jqa+d__$@pe0`ulJDi{k22$Vf^!6`1ZxC!f^~uy2|R*}1YLrc30@)iJi!kWe3{@? zg4YPP34V&;rwM+B;MWMgLGYUdzeDi51b;yA#{_>$@NI%WC%8)RU4l0W7|s#@ww@+N zZ>Tu;#D6AkAMv4RIwdr>@|rtg%?*dxmSQ@HoRp;{{H@7Q0}Lpvcom+`Hr%cjImW*AZN7KObHNl$dr8Shw`=Eu_gc ZHBgS_XK~Hrx(U~fxNgO@4_CSn|3AGWBr^a2 diff --git a/osinaweb/osinacore/delete/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/delete/__pycache__/urls.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e3235997fa0bf5f42dd5c97262325a9aa67fb3e8 GIT binary patch literal 1166 zcmZ{jyKdVs6oyI5PJGY((xGU9qJuM-K*zucI&>`BA?Tt-P|V|0jwA{qT_bvjzC!oD zlGaXnfetND^oSQ(PE#4C^!?}jhlivjMx#E#YjW`${&Zne#3ziPGgc# zpHjkG+>2X@=X;a@;|>LKm$zNG=uE+1MNA$9rK(jHQe?^`-R z>hnWOM@R#HZ0Q7P$WJS}?fD~qc1hl9N(D@R6ByY?R^ z6t9euqI`oZj)5!Y~I9_AtkW}0KweonLdvOB}3S20{wAEZ3T PVMvE`+!@pDU-#!<)UApH literal 0 HcmV?d00001 diff --git a/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..091905d565f13646a5392a8337e667c67fec8750 GIT binary patch literal 2928 zcmb7GOK;mo5awI7UXdL+P71Us`by-~QXgrH7HJVQMUg|11h#w8MUb@{n>H!Rv#Yok zWS~HL&3{Obx%HRy2kf<{o^xvt?aYu=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ff --git a/osinaweb/osinacore/delete/urls.py b/osinaweb/osinacore/delete/urls.py new file mode 100644 index 00000000..a3cb02ca --- /dev/null +++ b/osinaweb/osinacore/delete/urls.py @@ -0,0 +1,18 @@ + +from django.urls import path +from . import views + + +urlpatterns = [ + + path('deletecustomermodal/', views.delete_customer_modal, name='deletecustomermodal'), + path('deletebusinessmodal/', views.delete_business_modal, name='deletebusinessmodal'), + path('deletestaffmodal/', views.delete_staff_modal, name='deletestaffmodal'), + path('deleteprojectmodal/', views.delete_project_modal, name='deleteprojectmodal'), + path('deleteprojectnotemodal//', views.delete_project_note_modal, name='deleteprojectnotemodal'), + path('deletetaskmodal/', views.delete_task_modal, name='deletetaskmodal'), + path('deletepointmodal///', views.delete_point_modal, name='deletepointmodal'), + path('deletetaskpointmodal///', views.delete_task_point_modal, name='deletetaskpointmodal'), + path('deletenotemodal/', views.delete_note_modal, name='deletenotemodal') + +] \ No newline at end of file diff --git a/osinaweb/osinacore/delete/views.py b/osinaweb/osinacore/delete/views.py new file mode 100644 index 00000000..be206dc1 --- /dev/null +++ b/osinaweb/osinacore/delete/views.py @@ -0,0 +1,141 @@ +from django.shortcuts import render, redirect, get_object_or_404 +from osinacore.models import * +from django.contrib.auth.decorators import login_required +from django.urls import reverse +from django.http import HttpResponseRedirect + + +@login_required +def delete_customer_modal(request, customer_id): + customer = get_object_or_404(CustomerProfile, id=customer_id) + + if request.method == 'POST': + customer.delete() + return redirect('customers') + + context = { + 'customer': customer, + } + return render(request, "delete_templates/delete-customer-modal.html", context) + + +@login_required +def delete_business_modal(request, business_id): + business = get_object_or_404(Business, id=business_id) + + if request.method == 'POST': + business.delete() + return redirect('businesses') + + context = { + 'business': business, + } + return render(request, "delete_templates/delete-business-modal.html", context) + + +@login_required +def delete_staff_modal(request, staff_id): + staff = get_object_or_404(StaffProfile, id=staff_id) + + if request.method == 'POST': + staff.delete() + return redirect('users') + + context = { + 'staff': staff, + } + return render(request, "delete_templates/delete-staff-modal.html", context) + + +@login_required +def delete_project_modal(request, project_id): + project = get_object_or_404(Project, id=project_id) + + if request.method == 'POST': + project.delete() + return redirect('my-projects') + + context = { + 'project': project, + } + return render(request, "delete_templates/delete-project-modal.html", context) + + +@login_required +def delete_project_note_modal(request, note_id): + note = get_object_or_404(Note, id=note_id) + + if request.method == 'POST': + project_id = note.project_id + project = get_object_or_404(Project, id=project_id) + note.delete() + + return redirect('detailed-project', project_id=project.project_id) + + context = { + 'note': note, + } + + return render(request, "delete_templates/delete-project-note-modal.html", context) + + + +@login_required +def delete_task_modal(request, task_id): + task = get_object_or_404(Task, id=task_id) + + if request.method == 'POST': + task.delete() + return redirect('my-tasks') + + context = { + 'task': task, + } + return render(request, "delete_templates/delete-task-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_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_templates/delete-note-modal.html", context) + diff --git a/osinaweb/osinacore/edit/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/edit/__pycache__/urls.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a0cfccb7a8191574d4fd1d355980b16fe2315f4a GIT binary patch literal 1655 zcma)+&2rN)5XbE%Y0`YSN!k=j3oYfN?SX0rZk^EKz>$GNhl?*BH&TNee~qM&sosGH z;l%so%BjN}z=d5&4rU0HWTNP|{_lFVS}E&vnht!#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&!el=Zfzt%X6MR@*czE})uZ_*wojjhd3T2*>6 zDfR|o!l(>qeZcbs(cebaL#OXyfPvrN4foG48YkXp=9#%_9heB*+UN5$Eo^R?ik}SXH^hyZItb6%G_Xr*l2bQnG{#m{9{oMNo!c7k+Cxyex zQ4X>yhmpBntylM*dls(`bUVYdK3aLSIq$l4|0vIUy3t)72r{%w3frSSRQwg{HhPR`K=%lTNNPuVb&>BpF_19k+!QGZ zWC{_$clxFc%U$lo`UJ6$A$gXHt`K zxA#Ddfv@p6&64m}m>C#yFw*4$;BSemFX+rust^Jb{c8#_uoj_EC|M z8aY!NIUW(K%?RgSaRCyh?Fjdw?P_dmV+KQ3yPxwdF@JS2e@kNi8a#=E!(GPhr#)-_ zu*Rog%2wf8Y04ZiWv5e9R??;{v9EP-n(ND&@0ZrEtf%SeqW>D__tznsXC8gMac_cq z)Wo3y*~eW=;to2uf_4X?b&#y^Mm#&Env{?uFflkZMh}O{Lfi9DtRxk=(9O)v3~K&> zUpb_h!_U$Te#SCOe@(=!q39Gb4P0B`j5f0(IOBm8`EwLGffXJF36CT`_7vV%L^(EYz7w_kgvf)x+@ry&?f-dzlIg~*_hB9A|UARr;@?00C zzUsRuMaOGOsgjf$OQ{k{m88@y-$SX&q?FaG1Fcn{wH&+ZTR63;#cukga$(;6aA_M#`1HaYiOk5RLyprO#^wJ3T+X4KmKsd=M z%&xXxiE&f4%$q7a&aWrtpgU|?5V*(=gYA|D5gvO0{G@?>YrQ*MpD}k+%ms31BO_Ea^Iem~FzHEBcw^`&}iX#eoe=+L/', views.edit_customer, name='editcustomer'), + path('business//', views.edit_business, name='editbusiness'), + path('staff//', views.edit_staff, name='editstaff'), + path('project//', views.edit_project, name='editproject'), + path('task/', views.edit_task, name='edittask'), + path('task-status/', views.edit_task_status_modal, name='edittaskstatusmodal'), + path('epic/', views.edit_epic, name='editepic'), + path('projecttype/', views.edit_project_type, name='editprojecttype'), + path('staffposition/', views.edit_staff_position, name='editstaffposition'), + path('businesstype/', views.edit_business_type, name='editbusinesstype'), + path('reference/', views.edit_reference, name='editreference'), + path('tag/', views.edit_tag, name='edittag'), + + + #Mark Points + path('mark_point_working_on///', views.mark_point_working_on, name='mark_point_working_on'), + path('mark_point_working_on_task_page///', views.mark_point_working_on_task_page, name='mark_point_working_on_task_page'), + path('mark_point_completed///', views.mark_point_completed, name='mark_point_completed'), + path('mark_point_completed_task_page///', views.mark_point_completed_task_page, name='mark_point_completed_task_page'), + path('mark_point_paused///', views.mark_point_paused, name='mark_point_paused'), + +] \ No newline at end of file diff --git a/osinaweb/osinacore/edit/views.py b/osinaweb/osinacore/edit/views.py new file mode 100644 index 00000000..f898fc53 --- /dev/null +++ b/osinaweb/osinacore/edit/views.py @@ -0,0 +1,522 @@ +from osinacore.models import * +from django.shortcuts import render, redirect, get_object_or_404 +from django.contrib.auth.decorators import login_required +from django.http import HttpResponseRedirect +from django.urls import reverse +from django.http import HttpResponse + + +@login_required +def edit_customer(request, customer_id): + customer = get_object_or_404(CustomerProfile, customer_id=customer_id) + + #Utilities + references = Reference.objects.all() + businesses = Business.objects.all + customer_status = customer.status + customer_reference = customer.reference + customer_business = customer.business + + + if request.method == 'POST': + + customer.user.first_name = request.POST.get('first_name') + customer.user.last_name = request.POST.get('last_name') + customer.user.email = request.POST.get('email') + customer.user.save() + customer.mobile_number = request.POST.get('mobile_number') + customer.personal_website = request.POST.get('personal_website') + customer.status = request.POST.get('status') + + customer_reference = request.POST.get('reference') + reference = get_object_or_404(Reference, id=customer_reference) + customer.reference = reference + + if customer.business: + new_business = request.POST.get('business') + business = get_object_or_404(Business, id=new_business) + customer.business = business + + + + customer.save() + + + return redirect('customerdetails', customer_id=customer.customer_id) + + + context = { + + 'customer' : customer, + 'references' : references, + 'businesses' : businesses, + 'customer_status' : customer_status, + 'customer_reference' : customer_reference, + 'customer_business' : customer_business, + + } + return render(request, 'edit_templates/edit-customer.html', context) + + + + +@login_required +def edit_business(request, business_id): + business = get_object_or_404(Business, business_id=business_id) + business_types = BusinessType.objects.all().order_by('name') + current_business_type = None + if business.type: + current_business_type = business.type + + + if request.method == 'POST': + + business.name= request.POST.get('name') + business.financial_number = request.POST.get('financial_number') + business.commercial_registration = request.POST.get('commercial_registration') + business.vat = request.POST.get('vat') + business.phone_number = request.POST.get('phone_number') + business.website = request.POST.get('website') + + + business_type = request.POST.get('business_type') + type = get_object_or_404(BusinessType, id=business_type) + business.type = type + + new_logo = request.FILES.get('logo') + if new_logo: + business.logo = new_logo + + + business.save() + + + return redirect('businessdetails', business_id=business.business_id) + + context = { + 'business' : business, + 'business_types' : business_types, + 'current_business_type' : current_business_type, + + } + return render(request, 'edit_templates/edit-business.html', context) + + +@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.last_name = request.POST.get('last_name') + staff.user.email = request.POST.get('email') + staff.user.save() + + staff.mobile_number = request.POST.get('mobile_number') + staff.active = request.POST.get('active') + staff.intern = request.POST.get('intern') + + new_position_id = request.POST.get('staff_position') + new_position = get_object_or_404(StaffPosition, id=new_position_id) + staff.staff_position = new_position + + + new_image = request.FILES.get('image') + if new_image: + staff.image = new_image + + staff.active = request.POST.get('active') == 'on' + staff.intern = request.POST.get('intern') == 'on' + + + staff.save() + + + return redirect('userdetails', staff_id=staff.staff_id) + + context = { + 'staff' : staff, + 'positions' : positions, + 'current_position' : current_position, + + } + return render(request, 'edit_templates/edit-staff.html', context) + + + +@login_required +def edit_project(request, project_id): + project = get_object_or_404(Project, project_id=project_id) + + staffs = StaffProfile.objects.all().order_by('-id') + current_manager = project.manager + customers = CustomerProfile.objects.all().order_by('-id') + current_client = project.customer + types = ProjectType.objects.all().order_by('-id') + + + if request.method == 'POST': + + project.name = request.POST.get('name') + + new_customer_id = request.POST.get('customer') + customer = get_object_or_404(CustomerProfile, id=new_customer_id) + project.customer = customer + + new_manager_id = request.POST.get('manager') + manager = get_object_or_404(StaffProfile, id=new_manager_id) + project.manager = manager + + + members_ids = request.POST.getlist('members') + members_profiles = StaffProfile.objects.filter(id__in=members_ids) + project.members.set(members_profiles) + + + project.status = request.POST.get('status') + + + type_ids = request.POST.getlist('types') + types = ProjectType.objects.filter(id__in=type_ids) + project.project_type.set(type_ids) + + + project.details = request.POST.get('details') + project.start_date = request.POST.get('start_date') + project.end_date = request.POST.get('end_date') + + + project.save() + return redirect('detailed-project', project_id=project.project_id) + + + + context = { + + 'project' : project, + 'staffs' : staffs, + 'current_manager' : current_manager, + 'customers' : customers, + 'current_client' : current_client, + 'types' : types, + + + } + return render(request, 'edit_templates/edit-project.html', context) + + + +@login_required +def edit_task(request, task_id): + task = get_object_or_404(Task, task_id=task_id) + projects = Project.objects.all().order_by('-id') + staffs = StaffProfile.objects.all().order_by('-id') + + selected_project_id = request.POST.get('project', task.project.id) if request.method == 'POST' else task.project.id + epics_of_my_project = Epic.objects.filter(project_id=selected_project_id) + + if request.method == 'POST': + task.name = request.POST.get('name') + + project_id = request.POST.get('project') + project = get_object_or_404(Project, id=project_id) + task.project = project + + + task.extra = request.POST.get('extra') + + + epic_id = request.POST.get('epic') + epic = get_object_or_404(Epic, id=epic_id) + task.epic = epic + + task.requirement = request.POST.get('requirement') + task.status = request.POST.get('status') + + # Convert assigned_to ID to a StaffProfile instance + assigned_to_id = request.POST.get('assigned_to') + assigned_to = get_object_or_404(StaffProfile, id=assigned_to_id) + task.assigned_to = assigned_to + + task.description = request.POST.get('description') + task.start_date = request.POST.get('start_date') + task.end_date = request.POST.get('end_date') + + task.save() + return redirect('detailed-task', task_id=task.task_id) + + context = { + 'task': task, + 'projects': projects, + 'epics_of_my_project': epics_of_my_project, + 'staffs': staffs, + } + return render(request, 'edit_templates/edit-task.html', context) + + + + +def edit_task_status_modal(request, *, task_id): + task = get_object_or_404(Task, task_id=task_id) + + if request.method == 'POST': + status = request.POST.get('status') + task.status = status + task.save() + + # Reload the parent page using JavaScript + response = HttpResponse('') + return response + + context = { + 'task' : task, + } + + return render(request, 'edit_templates/edit-taskstatus-modal.html', context) + + + +@login_required +def edit_epic(request, *args, **kwargs): + + context = { + + } + return render(request, 'edit_templates/edit-epic.html', context) + + + +@login_required +def edit_project_type(request, projecttype_id): + + projecttype = get_object_or_404(ProjectType, id=projecttype_id) + + if request.method == 'POST': + projecttype.name = request.POST.get('name') + projecttype.save() + + return redirect('projecttypes') + + return render(request, 'edit_templates/edit-project-type.html', {'projecttype': projecttype}) + + +@login_required +def edit_staff_position(request): + + context = { + + + } + return render(request, 'edit_templates/edit-staff-position.html', context) + + + + +@login_required +def edit_business_type(request, businesstype_id): + + businesstype = get_object_or_404(BusinessType, id=businesstype_id) + + if request.method == 'POST': + businesstype.name = request.POST.get('name') + businesstype.save() + + return redirect('businesstypes') + + return render(request, 'edit_templates/edit-business-type.html', {'businesstype': businesstype}) + + +@login_required +def edit_reference(request, reference_id): + reference = get_object_or_404(Reference, id=reference_id) + + if request.method == 'POST': + reference.name = request.POST.get('name') + reference.date = request.POST.get('date') + reference.save() + + return redirect('references') + + return render(request, 'edit_templates/edit-reference.html', {'reference': reference}) + + + +@login_required +def edit_tag(request, tag_id): + tag = get_object_or_404(Tag, id=tag_id) + + if request.method == 'POST': + tag.name = request.POST.get('name') + tag.save() + + return redirect('tags') + + return render(request, 'edit_templates/edit-tag.html', {'tag': tag}) + + + + + + + + + + +#Mark points + +@login_required +def mark_point_working_on(request, point_id, task_id): + task = get_object_or_404(Task, id=task_id) + point = get_object_or_404(Point, id=point_id) + point.status = 'Working On' + current_datetime = datetime.now() + + point.save() + + activity = PointActivity( + point = point, + start_time = datetime.now(), + ) + activity.save() + + if PointActivity.objects.filter(point=point).count() == 1: + status_text = f'Started Working On: {point.text}' + status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile) + status.save() + else: + status_text = f'Resumed Working On: {point.text}' + status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile) + status.save() + + + + task_id_str = task.task_id + + showpoints_url = reverse('showpoints', args=[task_id_str]) + return HttpResponseRedirect(showpoints_url) + + + +@login_required +def mark_point_working_on_task_page(request, point_id, task_id): + task = get_object_or_404(Task, id=task_id) + point = get_object_or_404(Point, id=point_id) + point.status = 'Working On' + current_datetime = datetime.now() + + point.save() + + activity = PointActivity( + point = point, + start_time = datetime.now(), + ) + activity.save() + + if PointActivity.objects.filter(point=point).count() == 1: + status_text = f'Started Working On: {point.text}' + status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile) + status.save() + else: + status_text = f'Resumed Working On: {point.text}' + status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile) + status.save() + + + return redirect('detailed-task', task_id=task.task_id) + + + + +@login_required +def mark_point_paused(request, point_id, task_id): + task = get_object_or_404(Task, id=task_id) + point = get_object_or_404(Point, id=point_id) + point.status = 'Paused' + current_datetime = datetime.now() + + point.save() + + last_activity = PointActivity.objects.filter(point=point).last() + if last_activity: + last_activity.end_time = timezone.make_aware(current_datetime, timezone.get_current_timezone()) + last_activity.save() + + status_text = f'{point.text} - Paused' + status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile) + status.save() + + + task_id_str = task.task_id + + showpoints_url = reverse('showpoints', args=[task_id_str]) + return HttpResponseRedirect(showpoints_url) + + + +@login_required +def mark_point_completed(request, point_id, task_id): + task = get_object_or_404(Task, id=task_id) + point = get_object_or_404(Point, id=point_id) + point.status = 'Completed' + + current_datetime = datetime.now() + + point.save() + + # Update the end time of the last activity to the current time + last_activity = PointActivity.objects.filter(point=point).last() + if last_activity: + last_activity.end_time = timezone.make_aware(current_datetime, timezone.get_current_timezone()) + last_activity.save() + + + total_time_hours, total_time_minutes, total_time_seconds = point.total_activity_time() + + formatted_time = "" + if total_time_hours > 0: + formatted_time += f"{total_time_hours}{'hr' if total_time_hours == 1 else 'hrs'}" + if total_time_minutes > 0: + formatted_time += f" {total_time_minutes}{'min' if total_time_minutes == 1 else 'mins'}" + if total_time_seconds > 0: + formatted_time += f" {total_time_seconds}{'sec' if total_time_seconds == 1 else 'secs'}" + + status_text = f'{point.text} - Completed' + if formatted_time: + status_text += f' in {formatted_time}' + + status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile) + status.save() + + task_id_str = task.task_id + showpoints_url = reverse('showpoints', args=[task_id_str]) + return HttpResponseRedirect(showpoints_url) + + + +@login_required +def mark_point_completed_task_page(request, point_id, task_id): + task = get_object_or_404(Task, id=task_id) + point = get_object_or_404(Point, id=point_id) + point.status = 'Completed' + current_datetime = datetime.now() + + + point.save() + + + last_activity = PointActivity.objects.filter(point=point).last() + last_activity.end_time = datetime.now() + last_activity.save() + + + status_text = f'{point.text} - Completed' + status = Status(text=status_text, date=current_datetime.date(), time=current_datetime.strftime("%I:%M %p"), staff=request.user.staffprofile) + status.save() + + return redirect('detailed-task', task_id=task.task_id) + + diff --git a/osinaweb/osinacore/templates/.DS_Store b/osinaweb/osinacore/templates/.DS_Store index 29ace2cac40e085ada306e95867fd0c970f3f03b..2c3a58552dd2f9f033eb19bd4621b77ddff58051 100644 GIT binary patch delta 812 zcmZn(XbG6$gHU^hRb@?-^Jxyf1r{H#F?3=G>2;T0LWrs5MW4Q zNM*)ij1PedH3%rQ6Xq3VEOZ5` z#AZy6FwbNuQEq;0a`S+4J~-qq2=h*^7iHt*1G+s0=&TZ`qxdBc0d3Moauc$ODICUz zmO2WCmWGqx2sof=wiD*#Td^6a8(D|QWS|R0SRSRT{fIm2h#?7bqMjHxnn@RcCVc>^ zMKkH2F#qI4Fvc{Rd=eO}-&!%9;aYsR3DPlP$zgurVwEa&;!NN$Bu_ zRl_|r*;2}pbuCbG&g6P2cUBP~Yv$zBQueHsK-TQZ{L+EkcR?&j0BkJOW8KWI@QX#9 OfnhWbK5hzmZnUkNKl#`zXR3!j3p&LkJ>MQ}O%>=0i>Ma1W(}AX- z>14VJ*XjHp$b?ynRclVVVQ_MOZUI;wW1%ai>d6NsB`UN0YZ~=Xk0`y}ElF5c>USwDgR5%YQSTQtBek&%<2^R(VVY03`w;)^u zX87blacNZyQBa_wIE~>0!{npl4s77~oHvN(FNN1hF6ix3O>z%Vu_kUo4Epqe&PP M#zZG!7Elrf0Pq|)0RR91 diff --git a/osinaweb/osinacore/templates/delete_modals/delete-business-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-business-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-business-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-business-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-customer-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-customer-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-customer-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-note-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-note-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-note-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-note-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-project-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-project-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-project-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-project-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-project-note-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-project-note-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-project-note-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-staff-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-staff-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-staff-modal.html diff --git a/osinaweb/osinacore/templates/delete_modals/delete-task-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-task-modal.html similarity index 100% rename from osinaweb/osinacore/templates/delete_modals/delete-task-modal.html rename to osinaweb/osinacore/templates/delete_templates/delete-task-modal.html diff --git a/osinaweb/osinacore/templates/details_pages/business-details.html b/osinaweb/osinacore/templates/details_templates/business-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/business-details.html rename to osinaweb/osinacore/templates/details_templates/business-details.html diff --git a/osinaweb/osinacore/templates/details_pages/customer-details.html b/osinaweb/osinacore/templates/details_templates/customer-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/customer-details.html rename to osinaweb/osinacore/templates/details_templates/customer-details.html diff --git a/osinaweb/osinacore/templates/details_pages/project-details.html b/osinaweb/osinacore/templates/details_templates/project-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/project-details.html rename to osinaweb/osinacore/templates/details_templates/project-details.html diff --git a/osinaweb/osinacore/templates/popup_modals/showpoints-modal.html b/osinaweb/osinacore/templates/details_templates/showpoints-modal.html similarity index 100% rename from osinaweb/osinacore/templates/popup_modals/showpoints-modal.html rename to osinaweb/osinacore/templates/details_templates/showpoints-modal.html diff --git a/osinaweb/osinacore/templates/details_pages/staff-details.html b/osinaweb/osinacore/templates/details_templates/staff-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/staff-details.html rename to osinaweb/osinacore/templates/details_templates/staff-details.html diff --git a/osinaweb/osinacore/templates/popup_modals/status-on-mobile-modal.html b/osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html similarity index 100% rename from osinaweb/osinacore/templates/popup_modals/status-on-mobile-modal.html rename to osinaweb/osinacore/templates/details_templates/status-on-mobile-modal.html diff --git a/osinaweb/osinacore/templates/details_pages/task-details.html b/osinaweb/osinacore/templates/details_templates/task-details.html similarity index 100% rename from osinaweb/osinacore/templates/details_pages/task-details.html rename to osinaweb/osinacore/templates/details_templates/task-details.html diff --git a/osinaweb/osinacore/templates/popup_modals/timeline-modal.html b/osinaweb/osinacore/templates/details_templates/timeline-modal.html similarity index 100% rename from osinaweb/osinacore/templates/popup_modals/timeline-modal.html rename to osinaweb/osinacore/templates/details_templates/timeline-modal.html diff --git a/osinaweb/osinacore/templates/popup_modals/.DS_Store b/osinaweb/osinacore/templates/edit_templates/.DS_Store similarity index 70% rename from osinaweb/osinacore/templates/popup_modals/.DS_Store rename to osinaweb/osinacore/templates/edit_templates/.DS_Store index fa066f829101745892a8028508bc54a67702273e..02e90256e6994f633cba5c55bcdd953ba9ceb123 100644 GIT binary patch literal 6148 zcmeHKO-=$a6n;e(#9!1ziHXTv01|I75?r|U0>S`_B12$UxSPEPaOV{~jhFBSuJn7a z)s%ta&Zv1WdHp(_ey{EKn3fWeY0kPQL{%cHz!}TyD3%z%XJ4?AYuN-EiBYEx&1gyk z8ZGqJ230^6_-zXCw|huE>f)Qt$p3zO_>QM&$>^TO=+U5S)bD6`K1`F&FztZJ+r}xp z@h*lM(cX$^p%~9AVkEMoWRzm;9!)~?Fvo=$+ul5SSiyjjAorobJ@B|=jG596S`ty{ z8$HZhA=Yj%RzQu?RUyK@7h!^WAI>>(oIDO=IjMeduoxxMY z49rUM{N&|%XKB0;n=|aQw>&n_O81oe|A3YuL_(u(AHd|%GqL!+FDxeB{DZu+f1ZRvL<`!k^Kp|HEU>VI~sPmr! z=0px-hq*<(ff-8$TB>nZ3}fkNk6gdlVQ$gV$+*jhaU&adLoqTs;z!b*Ol(n0RX`P( zS76OPR{8ut3*Z0eN&2J;r~>~=0aI>Ww3=9wJ6jhP$7gK>zl5`KzuclwP`Kk*Dtr{z b;9__eaRnGV%q^k?rhf!P1}#*9A64K3#Sq=T delta 251 zcmZoMXfc=|#>B)qu~2NHo}wrV0|Nsi1A_nqLjglRLncEWLkUCi#=_-{;vgAOhGK>c zpm;e#cCr||ni11gpya&&U;tz>Fh~OxmM|m&aVe0c3)GSaBy)ju641~bhSbRt>?%q? z1q_VLNZN#f8Zv>(Qh`c9c7v5EFsuWbxBy9+1klt1h7_>*sSLW4dDsoP9f4|2Ley*) m {% if not business.type %} - {% endif %} - + {% else %} {% for type in business_types %} - {% endfor %} + {% endif %} diff --git a/osinaweb/osinacore/templates/edit_pages/edit-customer.html b/osinaweb/osinacore/templates/edit_templates/edit-customer.html similarity index 76% rename from osinaweb/osinacore/templates/edit_pages/edit-customer.html rename to osinaweb/osinacore/templates/edit_templates/edit-customer.html index 0e038588..dbf96c0a 100644 --- a/osinaweb/osinacore/templates/edit_pages/edit-customer.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-customer.html @@ -96,47 +96,14 @@ required> {% for business in businesses %} {% endfor %} {% endif %} - - - - -