diff --git a/app/routes/events-calendar.tsx b/app/routes/events-calendar.tsx index 0bb4b6b..fc1530c 100644 --- a/app/routes/events-calendar.tsx +++ b/app/routes/events-calendar.tsx @@ -7,6 +7,7 @@ import { type LinksFunction } from "@remix-run/cloudflare"; import { Button, Container, + Flex, Heading, Modal, ModalBody, @@ -15,8 +16,17 @@ import { ModalFooter, ModalHeader, ModalOverlay, + Popover, + PopoverArrow, + PopoverBody, + PopoverCloseButton, + PopoverContent, + PopoverHeader, + PopoverTrigger, + Spacer, Text, useDisclosure, + VStack, } from "@chakra-ui/react"; import { useLoaderData } from "@remix-run/react"; import { useState } from "react"; @@ -76,6 +86,9 @@ export async function loader({ context }: { context: RequestContext }) { return { calendarData, + canManage: Boolean( + [1 << 4, 1 << 12].find((p) => context.data.current_user.permissions & p), + ), eventList: eventsData.results, memberData: memberData.results, }; @@ -143,6 +156,39 @@ export default function () { toolbar={false} views={["month"]} /> + + + + {data.canManage ? ( + + + + + + + Management Tools + + + + + + + + + + + + + ) : null} + ); }