-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
References: Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com> #121, #136 and #411
- Loading branch information
1 parent
67553fd
commit aac0c8b
Showing
3 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script> | ||
export default { | ||
name: 'VoteCalendarLink', | ||
methods: { | ||
newEvent(option) { | ||
const dateTimeStart = option.timestamp | ||
const dateTimeEnd = moment.unix(dateTimeStart).add(1, 'hour').unix() | ||
const calendarRoot = 'apps/calendar' | ||
const calendarView = 'timeGridWeek' // timeGridDay, 'timeGridWeek' or 'dayGridMonth' | ||
const calendarTimeRange = moment.unix(dateTimeStart).format('Y-MM-DD') // 'now' or 'yyyy-mm-dd' | ||
const calendarAction = 'new' | ||
const calendarMode = 'sidebar' // 'popover' or 'sidebar' | ||
const calendarIsAllDay = '0' | ||
const calendarUrl = OC.generateUrl(calendarRoot + '/' + calendarView + '/' + calendarTimeRange + '/' + calendarAction + '/' + calendarMode + '/' + calendarIsAllDay + '/' + dateTimeStart + '/' + dateTimeEnd) | ||
return calendarUrl | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters