From cb549b9b7c8b5a742cdec105d80807a4ed8ccbb1 Mon Sep 17 00:00:00 2001 From: chark1es Date: Mon, 10 Feb 2025 16:51:22 -0800 Subject: [PATCH] Added popup --- .../dashboard/Officer_EventManagement.astro | 290 +++++++++++++++--- 1 file changed, 250 insertions(+), 40 deletions(-) diff --git a/src/components/dashboard/Officer_EventManagement.astro b/src/components/dashboard/Officer_EventManagement.astro index 3a94302..aa8e01a 100644 --- a/src/components/dashboard/Officer_EventManagement.astro +++ b/src/components/dashboard/Officer_EventManagement.astro @@ -2,19 +2,29 @@ import { Icon } from "astro-icon/components"; import { Get } from "../pocketbase/Get"; import { Authentication } from "../pocketbase/Authentication"; +import { Update } from "../pocketbase/Update"; +import { FileManager } from "../pocketbase/FileManager"; +import { SendLog } from "../pocketbase/SendLog"; // Get instances const get = Get.getInstance(); const auth = Authentication.getInstance(); +const update = Update.getInstance(); +const fileManager = FileManager.getInstance(); +const sendLog = SendLog.getInstance(); // Interface for Event type interface Event { id: string; event_name: string; event_description: string; - start_date: string; - location: string; event_code: string; + location: string; + files: string[]; + points_to_award: number; + start_date: string; + end_date: string; + published: boolean; } interface ListResponse { @@ -54,6 +64,7 @@ declare global { interface Window { [key: string]: any; openEditModal: (event: Event) => void; + deleteFile: (eventId: string, filename: string) => void; } } --- @@ -148,51 +159,141 @@ declare global { -