Fixed organization
This commit is contained in:
@@ -46,6 +46,7 @@ function deployEditModal() {
|
||||
lastActiveEvent.value = { ...props.event }
|
||||
revealEditEventModal()
|
||||
commandMenuOpened.value = false
|
||||
emit("query:close-popover")
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,6 +56,7 @@ function deployDeleteModal() {
|
||||
lastActiveEvent.value = { ...props.event }
|
||||
revealDeleteEventModal()
|
||||
commandMenuOpened.value = false
|
||||
emit("query:close-popover")
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const buttonDisabledState: ComputedRef<boolean> = computed<boolean>(() => {
|
||||
<UiTooltipProvider :delay-duration="250">
|
||||
<UiTooltip>
|
||||
<UiTooltipTrigger as-child>
|
||||
<UiButton size="sm" :disabled="buttonDisabledState" @click="jumpToDefaultDate">
|
||||
<UiButton size="sm" variant="secondary" :disabled="buttonDisabledState" @click="jumpToDefaultDate">
|
||||
{{ $t('entity.calendar.date.today') }}
|
||||
</UiButton>
|
||||
</UiTooltipTrigger>
|
||||
|
||||
@@ -39,6 +39,7 @@ function openEventCreatePopover() {
|
||||
*/
|
||||
function handleClosing(e: Event) {
|
||||
if (isLoading.value) {
|
||||
popoverOpen.value = false
|
||||
e.preventDefault()
|
||||
}
|
||||
}
|
||||
@@ -61,7 +62,7 @@ function handleClosing(e: Event) {
|
||||
@interact-outside="handleClosing"
|
||||
@pointer-down-outside="handleClosing"
|
||||
>
|
||||
<CalendarFormCreateEvent />
|
||||
<CalendarFormCreateEvent @event-created="handleClosing" />
|
||||
</UiPopoverContent>
|
||||
</UiPopover>
|
||||
</template>
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
import type { RPGDate } from "~/models/Date";
|
||||
import { PhAlarm, PhCircleNotch, PhEye, PhEyeClosed, PhMapPinArea, PhTag } from "@phosphor-icons/vue"
|
||||
|
||||
const emit = defineEmits(["event-created"])
|
||||
|
||||
const { eventSkeleton } = storeToRefs(useCalendar())
|
||||
const { submitSkeleton, cancelLatestRequest } = useCalendar()
|
||||
const popoverOpen = ref(false)
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -28,7 +29,7 @@ async function handleSubmit() {
|
||||
try {
|
||||
await submitSkeleton()
|
||||
|
||||
popoverOpen.value = false
|
||||
emit("event-created")
|
||||
} catch (err) {
|
||||
if (err instanceof Error) {
|
||||
formErrors.message = err.message
|
||||
@@ -64,7 +65,6 @@ function handleCancel() {
|
||||
pattern="([A-Za-zÀ-ÖØ-öø-ÿ0-9\s\&\-\~]+){3,120}"
|
||||
class="w-full -my-1 py-1 -mx-1 px-1 text-lg border-b-[1px] bg-transparent focus-visible:outline-none focus-visible:border-blue-600 invalid:border-red-500"
|
||||
>
|
||||
|
||||
<div class="mt-2 mb-1 text-xs opacity-50">
|
||||
{{ t('entity.calendar.event.patterns.title') }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user