diff --git a/recruitment/tasks.py b/recruitment/tasks.py index 3f84931..ceab43b 100644 --- a/recruitment/tasks.py +++ b/recruitment/tasks.py @@ -799,10 +799,6 @@ def _task_send_individual_email(subject, body_message, recipient, attachments,se logger.error(f"Email sent to {recipient}, but failed to store in DB: {str(e)}") - else: - logger.error("failed to send email") - - except Exception as e: logger.error(f"Failed to send email to {recipient}: {str(e)}", exc_info=True) diff --git a/recruitment/views.py b/recruitment/views.py index e7a18db..b23d527 100644 --- a/recruitment/views.py +++ b/recruitment/views.py @@ -3316,7 +3316,8 @@ def agency_detail(request, slug): ).count() hired_candidates = candidates.filter(stage="Hired").count() rejected_candidates = candidates.filter(stage="Rejected").count() - + job_assignments=AgencyJobAssignment.objects.filter(agency=agency) + print(job_assignments) context = { "agency": agency, "candidates": candidates[:10], # Show recent 10 candidates @@ -3327,6 +3328,7 @@ def agency_detail(request, slug): "generated_password": agency.generated_password if agency.generated_password else None, + "job_assignments":job_assignments } return render(request, "recruitment/agency_detail.html", context) @@ -4169,13 +4171,13 @@ def agency_portal_persons_list(request): | Q(last_name__icontains=search_query) | Q(email__icontains=search_query) | Q(phone__icontains=search_query) - | Q(job__title__icontains=search_query) + ) # Filter by stage if provided - stage_filter = request.GET.get("stage", "") - if stage_filter: - persons = persons.filter(stage=stage_filter) + # stage_filter = request.GET.get("stage", "") + # if stage_filter: + # persons = persons.filter(stage=stage_filter) # Pagination paginator = Paginator(persons, 20) # Show 20 persons per page @@ -4184,6 +4186,7 @@ def agency_portal_persons_list(request): # Get stage choices for filter dropdown stage_choices = Application.Stage.choices + print(stage_choices) person_form = PersonForm() person_form.initial["agency"] = agency @@ -4191,7 +4194,7 @@ def agency_portal_persons_list(request): "agency": agency, "page_obj": page_obj, "search_query": search_query, - "stage_filter": stage_filter, + # "stage_filter": stage_filter, "stage_choices": stage_choices, "total_persons": persons.count(), "person_form": person_form, diff --git a/templates/recruitment/agency_detail.html b/templates/recruitment/agency_detail.html index 54d2bf0..81ceef4 100644 --- a/templates/recruitment/agency_detail.html +++ b/templates/recruitment/agency_detail.html @@ -604,19 +604,22 @@ from your Django view context to populate this section. {% endcomment %} - {% if assigned_jobs %} - {% for assignment in assigned_jobs %} + {% if job_assignments %} + {% for assignment in job_assignments%}
+
- {{ assignment.job.location }} - {{ assignment.job.department.name }} + {{ assignment.job.get_location_display }} + {% if assessment.job.department %} + {{ assignment.job.department|default:"" }} + {% endif %}
diff --git a/templates/recruitment/agency_portal_persons_list.html b/templates/recruitment/agency_portal_persons_list.html index 8314a48..2d3da2c 100644 --- a/templates/recruitment/agency_portal_persons_list.html +++ b/templates/recruitment/agency_portal_persons_list.html @@ -93,7 +93,7 @@ value="{{ search_query }}" placeholder="{% trans 'Search by name, email, phone, or job title...' %}">
-
+ {% comment %}
@@ -111,7 +111,7 @@ -
+
{% endcomment %}
@@ -154,7 +154,7 @@ {% trans "Name" %} {% trans "Email" %} {% trans "Phone" %} - {% trans "Job" %} + {% trans "Created At" %} {% comment %} {% trans "Stage" %} {% trans "Applied Date" %} {% endcomment %} {% trans "Actions" %} @@ -202,7 +202,7 @@ {% endwith %} {% endcomment %} - {{ person.created_at|date:"Y-m-d" }} + {{ person.created_at|date:"d-m-Y" }}