Merge pull request #2007 from pateljannat/issues-174

fix: misc issues
This commit is contained in:
Jannat Patel
2026-01-22 13:59:54 +05:30
committed by GitHub
55 changed files with 78 additions and 212 deletions

View File

@@ -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'
}

View File

@@ -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'
"

View File

@@ -116,20 +116,30 @@ const debouncedSaveProgress = (scormDetails) => {
}
const saveDataToLMS = (key, value) => {
if (key === 'cmi.core.lesson_status') {
if (value === 'passed') {
isSuccessfullyCompleted.value = true
saveProgress({
is_complete: isSuccessfullyCompleted.value,
scorm_content: '',
})
} else if (value === 'failed' && courseRestartOnFailure) {
saveProgress({
is_complete: isSuccessfullyCompleted.value,
scorm_content: '',
})
}
} else if (key === 'cmi.suspend_data' && !isSuccessfullyCompleted.value) {
const isLessonStatus = key === 'cmi.core.lesson_status' && value === 'passed'
const isCompletionStatus =
key === 'cmi.completion_status' && value === 'completed'
const shouldRestart =
(key === 'cmi.core.lesson_status' && value === 'failed') ||
(key === 'cmi.completion_status' && value === 'incomplete')
if (isLessonStatus || isCompletionStatus) {
isSuccessfullyCompleted.value = true
}
if (
isLessonStatus ||
isCompletionStatus ||
(shouldRestart && courseRestartOnFailure)
) {
saveProgress({
is_complete: isSuccessfullyCompleted.value,
scorm_content: '',
})
return
}
if (key === 'cmi.suspend_data' && !isSuccessfullyCompleted.value) {
debouncedSaveProgress({
is_complete: false,
scorm_content: value,