Minor changes, delete point.

main
nataly 1 year ago
parent 67c5545507
commit d7d01e31b1

Binary file not shown.

@ -1739,6 +1739,36 @@ def delete_note_modal(request, note_id):
return render(request, "delete_modals/delete-note-modal.html", context) return render(request, "delete_modals/delete-note-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 @login_required
def delete_project_note_modal(request, note_id): def delete_project_note_modal(request, note_id):
note = get_object_or_404(Note, id=note_id) note = get_object_or_404(Note, id=note_id)

@ -98,7 +98,11 @@ urlpatterns = [
path('deleteprojectmodal/<int:project_id>', views.delete_project_modal, name='deleteprojectmodal'), path('deleteprojectmodal/<int:project_id>', views.delete_project_modal, name='deleteprojectmodal'),
path('deletetaskmodal/<int:task_id>', views.delete_task_modal, name='deletetaskmodal'), path('deletetaskmodal/<int:task_id>', views.delete_task_modal, name='deletetaskmodal'),
path('deletenotemodal/<int:note_id>', views.delete_note_modal, name='deletenotemodal'), path('deletenotemodal/<int:note_id>', views.delete_note_modal, name='deletenotemodal'),
path('deleteprojectnotemodal/<int:note_id>', views.delete_project_note_modal, name='deleteprojectnotemodal'), path('deleteprojectnotemodal/<int:note_id>/', views.delete_project_note_modal, name='deleteprojectnotemodal'),
path('deletepointmodal/<int:point_id>/<str:task_id>/', views.delete_point_modal, name='deletepointmodal'),
path('deletetaskpointmodal/<int:point_id>/<str:task_id>/', views.delete_task_point_modal, name='deletetaskpointmodal'),
#Save Urls #Save Urls
path('save_note/', views.save_note, name='save_note'), path('save_note/', views.save_note, name='save_note'),

@ -2311,6 +2311,11 @@ video {
background-color: rgb(59 130 246 / var(--tw-bg-opacity)); background-color: rgb(59 130 246 / var(--tw-bg-opacity));
} }
.hover\:bg-red-500:hover {
--tw-bg-opacity: 1;
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
}
.hover\:bg-transparent:hover { .hover\:bg-transparent:hover {
background-color: transparent; background-color: transparent;
} }
@ -2366,12 +2371,12 @@ video {
} }
@media (min-width: 650px) { @media (min-width: 650px) {
.s\:mt-\[-63px\] { .s\:mt-5 {
margin-top: -63px; margin-top: 1.25rem;
} }
.s\:flex { .s\:mt-\[-63px\] {
display: flex; margin-top: -63px;
} }
.s\:hidden { .s\:hidden {
@ -2485,6 +2490,11 @@ video {
padding-top: 0.25rem; padding-top: 0.25rem;
padding-bottom: 0.25rem; padding-bottom: 0.25rem;
} }
.md\:text-3xl {
font-size: 1.875rem;
line-height: 2.25rem;
}
} }
@media (min-width: 960px) { @media (min-width: 960px) {

@ -75,6 +75,8 @@ document.addEventListener("DOMContentLoaded", function () {
addButtonClickListener("deleteTaskButton", "400px", "140px"); addButtonClickListener("deleteTaskButton", "400px", "140px");
addButtonClickListener("deleteNoteButton", "400px", "140px"); addButtonClickListener("deleteNoteButton", "400px", "140px");
addButtonClickListener("deleteProjectNoteButton", "400px", "140px"); addButtonClickListener("deleteProjectNoteButton", "400px", "140px");
addButtonClickListener("deletePointButton", "400px", "140px");

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}
@ -188,7 +188,8 @@
<!-- RIGHT SIDE / USERS ACTIVITY --> <!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %} {% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[1283px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5"> <div
class="hidden xxlg1:block w-[25%] bg-white h-[1283px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1> <h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
<div class="w-full h-fit mt-2" id="activitiesContainer"> <div class="w-full h-fit mt-2" id="activitiesContainer">

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}
@ -191,6 +191,7 @@
</div> </div>
<!-- POINTS -->
<div class="mt-5 relative"> <div class="mt-5 relative">
<div <div
class=" bg-slate-700 border border-slate-700 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]"> class=" bg-slate-700 border border-slate-700 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
@ -247,6 +248,13 @@
<button type="submit" <button type="submit"
class="w-[120px] px-2 py-2 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button> class="w-[120px] px-2 py-2 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button>
</form> </form>
<form method="post" action="{% url 'deletetaskpointmodal' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-fit px-3 py-2 bg-white border border-red-500 rounded-md text-red-500 hover:bg-red-500 hover:text-white cursor-pointer">
<i class="fa fa-trash"></i>
</button>
</form>
</div> </div>
</td> </td>
{% endif %} {% endif %}
@ -271,6 +279,13 @@
<button type="submit" <button type="submit"
class="w-[120px] px-2 py-2 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button> class="w-[120px] px-2 py-2 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button>
</form> </form>
<form method="post" action="{% url 'deletetaskpointmodal' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-fit px-3 py-2 bg-white border border-red-500 rounded-md text-red-500 hover:bg-red-500 hover:text-white cursor-pointer">
<i class="fa fa-trash"></i>
</button>
</form>
</div> </div>
</td> </td>
{% endif %} {% endif %}
@ -288,6 +303,9 @@
</div> </div>
</div> </div>
<!-- TIMLINE -->
<div> <div>
<div class="mt-5 relative"> <div class="mt-5 relative">
<div <div
@ -359,6 +377,9 @@
</div> </div>
</div> </div>
<!-- DESCRIPTION -->
<div class="mt-5"> <div class="mt-5">
<p class="text-gray-500 text-xl">Description:</p> <p class="text-gray-500 text-xl">Description:</p>
<div class="w-full h-fit px-4 mt-1"> <div class="w-full h-fit px-4 mt-1">
@ -368,6 +389,9 @@
</div> </div>
</div> </div>
<!-- TAGS -->
<div> <div>
<p class="text-gray-500 text-xl">Tags:</p> <p class="text-gray-500 text-xl">Tags:</p>
<div class="w-full h-fit px-4 mt-2 flex flex-wrap justify-start items-center gap-3"> <div class="w-full h-fit px-4 mt-2 flex flex-wrap justify-start items-center gap-3">
@ -384,7 +408,6 @@
On Demand</button> On Demand</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -69,7 +69,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -68,7 +68,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -67,7 +67,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -66,7 +66,7 @@
</div> </div>
<!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) --> <!-- ALL NOTES CONTAINER (appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit hidden" id="notesContainer"> <div class="w-full h-fit hidden mt-3 s:mt-5" id="notesContainer">
<div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3"> <div class="w-full hidden lg:grid grid-cols-3 xlg:grid-cols-6 gap-3">
{% for note in notes %} {% for note in notes %}

@ -35,7 +35,7 @@
<p class="text-base text-gray-400 font-light">Keep me logged in</p> <p class="text-base text-gray-400 font-light">Keep me logged in</p>
</div> </div>
<div class="w-full flex justify-center items-center mt-5"> <div class="w-full flex justify-center items-center mt-5">
<button type="submit" class="w-full h-[45px] bg-blue-500 border border-blue-500 text-white text-base s:text-xl rounded-md font-medium hover:bg-white hover:text-blue-500 duration-300">LOGIN</button> <button type="submit" class="w-full px-3 py-1 bg-blue-500 border border-blue-500 text-white text-base s:text-xl rounded-md font-medium hover:bg-white hover:text-blue-500 duration-300">LOGIN</button>
</div> </div>
<div class="mt-3 w-full flex justify-center items-center"> <div class="mt-3 w-full flex justify-center items-center">
<p class="text-base text-gray-400 font-light cursor-pointer">Forgot Password?</p> <p class="text-base text-gray-400 font-light cursor-pointer">Forgot Password?</p>

@ -28,15 +28,22 @@
</div> </div>
<div class="flex justify-end items-center gap-2"> <div class="flex justify-end items-center gap-2">
<form method="post" action="{% url 'mark_point_working_on' point.id task.id %}"> <form method="post" action="{% url 'mark_point_working_on' point.id task.id %}">
{% csrf_token %} {% csrf_token %}
<button type="submit" <button type="submit"
class="w-[120px] px-2 py-1 bg-transparent border border-yellow-500 rounded-md text-yellow-500 hover:bg-yellow-500 hover:text-white">Working class="w-[120px] px-2 py-1 bg-transparent border border-yellow-500 rounded-md text-yellow-500 hover:bg-yellow-500 hover:text-white">Working
On</button> On</button>
</form> </form>
<form method="post" action="{% url 'mark_point_completed' point.id task.id %}"> <form method="post" action="{% url 'mark_point_completed' point.id task.id %}">
{% csrf_token %} {% csrf_token %}
<button type="submit" <button type="submit"
class="w-[120px] px-2 py-1 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button> class="w-[120px] px-2 py-1 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button>
</form>
<form method="post" action="{% url 'deletepointmodal' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-fit px-2 py-1 bg-white border border-red-500 rounded-md text-red-500 hover:bg-red-500 hover:text-white cursor-pointer">
<i class="fa fa-trash"></i>
</button>
</form> </form>
</div> </div>
</div> </div>
@ -62,14 +69,20 @@
</div> </div>
<div class="flex justify-end items-center gap-2"> <div class="flex justify-end items-center gap-2">
<button <button
class="w-[120px] px-2 py-1 border border-yellow-500 rounded-md bg-yellow-500 text-white opacity-40" class="w-[120px] px-2 py-1 border border-yellow-500 rounded-md bg-yellow-500 text-white opacity-40"
disabled>Working On</button> disabled>Working On</button>
<form method="post" action="{% url 'mark_point_completed' point.id task.id %}"> <form method="post" action="{% url 'mark_point_completed' point.id task.id %}">
{% csrf_token %} {% csrf_token %}
<button type="submit" <button type="submit"
class="w-[120px] px-2 py-1 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button> class="w-[120px] px-2 py-1 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button>
</form>
<form method="post" action="{% url 'deletepointmodal' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-fit px-2 py-1 bg-white border border-red-500 rounded-md text-red-500 hover:bg-red-500 hover:text-white cursor-pointer">
<i class="fa fa-trash"></i>
</button>
</form> </form>
</div> </div>
</div> </div>
{% endif %} {% endif %}

Loading…
Cancel
Save