- Fixed issue with events not being mapped correctly when fetched(missing attributes)

- Fixed issue with editing of events because of incorrect attribute name
- Color events created by other user, but assigned to current user in the current user's color
This commit is contained in:
Dejan
2024-11-18 17:46:01 +01:00
parent d8e7dc6bf7
commit 89d00cdead
4 changed files with 24 additions and 13 deletions

View File

@ -130,7 +130,7 @@ export const ManuallyAddEventModal = () => {
editEvent?.end ?? initialDate ?? new Date()
);
const [selectedAttendees, setSelectedAttendees] = useState<string[]>(
editEvent?.participants ?? []
editEvent?.attendees ?? []
);
const [repeatInterval, setRepeatInterval] = useState<PickerMultiValue>([]);
@ -187,7 +187,8 @@ export const ManuallyAddEventModal = () => {
setStartDate(initialDate ?? new Date());
setEndDate(editEvent?.end ?? initialDate ?? new Date());
setSelectedAttendees(editEvent?.participants ?? []);
setSelectedAttendees(editEvent?.attendees ?? []);
setLocation(editEvent?.location ?? "");
setRepeatInterval([]);
}, [editEvent, selectedNewEventDate]);
@ -664,7 +665,7 @@ export const ManuallyAddEventModal = () => {
<TextField
value={location}
onChangeText={setLocation}
onChangeText={(text) => setLocation(text)}
ref={locationRef}
maxLength={2000}
multiline