add feature add and delete range

This commit is contained in:
2022-06-24 18:52:28 +02:00
parent 75b2f6419e
commit 3ea630748a
7 changed files with 137 additions and 35 deletions

View File

@@ -2,6 +2,7 @@ import {COLORS} from '../const';
import {ISOToDatetime} from 'ChillMainAssets/chill/js/date';
import {DateTime, User} from 'ChillMainAssets/types';
import {CalendarRange, CalendarRemote} from 'ChillCalendarAssets/types';
import type {EventInputCalendarRange} from 'ChillCalendarAssets/types';
import {EventInput} from '@fullcalendar/vue3';
export interface UserData {
@@ -63,7 +64,7 @@ export const createUserData = (user: User, colorIndex: number): UserData => {
}
// TODO move this function to a more global namespace, as it is in use in MyCalendarRange app
export const calendarRangeToFullCalendarEvent = (entity: CalendarRange): EventInput & {id: string} => {
export const calendarRangeToFullCalendarEvent = (entity: CalendarRange): EventInputCalendarRange => {
return {
id: `range_${entity.id}`,
title: "(" + entity.user.text + ")",