fix: email on job creation

This commit is contained in:
Jannat Patel
2021-12-30 13:08:52 +05:30
parent aa81426189
commit 5a1bdc156d
9 changed files with 54 additions and 10 deletions

View File

@@ -113,7 +113,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-12-30 10:04:01.049256",
"modified": "2021-12-30 12:10:08.849547",
"modified_by": "Administrator",
"module": "Job",
"name": "Job Opportunity",
@@ -129,6 +129,7 @@
"read": 1,
"report": 1,
"role": "System Manager",
"select": 1,
"share": 1,
"write": 1
},

View File

View File

@@ -0,0 +1,28 @@
{
"attach_print": 0,
"channel": "Email",
"creation": "2021-12-30 12:29:56.533903",
"days_in_advance": 0,
"docstatus": 0,
"doctype": "Notification",
"document_type": "Job Opportunity",
"enabled": 1,
"event": "New",
"idx": 0,
"is_standard": 1,
"message": "Hey,\n\nA new Job Opportunity has been created. \n\n<p>Company Name: {{ doc.company_name}}</p>\n<p>Job Title: {{ doc.job_title}}</p>\n<p>Job Location: {{ doc.location}}</p><br>\n<p>Job Description: {{ doc.description}}</p><br>\n\n<p>Find all the posted jobs <a href=\"{{ frappe.utils.get_url() }}/app/job-opportunity\">here</a>.</p><br>\n",
"modified": "2021-12-30 12:54:13.382512",
"modified_by": "Administrator",
"module": "Job",
"name": "New job alert",
"owner": "Administrator",
"recipients": [
{
"receiver_by_role": "System Manager"
}
],
"send_system_notification": 0,
"send_to_all_assignees": 0,
"sender_email": "",
"subject": "New job added by {{ doc.company_name}}"
}

View File

@@ -0,0 +1,10 @@
Hey,
A new Job Opportunity has been created.
<p>Company Name: {{ doc.company_name}}</p>
<p>Job Title: {{ doc.job_title}}</p>
<p>Job Location: {{ doc.location}}</p><br>
<p>Job Description: {{ doc.description}}</p><br>
<p>Find all the posted jobs <a href="{{ frappe.utils.get_url() }}/app/job-opportunity">here</a>.</p><br>

View File

@@ -0,0 +1,5 @@
import frappe
def get_context(context):
# do your magic here
pass

View File

@@ -8,7 +8,7 @@
"allow_print": 0,
"amount": 0.0,
"amount_based_on_field": 0,
"apply_document_permissions": 0,
"apply_document_permissions": 1,
"button_label": "Save",
"creation": "2021-12-27 17:02:12.461145",
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
@@ -19,7 +19,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-12-30 10:03:52.681310",
"modified": "2021-12-30 12:09:22.469041",
"modified_by": "Administrator",
"module": "Job",
"name": "job-opportunity",

View File

@@ -13,11 +13,11 @@
<div class="job-card">
<div>
<div class="course-tags">
<div class="course-card-pills">{{ job.type }}</div>
<div class="course-card-pills">{{ _(job.type) }}</div>
<div class="course-card-pills">{{ job.location }}</div>
</div>
<div class="job-card-info">
<div class="bold-title">{{ job.job_title }}</div>
<div class="bold-title">{{ _(job.job_title) }}</div>
<small>{{ job.company_name }}</small>
</div>
</div>

View File

@@ -1,6 +1,6 @@
{% extends "templates/base.html" %}
{% from "www/hackathons/macros/card.html" import null_card %}
{% block title %}{{ job.job_title }}{% endblock %}
{% block title %}{{ _(job.job_title) }}{% endblock %}
{% block content %}
@@ -11,11 +11,11 @@
<div class="job-card">
<div>
<span class="course-tags">
<div class="course-card-pills">{{ job.type }}</div>
<div class="course-card-pills">{{ _(job.type) }}</div>
<div class="course-card-pills">{{ job.location }}</div>
</span>
<div class="job-card-info">
<div class="card-heading">{{ job.job_title }}</div>
<div class="card-heading">{{ _(job.job_title) }}</div>
<a class="dark-links" href="{{ job.company_website }}">{{ job.company_name }}</a>
<div class="small mt-1">Posted On: {{ frappe.utils.format_date(job.creation, "medium") }}</div>
</div>
@@ -25,7 +25,7 @@
</div>
</div>
<div class="job-description-section">
<div>{{ job.description }}</div>
<div>{{ _(job.description) }}</div>
<a class="button is-primary mt-5" href="{{ job.application_link }}">{{ _("Apply Now") }}</a>
</div>
</div>
@@ -38,6 +38,6 @@
<div class="breadcrumb">
<a class="dark-links" href="/jobs">{{ _("Job Openings") }}</a>
<img class="ml-1 mr-1" src="/assets/school/icons/chevron-right.svg">
<span class="muted-text">{{ job.job_title }}</span>
<span class="muted-text">{{ _(job.job_title) }}</span>
</div>
{% endmacro %}