From 8f317d2f4448113f441579cba67547c0f4da75f8 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Thu, 25 Jan 2024 15:24:52 +0530 Subject: [PATCH] fix: ui issues --- frontend/src/components/CourseOutline.vue | 6 +- frontend/src/components/JobCard.vue | 45 ++++++ frontend/src/pages/Batch.vue | 2 +- frontend/src/pages/Batches.vue | 179 ++++++++++++---------- frontend/src/pages/Courses.vue | 14 +- frontend/src/pages/JobDetail.vue | 27 ++++ frontend/src/pages/Jobs.vue | 48 ++++++ frontend/src/router.js | 11 ++ lms/lms/utils.py | 11 ++ 9 files changed, 254 insertions(+), 89 deletions(-) create mode 100644 frontend/src/components/JobCard.vue create mode 100644 frontend/src/pages/JobDetail.vue create mode 100644 frontend/src/pages/Jobs.vue diff --git a/frontend/src/components/CourseOutline.vue b/frontend/src/components/CourseOutline.vue index caf5e23a..d620e056 100644 --- a/frontend/src/components/CourseOutline.vue +++ b/frontend/src/components/CourseOutline.vue @@ -16,13 +16,13 @@ }" class="h-5 w-5 text-gray-900 stroke-1 mr-2" /> -
+
{{ chapter.title }}
-
+
+
+ +
+
+
+ {{ job.job_title }} +
+
+
+ {{ job.company_name }} +
+
+ + + {{ job.location }} + +
+
+
+ +
+ {{ dayjs(job.creation).format('DD MMM YYYY') }} +
+
+
+
+ + diff --git a/frontend/src/pages/Batch.vue b/frontend/src/pages/Batch.vue index 4fe7e485..31b00237 100644 --- a/frontend/src/pages/Batch.vue +++ b/frontend/src/pages/Batch.vue @@ -4,7 +4,7 @@ class="sticky top-0 z-10 flex items-center justify-between border-b bg-white px-3 py-2.5 sm:px-5" > -
-
- +
+ + diff --git a/frontend/src/pages/Jobs.vue b/frontend/src/pages/Jobs.vue new file mode 100644 index 00000000..30004d39 --- /dev/null +++ b/frontend/src/pages/Jobs.vue @@ -0,0 +1,48 @@ + + diff --git a/frontend/src/router.js b/frontend/src/router.js index 2a66db34..eb257bf7 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -54,6 +54,17 @@ const routes = [ name: 'Statistics', component: () => import('@/pages/Statistics.vue'), }, + { + path: '/job-openings', + name: 'Jobs', + component: () => import('@/pages/Jobs.vue'), + }, + { + path: '/job-openings/:job', + name: 'JobDetail', + component: () => import('@/pages/JobDetail.vue'), + props: true, + }, ] let router = createRouter({ diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 7fce3473..9127796f 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -1726,3 +1726,14 @@ def get_order_summary(doctype, docname, country=None): details.total_amount_formatted = fmt_money(details.amount, 0, details.currency) return details + + +@frappe.whitelist(allow_guest=True) +def get_job_opportunities(): + jobs = frappe.get_all( + "Job Opportunity", + {"status": "Open", "disabled": False}, + ["job_title", "location", "type", "company_name", "company_logo", "name", "creation"], + order_by="creation desc", + ) + return jobs