mirror of
https://github.com/frappe/lms.git
synced 2026-05-02 13:39:31 +03:00
fix: renamed open to opportunities to open to work
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
<FormControl
|
||||
v-model="profile.open_to"
|
||||
type="select"
|
||||
:options="[' ', 'Opportunities', 'Hiring']"
|
||||
:options="[' ', 'Work', 'Hiring']"
|
||||
:label="__('Open to')"
|
||||
:placeholder="__('Looking for new work or hiring talent?')"
|
||||
/>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
:size="size"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<template v-if="user.open_to === 'Opportunities'" #indicator>
|
||||
<Tooltip :text="__('Open to Opportunities')" placement="right">
|
||||
<template v-if="user.open_to === 'Work'" #indicator>
|
||||
<Tooltip :text="__('Open to Work')" placement="right">
|
||||
<div class="rounded-full bg-surface-green-3 w-fit">
|
||||
<BadgeCheckIcon :class="'text-ink-white ' + checkSize" />
|
||||
</div>
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
</div>
|
||||
<div class="flex items-center space-x-4">
|
||||
<FormControl
|
||||
v-model="openToOpportunities"
|
||||
:label="__('Open to Opportunities')"
|
||||
v-model="openToWork"
|
||||
:label="__('Open to Work')"
|
||||
type="checkbox"
|
||||
@change="updateParticipants()"
|
||||
/>
|
||||
@@ -140,7 +140,7 @@ import UserAvatar from '@/components/UserAvatar.vue'
|
||||
const filters = ref({})
|
||||
const currentCategory = ref('')
|
||||
const nameFilter = ref('')
|
||||
const openToOpportunities = ref(false)
|
||||
const openToWork = ref(false)
|
||||
const hiring = ref(false)
|
||||
const { brand } = sessionStore()
|
||||
const memberCount = ref(0)
|
||||
@@ -197,8 +197,8 @@ const updateFilters = () => {
|
||||
...(nameFilter.value && {
|
||||
member_name: ['like', `%${nameFilter.value}%`],
|
||||
}),
|
||||
...(openToOpportunities.value && {
|
||||
open_to_opportunities: true,
|
||||
...(openToWork.value && {
|
||||
open_to_work: true,
|
||||
}),
|
||||
...(hiring.value && {
|
||||
hiring: true,
|
||||
@@ -211,7 +211,7 @@ const setQueryParams = () => {
|
||||
let filterKeys = {
|
||||
category: currentCategory.value,
|
||||
name: nameFilter.value,
|
||||
'open-to-opportunities': openToOpportunities.value,
|
||||
'open-to-work': openToWork.value,
|
||||
hiring: hiring.value,
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ const setFiltersFromQuery = () => {
|
||||
let queries = new URLSearchParams(location.search)
|
||||
nameFilter.value = queries.get('name') || ''
|
||||
currentCategory.value = queries.get('category') || ''
|
||||
openToOpportunities.value = queries.get('open-to-opportunities') === 'true'
|
||||
openToWork.value = queries.get('open-to-opportunities') === 'true'
|
||||
hiring.value = queries.get('hiring') === 'true'
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<Tooltip
|
||||
v-if="profile.data.open_to"
|
||||
:text="
|
||||
profile.data.open_to === 'Opportunities'
|
||||
? __('Open to Opportunities')
|
||||
profile.data.open_to === 'Work'
|
||||
? __('Open to Work')
|
||||
: __('Hiring')
|
||||
"
|
||||
placement="right"
|
||||
@@ -77,7 +77,7 @@
|
||||
<div
|
||||
class="rounded-full w-fit"
|
||||
:class="
|
||||
profile.data.open_to === 'Opportunities'
|
||||
profile.data.open_to === 'Work'
|
||||
? 'bg-surface-green-3'
|
||||
: 'bg-purple-500'
|
||||
"
|
||||
|
||||
@@ -257,12 +257,12 @@
|
||||
"length": 0,
|
||||
"link_filters": null,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2025-12-24 12:56:32.110405",
|
||||
"modified": "2025-12-24 12:56:32.110406",
|
||||
"module": null,
|
||||
"name": "User-open_to",
|
||||
"no_copy": 0,
|
||||
"non_negative": 0,
|
||||
"options": "\nOpportunities\nHiring",
|
||||
"options": "\nWork\nHiring",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
|
||||
+2
-2
@@ -331,8 +331,8 @@ def get_certification_query(filters):
|
||||
)
|
||||
if field == "member_name":
|
||||
query = query.where(Certificate.member_name.like(value[1]))
|
||||
if field == "open_to_opportunities":
|
||||
query = query.where(User.open_to == "Opportunities")
|
||||
if field == "open_to_work":
|
||||
query = query.where(User.open_to == "Work")
|
||||
if field == "hiring":
|
||||
query = query.where(User.open_to == "Hiring")
|
||||
return query
|
||||
|
||||
+2
-1
@@ -114,4 +114,5 @@ lms.patches.v2_0.count_in_program
|
||||
lms.patches.v2_0.fix_scorm_lesson_reference_idx #02-09-2025
|
||||
lms.patches.v2_0.certified_members_to_certifications #05-10-2025
|
||||
lms.patches.v2_0.fix_job_application_resume_urls
|
||||
lms.patches.v2_0.open_to_opportunities
|
||||
lms.patches.v2_0.open_to_opportunities
|
||||
lms.patches.v2_0.open_to_work
|
||||
@@ -0,0 +1,8 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
open_to_field_exists = frappe.db.exists("Custom Field", {"dt": "User", "fieldname": "open_to"})
|
||||
|
||||
if not open_to_field_exists:
|
||||
return
|
||||
Reference in New Issue
Block a user