From d4f1621da9f23039774c1bc42ac54116b03f782e Mon Sep 17 00:00:00 2001 From: QA2A <150867722+QA2A@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:38:03 -0400 Subject: [PATCH] refactor: Remove salary and role columns from job_detail_include.html The salary and role columns have been removed from the job_detail_include.html template. This change simplifies the table layout and removes unnecessary information, improving the overall user experience. --- .../partials/job_detail_include.html | 57 +++---------------- website/views.py | 9 ++- 2 files changed, 14 insertions(+), 52 deletions(-) diff --git a/website/templates/partials/job_detail_include.html b/website/templates/partials/job_detail_include.html index 09eb43e..5a60f0e 100644 --- a/website/templates/partials/job_detail_include.html +++ b/website/templates/partials/job_detail_include.html @@ -12,9 +12,6 @@

Applications (only visible to you)

- - - @@ -23,49 +20,11 @@

Applications (only visible to you)

- + {% for application in applications %} - - - @@ -88,14 +47,12 @@

Applications (only visible to you)

{% for email in application.email_set.all %} -

- {{ email }} - ({{ email.date|date:"m/d" }}) -

- {% empty %} -

No emails found.

- {% endfor %} + {{ forloop.counter }} + {% empty %} + 0 + {% endfor %}
diff --git a/website/views.py b/website/views.py index 1d8ca93..3470af0 100644 --- a/website/views.py +++ b/website/views.py @@ -94,9 +94,11 @@ def job_detail_htmx(request, slug): applications = Application.objects.filter( user=request.user, job=job ) + stages = Stage.objects.all().order_by("-order") else: applications = None - return render(request, "partials/job_detail_include.html", {"job": job, "applications": applications}) + stages = None + return render(request, "partials/job_detail_include.html", {"job": job, "applications": applications, "stages": stages}) @login_required def view_resume_clicks(request, company_id): @@ -987,7 +989,10 @@ def post(self, request): data = request.data link_is_410 = data.get("link_is_410", False) if link_is_410: - job = Job.objects.get(link=data.get("link")) + link = data.get("link") + link_parts = link.split("/") + job_slug = link_parts[-1] + job = Job.objects.filter(link__endswith=job_slug).first() job.link_status_code = 410 job.link_status_code_updated = timezone.now() job.save()
CompanyRoleSalary Applied Last Email Days actions link emailgping
- {% if application.job.company.website %} - - {% endif %} - {{ application.job.company.name }} - - {% if application.job.role %} - {{ application.job.role|truncatechars:50 }} - {% else %} -
- {% csrf_token %} - - -
- {% endif %} -
- {% if application.job.salary_min %} - ${{ application.job.salary_min|floatformat:0|intcomma }} - ${{ application.job.salary_max|floatformat:0|intcomma }} - {% endif %} - {{ application.date_applied|date:"m/d" }} {{ application.date_of_last_email|date:"m/d" }} {{ application.days_since_last_email }}