Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge 'develop' into 'main' #1155

Merged
merged 37 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
26f1e22
feat: add required indicator in jobs
iamejaaz Nov 8, 2024
9dbe8fb
feat: tables in lms lessons
FahidLatheef Nov 9, 2024
8226031
Merge remote-tracking branch 'origin/develop' into develop
FahidLatheef Nov 9, 2024
740584d
Merge branch 'frappe:develop' into develop
FahidLatheef Nov 11, 2024
93b3eda
refactor: removed trailing semicolon
FahidLatheef Nov 11, 2024
af83812
Merge branch 'frappe:develop' into develop
FahidLatheef Nov 13, 2024
08261c8
refactor: mark two options as required in choices
iamejaaz Nov 18, 2024
8e1db29
refactor: change possibility to require only one option
iamejaaz Nov 19, 2024
75d43a1
chore: French translations
pateljannat Nov 25, 2024
cec5913
chore: Spanish translations
pateljannat Nov 25, 2024
0dc7734
chore: Arabic translations
pateljannat Nov 25, 2024
5111d83
chore: German translations
pateljannat Nov 25, 2024
d2f9a2c
chore: Hungarian translations
pateljannat Nov 25, 2024
7e1e373
chore: Polish translations
pateljannat Nov 25, 2024
a92159b
chore: Russian translations
pateljannat Nov 25, 2024
d634a0f
chore: Swedish translations
pateljannat Nov 25, 2024
06706ea
chore: Turkish translations
pateljannat Nov 25, 2024
58d5157
chore: Chinese Simplified translations
pateljannat Nov 25, 2024
1b4622b
chore: Persian translations
pateljannat Nov 25, 2024
6e8d4cd
chore: Bosnian translations
pateljannat Nov 25, 2024
86b129a
chore: Esperanto translations
pateljannat Nov 25, 2024
6c06f7d
Merge pull request #1152 from frappe/l10n_develop2
pateljannat Nov 26, 2024
98ccb15
chore: Swedish translations
pateljannat Nov 26, 2024
34ba2fb
chore: Persian translations
pateljannat Nov 26, 2024
a64b0f7
fix: misc issues
pateljannat Nov 27, 2024
b8da14a
Merge pull request #1154 from frappe/l10n_develop2
pateljannat Nov 27, 2024
a9f40d1
Merge pull request #1109 from FahidLatheef/develop
pateljannat Nov 27, 2024
015e228
chore(release): Bumped to Version 2.14.0
frappe-bot Nov 27, 2024
6329d9c
Merge pull request #1108 from iamejaaz/required-indicator-job
pateljannat Nov 27, 2024
0e6df83
fix: patched quiz submission data
pateljannat Nov 27, 2024
97543a4
fix: misc quiz submission issues
pateljannat Nov 28, 2024
d688d5c
fix: program title rename and program overlay
pateljannat Nov 29, 2024
c3af65e
chore: removed unused imports
pateljannat Nov 29, 2024
d1b613c
chore: removed unused file
pateljannat Nov 29, 2024
727f7b0
fix: check for payments app before importing gateway controller
pateljannat Nov 29, 2024
55ec813
chore: removed unused file
pateljannat Nov 29, 2024
c471d39
Merge pull request #1156 from pateljannat/program-saving-issue
pateljannat Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@editorjs/nested-list": "^1.4.2",
"@editorjs/paragraph": "^2.11.3",
"@editorjs/simple-image": "^1.6.0",
"@editorjs/table": "^2.4.2",
"ace-builds": "^1.36.2",
"chart.js": "^4.4.1",
"codemirror-editor-vue3": "^2.8.0",
Expand Down
31 changes: 20 additions & 11 deletions frontend/src/components/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,27 @@ const addQuizzes = () => {
}

const addPrograms = () => {
if (settingsStore.learningPaths.data) {
let activeFor = ['Programs', 'ProgramForm']
let index = 1
if (!isInstructor.value && !isModerator.value) {
sidebarLinks.value = sidebarLinks.value.filter(
(link) => link.label !== 'Courses'
)
activeFor.push('CourseDetail')
activeFor.push('Lesson')
index = 0
}
let activeFor = ['Programs', 'ProgramForm']
let index = 1
let canAddProgram = false

if (
!isInstructor.value &&
!isModerator.value &&
settingsStore.learningPaths.data
) {
sidebarLinks.value = sidebarLinks.value.filter(
(link) => link.label !== 'Courses'
)
activeFor.push('CourseDetail')
activeFor.push('Lesson')
index = 0
canAddProgram = true
} else if (isInstructor.value || isModerator.value) {
canAddProgram = true
}

if (canAddProgram) {
sidebarLinks.value.splice(index, 0, {
label: 'Programs',
icon: 'Route',
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/DesktopLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<AppSidebar />
</div>
<div class="w-full overflow-auto" id="scrollContainer">
<OnboardingBanner />
<slot />
</div>
</div>
Expand All @@ -17,5 +16,4 @@
</template>
<script setup>
import AppSidebar from './AppSidebar.vue'
import OnboardingBanner from '@/components/OnboardingBanner.vue'
</script>
13 changes: 10 additions & 3 deletions frontend/src/components/LessonHelp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@click="openHelpDialog('upload')"
>
<span class="leading-5">
{{ __('How to upload content from your system?') }}
{{ __(contentMap['upload']) }}
</span>
<Info class="w-3 h-3 text-gray-700" />
</div>
Expand All @@ -44,7 +44,7 @@
@click="openHelpDialog('youtube')"
>
<span>
{{ __('How to add a YouTube Video?') }}
{{ __(contentMap['youtube']) }}
</span>
<Info class="w-3 h-3 text-gray-700" />
</div>
Expand Down Expand Up @@ -72,7 +72,7 @@
</div>
</div>
</div>
<ExplanationVideos v-model="showExplanation" :type="type" />
<ExplanationVideos v-model="showExplanation" :title="title" :type="type" />
</template>
<script setup>
import { Info } from 'lucide-vue-next'
Expand All @@ -81,9 +81,16 @@ import ExplanationVideos from '@/components/Modals/ExplanationVideos.vue'

const showExplanation = ref(false)
const type = ref(null)
const title = ref(null)
const contentMap = {
quiz: 'How to add a Quiz?',
upload: 'How to upload content from your system?',
youtube: 'How to add a YouTube Video?',
}

const openHelpDialog = (contentType) => {
type.value = contentType
title.value = contentMap[contentType]
showExplanation.value = true
}
</script>
9 changes: 7 additions & 2 deletions frontend/src/components/Modals/ExplanationVideos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
v-model="show"
:options="{
size: '4xl',
title: title,
}"
>
<template #body>
<div class="p-4">
<template #body-content>
<div>
<VideoBlock :file="file" />
</div>
</template>
Expand All @@ -24,6 +25,10 @@ const props = defineProps({
type: [String, null],
required: true,
},
title: {
type: String,
required: true,
},
})

const file = computed(() => {
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/Modals/Question.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@
type="select"
:options="['Choices', 'User Input', 'Open Ended']"
class="pb-2"
:required="true"
/>
<div v-if="question.type == 'Choices'" class="divide-y border-t">
<div v-for="n in 4" class="space-y-4 py-2">
<FormControl
:label="__('Option') + ' ' + n"
v-model="question[`option_${n}`]"
:required="n <= 2 ? true : false"
/>
<FormControl
:label="__('Explanation')"
Expand All @@ -82,6 +84,7 @@
<FormControl
:label="__('Possibility') + ' ' + n"
v-model="question[`possibility_${n}`]"
:required="n == 1 ? true : false"
/>
</div>
</div>
Expand Down
22 changes: 11 additions & 11 deletions frontend/src/components/OnboardingBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
@click="redirectToCourseForm()"
class="flex items-center space-x-2"
:class="{
'cursor-pointer': !onboardingDetails.data.course_created.length,
'cursor-pointer': !onboardingDetails.data.course_created?.length,
}"
>
<span
v-if="onboardingDetails.data.course_created.length"
v-if="onboardingDetails.data.course_created?.length"
class="py-1 px-1 bg-white rounded-full"
>
<Check class="h-4 w-4 stroke-2 text-green-600" />
Expand All @@ -32,13 +32,13 @@
class="flex items-center space-x-2"
:class="{
'cursor-pointer':
onboardingDetails.data.course_created.length &&
!onboardingDetails.data.chapter_created.length,
'text-gray-400': !onboardingDetails.data.course_created.length,
onboardingDetails.data.course_created?.length &&
!onboardingDetails.data.chapter_created?.length,
'text-gray-400': !onboardingDetails.data.course_created?.length,
}"
>
<span
v-if="onboardingDetails.data.chapter_created.length"
v-if="onboardingDetails.data.chapter_created?.length"
class="py-1 px-1 bg-white rounded-full"
>
<Check class="h-4 w-4 stroke-2 text-green-600" />
Expand All @@ -55,15 +55,15 @@
class="flex items-center space-x-2"
:class="{
'cursor-pointer':
onboardingDetails.data.course_created.length &&
onboardingDetails.data.chapter_created.length,
onboardingDetails.data.course_created?.length &&
onboardingDetails.data.chapter_created?.length,
'text-gray-400':
!onboardingDetails.data.course_created.length ||
!onboardingDetails.data.chapter_created.length,
!onboardingDetails.data.course_created?.length ||
!onboardingDetails.data.chapter_created?.length,
}"
>
<span
v-if="onboardingDetails.data.lesson_created.length"
v-if="onboardingDetails.data.lesson_created?.length"
class="py-1 px-1 bg-white rounded-full"
>
<Check class="h-4 w-4 stroke-2 text-green-600" />
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/pages/JobCreation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
v-model="job.job_title"
:label="__('Title')"
class="mb-4"
:required="true"
/>
<FormControl
v-model="job.location"
:label="__('Location')"
:required="true"
/>
<FormControl v-model="job.location" :label="__('Location')" />
</div>
<div>
<FormControl
Expand All @@ -29,18 +34,21 @@
type="select"
:options="jobTypes"
class="mb-4"
:required="true"
/>
<FormControl
v-model="job.status"
:label="__('Status')"
type="select"
:options="jobStatuses"
:required="true"
/>
</div>
</div>
<div class="mt-4">
<label class="block text-gray-600 text-xs mb-1">
{{ __('Description') }}
<span class="text-red-500">*</span>
</label>
<TextEditor
:content="job.description"
Expand All @@ -61,20 +69,24 @@
v-model="job.company_name"
:label="__('Company Name')"
class="mb-4"
:required="true"
/>
<FormControl
v-model="job.company_website"
:label="__('Company Website')"
:required="true"
/>
</div>
<div>
<FormControl
v-model="job.company_email_address"
:label="__('Company Email Address')"
class="mb-4"
:required="true"
/>
<label class="block text-gray-600 text-xs mb-1 mt-4">
{{ __('Company Logo') }}
<span class="text-red-500">*</span>
</label>
<FileUploader
v-if="!job.image"
Expand Down
19 changes: 16 additions & 3 deletions frontend/src/pages/ProgramForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="sticky top-0 z-10 flex flex-col md:flex-row md:items-center justify-between border-b bg-white px-3 py-2.5 sm:px-5"
>
<Breadcrumbs :items="breadbrumbs" />
<Button variant="solid">
<Button variant="solid" @click="saveProgram()">
{{ __('Save') }}
</Button>
</header>
Expand Down Expand Up @@ -50,6 +50,7 @@
item-key="name"
group="items"
@end="updateOrder"
class="cursor-move"
>
<template #item="{ element: row }">
<ListRow :row="row" />
Expand Down Expand Up @@ -191,11 +192,13 @@ import { Plus, Trash2 } from 'lucide-vue-next'
import Link from '@/components/Controls/Link.vue'
import { showToast } from '@/utils/'
import Draggable from 'vuedraggable'
import { useRouter } from 'vue-router'

const showDialog = ref(false)
const currentForm = ref(null)
const course = ref(null)
const member = ref(null)
const router = useRouter()

const props = defineProps({
programName: {
Expand Down Expand Up @@ -302,6 +305,16 @@ const updateOrder = (e) => {
)
}

const saveProgram = () => {
call('frappe.model.rename_doc.update_document_title', {
doctype: 'LMS Program',
docname: program.doc.name,
name: program.doc.title,
}).then((data) => {
router.push({ name: 'ProgramForm', params: { programName: data } })
})
}

const courseColumns = computed(() => {
return [
{
Expand Down Expand Up @@ -332,10 +345,10 @@ const memberColumns = computed(() => {
align: 'left',
},
{
label: 'Progress',
label: 'Progress (%)',
key: 'progress',
width: 3,
align: 'left',
align: 'right',
},
]
})
Expand Down
Loading
Loading