Fix in Calendar
This commit is contained in:
@@ -60,11 +60,11 @@ const calendarOptionsGrid = computed(() => {
|
||||
router.push(`/standardEntity/events/edit/?start=${info.startStr}&end=${info.endStr}&source=grid`)
|
||||
},
|
||||
eventClick: function (info) {
|
||||
console.log(info)
|
||||
if (info.event.title.startsWith("Abw.:")) {
|
||||
router.push(`/standardEntity/absencerequests/show/${info.event.id}`)
|
||||
console.log(info.event)
|
||||
if(info.event.extendedProps.entrytype === "absencerequest"){
|
||||
router.push(`/standardEntity/absencerequests/show/${info.event.extendedProps.absencerequestId}`)
|
||||
} else {
|
||||
router.push(`/standardEntity/events/show/${info.event.id}`)
|
||||
router.push(`/standardEntity/events/show/${info.event.extendedProps.eventId}`)
|
||||
}
|
||||
|
||||
},
|
||||
@@ -188,7 +188,9 @@ const setupPage = async () => {
|
||||
title: title,
|
||||
borderColor: eventColor,
|
||||
textColor: eventColor,
|
||||
backgroundColor: "black"
|
||||
backgroundColor: "black",
|
||||
entrytype: "event",
|
||||
eventId: event.id
|
||||
}
|
||||
}),
|
||||
...absencerequests.map(absence => {
|
||||
@@ -196,10 +198,12 @@ const setupPage = async () => {
|
||||
id: absence.id,
|
||||
resourceId: absence.user,
|
||||
resourceType: "person",
|
||||
title: `Abw.: ${absence.reason}`,
|
||||
title: `${absence.reason} - ${absence.name}`,
|
||||
start: dayjs(absence.start).toDate(),
|
||||
end: dayjs(absence.end).add(1, 'day').toDate(),
|
||||
allDay: true,
|
||||
absencerequestId: absence.id,
|
||||
entrytype: "absencerequest",
|
||||
}
|
||||
})
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user