Skip to content

Commit

Permalink
Merge pull request #1613 from frappe/version-15-hotfix
Browse files Browse the repository at this point in the history
chore: release v15
  • Loading branch information
ruchamahabal authored Apr 3, 2024
2 parents a904827 + c2bb8e6 commit 318af48
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 22 deletions.
3 changes: 2 additions & 1 deletion hrms/hr/doctype/employee_checkin/employee_checkin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
{
"fieldname": "employee",
"fieldtype": "Link",
"in_standard_filter": 1,
"label": "Employee",
"options": "Employee",
"reqd": 1,
Expand Down Expand Up @@ -109,7 +110,7 @@
}
],
"links": [],
"modified": "2023-05-12 14:52:22.660264",
"modified": "2024-04-02 01:50:23.150627",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Checkin",
Expand Down
11 changes: 10 additions & 1 deletion hrms/hr/doctype/job_opening/job_opening.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"section_break_6",
"publish",
"route",
"publish_applications_received",
"column_break_12",
"job_application_route",
"section_break_14",
Expand Down Expand Up @@ -241,12 +242,20 @@
"fieldtype": "Select",
"label": "Salary Paid Per",
"options": "Month\nYear"
},
{
"default": "1",
"depends_on": "publish",
"description": "If enabled, the total no. of applications received for this opening will be displayed on the website",
"fieldname": "publish_applications_received",
"fieldtype": "Check",
"label": "Publish Applications Received"
}
],
"icon": "fa fa-bookmark",
"idx": 1,
"links": [],
"modified": "2024-01-03 14:34:32.159138",
"modified": "2024-04-01 11:32:47.167232",
"modified_by": "Administrator",
"module": "HR",
"name": "Job Opening",
Expand Down
34 changes: 18 additions & 16 deletions hrms/templates/generators/job_opening.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,26 @@
</div>
{% endif %}

<div class="col-12 col-md-4 mb-6 mb-md-8">
<div class="flex flex-row align-items-center">
<div class="rounded-circle p-4" style="background: var(--orange-50)">
<svg
class="icon"
style="height: 28px;
width: 28px;
--icon-stroke: var(--orange-700)"
>
<use href="#icon-users"></use>
</svg>
</div>
<div class="ml-5">
<div class="text-secondary text-uppercase" style="font-size: 11px">{{ _("Applications Received") }}</div>
<div class="font-weight-bold">{{ no_of_applications }}</div>
{%- if publish_applications_received -%}
<div class="col-12 col-md-4 mb-6 mb-md-8">
<div class="flex flex-row align-items-center">
<div class="rounded-circle p-4" style="background: var(--orange-50)">
<svg
class="icon"
style="height: 28px;
width: 28px;
--icon-stroke: var(--orange-700)"
>
<use href="#icon-users"></use>
</svg>
</div>
<div class="ml-5">
<div class="text-secondary text-uppercase" style="font-size: 11px">{{ _("Applications Received") }}</div>
<div class="font-weight-bold">{{ no_of_applications }}</div>
</div>
</div>
</div>
</div>
{%- endif -%}

{%- if (status == 'Open' and closes_on) or (status == 'Closed' and closed_on) -%}
<div class="col-12 col-md-4 mb-6 mb-md-8">
Expand Down
2 changes: 1 addition & 1 deletion hrms/www/hrms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ def get_context(context):
csrf_token = frappe.sessions.get_csrf_token()
frappe.db.commit() # nosempgrep
context = frappe._dict()
context.csrf_token = csrf_token
context.boot = get_boot()
context.boot.csrf_token = csrf_token
return context


Expand Down
10 changes: 7 additions & 3 deletions hrms/www/jobs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,13 @@ <h3 class="mt-0 mb-10 jobs-page">{{ _("Job Openings") }}</h3>

<div class="px-4 py-2 job-card-footer mt-auto">
<div class="row text-12 text-secondary">
<p class="col-6 text-center border-right mb-0">
{{ _("Applications received:") + " " }}
<b>{{ jo.no_of_applications }}</b>
<p class="col-6 text-center mb-0 {{ 'border-right' if (jo.publish_applications_received or jo.closes_on) }}">
{%- if jo.publish_applications_received -%}
{{ _("Applications received:") + " " }}
<b>{{ jo.no_of_applications }}</b>
{% else %}
{% endif %}
</p>
<p class="col-6 text-center mb-0">
{%- if jo.closes_on -%}
Expand Down
1 change: 1 addition & 0 deletions hrms/www/jobs/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def get_job_openings(filters=None, txt=None, sort=None, limit=20, offset=0):
jo.status,
jo.job_title,
jo.description,
jo.publish_applications_received,
jo.publish_salary_range,
jo.lower_range,
jo.upper_range,
Expand Down

0 comments on commit 318af48

Please sign in to comment.