fix: Resolve build error and duplicate generateSlug function in admin page

This commit is contained in:
Ryderjj89
2025-10-01 18:59:17 -04:00
parent 07683824c2
commit 71162e5b50

View File

@@ -34,8 +34,6 @@
<form @submit.prevent="handleSubmit" class="space-y-8">
<!-- Basic Information -->
<div class="space-y-4">
<h3 class="text-lg font-medium text-gray-900">Basic Information</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<UFormGroup label="Sermon Title" name="title" required>
<UInput
@@ -162,24 +160,6 @@ const form = reactive({
const loading = ref(false)
const successMessage = ref('')
const generateSlug = (title: string, date: string) => {
if (!title || !date) return ''
const formattedTitle = title
.toLowerCase()
.replace(/[^a-z0-9\s-]/g, '')
.replace(/\s+/g, '-')
.replace(/-+/g, '-')
.trim()
const dateObj = new Date(date)
const month = String(dateObj.getMonth() + 1).padStart(2, '0')
const day = String(dateObj.getDate()).padStart(2, '0')
const year = dateObj.getFullYear()
return `sermon-${month}${day}${year}`
}
const addBibleReference = () => {
form.bibleReferences.push('')
}