|
|
@ -25,27 +25,35 @@ export default function Integration({ config, params, hideErrors = false }) {
|
|
|
|
const physicalTitle = `${event.title} - ${t("calendar.physicalRelease")}`;
|
|
|
|
const physicalTitle = `${event.title} - ${t("calendar.physicalRelease")}`;
|
|
|
|
const digitalTitle = `${event.title} - ${t("calendar.digitalRelease")}`;
|
|
|
|
const digitalTitle = `${event.title} - ${t("calendar.digitalRelease")}`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event.inCinemas) {
|
|
|
|
eventsToAdd[cinemaTitle] = {
|
|
|
|
eventsToAdd[cinemaTitle] = {
|
|
|
|
title: cinemaTitle,
|
|
|
|
title: cinemaTitle,
|
|
|
|
date: DateTime.fromISO(event.inCinemas),
|
|
|
|
date: DateTime.fromISO(event.inCinemas),
|
|
|
|
color: config?.color ?? "amber",
|
|
|
|
color: config?.color ?? "amber",
|
|
|
|
isCompleted: event.isAvailable,
|
|
|
|
isCompleted: event.hasFile,
|
|
|
|
additional: "",
|
|
|
|
additional: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event.physicalRelease) {
|
|
|
|
eventsToAdd[physicalTitle] = {
|
|
|
|
eventsToAdd[physicalTitle] = {
|
|
|
|
title: physicalTitle,
|
|
|
|
title: physicalTitle,
|
|
|
|
date: DateTime.fromISO(event.physicalRelease),
|
|
|
|
date: DateTime.fromISO(event.physicalRelease),
|
|
|
|
color: config?.color ?? "cyan",
|
|
|
|
color: config?.color ?? "cyan",
|
|
|
|
isCompleted: event.isAvailable,
|
|
|
|
isCompleted: event.hasFile,
|
|
|
|
additional: "",
|
|
|
|
additional: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event.digitalRelease) {
|
|
|
|
eventsToAdd[digitalTitle] = {
|
|
|
|
eventsToAdd[digitalTitle] = {
|
|
|
|
title: digitalTitle,
|
|
|
|
title: digitalTitle,
|
|
|
|
date: DateTime.fromISO(event.digitalRelease),
|
|
|
|
date: DateTime.fromISO(event.digitalRelease),
|
|
|
|
color: config?.color ?? "emerald",
|
|
|
|
color: config?.color ?? "emerald",
|
|
|
|
isCompleted: event.isAvailable,
|
|
|
|
isCompleted: event.hasFile,
|
|
|
|
additional: "",
|
|
|
|
additional: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
setEvents((prevEvents) => ({ ...prevEvents, ...eventsToAdd }));
|
|
|
|
setEvents((prevEvents) => ({ ...prevEvents, ...eventsToAdd }));
|
|
|
|