Fixed event popover not closing on submit
This was caused by a random stray isLoading
This commit is contained in:
@@ -5,8 +5,6 @@ const { eventSkeleton, operationInProgress } = storeToRefs(useCalendar())
|
|||||||
const { resetSkeleton } = useCalendar()
|
const { resetSkeleton } = useCalendar()
|
||||||
const popoverOpen = ref(false)
|
const popoverOpen = ref(false)
|
||||||
|
|
||||||
const isLoading = ref(false)
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
date?: RPGDate
|
date?: RPGDate
|
||||||
btnClass?: string
|
btnClass?: string
|
||||||
@@ -38,10 +36,8 @@ function openEventCreatePopover() {
|
|||||||
* @param e The closing event (can be keydown or click)
|
* @param e The closing event (can be keydown or click)
|
||||||
*/
|
*/
|
||||||
function handleClosing(e: Event) {
|
function handleClosing(e: Event) {
|
||||||
if (isLoading.value) {
|
|
||||||
popoverOpen.value = false
|
popoverOpen.value = false
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import type { Calendar } from "~/models/CalendarConfig";
|
import type { Calendar } from "~/models/CalendarConfig";
|
||||||
import { PhAlarm, PhCalendarDots, PhCircleNotch, PhWrench } from "@phosphor-icons/vue";
|
import { PhAlarm, PhCalendarDots, PhCircleNotch, PhWrench } from "@phosphor-icons/vue";
|
||||||
|
|
||||||
const defaultSkeleton: Calendar = { name: "", today: { day: 1, month: 0, year: 0 }, months: [], events: []}
|
const defaultSkeleton: Calendar = { name: "", today: { day: 1, month: 0, year: 0 }, months: [], events: [], state: "draft" }
|
||||||
const calendarSkeleton = ref<Calendar>({ ...defaultSkeleton })
|
const calendarSkeleton = ref<Calendar>({ ...defaultSkeleton })
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface CalendarConfig {
|
|||||||
|
|
||||||
export interface Calendar extends CalendarConfig {
|
export interface Calendar extends CalendarConfig {
|
||||||
id?: number
|
id?: number
|
||||||
shortId: string
|
shortId?: string
|
||||||
name: string
|
name: string
|
||||||
events: CalendarEvent[]
|
events: CalendarEvent[]
|
||||||
state: CalendarState
|
state: CalendarState
|
||||||
|
|||||||
Reference in New Issue
Block a user