chore: resolved conflicts

This commit is contained in:
Jannat Patel
2026-01-15 09:41:48 +05:30
18 changed files with 169 additions and 215 deletions

View File

@@ -70,7 +70,7 @@ const props = withDefaults(
modelValue: string
label?: string
description?: string
type: 'image' | 'video'
type?: 'image' | 'video'
required?: boolean
}>(),
{

View File

@@ -285,9 +285,6 @@ const certificate = createResource({
}&format=${encodeURIComponent(data.template)}`,
'_blank'
)
capture('certificate_issued', {
course: props.course.data.name,
})
},
})

View File

@@ -52,14 +52,12 @@ import {
} from 'frappe-ui'
import { computed, ref, watch } from 'vue'
import SettingFields from '@/components/Settings/SettingFields.vue'
import { useTelemetry } from 'frappe-ui/frappe'
const show = defineModel<boolean>({ required: true, default: false })
const paymentGateways = defineModel<any>('paymentGateways')
const newGateway = ref(null)
const newGatewayFields = ref([])
const newGatewayData = ref<Record<string, any>>({})
const { capture } = useTelemetry()
const props = defineProps<{
gatewayID: string | null
@@ -160,7 +158,6 @@ const saveNewGateway = (close: () => void) => {
...newGatewayData.value,
},
}).then((data: any) => {
capture('payment_gateway_configured')
paymentGateways.value.reload()
close()
})

View File

@@ -4,15 +4,30 @@
<div class="text-lg text-ink-gray-9 font-semibold">
{{ __('Upcoming Evaluations') }}
</div>
<Button
v-if="
upcoming_evals.data?.length != evaluationCourses.length && !forHome
"
@click="openEvalModal"
>
<Button v-if="canScheduleEvals" @click="openEvalModal">
{{ __('Schedule Evaluation') }}
</Button>
</div>
<div
v-if="endDate && !endDateHasPassed"
class="text-sm leading-5 bg-surface-amber-1 text-ink-amber-3 p-2 rounded-md mb-4"
>
{{ __('The last day to schedule your evaluations is ') }}
<span class="font-medium">
{{ dayjs(endDate).format('DD MMMM YYYY') }} </span
>.
{{ __('Please make sure to schedule your evaluation before this date.') }}
</div>
<div
v-else-if="endDateHasPassed"
class="text-sm leading-5 bg-surface-red-1 text-ink-red-3 p-2 rounded-md mb-4"
>
{{
__(
'The deadline to schedule evaluations has passed. Please contact the Instructor for assistance.'
)
}}
</div>
<div v-if="upcoming_evals.data?.length">
<div
class="grid gap-4"
@@ -99,7 +114,7 @@
</div>
</div>
</div>
<div v-else class="text-ink-gray-5">
<div v-else-if="!endDateHasPassed" class="text-ink-gray-5">
{{ __('Schedule an evaluation to get certified.') }}
</div>
</div>
@@ -173,6 +188,18 @@ const evaluationCourses = computed(() => {
})
})
const canScheduleEvals = computed(() => {
return (
upcoming_evals.data?.length != evaluationCourses.length &&
!props.forHome &&
!endDateHasPassed.value
)
})
const endDateHasPassed = computed(() => {
return dayjs().isSameOrAfter(dayjs(props.endDate))
})
const cancelEvaluation = (evl) => {
$dialog({
title: __('Cancel this evaluation?'),