fix: added eventType in modal

This commit is contained in:
Shariq Ansari 2025-04-23 16:09:30 +05:30
parent 21bd24f614
commit 28217968e1

View File

@ -67,6 +67,12 @@
<div class="flex justify-between items-center">
<div class="flex">
<div class="flex items-center gap-x-2">
<Button variant="ghost" @click="updateEventType">
<FeatherIcon
:name="_event.eventType == 'Private' ? 'lock' : 'unlock'"
class="h-4 w-4"
/>
</Button>
<Button
v-if="_event.id"
variant="ghost"
@ -111,6 +117,14 @@ const title = ref(null)
let _event = ref({})
function updateEventType() {
if (_event.value.eventType == 'Private') {
_event.value.eventType = 'Public'
} else {
_event.value.eventType = 'Private'
}
}
function saveEvent() {
error.value = null
if (!_event.value.title) {