Merge pull request #275 from pateljannat/enhanced-profile

This commit is contained in:
Jannat Patel
2021-12-14 18:09:15 +05:30
committed by GitHub
55 changed files with 3209 additions and 378 deletions

View File

@@ -65,7 +65,7 @@ jobs:
run: bench new-site --mariadb-root-password root --admin-password admin frappe.local
- name: install school app
working-directory: /home/runner/frappe-bench
run: bench --verbose --site frappe.local install-app school
run: bench --site frappe.local install-app school
- name: setup requirements
working-directory: /home/runner/frappe-bench
run: bench setup requirements --dev

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,162 @@
[
{
"docstatus": 0,
"doctype": "Function",
"function": "Consulting",
"modified": "2021-12-14 15:16:26.189604",
"name": "Consulting",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Data & Analytics",
"modified": "2021-12-14 15:16:26.341051",
"name": "Data & Analytics",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Design & Creative",
"modified": "2021-12-14 15:16:26.343820",
"name": "Design & Creative",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Engineering (Non Software)",
"modified": "2021-12-14 15:16:26.346329",
"name": "Engineering (Non Software)",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Engineering (Software & IT)",
"modified": "2021-12-14 15:16:26.348864",
"name": "Engineering (Software & IT)",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Finance, Investment & Accounting",
"modified": "2021-12-14 15:16:26.351518",
"name": "Finance, Investment & Accounting",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Human Resource & Recruiting",
"modified": "2021-12-14 15:16:26.354310",
"name": "Human Resource & Recruiting",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Legal",
"modified": "2021-12-14 15:16:26.356844",
"name": "Legal",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Marketing, Advertising & PR",
"modified": "2021-12-14 15:16:26.359511",
"name": "Marketing, Advertising & PR",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Operations & Admin",
"modified": "2021-12-14 15:16:26.362571",
"name": "Operations & Admin",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Project Management",
"modified": "2021-12-14 15:16:26.365033",
"name": "Project Management",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Product",
"modified": "2021-12-14 15:16:26.367804",
"name": "Product",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Research, Training & Education",
"modified": "2021-12-14 15:16:26.370085",
"name": "Research, Training & Education",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Sales & Customer Service",
"modified": "2021-12-14 15:16:26.372635",
"name": "Sales & Customer Service",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Supply Chain, Logistics Strategy & Management",
"modified": "2021-12-14 15:16:26.375091",
"name": "Supply Chain, Logistics Strategy & Management",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Function",
"function": "Other",
"modified": "2021-12-14 15:16:26.377761",
"name": "Other",
"parent": null,
"parentfield": null,
"parenttype": null
}
]

View File

@@ -0,0 +1,242 @@
[
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Accounting",
"modified": "2021-12-14 15:21:18.044741",
"name": "Accounting",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Ads, Marketing, PR & Events",
"modified": "2021-12-14 15:21:18.069794",
"name": "Ads, Marketing, PR & Events",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Agriculture, Fishing & Forestry",
"modified": "2021-12-14 15:21:18.074148",
"name": "Agriculture, Fishing & Forestry",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Architecture",
"modified": "2021-12-14 15:21:18.078250",
"name": "Architecture",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Aviation & Aerospace",
"modified": "2021-12-14 15:21:18.082127",
"name": "Aviation & Aerospace",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Banking, Financial Services & Insurance",
"modified": "2021-12-14 15:21:18.087499",
"name": "Banking, Financial Services & Insurance",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Biotech & Pharmaceuticals",
"modified": "2021-12-14 15:21:18.092094",
"name": "Biotech & Pharmaceuticals",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Construction & Real Estate",
"modified": "2021-12-14 15:21:18.095728",
"name": "Construction & Real Estate",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Consulting & Professional Services",
"modified": "2021-12-14 15:21:18.099171",
"name": "Consulting & Professional Services",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Education & Training",
"modified": "2021-12-14 15:21:18.105864",
"name": "Education & Training",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Energy & Utilities",
"modified": "2021-12-14 15:21:18.114022",
"name": "Energy & Utilities",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Engineering",
"modified": "2021-12-14 15:21:18.119149",
"name": "Engineering",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Food & Beverages",
"modified": "2021-12-14 15:21:18.124655",
"name": "Food & Beverages",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Health & Medical",
"modified": "2021-12-14 15:21:18.127914",
"name": "Health & Medical",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Hospitality & Tourism",
"modified": "2021-12-14 15:21:18.130783",
"name": "Hospitality & Tourism",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "IT / Ecommerce / Internet",
"modified": "2021-12-14 15:21:18.134069",
"name": "IT / Ecommerce / Internet",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Manufacturing & Production",
"modified": "2021-12-14 15:21:18.137362",
"name": "Manufacturing & Production",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Media & Entertainment",
"modified": "2021-12-14 15:21:18.140180",
"name": "Media & Entertainment",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Public Service & NGOs",
"modified": "2021-12-14 15:21:18.143125",
"name": "Public Service & NGOs",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Retail, Fashion & FMCG",
"modified": "2021-12-14 15:21:18.146020",
"name": "Retail, Fashion & FMCG",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Staffing & Recruiting",
"modified": "2021-12-14 15:21:18.149084",
"name": "Staffing & Recruiting",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Transportation & Logistics",
"modified": "2021-12-14 15:21:18.151952",
"name": "Transportation & Logistics",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Security & Law Enforcement",
"modified": "2021-12-14 15:21:18.154929",
"name": "Security & Law Enforcement",
"parent": null,
"parentfield": null,
"parenttype": null
},
{
"docstatus": 0,
"doctype": "Industry",
"industry": "Other",
"modified": "2021-12-14 15:21:18.157766",
"name": "Other",
"parent": null,
"parentfield": null,
"parenttype": null
}
]

View File

@@ -105,7 +105,7 @@ doc_events = {
# ]
#}
fixtures = ["Custom Field"]
fixtures = ["Custom Field", "Function", "Industry"]
# Testing
# -------

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Certification', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,72 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-12-07 12:20:37.143096",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"certification_name",
"organization",
"description",
"column_break_4",
"expire",
"issue_date",
"expiration_date"
],
"fields": [
{
"fieldname": "certification_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Certification Name",
"reqd": 1
},
{
"fieldname": "organization",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Organization",
"reqd": 1
},
{
"fieldname": "issue_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Issue Date",
"reqd": 1
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description"
},
{
"depends_on": "eval: !doc.expire",
"fieldname": "expiration_date",
"fieldtype": "Data",
"label": "Expiration Date"
},
{
"default": "0",
"fieldname": "expire",
"fieldtype": "Check",
"label": "This certificate does no expire"
},
{
"fieldname": "column_break_4",
"fieldtype": "Column Break"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-14 11:42:24.844113",
"modified_by": "Administrator",
"module": "LMS",
"name": "Certification",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Certification(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and Contributors
# See license.txt
# import frappe
import unittest
class TestCertification(unittest.TestCase):
pass

View File

@@ -0,0 +1,85 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-12-07 12:15:46.078717",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"institution_name",
"location",
"degree_type",
"major",
"column_break_5",
"grade_type",
"grade",
"start_date",
"end_date"
],
"fields": [
{
"fieldname": "institution_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Institution Name",
"reqd": 1
},
{
"fieldname": "location",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Location",
"reqd": 1
},
{
"fieldname": "degree_type",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Degree Type",
"reqd": 1
},
{
"fieldname": "grade_type",
"fieldtype": "Select",
"label": "Grade Type",
"options": "Percentage (e.g. 70%)\nPoint of Score (e.g. 70)\nLetter Grade (e.g. A, B-)\nUK Grading (e.g. 1st, 2:2)\nFrench (e.g. Distinction)\nCGPA/4"
},
{
"fieldname": "grade",
"fieldtype": "Data",
"label": "Grade"
},
{
"fieldname": "major",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Field of Major/Study",
"reqd": 1
},
{
"fieldname": "start_date",
"fieldtype": "Date",
"label": "Start Date"
},
{
"fieldname": "end_date",
"fieldtype": "Date",
"label": "End Date (or expected)"
},
{
"fieldname": "column_break_5",
"fieldtype": "Column Break"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-10 12:12:58.827429",
"modified_by": "Administrator",
"module": "LMS",
"name": "Education Detail",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class EducationDetail(Document):
pass

View File

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Function', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,44 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:function",
"creation": "2021-12-14 14:02:35.435916",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"function"
],
"fields": [
{
"fieldname": "function",
"fieldtype": "Data",
"label": "Function",
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-12-14 14:02:46.474260",
"modified_by": "Administrator",
"module": "LMS",
"name": "Function",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Function(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and Contributors
# See license.txt
# import frappe
import unittest
class TestFunction(unittest.TestCase):
pass

View File

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Industry', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,44 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:industry",
"creation": "2021-12-14 14:37:47.183595",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"industry"
],
"fields": [
{
"fieldname": "industry",
"fieldtype": "Data",
"label": "Industry",
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-12-14 14:38:10.405473",
"modified_by": "Administrator",
"module": "LMS",
"name": "Industry",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Industry(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and Contributors
# See license.txt
# import frappe
import unittest
class TestIndustry(unittest.TestCase):
pass

View File

@@ -0,0 +1,32 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-12-14 14:42:48.823215",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"function"
],
"fields": [
{
"fieldname": "function",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Function",
"options": "Function",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-14 14:42:48.823215",
"modified_by": "Administrator",
"module": "LMS",
"name": "Preferred Function",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PreferredFunction(Document):
pass

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Preferred Industry', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,32 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-12-14 14:44:06.808797",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"industry"
],
"fields": [
{
"fieldname": "industry",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Industry",
"options": "Industry",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-14 14:44:21.215262",
"modified_by": "Administrator",
"module": "LMS",
"name": "Preferred Industry",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PreferredIndustry(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and Contributors
# See license.txt
# import frappe
import unittest
class TestPreferredIndustry(unittest.TestCase):
pass

View File

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Skill', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,44 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:skill",
"creation": "2021-12-08 15:31:29.292544",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"skill"
],
"fields": [
{
"fieldname": "skill",
"fieldtype": "Data",
"label": "Skill",
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-12-12 10:02:39.584832",
"modified_by": "Administrator",
"module": "LMS",
"name": "Skill",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Skill(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and Contributors
# See license.txt
# import frappe
import unittest
class TestSkill(unittest.TestCase):
pass

View File

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Skills', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,32 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-12-07 12:22:44.139341",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"skill_name"
],
"fields": [
{
"fieldname": "skill_name",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Skill Name",
"options": "Skill",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-13 14:42:43.962186",
"modified_by": "Administrator",
"module": "LMS",
"name": "Skills",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Skills(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and Contributors
# See license.txt
# import frappe
import unittest
class TestSkills(unittest.TestCase):
pass

View File

@@ -0,0 +1,81 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-12-07 12:17:49.571045",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"title",
"company",
"location",
"description",
"column_break_4",
"current",
"from_date",
"to_date"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1
},
{
"fieldname": "company",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Company",
"reqd": 1
},
{
"fieldname": "location",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Location",
"reqd": 1
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"reqd": 1
},
{
"depends_on": "eval: !doc.current",
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
"mandatory_depends_on": "eval: !doc.current"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description"
},
{
"default": "0",
"fieldname": "current",
"fieldtype": "Check",
"label": "I am currently working here"
},
{
"fieldname": "column_break_4",
"fieldtype": "Column Break"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-09 16:25:48.104205",
"modified_by": "Administrator",
"module": "LMS",
"name": "Work Experience",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class WorkExperience(Document):
pass

View File

@@ -1,14 +1,83 @@
frappe.ready(function () {
frappe.web_form.after_load = () => {
if (!frappe.utils.get_url_arg("name")) {
window.location.href = `/edit-profile?name=${frappe.session.user}`;
}
redirect_to_user_profile_form();
add_listener_for_current_company();
add_listener_for_certificate_expiry();
add_listener_for_skill_add_rows();
add_listener_for_functions_add_rows();
add_listener_for_industries_add_rows();
}
frappe.web_form.validate = () => {
let information_missing;
const data = frappe.web_form.get_values();
data.work_experience.forEach(exp => {
if (!exp.current && !exp.to_date) {
information_missing = true
frappe.msgprint('To Date is mandatory in Work Experience.');
}
});
if (information_missing)
return false;
return true;
};
frappe.web_form.after_save = () => {
setTimeout(() => {
window.location.href = `/profile_/${frappe.web_form.get_value(["username"])}`;
})
}
})
});
const redirect_to_user_profile_form = () => {
if (!frappe.utils.get_url_arg("name")) {
window.location.href = `/edit-profile?name=${frappe.session.user}`;
}
};
const add_listener_for_current_company = () => {
$(document).on("click", "input[data-fieldname='current']", (e) => {
if ($(e.currentTarget).prop("checked"))
$("div[data-fieldname='to_date']").addClass("hide");
else
$("div[data-fieldname='to_date']").removeClass("hide");
});
};
const add_listener_for_certificate_expiry = () => {
$(document).on("click", "input[data-fieldname='expire']", (e) => {
if ($(e.currentTarget).prop("checked"))
$("div[data-fieldname='expiration_date']").addClass("hide");
else
$("div[data-fieldname='expiration_date']").removeClass("hide");
});
};
const add_listener_for_skill_add_rows = () => {
$('[data-fieldname="skill"]').find(".grid-add-row").click((e) => {
if ($('[data-fieldname="skill"]').find(".grid-row").length > 5) {
$('[data-fieldname="skill"]').find(".grid-add-row").hide();
}
});
};
const add_listener_for_functions_add_rows = () => {
$('[data-fieldname="preferred_functions"]').find(".grid-add-row").click((e) => {
if ($('[data-fieldname="preferred_functions"]').find(".grid-row").length > 3) {
$('[data-fieldname="preferred_functions"]').find(".grid-add-row").hide();
}
});
};
const add_listener_for_industries_add_rows = () => {
$('[data-fieldname="preferred_industries"]').find(".grid-add-row").click((e) => {
if ($('[data-fieldname="preferred_industries"]').find(".grid-row").length > 3) {
$('[data-fieldname="preferred_industries"]').find(".grid-add-row").hide();
}
});
};

View File

@@ -21,7 +21,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-08-06 14:40:39.013776",
"modified": "2021-12-14 16:35:24.751439",
"modified_by": "Administrator",
"module": "LMS",
"name": "profile",
@@ -98,6 +98,19 @@
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"description": "",
"fieldname": "cover_image",
"fieldtype": "Attach Image",
"hidden": 0,
"label": "Cover Image",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "mobile_no",
@@ -114,7 +127,7 @@
{
"allow_read_on_all_link_options": 0,
"fieldname": "bio",
"fieldtype": "Small Text",
"fieldtype": "Text Editor",
"hidden": 0,
"label": "Bio",
"max_length": 0,
@@ -173,10 +186,10 @@
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "college",
"fieldtype": "Data",
"fieldname": "education_details",
"fieldtype": "Section Break",
"hidden": 0,
"label": "College Name",
"label": "Education Details",
"max_length": 0,
"max_value": 0,
"read_only": 0,
@@ -185,11 +198,23 @@
},
{
"allow_read_on_all_link_options": 0,
"depends_on": "college",
"fieldname": "branch",
"fieldtype": "Data",
"fieldname": "education",
"fieldtype": "Table",
"hidden": 0,
"label": "Branch",
"label": "Education",
"max_length": 0,
"max_value": 0,
"options": "Education Detail",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "work_experience_details",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Work Experience",
"max_length": 0,
"max_value": 0,
"read_only": 0,
@@ -198,10 +223,232 @@
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "profession",
"fieldname": "work_experience",
"fieldtype": "Table",
"hidden": 0,
"label": "Work Experience",
"max_length": 0,
"max_value": 0,
"options": "Work Experience",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "certification_details",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Certification Details",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "certification",
"fieldtype": "Table",
"hidden": 0,
"label": "Certification",
"max_length": 0,
"max_value": 0,
"options": "Certification",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "skill_details",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Skill Details",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "skill",
"fieldtype": "Table",
"hidden": 0,
"label": "Skill",
"max_length": 0,
"max_value": 0,
"options": "Skills",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "carrer_preference_details",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Career Preference",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "preferred_functions",
"fieldtype": "Table",
"hidden": 0,
"label": "Preferred Functions",
"max_length": 0,
"max_value": 0,
"options": "Preferred Function",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "preferred_industries",
"fieldtype": "Table",
"hidden": 0,
"label": "Preferred Industries",
"max_length": 0,
"max_value": 0,
"options": "Preferred Industry",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "preferred_location",
"fieldtype": "Data",
"hidden": 0,
"label": "Profession",
"label": "Preferred Location",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "dream_companies",
"fieldtype": "Data",
"hidden": 0,
"label": "Dream Companies",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "work_environment",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Work Environment",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "attire",
"fieldtype": "Select",
"hidden": 0,
"label": "Attire Preference",
"max_length": 0,
"max_value": 0,
"options": "Casual Wear\nFormal Wear",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "collaboration",
"fieldtype": "Select",
"hidden": 0,
"label": "Collaboration Preference",
"max_length": 0,
"max_value": 0,
"options": "Individual Work\nTeam Work\nBoth Individual and Team Work",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "role",
"fieldtype": "Select",
"hidden": 0,
"label": "Role Preference",
"max_length": 0,
"max_value": 0,
"options": "Clearly Defined Role\nUnstructured Role",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "location_preference",
"fieldtype": "Select",
"hidden": 0,
"label": "Location Preference",
"max_length": 0,
"max_value": 0,
"options": "Travel to work\nOffice close to Home",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "time",
"fieldtype": "Select",
"hidden": 0,
"label": "Time Preference",
"max_length": 0,
"max_value": 0,
"options": "Flexible Time\nFixed 9-5",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "company_type",
"fieldtype": "Select",
"hidden": 0,
"label": "Company Type",
"max_length": 0,
"max_value": 0,
"options": "Corporate Organization\nStartup Organization",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"description": "Private Information includes your Mobile Number, Email Address, Grade Type, Grade and Work Environment Preferences",
"fieldname": "hide_private",
"fieldtype": "Check",
"hidden": 0,
"label": "Hide my Private Information from others",
"max_length": 0,
"max_value": 0,
"read_only": 0,

View File

@@ -11,6 +11,7 @@ class CustomUser(User):
def validate(self):
super(CustomUser, self).validate()
self.validate_username_characters()
self.validate_skills()
def validate_username_characters(self):
if len(self.username):
@@ -49,6 +50,17 @@ class CustomUser(User):
if len(self.username) < 4:
frappe.throw(_("Username cannot be less than 4 characters"))
def validate_skills(self):
unique_skills = []
for skill in self.skill:
if not skill.skill_name:
return
if not skill.skill_name in unique_skills:
unique_skills.append(skill.skill_name)
else:
frappe.throw(_("Skills must be unique"))
def get_username_from_first_name(self):
return frappe.scrub(self.first_name) + str(random.randint(0, 99))

View File

@@ -773,7 +773,6 @@ input[type=checkbox] {
.overview-card {
padding: 1.5rem;
width: 256px;
flex-direction: column;
display: grid;
-moz-column-gap: 1rem;
@@ -976,7 +975,6 @@ input[type=checkbox] {
}
.profile-about-section {
flex: 1;
margin-top: 3rem;
}
@@ -984,13 +982,16 @@ input[type=checkbox] {
height: 68px;
background: #ffffff;
border-radius: 0px 0px 8px 8px;
font-size: 12px;
display: flex;
justify-content: space-between;
}
.profile-avatar {
position: relative;
top: 188px;
left: 40px;
display: flex;
width: fit-content;
}
@media (max-width: 500px) {
@@ -1008,13 +1009,11 @@ input[type=checkbox] {
}
.profile-name {
color: #FFFFFF;
color: var(--text-color-dark);
font-weight: 600;
font-size: 22px;
line-height: 156%;
letter-spacing: -0.0175em;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.64);
padding: 1.5rem;
}
@media (max-width: 375px) {
@@ -1024,6 +1023,36 @@ input[type=checkbox] {
}
}
.profile-name-section {
display: flex;
align-items: center;
margin-bottom: 0.25rem;
padding-left: 175px;
}
.profile-link {
display: flex;
align-items: center;
padding: 1rem;
}
@media (max-width: 500px) {
.profile-info {
flex-direction: column;
align-items: end;
justify-content: space-around;
padding-right: 1rem;
}
.profile-name-section {
padding-left: 0;
}
.profile-link {
padding: 0;
}
}
.creator-badge {
background: #48BB74;
padding: 4px 6px;
@@ -1038,54 +1067,40 @@ input[type=checkbox] {
height: fit-content;
box-shadow: 0px 1px 1px rgb(0 0 0 / 16%);
border-radius: 4px;
margin-top: 2rem;
margin-left: 0.5rem;
}
@media (max-width: 375px) {
.creator-badge {
font-size: 8px;
margin: 8px 0px 0px;
}
}
.profile-profession {
position: relative;
top: 16px;
left: 174px;
font-size: 12px;
line-height: 165%;
width: 85%;
.profile-card {
flex-direction: column;
padding: 1.5rem;
display: grid;
row-gap: 2rem;
}
@media (max-width: 1200px) {
.profile-profession {
width: 75%;
}
.profile-item {
color: var(--text-color-dark);
font-weight: 500;
}
@media (max-width: 767px) {
.profile-profession {
width: 60%;
}
.profile-card-row span::before {
content: "\00B7";
margin: 0 4px;
}
@media (max-width: 500px) {
.profile-profession {
top: 10px;
left: 120px;
}
}
@media (max-width: 375px) {
.profile-profession {
top: 5px;
left: 70px;
width: 75%;
}
.education-work-details {
display: grid;
grid-template-columns: 4fr 1fr;
grid-gap: 2rem;
}
.social-icons {
margin: 16px;
margin: 0.5rem;
}
@media (max-width: 500px) {
@@ -1100,6 +1115,15 @@ input[type=checkbox] {
}
}
.education-details {
margin-top: 3rem;
}
.institute-name {
font-weight: bold;
color: var(--text-color-dark);
}
.profile-courses {
margin-top: 3rem;
}
@@ -1185,98 +1209,10 @@ pre {
font-size: 1rem;
}
.talk-title {
border-bottom: 1px solid #cecdcd;
}
.mt-5 {
margin-top: 5px;
}
.company-name {
font-weight: bold;
}
.speaker-cards-parent {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
-moz-column-gap: 32px;
column-gap: 14px;
row-gap: 32px;
}
.avatar img {
object-fit: cover;
}
.section-with-cards .course-home-headings {
margin: 0px 0px 1rem;
}
.schedule-container {
padding-bottom: 16px;
}
.schedule-inner-container {
display: grid;
grid-template-columns: 1.2fr 2fr 1fr 0.2fr;
padding: 0 20px 0;
}
.schedule-slot {
font-weight: bolder;
}
.schedule-title {
font-size: 20px;
}
.schedule-info {
padding: 20px;
}
.drop-down-icon {
padding: 5px 0 0 5px;
}
.event-btn {
display: flex;
align-items: center;
justify-content: center;
margin-top: 3rem;
}
.exhibitor-card {
text-align: center;
padding-bottom: 30px;
}
.exhibitor-card .company-name {
font-size: 25px;
margin-top: 30px;
}
.exhibitor-card .company-logo {
height: 158px;
width: 252px;
object-fit: contain;
}
.info-speaker-avatar {
display: flex;
text-align: left;
}
.info-speaker {
margin-left: 1rem;
padding-bottom: 0;
margin-top: 6px;
}
.info-avatar img {
object-fit: contain;
}
.certificate-content {
padding: 2.5rem 3rem;
}

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.4823 11.64L10.8764 13.2242C10.0389 12.7193 9.26095 12.1217 8.55714 11.4428C7.87926 10.7378 7.28179 9.95968 6.77571 9.12278L8.35837 7.51687C8.45423 7.41953 8.51896 7.29587 8.54434 7.16164C8.56971 7.0274 8.55459 6.88865 8.50088 6.76304L6.85072 2.91666C6.78553 2.76499 6.66802 2.64179 6.5196 2.56951C6.37119 2.49723 6.20174 2.48068 6.04214 2.52287L3.01634 3.3232C2.86523 3.36237 2.7319 3.45167 2.63815 3.57648C2.54441 3.7013 2.4958 3.85423 2.50028 4.01027C2.69281 7.52945 4.15604 10.8592 6.6182 13.381C9.14046 15.8439 12.4711 17.3074 15.9911 17.4996C16.1473 17.5049 16.3006 17.4567 16.4257 17.363C16.5508 17.2693 16.6401 17.1357 16.6789 16.9843L17.4785 13.957C17.5209 13.7975 17.5046 13.6281 17.4324 13.4796C17.3602 13.3312 17.2371 13.2136 17.0855 13.1484L13.2384 11.499C13.1126 11.4445 12.9735 11.4288 12.8388 11.454C12.7041 11.4791 12.5799 11.5439 12.4823 11.64V11.64Z" stroke="#192734" stroke-miterlimit="10" stroke-linecap="square"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -1,9 +1 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="2" y="2" width="20" height="20" fill="url(#pattern0)"/>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0" transform="scale(0.05)"/>
</pattern>
<image id="image0" width="20" height="20" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABiUlEQVQ4EZWU4VUCMQzHOwIjMAIb6AhuIBvgArb9QkLDh3MD3EA3wA10A9wAN0D/PdLLld5DeI+XuzT95Z9cU+cavxi7maf0GCi9BU6HwHI6//eBUhd5e9/Y1nZFSk+B5GggCqvtPq5l0aY456AqsOz+ARrAJMdI6aEJ9ZReb4INbThdtCCXOQrgeWRZepJvTeI5/ZjniHKLCCiN3SwrzaVWPdMSsFYCz07bN88p2iQ9kGWpTrU1RBPUtihEdSTHvO5Z3hUE6zl91Run3q1C7M0fyPapOKcIDX/dW2fVZaA2t7G55fIkH8qA4kvgLVPgnLMVZiB6phlgPctLS0nLh/Nn9+L4OQCsM0M3smoBrK+Hjeb8lI9UnWWAp4PnbXgmuVNQZJ77jaz6S6NcGHkUR6fDNHZ3MTXVBWBih5nWI1Myr2WhyqAY5wkNxvhpjFqUpbFqkUTXi8XmHEDyeW1SFASLUifjoc4c1Mn7ToFQNglTqQjAlwcYCdRvbVY1dQ/awPr5avZ6w9/7L3HVAW99VdWzAAAAAElFTkSuQmCC"/>
</defs>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#192734" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 523 B

View File

@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-linkedin" width="20" height="20" viewBox="0 0 24 24" stroke-width="1" stroke="#192734" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<rect x="4" y="4" width="16" height="16" rx="2" />
<line x1="8" y1="11" x2="8" y2="16" />
<line x1="8" y1="8" x2="8" y2="8.01" />
<line x1="12" y1="16" x2="12" y2="11" />
<path d="M16 16v-3a2 2 0 0 0 -4 0" />
</svg>

After

Width:  |  Height:  |  Size: 509 B

View File

@@ -0,0 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.5 7.65137V15.0756C2.5 15.4373 2.64367 15.7841 2.8994 16.0398C3.15513 16.2956 3.50198 16.4392 3.86364 16.4392H16.1364C16.498 16.4392 16.8449 16.2956 17.1006 16.0398C17.3563 15.7841 17.5 15.4373 17.5 15.0756V7.65137" stroke="#192734" stroke-miterlimit="10" stroke-linecap="square"/>
<path d="M17.5 7.5756V5.53014C17.5 5.16848 17.3563 4.82164 17.1006 4.5659C16.8449 4.31017 16.498 4.1665 16.1364 4.1665H3.86364C3.50198 4.1665 3.15513 4.31017 2.8994 4.5659C2.64367 4.82164 2.5 5.16848 2.5 5.53014V7.5756L10 10.8332L17.5 7.5756Z" stroke="#192734" stroke-miterlimit="10" stroke-linecap="square"/>
</svg>

After

Width:  |  Height:  |  Size: 714 B

View File

@@ -1,9 +1,9 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="2" y="3" width="20.7" height="18" fill="url(#pattern0)"/>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0" transform="scale(0.0434783 0.05)"/>
</pattern>
<image id="image0" width="23" height="20" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAUCAYAAABmvqYOAAABtUlEQVRIDa2UTU7CQBSAOYJH4CgcxSNwAIPoAgSEqAmIbohR/iQIgiK0nU75q4BiKz0ALnStxoULTMZMzWvGoUBrbPLy5jUz3zd5M61nKxJ7iR0kjz0uH1HEPhErH93+7eK1m+EoobEd3Z25kbSQrAtIJjQkrMxsJQCH7EQiIuQHMJvnJADlM5UkUukNvls3GHsFJL+yUH5MJe2eGvbwULaOp9KfmXzeywpaklzlYXb1cDTWl8ITqSOSyRYqAKeHaAfi33V6KtEmhuIETjKneR/GeK2F5CkP4mtJxkTTH13As4VpQ5B2eJBdPRiNiD4xXMFJ+bJuXjs7ILxTOl0T7BqeyRZIQxCXCu4ftL/Dc+cXC+H9wcACO9p5PHn4TnfMRvXqek6AFMU8RAqFWHlbQnv72bNi6Y2Fn+SKpCmiX4Lh3diCOoYHwpEgveOlcs3PSkqVmgVvd3tzYEdtATh8RKyk3mgSQUJfY03/HzgrKZarz11VfYI28NnseTAc8wVCUYX9p8CY3znAIWuG4aMQHmy1BSbaSVbBYa2dxNw5TIDMSpzCYS0rsYXDRCqhAbWb/COZrH8Ddw70agzSigAAAAAASUVORK5CYII="/>
</defs>
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-medium" width="20" height="20" viewBox="0 0 24 24" stroke-width="1" stroke="#192734" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<rect x="4" y="4" width="16" height="16" rx="2" />
<path d="M8 9h1l3 3l3 -3h1" />
<line x1="8" y1="15" x2="10" y2="15" />
<line x1="14" y1="15" x2="16" y2="15" />
<line x1="9" y1="9" x2="9" y2="15" />
<line x1="15" y1="9" x2="15" y2="15" />
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 541 B

View File

@@ -9,7 +9,7 @@
<div class="container profile-page">
{% set read_only = member.name != frappe.session.user %}
{{ ProfileBanner(member) }}
{{ AboutOverviewSection(member) }}
{{ ProfileSections(member) }}
{{ CoursesEnrolled(member, read_only) }}
{{ CoursesCreated(member, read_only) }}
{{ CoursesMentored(member, read_only) }}
@@ -19,63 +19,58 @@
{% endblock %}
{% macro ProfileBanner(member) %}
{% set cover_image = member.cover_image if member.cover_image else "/assets/school/images/profile-banner.png" %}
<div class="">
<div class="profile-banner" style="background-image: url(/assets/school/images/profile-banner.png)">
<div class="profile-banner" style="background-image: url({{ cover_image }})">
<div class="profile-avatar">
{{ widgets.Avatar(member=member, avatar_class="avatar-xl") }}
</div>
</div>
<div class="profile-info">
<div class="profile-name-section">
<div class="profile-name"> {{ member.full_name }} </div>
{% if member.get_authored_courses() | length %}
<div class="creator-badge"> Creator </div>
{% endif %}
</div>
</div>
<div class="profile-info">
<div class="profile-profession">
{% if member.profession %}
<span class=""> {{ member.profession }} </span>
{% endif %}
<span class="social-icons">
{% if member.linkedin %}
<a class="linkedin button-links" href="{{ member.linkedin }}">
<img src="/assets/school/images/linkedin.png">
</a>
{% endif %}
{% if member.medium %}
<a class="medium button-links" href="{{ member.medium}}">
<img src="/assets/school/icons/medium.svg">
</a>
{% endif %}
{% if member.github %}
<a class="github button-links" href="{{ member.github }}">
<img src="/assets/school/icons/github.svg">
</a>
{% endif %}
</span>
{% if frappe.session.user == member.email %}
<a class="dark-links pull-right" href="/edit-profile?name={{ member.email }}">Edit Profile</a>
{% endif %}
</div>
{% if frappe.session.user == member.email %}
<a class="dark-links profile-link" href="/edit-profile?name={{ member.email }}">Edit Profile</a>
{% endif %}
</div>
</div>
{% endmacro %}
{% macro AboutOverviewSection(member) %}
{% macro ProfileSections(member) %}
<div class="profile-parent-section">
<div class="profile-column-one">
{{ About(member) }}
{{ EducationDetails(member) }}
{{ WorkDetails(member) }}
{{ Certification(member) }}
</div>
<div class="profile-column-two">
{{ Overview(member) }}
{{ Contact(member) }}
{{ Skills(member) }}
{{ CareerPreference(member) }}
<!-- {{ WorkPreference(member) }} -->
</div>
</div>
{% endmacro %}
{% macro Overview(member) %}
{% set enrollment = member.get_course_membership("Student") | length %}
{% set mentorship = member.get_course_membership("Mentor") | length %}
{% set reviews = member.get_user_reviews() | length %}
<div class="profile-parent-section">
{% if member.bio %}
<div class="profile-about-section">
<div class="course-home-headings">
About
</div>
<div class="common-card-style description-card">
{{ member.bio }}
</div>
</div>
{% endif %}
{% if enrollment or reviews or mentorship %}
{% if enrollment or reviews or mentorship %}
<div class="course-overview-section">
<div class="course-home-headings">
Overview
@@ -101,9 +96,7 @@
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endif %}
{% endmacro %}
@@ -126,9 +119,7 @@
{% macro CoursesMentored(member, read_only) %}
{% if member.get_mentored_courses() | length %}
<div class="profile-courses">
<div class="course-home-headings">
Courses Mentored
</div>
<div class="course-home-headings"> {{ _("Courses Mentored") }} </div>
<div class="cards-parent">
{% for course in member.get_mentored_courses() %}
{{ widgets.CourseCard(course=course, read_only=read_only) }}
@@ -143,9 +134,7 @@
{% if enrolled.completed | length %}
<div class="profile-courses">
<div class="course-home-headings">
Courses Completed
</div>
<div class="course-home-headings"> {{ _("Courses Completed") }} </div>
<div class="cards-parent">
{% for course in enrolled.completed %}
{{ widgets.CourseCard(course=course, read_only=read_only) }}
@@ -156,9 +145,7 @@
{% if enrolled.in_progress | length %}
<div class="profile-courses">
<div class="course-home-headings">
Courses In Progress
</div>
<div class="course-home-headings"> {{ _("Courses In Progress") }} </div>
<div class="cards-parent">
{% for course in enrolled.in_progress %}
{{ widgets.CourseCard(course=course, read_only=read_only) }}
@@ -182,6 +169,180 @@
</div>
{% endmacro %}
{% macro About(member) %}
{% if member.bio %}
<div class="profile-about-section">
<div class="course-home-headings"> {{ _("About") }} </div>
<div class="common-card-style description-card">
{{ member.bio }}
</div>
</div>
{% endif %}
{% endmacro %}
{% macro WorkPreference(member) %}
<div class="education-details">
<div class="course-home-headings"> {{ _("Work Preference") }} </div>
<div class="common-card-style overview-card">
<div> {{ member.attire }} </div>
<div> {{ member.collaboration }} </div>
<div> {{ member.role }} </div>
<div> {{ member.location_preference }} </div>
<div> {{ member.time }} </div>
<div> {{ member.company_type }} </div>
</div>
</div>
{% endmacro %}
{% macro CareerPreference(member) %}
{% if member.preferred_functions or member.preferred_industries or member.preferred_location or member.dream_companies %}
<div class="education-details">
<div class="course-home-headings"> {{ _("Career Preference") }} </div>
<div class="common-card-style overview-card">
{% if member.preferred_functions | length %}
<div>
<b>Preferred Functions:</b>
<div>
{% for function in member.preferred_functions %}
<div>{{ function.function }}</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if member.preferred_industries | length %}
<div>
<b>Preferred Industries:</b>
<div>
{% for industry in member.preferred_industries %}
<div>{{ industry.industry }}</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if member.preferred_location %}
<div> <b>Preferred Locations:</b> {{ member.preferred_location }} </div>
{% endif %}
{% if member.dream_companies %}
<div> <b>Dream Companies:</b> {{ member.dream_companies }} </div>
{% endif %}
</div>
</div>
{% endif %}
{% endmacro %}
{% macro Contact(member) %}
<div class="education-details">
<div class="course-home-headings"> {{ _("Contact") }} </div>
<div class="common-card-style overview-card">
{% if not member.hide_private %}
<a class="button-links" href="mailto:{{ member.email }}"> <img src="/assets/school/icons/mail.svg"> {{ member.email }} </a>
{% endif %}
{% if member.mobile_no and not member.hide_private %}
<a class="button-links" href="tel:{{ member.mobile_no }}" >
<img src="/assets/school/icons/call.svg"> {{ member.mobile_no }}
</a>
{% endif %}
{% if member.linkedin %}
<a class="button-links" href="{{ member.linkedin }}">
<img src="/assets/school/icons/linkedin.svg"> {{ member.linkedin.split("/")[-1] }}
</a>
{% endif %}
{% if member.medium %}
<a class="button-links" href="{{ member.medium}}">
<img src="/assets/school/icons/medium.svg"> {{ member.medium.split("/")[-1] }}
</a>
{% endif %}
{% if member.github %}
<a class="button-links" href="{{ member.github }}">
<img src="/assets/school/icons/github.svg"> {{ member.github.split("/")[-1] }}
</a>
{% endif %}
</div>
</div>
{% endmacro %}
{% macro Skills(member) %}
{% if member.skill | length %}
<div class="education-details">
<div class="course-home-headings"> {{ _("Skills")}} </div>
<div class="common-card-style overview-card">
{% for skill in member.skill %}
<div> {{ skill.skill_name }} </div>
{% endfor %}
</div>
</div>
{% endif %}
{% endmacro %}
{% macro EducationDetails(member) %}
{% if member.education %}
<div class="education-details">
<div class="course-home-headings"> Education </div>
<div class="common-card-style profile-card">
{% for edu in member.education %}
<div class="profile-card-row">
<div class="institute-name"> {{ edu.institution_name }} </div>
<div class="profile-item"> {{ edu.degree_type }} <span></span> {{ edu.major }}
{% if not member.hide_private %} <span></span>
<!-- {% if edu.grade_type %} {{ edu.grade_type }} {% endif %} -->
{% if edu.grade %} {{ edu.grade }} {% endif %}
{% endif %}
</div>
<div> {{ frappe.utils.format_date(edu.start_date, "MMM YYYY") }} - {{ frappe.utils.format_date(edu.end_date, "MMM YYYY") }} </div>
<div> {{ edu.location }} </div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endmacro %}
{% macro WorkDetails(member) %}
{% if member.work_experience %}
<div class="education-details">
<div class="course-home-headings"> Work Experience </div>
<div class="common-card-style profile-card">
{% for work in member.work_experience %}
<div class="">
<div class="institute-name"> {{ work.title }} </div>
<div class="profile-item"> {{ work.company }} </div>
<div> {{ frappe.utils.format_date(work.from_date, "MMM YYYY") }} -
{% if work.to_date %} {{ frappe.utils.format_date(work.to_date, "MMM YYYY") }} {% else %} Present {% endif %} </div>
<div> {{ work.location }} </div>
{% if work.description %} <div class="profile-item"> {{ work.description }} </div> {% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endmacro %}
{% macro Certification(member) %}
{% if member.certification %}
<div class="education-details">
<div class="course-home-headings"> Certification </div>
<div class="common-card-style profile-card">
{% for cert in member.certification %}
<div class="">
<div class="institute-name"> {{ cert.certification_name }} </div>
<div class="profile-item"> {{ cert.organization }} </div>
<div> {{ frappe.utils.format_date(cert.issue_date, "MMM YYYY") }}
{% if cert.expiration_date %} - {{ frappe.utils.format_date(cert.expiration_date, "MMM YYYY") }} {% endif %} </div>
{% if cert.description %} <div class="profile-item"> {{ cert.description }} </div> {% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endmacro %}
{% block script %}
<script>
frappe.ready(() => {
@@ -191,6 +352,10 @@
link_array.length && $(link_array[0]).addClass("active");
}, 0)
}
})
if ($(".profile-column-one").children().length == 0) {
$(".profile-column-one").hide();
}
});
</script>
{% endblock %}

View File

@@ -10,7 +10,7 @@ def get_context(context):
except KeyError:
username = frappe.db.get_value("User", frappe.session.user, ["username"])
if username:
frappe.local.flags.redirect_location = get_profile_url_prefix() + urlencode({"username": username})
frappe.local.flags.redirect_location = get_profile_url_prefix() + username
raise frappe.Redirect
try:
context.member = frappe.get_doc("User", {"username": username})