From 83a7e4f73d7a50930d8768d6cefacad9747d19c7 Mon Sep 17 00:00:00 2001 From: Krrish Sehgal <133865424+krrish-sehgal@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:00:51 +0530 Subject: [PATCH] fixed frontend delete in sizzle --- website/templates/sizzle/sizzle.html | 164 ++++++++++++++------------- website/views/organization.py | 2 + 2 files changed, 87 insertions(+), 79 deletions(-) diff --git a/website/templates/sizzle/sizzle.html b/website/templates/sizzle/sizzle.html index b9dd4477c..3591647d0 100644 --- a/website/templates/sizzle/sizzle.html +++ b/website/templates/sizzle/sizzle.html @@ -102,7 +102,7 @@

Your Sizzle Report

{% if user.is_authenticated %} + data-id="{{ sizzle_data.id }}">Delete {% endif %} @@ -147,90 +147,96 @@

Your Sizzle Report

{% endif %} {% endblock content %} diff --git a/website/views/organization.py b/website/views/organization.py index 7e4101a93..c0e939354 100644 --- a/website/views/organization.py +++ b/website/views/organization.py @@ -997,6 +997,7 @@ def TimeLogListAPIView(request): formatted_date = first_log.created.strftime("%d %B %Y") day_data = { + "id": first_log.id, "issue_title": issue_title, "duration": formatted_duration, "start_time": start_time, @@ -1057,6 +1058,7 @@ def sizzle(request): date = last_data.created.strftime("%d %B %Y") sizzle_data = { + "id": last_data.id, "issue_title": issue_title, "duration": formatted_duration, "start_time": start_time,