fix: course creation form validations

This commit is contained in:
Jannat Patel
2024-02-28 23:42:17 +05:30
parent 60a917e60c
commit 8f504a8043
5 changed files with 139 additions and 51 deletions

View File

@@ -48,6 +48,7 @@ import { sessionStore } from '@/stores/session'
import { Dropdown } from 'frappe-ui'
import { ChevronDown, LogIn, LogOut, User } from 'lucide-vue-next'
import { useRouter } from 'vue-router'
import { convertToTitleCase } from '../utils'
const router = useRouter()
const props = defineProps({
@@ -94,18 +95,4 @@ const userDropdownOptions = [
},
},
]
function convertToTitleCase(str) {
if (!str) {
return ''
}
return str
.toLowerCase()
.split(' ')
.map(function (word) {
return word.charAt(0).toUpperCase().concat(word.substr(1))
})
.join(' ')
}
</script>