Starting to implement permissions into frontend

This commit is contained in:
cdricms
2025-01-30 15:50:58 +01:00
parent 8d2214e5dd
commit 0e707e8721
16 changed files with 715 additions and 35 deletions

View File

@@ -58,10 +58,7 @@ const Planning: React.FC<{
csrfToken: false,
});
if (res.status === "Error") {
console.log("Error");
}
if (res.status === "Success") {
calendar?.events?.update(eventSelected);
// calendar?.events?.update(oldEvent);
}
} catch (e) {
console.log(e);
@@ -89,9 +86,12 @@ const Planning: React.FC<{
onEventClick(event, e) {
setEventSelected(event);
},
async onEventUpdate(event) {
console.log(event);
await handleEventUpdate(event);
// async onBeforeEventUpdate(oldEvent, newEvent) {
// await request("/api/me/has-permissions")
// },
async onEventUpdate(newEvent) {
// console.log(event);
await handleEventUpdate(newEvent);
},
},
},