General clean up of code. Starting to wrap up for the night.
This commit is contained in:
@@ -28,7 +28,7 @@ import View_modal_sponsorship_obj from './10_view_modal__sponsorship_obj.svelte'
|
||||
|
||||
|
||||
// Editing
|
||||
const modalComponentEditSponsorshipObj: ModalComponent = { ref: Edit_modal_sponsorship_obj, props: {container_class_li: 'w-full p-4 space-y-4 card', container_header_class_li: 'card-header text-2xl font-bold'} };
|
||||
const modalComponentEditSponsorshipObj: ModalComponent = { ref: Edit_modal_sponsorship_obj, props: {container_class_li: 'w-full p-4 space-y-4 card'} };
|
||||
|
||||
const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
type: 'component',
|
||||
@@ -40,7 +40,7 @@ const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
};
|
||||
|
||||
// Viewing
|
||||
const modalComponentViewSponsorshipObj: ModalComponent = { ref: View_modal_sponsorship_obj, props: {container_class_li: 'w-full p-4 space-y-4 card', container_header_class_li: 'card-header text-2xl font-bold'} };
|
||||
const modalComponentViewSponsorshipObj: ModalComponent = { ref: View_modal_sponsorship_obj, props: {container_class_li: 'w-full p-4 space-y-4 card'} };
|
||||
|
||||
const modal_view__sponsorship_obj: ModalSettings = {
|
||||
type: 'component',
|
||||
|
||||
@@ -30,7 +30,6 @@ import { getModalStore, FileDropzone, TabGroup, Tab, TabAnchor } from '@skeleton
|
||||
/** Exposes parent props to this component. */
|
||||
export let parent: SvelteComponent;
|
||||
export let container_class_li = '';
|
||||
export let container_header_class_li = '';
|
||||
|
||||
const modalStore = getModalStore();
|
||||
|
||||
@@ -50,15 +49,6 @@ onMount(() => {
|
||||
}
|
||||
});
|
||||
|
||||
// // Form Data
|
||||
// const formData = {
|
||||
// name: 'Jane Doe',
|
||||
// tel: '214-555-1234',
|
||||
// email: 'jdoe@email.com'
|
||||
// };
|
||||
|
||||
// const form_data = $slct.sponsorship_obj;
|
||||
|
||||
// We've created a custom submit function to pass the response and close the modal.
|
||||
// function onFormSubmit(): void {
|
||||
// if ($modalStore[0].response) $modalStore[0].response(formData);
|
||||
@@ -66,24 +56,21 @@ onMount(() => {
|
||||
// }
|
||||
|
||||
// Base Classes
|
||||
const cBase = 'card p-4 shadow-xl space-y-4 ae_modal_scrollfix';
|
||||
// const cBase = 'card p-4 shadow-xl space-y-4 ae_modal_scrollfix';
|
||||
// w-modal-wide
|
||||
// const cBase = 'bg-surface-100-800-token w-screen h-screen';
|
||||
// const cBase = 'card h-screen';
|
||||
// const cBase = 'card p-4 w-modal-wide h-screen shadow-xl space-y-4';
|
||||
|
||||
const cHeader = 'text-2xl font-bold';
|
||||
const cForm = 'border border-surface-500 p-4 space-y-4 rounded-container-token';
|
||||
|
||||
|
||||
|
||||
$ae_loc.mod.sponsorships.disable_submit__sponsorship_obj = false;
|
||||
let placeholder_li: key_val = {
|
||||
file_logo_primary: '-- No File Selected --',
|
||||
file_logo_secondary: '-- No File Selected --',
|
||||
file_media_promo_video: '-- No File Selected --',
|
||||
};
|
||||
let ae_promises_init: key_val = {};
|
||||
let ae_promises: key_val = {};
|
||||
// let ae_promises.api_create__sponsorship_obj: Promise<any>;
|
||||
|
||||
@@ -121,7 +108,6 @@ if ($slct.sponsorship_id) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
$: if ($slct.sponsorship_obj) {
|
||||
// Logo related
|
||||
if ($slct.sponsorship_obj.logo_li_json) {
|
||||
@@ -460,7 +446,7 @@ async function handle_update__sponsorship({
|
||||
|
||||
{#if $modalStore[0]}
|
||||
<div class="svelte_component ae_edit_modal ae_obj__sponsorship {container_class_li}">
|
||||
<header class={container_header_class_li}>
|
||||
<header class={parent.regionHeader}>
|
||||
{$modalStore[0].title ?? '-- No Title --'}
|
||||
|
||||
{#await ae_promises.update__sponsorship_obj}
|
||||
@@ -542,7 +528,7 @@ async function handle_update__sponsorship({
|
||||
<legend class="legend">General Information</legend>
|
||||
|
||||
<label for="organization_name" class="label">Name of organization/company
|
||||
<input type="text" id="organization_name" name="organization_name" required max="200" value={$slct.sponsorship_obj.organization_name ?? ''} placeholder="Name of organization/company" autocomplete="off" class="input" />
|
||||
<input type="text" id="organization_name" name="organization_name" required max="200" value={$slct.sponsorship_obj.name ?? ''} placeholder="Name of organization/company" autocomplete="off" class="input" />
|
||||
</label>
|
||||
|
||||
<!-- <label class="label ae_label sponsorship__description">Short description
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script lang="ts">
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
// Stores
|
||||
// import { getModalStore } from '@skeletonlabs/skeleton';
|
||||
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
import { api } from '$lib/api';
|
||||
@@ -14,9 +13,6 @@ import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
export let parent: SvelteComponent;
|
||||
console.log(`Parent:`, parent);
|
||||
export let container_class_li = '';
|
||||
export let container_header_class_li = '';
|
||||
|
||||
// const dispatch = createEventDispatcher();
|
||||
|
||||
if ($slct.sponsorship_id) {
|
||||
console.log(`Sponsorship ID selected: ${$slct.sponsorship_id}`);
|
||||
@@ -35,7 +31,9 @@ onMount(() => {
|
||||
|
||||
<section class="svelte_component ae_view_modal ae_obj__sponsorship_obj {container_class_li}">
|
||||
|
||||
<header class={container_header_class_li}>{@html $slct.sponsorship_obj.name}</header>
|
||||
<header class={parent.regionHeader}>
|
||||
{@html $slct.sponsorship_obj.name}
|
||||
</header>
|
||||
|
||||
<div class="sponsorship__content">
|
||||
<div class="sponsorship__poc">
|
||||
|
||||
Reference in New Issue
Block a user