fix: minor recritment analytics fixes (#22830)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
Anurag Mishra
2020-07-31 17:59:30 +05:30
committed by GitHub
parent cf00ee49ec
commit 2a4c90302b

View File

@@ -96,6 +96,7 @@ def get_data(filters):
def get_parent_row(sp_jo_map, sp, jo_ja_map, ja_joff_map): def get_parent_row(sp_jo_map, sp, jo_ja_map, ja_joff_map):
data = [] data = []
if sp in sp_jo_map.keys():
for jo in sp_jo_map[sp]: for jo in sp_jo_map[sp]:
row = { row = {
"staffing_plan" : sp, "staffing_plan" : sp,
@@ -108,6 +109,7 @@ def get_parent_row(sp_jo_map, sp, jo_ja_map, ja_joff_map):
def get_child_row(jo, jo_ja_map, ja_joff_map): def get_child_row(jo, jo_ja_map, ja_joff_map):
data = [] data = []
if jo in jo_ja_map.keys():
for ja in jo_ja_map[jo]: for ja in jo_ja_map[jo]:
row = { row = {
"indent":1, "indent":1,
@@ -177,7 +179,7 @@ def get_job_applicant(jo_list):
def get_job_offer(ja_list): def get_job_offer(ja_list):
ja_joff_map = {} ja_joff_map = {}
offers = frappe.get_all("Job offer", filters = [["job_applicant", "IN", ja_list]], fields =["name", "job_applicant", "status", 'offer_date', 'designation']) offers = frappe.get_all("Job Offer", filters = [["job_applicant", "IN", ja_list]], fields =["name", "job_applicant", "status", 'offer_date', 'designation'])
for offer in offers: for offer in offers:
if offer.job_applicant not in ja_joff_map.keys(): if offer.job_applicant not in ja_joff_map.keys():