Merge branch 'develop' of https://github.com/frappe/lms into user-persona

This commit is contained in:
Jannat Patel
2025-04-21 18:07:12 +05:30
30 changed files with 3942 additions and 3408 deletions

View File

@@ -24,7 +24,10 @@
>
{{ formatNumberIntoCurrency(batch.data.amount, batch.data.currency) }}
</div>
<div class="flex items-center mb-3 text-ink-gray-7">
<div
v-if="batch.data.courses.length"
class="flex items-center mb-3 text-ink-gray-7"
>
<BookOpen class="h-4 w-4 stroke-1.5 mr-2" />
<span> {{ batch.data.courses.length }} {{ __('Courses') }} </span>
</div>

View File

@@ -9,16 +9,20 @@
:class="{ 'default-image': !course.image }"
:style="{ backgroundImage: 'url(\'' + encodeURI(course.image) + '\')' }"
>
<div
class="flex items-center flex-wrap space-x-1 relative top-4 px-2 w-fit"
>
<Badge v-if="course.featured" variant="subtle" theme="green" size="md">
<div class="flex items-center flex-wrap relative top-4 px-2 w-fit">
<Badge
v-if="course.featured"
variant="subtle"
theme="green"
size="md"
class="mb-1 mr-1"
>
{{ __('Featured') }}
</Badge>
<div
v-if="course.tags"
v-for="tag in course.tags?.split(', ')"
class="text-xs bg-white text-gray-800 px-2 py-0.5 rounded-md"
class="text-xs bg-white text-gray-800 px-2 py-0.5 rounded-md mb-1 mr-1"
>
{{ tag }}
</div>

View File

@@ -352,10 +352,23 @@ const tabsStructure = computed(() => {
label: 'Meta Description',
name: 'meta_description',
type: 'textarea',
rows: 5,
rows: 4,
description:
"This description will be shown on lists and pages that don't have meta description",
},
{
label: 'Meta Keywords',
name: 'meta_keywords',
type: 'textarea',
rows: 4,
description:
'Keywords for search engines to find your website. Separated by commas.',
},
{
label: 'Meta Image',
name: 'meta_image',
type: 'Upload',
},
],
},
],

View File

@@ -51,7 +51,9 @@ const props = defineProps({
const update = () => {
props.fields.forEach((f) => {
if (f.type != 'Column Break') {
if (f.type == 'Upload') {
props.data.doc[f.name] = f.value ? f.value.file_url : null
} else if (f.type != 'Column Break') {
props.data.doc[f.name] = f.value
}
})

View File

@@ -54,15 +54,24 @@
<div v-else>
<div class="flex items-center text-sm space-x-2">
<div
class="flex items-center justify-center rounded border border-outline-gray-modals bg-white w-[10rem] py-5"
class="flex items-center justify-center rounded border border-outline-gray-modals bg-white w-[10rem] py-2"
>
<img :src="data[field.name]?.file_url" class="h-6 rounded" />
<img
:src="data[field.name]?.file_url || data[field.name]"
class="w-[80%] rounded"
/>
</div>
<div class="flex flex-col flex-wrap">
<span class="break-all text-ink-gray-9">
{{ data[field.name]?.file_name }}
{{
data[field.name]?.file_name ||
data[field.name].split('/').pop()
}}
</span>
<span class="text-sm text-ink-gray-5 mt-1">
<span
v-if="data[field.name]?.file_size"
class="text-sm text-ink-gray-5 mt-1"
>
{{ getFileSize(data[field.name]?.file_size) }}
</span>
</div>