feat: new tab and other misc fixes
This commit is contained in:
@@ -30,13 +30,23 @@ class LMSJobApplication(Document):
|
||||
"full_name": frappe.db.get_value("User", self.user, "full_name"),
|
||||
"job_title": self.job_title,
|
||||
}
|
||||
|
||||
resume = frappe.get_doc(
|
||||
"File",
|
||||
{
|
||||
"file_name": self.resume,
|
||||
},
|
||||
)
|
||||
frappe.sendmail(
|
||||
recipients=company_email,
|
||||
subject=subject,
|
||||
template="job_application",
|
||||
args=args,
|
||||
attachments=[self.resume],
|
||||
attachments=[
|
||||
{
|
||||
"fname": resume.file_name,
|
||||
"fcontent": resume.get_content(),
|
||||
}
|
||||
],
|
||||
header=[subject, "green"],
|
||||
retry=3,
|
||||
)
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2024-01-22 10:42:42.872995",
|
||||
"modified": "2024-04-17 10:35:21.957961",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "LMS Batch",
|
||||
@@ -334,6 +334,18 @@
|
||||
"role": "Moderator",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Batch Evaluator",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"show_title_field_in_link": 1,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"status",
|
||||
"section_break_7",
|
||||
"published",
|
||||
"published_on",
|
||||
"column_break_10",
|
||||
"upcoming",
|
||||
"column_break_12",
|
||||
@@ -242,6 +243,11 @@
|
||||
"fieldname": "amount_usd",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Amount (USD)"
|
||||
},
|
||||
{
|
||||
"fieldname": "published_on",
|
||||
"fieldtype": "Date",
|
||||
"label": "Published On"
|
||||
}
|
||||
],
|
||||
"is_published_field": "published",
|
||||
@@ -268,7 +274,7 @@
|
||||
}
|
||||
],
|
||||
"make_attachments_public": 1,
|
||||
"modified": "2024-02-28 11:20:47.700649",
|
||||
"modified": "2024-04-16 17:40:50.899368",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "LMS Course",
|
||||
|
||||
@@ -1208,6 +1208,7 @@ def get_course_details(course):
|
||||
"short_introduction",
|
||||
"published",
|
||||
"upcoming",
|
||||
"published_on",
|
||||
"status",
|
||||
"paid_course",
|
||||
"course_price",
|
||||
@@ -1261,7 +1262,7 @@ def get_course_details(course):
|
||||
|
||||
|
||||
def get_categorized_courses(courses):
|
||||
live, upcoming, enrolled, created, under_review = [], [], [], [], []
|
||||
live, upcoming, new, enrolled, created, under_review = [], [], [], [], [], []
|
||||
|
||||
for course in courses:
|
||||
if course.status == "Under Review":
|
||||
@@ -1271,6 +1272,13 @@ def get_categorized_courses(courses):
|
||||
elif course.published:
|
||||
live.append(course)
|
||||
|
||||
if (
|
||||
course.published
|
||||
and not course.upcoming
|
||||
and course.published_on > add_months(getdate(), -3)
|
||||
):
|
||||
new.append(course)
|
||||
|
||||
if course.membership and course.published:
|
||||
enrolled.append(course)
|
||||
elif course.is_instructor:
|
||||
@@ -1282,6 +1290,7 @@ def get_categorized_courses(courses):
|
||||
|
||||
return {
|
||||
"live": live,
|
||||
"new": new,
|
||||
"upcoming": upcoming,
|
||||
"enrolled": enrolled,
|
||||
"created": created,
|
||||
|
||||
@@ -85,4 +85,5 @@ execute:frappe.delete_doc("Notification", "Assignment Submission Notification")
|
||||
lms.patches.v1_0.change_jobs_url #19-01-2024
|
||||
lms.patches.v1_0.custom_perm_for_discussions #14-01-2024
|
||||
lms.patches.v1_0.rename_evaluator_role
|
||||
lms.patches.v1_0.change_navbar_urls
|
||||
lms.patches.v1_0.change_navbar_urls
|
||||
lms.patches.v1_0.set_published_on
|
||||
10
lms/patches/v1_0/set_published_on.py
Normal file
10
lms/patches/v1_0/set_published_on.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
courses = frappe.get_all(
|
||||
"LMS Course", filters={"published": 1}, fields=["name", "creation"]
|
||||
)
|
||||
|
||||
for course in courses:
|
||||
frappe.db.set_value("LMS Course", course.name, "published_on", course.creation)
|
||||
@@ -1,14 +1,8 @@
|
||||
<h3>
|
||||
{{ _("New Job Applicant") }}
|
||||
</h3>
|
||||
<br>
|
||||
<p>
|
||||
{{ _("{0} has applied for the job position {1}").format(full_name, job_title) }}
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<b>
|
||||
{{ _("You can find their resume attached to this email.") }}
|
||||
</b>
|
||||
{{ _("You can find their resume attached to this email.") }}
|
||||
</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user