From 1b9efd262fed3e4817cddc9a50859f4a9c903e25 Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Mon, 6 Apr 2026 22:39:10 -0700 Subject: [PATCH 01/11] Removed not needed components and fixed the tags spacing issue in the dashboard home pags --- .../src/lib/dashboard/home/MetricCards.svelte | 72 ---------- .../lib/dashboard/home/QuickActions.svelte | 51 ------- .../src/lib/dashboard/home/SyncStatus.svelte | 59 -------- .../lib/dashboard/home/UpcomingEvents.svelte | 80 ----------- .../src/lib/dashboard/home/YourViews.svelte | 136 ------------------ .../dashboard/homePage/UpcomingEvents.svelte | 20 +-- 6 files changed, 11 insertions(+), 407 deletions(-) delete mode 100644 frontend/src/lib/dashboard/home/MetricCards.svelte delete mode 100644 frontend/src/lib/dashboard/home/QuickActions.svelte delete mode 100644 frontend/src/lib/dashboard/home/SyncStatus.svelte delete mode 100644 frontend/src/lib/dashboard/home/UpcomingEvents.svelte delete mode 100644 frontend/src/lib/dashboard/home/YourViews.svelte diff --git a/frontend/src/lib/dashboard/home/MetricCards.svelte b/frontend/src/lib/dashboard/home/MetricCards.svelte deleted file mode 100644 index bc95340..0000000 --- a/frontend/src/lib/dashboard/home/MetricCards.svelte +++ /dev/null @@ -1,72 +0,0 @@ - - -
- {#each metrics as metric (`metric${metric.name}`)} - - -
-
- -
-
- -
-

{metric.value}

-

{metric.name}

-

{metric.description}

-
-
-
- {/each} -
\ No newline at end of file diff --git a/frontend/src/lib/dashboard/home/QuickActions.svelte b/frontend/src/lib/dashboard/home/QuickActions.svelte deleted file mode 100644 index b9077ca..0000000 --- a/frontend/src/lib/dashboard/home/QuickActions.svelte +++ /dev/null @@ -1,51 +0,0 @@ - - - - - Quick Actions - Create new views or sync events - - -
- {#each actions as action (`anaction${action.name}`)} - - {/each} - {#if (await getMyIntegrations()).filter((integration) => integration.service === "planningcenter").length > 0} - - {/if} -
-
-
\ No newline at end of file diff --git a/frontend/src/lib/dashboard/home/SyncStatus.svelte b/frontend/src/lib/dashboard/home/SyncStatus.svelte deleted file mode 100644 index c169158..0000000 --- a/frontend/src/lib/dashboard/home/SyncStatus.svelte +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Sync Status - Planning Center connection - - -
- -
-

Connected

-

Last sync: {lastSyncTAgo}

-
-
- -
-
- Events fetched - {eventsAmount} -
-
- Next sync - In {lastSyncTIn} -
-
- - -
-
\ No newline at end of file diff --git a/frontend/src/lib/dashboard/home/UpcomingEvents.svelte b/frontend/src/lib/dashboard/home/UpcomingEvents.svelte deleted file mode 100644 index 0f3cd08..0000000 --- a/frontend/src/lib/dashboard/home/UpcomingEvents.svelte +++ /dev/null @@ -1,80 +0,0 @@ - - - - -
- Todays Events - Fetched from Planning Center -
-
- -
- {#if todaysEvents.length > 0} - {#each todaysEvents as event (`upcomingevent${event.id}`)} -
-
- -
- -
-

{event.name}

-
- {#if event.location} - - - {event.location.split("-")[0]} - - {/if} - - - -
-
-
- {/each} - {:else} - - - - - - No Events Today - - You haven't created any events for today. Get started by going to planning center and create an event. - - - -
- -
-
- -
- {/if} -
-
-
\ No newline at end of file diff --git a/frontend/src/lib/dashboard/home/YourViews.svelte b/frontend/src/lib/dashboard/home/YourViews.svelte deleted file mode 100644 index 83b8554..0000000 --- a/frontend/src/lib/dashboard/home/YourViews.svelte +++ /dev/null @@ -1,136 +0,0 @@ - - - - -
- Your Views - Event lists, Image Feeds, and Calendars you've created -
-
- -
- {#if calendars.length > 0 || eventLists.length > 0 || imageFeeds.length > 0} - {#each calendars as calendar (`viewssCal${calendar.id}`)} - - {#if calendar.logo} -
- IFeed Avatar -
- {:else} -
- -
- {/if} - -
-
-

{calendar.name}

- Calendar -
-

- {calendar.visits} visits · Updated {timeAgo(calendar.updated)} -

-
-
- {/each} - {#each eventLists as eventList (`viewssEList${eventList.id}`)} - - {#if eventList.logo} -
- IFeed Avatar -
- {:else} -
- -
- {/if} - -
-
-

{eventList.name}

- Event List -
-

- {eventList.visits} visits · Updated {timeAgo(eventList.updated)} -

-
-
- {/each} - {#each imageFeeds as imageFeed (`viewssIFeed${imageFeed.id}`)} - - {#if imageFeed.logo} -
- IFeed Avatar -
- {:else} -
- -
- {/if} - -
-
-

{imageFeed.name}

- Image Feed -
-

- {imageFeed.visits} visits · Updated {timeAgo(imageFeed.updated)} -

-
-
- {/each} - {:else} - - - - - - No Views Yet - - You haven't created any views. Get started by creating a custom view. - - - -
- - - -
-
-
- {/if} -
-
-
\ No newline at end of file diff --git a/frontend/src/lib/dashboard/homePage/UpcomingEvents.svelte b/frontend/src/lib/dashboard/homePage/UpcomingEvents.svelte index 7fa022b..3c72b98 100644 --- a/frontend/src/lib/dashboard/homePage/UpcomingEvents.svelte +++ b/frontend/src/lib/dashboard/homePage/UpcomingEvents.svelte @@ -48,15 +48,17 @@ {/if} {#if event.expand.tags} - {#each event.expand.tags as tag (`aneventtag${tag.name}`)} - - {tag.name} - - {/each} +
+ {#each event.expand.tags as tag (`aneventtag${tag.name}`)} + + {tag.name} + + {/each} +
{/if}

From a7700a6ee56b9f9550734ecb634047896794be6e Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Mon, 6 Apr 2026 22:44:57 -0700 Subject: [PATCH 02/11] Moved the tag and resources keys to the private interface of the event db model --- frontend/src/lib/event.utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/event.utils.ts b/frontend/src/lib/event.utils.ts index 7d95ed1..ca460c8 100644 --- a/frontend/src/lib/event.utils.ts +++ b/frontend/src/lib/event.utils.ts @@ -39,8 +39,6 @@ export interface EventDBModel extends RecordModel { registrationURL: string, location: string, times: EventTimesType[] | null, - // resources: string[] | null - // tags: string[] | null, startTime: string, endTime: string, featured: boolean, @@ -58,6 +56,8 @@ export interface EventDBModelExpanded extends EventDBModel { export interface EventDBModelPrivate extends EventDBModel { owner: string + resources: string[] | null + tags: string[] | null, } export interface EventDBModelPrivateExpanded extends EventDBModelPrivate { From d5f9755926314114ab3b6b82c6b231cd4ed2733b Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Mon, 6 Apr 2026 23:14:12 -0700 Subject: [PATCH 03/11] Tailwind fix --- frontend/src/lib/IncludedCalendars.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/IncludedCalendars.svelte b/frontend/src/lib/IncludedCalendars.svelte index d2eb5e1..ed3616d 100644 --- a/frontend/src/lib/IncludedCalendars.svelte +++ b/frontend/src/lib/IncludedCalendars.svelte @@ -107,7 +107,7 @@ - + Incude Calendar KEEP IN MIND that a password protected calendar will be public and will not require a password. Also, any calendar that has access to UNPUBLISHED events also will be public. From efc7137fccf48f7408f7265b006ce442ff3c785f Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Mon, 6 Apr 2026 23:34:13 -0700 Subject: [PATCH 04/11] Moved calendar related utility types and variable to the cal.utils file --- frontend/src/lib/ACalToAdd.svelte | 4 +- frontend/src/lib/AnIncludedCalendar.svelte | 4 +- frontend/src/lib/Calendar.svelte | 2 +- frontend/src/lib/Day.svelte | 3 +- frontend/src/lib/Event.svelte | 5 ++- frontend/src/lib/EverythingSearch.svelte | 3 +- frontend/src/lib/IncludedCalendars.svelte | 2 +- frontend/src/lib/cal.utils.ts | 43 +++++++++++++++++++ .../calendar/monthView/MonthCalView.svelte | 3 +- .../calendar/monthView/MonthCalViewDay.svelte | 3 +- .../monthView/MonthCalViewDayEvent.svelte | 2 +- .../lib/calendar/weekView/WeekCalView.svelte | 3 +- .../calendar/weekView/WeekCalViewDay.svelte | 3 +- .../weekView/WeekCalViewDayEvent.svelte | 3 +- .../src/lib/dashboard/DashboardHeader.svelte | 3 +- .../calendar/CalDisplaySettings.svelte | 2 +- .../dashboard/calendar/CalEventPreview.svelte | 2 +- .../calendar/CalFilterSettings.svelte | 2 +- .../dashboard/homePage/FeatureSummary.svelte | 3 +- .../lib/dashboard/homePage/MetricCards.svelte | 3 +- .../dashboard/homePage/RecentActivity.svelte | 3 +- frontend/src/lib/utils.ts | 42 ------------------ .../(mainWebsite)/dashboard/backend.remote.ts | 3 +- .../calendars/calendarActions.remote.ts | 2 +- .../src/routes/cal/[slug]/+page.server.ts | 2 +- .../routes/cal/[slug]/login/+page.server.ts | 2 +- .../src/routes/ifeed/[slug]/+page.server.ts | 3 +- .../ifeedPreview/[slug]/+page.server.ts | 3 +- 28 files changed, 87 insertions(+), 71 deletions(-) create mode 100644 frontend/src/lib/cal.utils.ts diff --git a/frontend/src/lib/ACalToAdd.svelte b/frontend/src/lib/ACalToAdd.svelte index b7415cb..9d3bdcf 100644 --- a/frontend/src/lib/ACalToAdd.svelte +++ b/frontend/src/lib/ACalToAdd.svelte @@ -1,5 +1,5 @@ + +

+ {@render children?.()} +
diff --git a/frontend/src/lib/components/ui/item/item-content.svelte b/frontend/src/lib/components/ui/item/item-content.svelte new file mode 100644 index 0000000..2649b79 --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-content.svelte @@ -0,0 +1,23 @@ + + +
+ {@render children?.()} +
diff --git a/frontend/src/lib/components/ui/item/item-description.svelte b/frontend/src/lib/components/ui/item/item-description.svelte new file mode 100644 index 0000000..a15632b --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-description.svelte @@ -0,0 +1,23 @@ + + +

a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4", + className + )} + {...restProps} +> + {@render children?.()} +

diff --git a/frontend/src/lib/components/ui/item/item-footer.svelte b/frontend/src/lib/components/ui/item/item-footer.svelte new file mode 100644 index 0000000..cd68c38 --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-footer.svelte @@ -0,0 +1,20 @@ + + +
+ {@render children?.()} +
diff --git a/frontend/src/lib/components/ui/item/item-group.svelte b/frontend/src/lib/components/ui/item/item-group.svelte new file mode 100644 index 0000000..3e58e36 --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-group.svelte @@ -0,0 +1,21 @@ + + +
+ {@render children?.()} +
diff --git a/frontend/src/lib/components/ui/item/item-header.svelte b/frontend/src/lib/components/ui/item/item-header.svelte new file mode 100644 index 0000000..e1116f4 --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-header.svelte @@ -0,0 +1,20 @@ + + +
+ {@render children?.()} +
diff --git a/frontend/src/lib/components/ui/item/item-media.svelte b/frontend/src/lib/components/ui/item/item-media.svelte new file mode 100644 index 0000000..45def5a --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-media.svelte @@ -0,0 +1,42 @@ + + + + +
+ {@render children?.()} +
diff --git a/frontend/src/lib/components/ui/item/item-separator.svelte b/frontend/src/lib/components/ui/item/item-separator.svelte new file mode 100644 index 0000000..992541c --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-separator.svelte @@ -0,0 +1,19 @@ + + + diff --git a/frontend/src/lib/components/ui/item/item-title.svelte b/frontend/src/lib/components/ui/item/item-title.svelte new file mode 100644 index 0000000..c9a0f9b --- /dev/null +++ b/frontend/src/lib/components/ui/item/item-title.svelte @@ -0,0 +1,20 @@ + + +
+ {@render children?.()} +
diff --git a/frontend/src/lib/components/ui/item/item.svelte b/frontend/src/lib/components/ui/item/item.svelte new file mode 100644 index 0000000..8eff328 --- /dev/null +++ b/frontend/src/lib/components/ui/item/item.svelte @@ -0,0 +1,61 @@ + + + + +{#if child} + {@render child({ props: mergedProps })} +{:else} +
+ {@render mergedProps.children?.()} +
+{/if} diff --git a/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte b/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte index 63c40c4..7eddb59 100644 --- a/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte +++ b/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte @@ -5,6 +5,8 @@ import type { CalendarFilters } from "@/cal.utils"; import { Switch } from "@/components/ui/switch"; import { Label } from "@/components/ui/label"; + import { getMyEventResourcesPrivate } from "../../../routes/(mainWebsite)/dashboard/events.remote"; + import * as Item from "$lib/components/ui/item/index.js"; let { filters, @@ -14,6 +16,8 @@ changed: boolean } = $props(); + let myResources = $derived(await getMyEventResourcesPrivate()); + // svelte-ignore state_referenced_locally let filtersBindable = $state(filters); $effect(() => {filtersBindable = filters}); @@ -56,24 +60,77 @@ /> -
- - - - - AllowList - BlockList - - - allow - - - block - - +
+
+ + + + +
+ +
+ + + + Allow Events + Block Events + + +
+ +
+ {#each myResources as resource (`allowAResource${resource.id}`)} +
+ +
+ {/each} +
+
+
+ +
+ {#each myResources as resource (`blockAResource${resource.id}`)} +
+ +
+ {/each} +
+
+
diff --git a/frontend/src/routes/(mainWebsite)/dashboard/calendars/calendarActions.remote.ts b/frontend/src/routes/(mainWebsite)/dashboard/calendars/calendarActions.remote.ts index 0aec4fa..a367243 100644 --- a/frontend/src/routes/(mainWebsite)/dashboard/calendars/calendarActions.remote.ts +++ b/frontend/src/routes/(mainWebsite)/dashboard/calendars/calendarActions.remote.ts @@ -91,8 +91,9 @@ const UpdateCalendarSchema = v.object({ onlyShowFeatured: v.optional(v.boolean(), false), hideUnpublished: v.optional(v.boolean(), false), resourceFilterType: v.picklist(["allow", "block"]), - allowResources: v.array(v.string()), - blockResources: v.array(v.string()), + allowResources: v.optional(v.array(v.string()), []), + blockResources: v.optional(v.array(v.string()), []), + enableResourceFiltering: v.optional(v.boolean(), false) }) }); diff --git a/frontend/src/routes/(mainWebsite)/dashboard/events.remote.ts b/frontend/src/routes/(mainWebsite)/dashboard/events.remote.ts index 15d1fce..9fc924c 100644 --- a/frontend/src/routes/(mainWebsite)/dashboard/events.remote.ts +++ b/frontend/src/routes/(mainWebsite)/dashboard/events.remote.ts @@ -1,5 +1,5 @@ import { command, getRequestEvent, query } from "$app/server"; -import type { EventDBModelPrivateExpanded } from "@/event.utils"; +import type { EventDBModelPrivateExpanded, EventResourcesDBModelPrivate, EventTagsDBModelPrivate } from "@/event.utils"; import { getMyIntegrations } from "./backend.remote"; import { config } from "dotenv"; @@ -57,4 +57,44 @@ export const updateSpecificUserEvents = command(async () => { error: false, msg: "Successful sync" } +}); + +export const getMyEventTagsPrivate = query(async () => { + const { locals } = getRequestEvent(); + let tags: EventTagsDBModelPrivate[] = []; + + if (!locals.user) return tags; + + try { + tags = await locals.pb.collection('tags').getFullList({ + filter: `owner="${locals.user.id}"`, + headers: { + "Authorization": "Bearer " + process.env["POCKETBASE_TOKEN"]! + } + }); + } catch (err) { + console.log("Failed to fetch tags.", err); + } + + return tags; +}); + +export const getMyEventResourcesPrivate = query(async () => { + const { locals } = getRequestEvent(); + let resources: EventResourcesDBModelPrivate[] = []; + + if (!locals.user) return resources; + + try { + resources = await locals.pb.collection('resources').getFullList({ + filter: `owner="${locals.user.id}"`, + headers: { + "Authorization": "Bearer " + process.env["POCKETBASE_TOKEN"]! + } + }); + } catch (err) { + console.log("Failed to fetch resources.", err); + } + + return resources; }); \ No newline at end of file From 86e563b43e47b8b7aa1c2f650767465ea701b6de Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Thu, 9 Apr 2026 01:03:10 -0700 Subject: [PATCH 07/11] Added the check github action --- .github/workflows/check.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..76f4fa4 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,22 @@ +name: Check +on: [push, pull_request] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Bun + # Uses the official action to install Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Run check script + # This executes the "check" script defined in your package.json + run: bun run check \ No newline at end of file From 98b86056925726380629a97c48279abb8a3c1541 Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Thu, 9 Apr 2026 01:08:25 -0700 Subject: [PATCH 08/11] Fixed some github actions errors --- .github/workflows/check.yml | 7 +++++-- .github/workflows/frontend.yml | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 76f4fa4..d530771 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,5 @@ -name: Check +name: Frontend Check + on: [push, pull_request] jobs: @@ -16,7 +17,9 @@ jobs: - name: Install dependencies run: bun install + working-directory: ./frontend - name: Run check script # This executes the "check" script defined in your package.json - run: bun run check \ No newline at end of file + run: bun run check + working-directory: ./frontend \ No newline at end of file diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index f69deb4..26418fa 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -3,6 +3,10 @@ name: Docker Build InfoSections frontend on: push: branches: [ release ] + workflow_run: + workflows: ["Frontend Check"] + types: + - completed jobs: build: From fe7c2331d8b4a3a287984c1ae42aa00fce18a2ec Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Thu, 9 Apr 2026 02:03:29 -0700 Subject: [PATCH 09/11] Actually implemented the event filtering based on resources --- .../calendar/CalFilterSettings.svelte | 4 ++-- frontend/src/lib/event.utils.ts | 18 +++++++++++++++++- frontend/src/routes/cal/[slug]/+page.server.ts | 10 +++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte b/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte index 7eddb59..b67f775 100644 --- a/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte +++ b/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte @@ -1,12 +1,12 @@