Skip to content

Commit

Permalink
refactor: Remove salary and role columns from job_detail_include.html
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
QA2A committed Sep 4, 2024
1 parent ff51da7 commit d4f1621
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 52 deletions.
57 changes: 7 additions & 50 deletions website/templates/partials/job_detail_include.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ <h3>Applications (only visible to you)</h3>
<table>
<thead>
<tr align="left">
<th>Company</th>
<th>Role</th>
<th>Salary</th>
<th>Applied</th>
<th>Last Email</th>
<th>Days</th>
Expand All @@ -23,49 +20,11 @@ <h3>Applications (only visible to you)</h3>
<th>actions</th>
<th>link</th>
<th>email</th>
<td>g</td>
<td>ping</td>
</tr>
</thead>
{% for application in applications %}
<tr id="row-{{ application.id }}">
<td>
{% if application.job.company.website %}
<img src="https://www.google.com/s2/favicons?domain={{ application.job.company.website }}"
style="margin-right: 5px">
{% endif %}
<a href="{% url 'company_detail' slug=application.job.company.slug %}"
target="_blank"
style="text-decoration: none;
font-size:14px">{{ application.job.company.name }}</a>
</td>
<td>
{% if application.job.role %}
{{ application.job.role|truncatechars:50 }}
{% else %}
<form hx-post="{% url 'update_email' %}"
hx-trigger="change"
hx-target="this"
id="role-form-{{ application.id }}">
{% csrf_token %}
<input type="hidden" name="application_id" value="{{ application.id }}" />
<input type="text"
name="role"
id="role"
class="link-input"
placeholder="role"
style="height: 20px;
width: 120px;
display: inline-block;
vertical-align: middle;
margin:0px" />
</form>
{% endif %}
</td>
<td nowrap>
{% if application.job.salary_min %}
${{ application.job.salary_min|floatformat:0|intcomma }} - ${{ application.job.salary_max|floatformat:0|intcomma }}
{% endif %}
</td>
<td>{{ application.date_applied|date:"m/d" }}</td>
<td>{{ application.date_of_last_email|date:"m/d" }}</td>
<td>{{ application.days_since_last_email }}</td>
Expand All @@ -88,14 +47,12 @@ <h3>Applications (only visible to you)</h3>
</a>
<div class="hover-box">
{% for email in application.email_set.all %}
<p>
<a href="https://mail.google.com/mail/u/0/#inbox/{{ email }}"
target="_blank">{{ email }}</a>
<span>({{ email.date|date:"m/d" }})</span>
</p>
{% empty %}
<p>No emails found.</p>
{% endfor %}
<a href="https://mail.google.com/mail/u/0/#inbox/{{ email }}"
target="_blank"
title="{{ email.date|date:'m/d/y' }}">{{ forloop.counter }}</a>
{% empty %}
0
{% endfor %}
</div>
</div>
</td>
Expand Down
9 changes: 7 additions & 2 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit d4f1621

Please sign in to comment.