Starting to implement permissions into frontend
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
Calendar,
|
||||
Loader2,
|
||||
Camera,
|
||||
UserRoundCog,
|
||||
} from "lucide-react";
|
||||
|
||||
import { NavMain } from "@/components/nav-main";
|
||||
@@ -103,6 +104,11 @@ const data = {
|
||||
url: "/dashboard/settings/shortcodes",
|
||||
icon: Camera,
|
||||
},
|
||||
{
|
||||
title: "Rôles et Permissions",
|
||||
url: "/dashboard/settings/roles",
|
||||
icon: UserRoundCog,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user