Making progress on pulling this together.

This commit is contained in:
Scott Idem
2024-02-16 21:38:41 -05:00
parent 9958724aaa
commit bab68af7dc
6 changed files with 61 additions and 863 deletions

View File

@@ -1,6 +1,10 @@
<script lang="ts">
import { onMount } from 'svelte';
// import { localStorageStore } from '@skeletonlabs/skeleton';
// import type { Writable } from 'svelte/store';
// const store_current_page: Writable<string> = localStorageStore('store_current_page', 'start');
// To retrieve the store, getModalStore must be invoked at the top level of your component!
import { getDrawerStore, getModalStore } from '@skeletonlabs/skeleton';
import type {
@@ -28,6 +32,9 @@ const modal_view__sponsorship_obj: ModalSettings = {
component: modalComponentViewSponsorshipObj,
};
// We don't want the edit or view to show up by default. Maybe if we see an object ID param in the URL, we can show the view modal.
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = false;
$ae_loc.mod.sponsorships.show_view__sponsorship_obj = false;
type key_val = {
[key: string]: any;
@@ -43,6 +50,8 @@ onMount(() => {
console.log('Sponsorships: +page.svelte');
let url = window.location.href;
console.log(url);
$ae_loc.href_url = url;
});
@@ -245,7 +254,6 @@ $: if ($ae_loc.mod.sponsorships.show_edit__sponsorship_obj) {
modalStore.trigger(modal_edit__sponsorship_obj);
} else if ($ae_loc.mod.sponsorships.show_view__sponsorship_obj) {
console.log('Show Modal View');
// modalStore.trigger(modalComponentViewSponsorshipObj);
modalStore.trigger(modal_view__sponsorship_obj);
}
@@ -288,7 +296,7 @@ const drawer_settings_y: DrawerSettings = {
<div class="space-y-10 flex flex-col">
<h1 class="h1 text-center">Aether - Sponsorships (dev)</h1>
<section>
<!-- <section>
<button
on:click={() => {
console.log('Open drawer');
@@ -315,7 +323,7 @@ const drawer_settings_y: DrawerSettings = {
>
Open Drawer Edit
</button>
</section>
</section> -->
<section class="sponsorships_list">
{#if $slct.sponsorship_obj_li && $ae_loc.mod.sponsorships.show_list__sponsorship_obj_li}