fix: made address amount and currency mandatory in LMS Payment

This commit is contained in:
Jannat Patel
2025-03-13 22:01:26 +05:30
parent f29c2da9ce
commit 2ca7b09d1e
3 changed files with 26 additions and 17 deletions

View File

@@ -22,11 +22,13 @@
<span class="font-semibold leading-5"> <span class="font-semibold leading-5">
{{ evl.course_title }} {{ evl.course_title }}
</span> </span>
<Menu v-if="evl.date > dayjs().format()" as="div" class="relative inline-block text-left"> <Menu
v-if="evl.date > dayjs().format()"
as="div"
class="relative inline-block text-left"
>
<div> <div>
<MenuButton <MenuButton class="inline-flex w-full justify-center">
class="inline-flex w-full justify-center"
>
<EllipsisVertical class="w-4 h-4 stroke-1.5" /> <EllipsisVertical class="w-4 h-4 stroke-1.5" />
</MenuButton> </MenuButton>
</div> </div>
@@ -43,15 +45,19 @@
class="absolute mt-2 w-32 rounded-md bg-white shadow-lg p-1.5" class="absolute mt-2 w-32 rounded-md bg-white shadow-lg p-1.5"
> >
<MenuItem v-slot="{ active }"> <MenuItem v-slot="{ active }">
<Button variant="ghost" class="w-full" @click="cancelEvaluation(evl)"> <Button
variant="ghost"
class="w-full"
@click="cancelEvaluation(evl)"
>
<template #prefix> <template #prefix>
<Ban <Ban
:active="active" :active="active"
class="size-4 stroke-1.5" class="size-4 stroke-1.5"
aria-hidden="true" aria-hidden="true"
/> />
</template> </template>
{{ __("Cancel") }} {{ __('Cancel') }}
</Button> </Button>
</MenuItem> </MenuItem>
</MenuItems> </MenuItems>
@@ -111,7 +117,7 @@ import {
Clock, Clock,
GraduationCap, GraduationCap,
HeadsetIcon, HeadsetIcon,
EllipsisVertical EllipsisVertical,
} from 'lucide-vue-next' } from 'lucide-vue-next'
import { inject, ref, getCurrentInstance } from 'vue' import { inject, ref, getCurrentInstance } from 'vue'
import { formatTime } from '../utils' import { formatTime } from '../utils'

View File

@@ -126,7 +126,7 @@ const toggleTheme = () => {
const userDropdownOptions = computed(() => { const userDropdownOptions = computed(() => {
return [ return [
{ {
group: "", group: '',
items: [ items: [
{ {
icon: User, icon: User,
@@ -148,7 +148,9 @@ const userDropdownOptions = computed(() => {
{ {
component: markRaw(Apps), component: markRaw(Apps),
condition: () => { condition: () => {
let cookies = new URLSearchParams(document.cookie.split('; ').join('&')) let cookies = new URLSearchParams(
document.cookie.split('; ').join('&')
)
let system_user = cookies.get('system_user') let system_user = cookies.get('system_user')
if (system_user === 'yes') return true if (system_user === 'yes') return true
else return false else return false
@@ -187,18 +189,19 @@ const userDropdownOptions = computed(() => {
}, },
condition: () => { condition: () => {
return ( return (
userResource.data?.is_system_manager && userResource.data?.is_fc_site userResource.data?.is_system_manager &&
userResource.data?.is_fc_site
) )
}, },
}, },
] ],
}, },
{ {
group: "", group: '',
items: [ items: [
{ {
icon: Zap, icon: Zap,
label: "Powered by Learning", label: 'Powered by Learning',
onClick: () => { onClick: () => {
window.open('https://frappe.io/learning', '_blank') window.open('https://frappe.io/learning', '_blank')
}, },
@@ -225,8 +228,8 @@ const userDropdownOptions = computed(() => {
return !isLoggedIn return !isLoggedIn
}, },
}, },
] ],
} },
] ]
}) })

View File

@@ -1957,7 +1957,7 @@ def update_certificate_purchase(course, payment_name):
{ {
"purchased_certificate": 1, "purchased_certificate": 1,
"payment": payment_name, "payment": payment_name,
} },
) )