From 8fe447e740bf97dc0b82ab660a737cdd398b5a64 Mon Sep 17 00:00:00 2001 From: Horilla Date: Tue, 11 Jun 2024 22:59:25 +0530 Subject: [PATCH] [FIX] HORILLA_CRUMBS: Path issue from another urls to employee individua --- horilla_crumbs/context_processors.py | 29 ++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/horilla_crumbs/context_processors.py b/horilla_crumbs/context_processors.py index dcb094bd9..2c3daec95 100644 --- a/horilla_crumbs/context_processors.py +++ b/horilla_crumbs/context_processors.py @@ -144,18 +144,35 @@ def breadcrumbs(request): path = base_url candidates = Candidate.objects.filter(is_active=True) + employees = Employee.objects.all() if len(parts) > 1: - if "search-candidate" in parts: + + if "recruitment" in parts: + if "search-candidate" in parts: + pass + elif "candidate-view" in parts: + pass + elif "get-mail-log-rec" in parts: + pass + else: + # Store the candidates in the session + request.session["filtered_candidates"] = [ + candidate.id for candidate in candidates + ] + + if "employee-filter-view" in parts: pass - elif "candidate-view" in parts: + elif "employee-view" in parts: pass - elif "get-mail-log-rec" in parts: + elif "view-penalties" in parts: + pass + elif parts[0] == "employee" and parts[-1].isdigit(): pass else: - # Store the candidates in the session - request.session["filtered_candidates"] = [ - candidate.id for candidate in candidates + # Store the employees in the session + request.session["filtered_employees"] = [ + employee.id for employee in employees ] if len(parts) == 0: