fix: inject events resource into CalendarEventPanel for improved event handling
This commit is contained in:
parent
54e4819c71
commit
6e8228a82c
@ -335,6 +335,9 @@
|
||||
variant="solid"
|
||||
class="w-full"
|
||||
:disabled="!dirty"
|
||||
:loading="
|
||||
mode === 'edit' ? events.setValue.loading : events.insert.loading
|
||||
"
|
||||
@click="saveEvent"
|
||||
>
|
||||
{{
|
||||
@ -382,7 +385,7 @@ import {
|
||||
createDocumentResource,
|
||||
} from 'frappe-ui'
|
||||
import ShortcutTooltip from '@/components/ShortcutTooltip.vue'
|
||||
import { ref, computed, watch, h } from 'vue'
|
||||
import { ref, computed, watch, h, inject } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
@ -408,6 +411,8 @@ const { $dialog } = globalStore()
|
||||
const show = defineModel()
|
||||
const event = defineModel('event')
|
||||
|
||||
const events = inject('events')
|
||||
|
||||
const _event = ref({})
|
||||
|
||||
const peoples = computed({
|
||||
|
||||
@ -138,7 +138,7 @@ import {
|
||||
CalendarActiveEvent as activeEvent,
|
||||
call,
|
||||
} from 'frappe-ui'
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import { onMounted, ref, computed, provide } from 'vue'
|
||||
|
||||
const { user } = sessionStore()
|
||||
const { $dialog } = globalStore()
|
||||
@ -182,6 +182,8 @@ const events = createListResource({
|
||||
})),
|
||||
})
|
||||
|
||||
provide('events', events)
|
||||
|
||||
const eventPanel = ref(null)
|
||||
const showEventPanel = ref(false)
|
||||
const event = ref({})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user