I need to stop for the night.
This commit is contained in:
@@ -17,11 +17,13 @@ const modalStore = getModalStore();
|
||||
import { api } from '$lib/api';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
|
||||
|
||||
// import Edit_sponsorship_obj from './10_edit__sponsorship_obj.svelte';
|
||||
import Edit_modal_sponsorship_obj from './10_edit_modal__sponsorship_obj.svelte';
|
||||
import List_sponsorship_obj from './10_list__sponsorship_obj.svelte';
|
||||
import View_modal_sponsorship_obj from './10_view_modal__sponsorship_obj.svelte';
|
||||
|
||||
// Viewing
|
||||
const modalComponentViewSponsorshipObj: ModalComponent = { ref: View_modal_sponsorship_obj };
|
||||
|
||||
const modal_view__sponsorship_obj: ModalSettings = {
|
||||
@@ -31,6 +33,26 @@ const modal_view__sponsorship_obj: ModalSettings = {
|
||||
position: '', // default is "items-center"
|
||||
};
|
||||
|
||||
|
||||
// Editing
|
||||
const modalComponentEditSponsorshipObj: ModalComponent = { ref: Edit_modal_sponsorship_obj };
|
||||
|
||||
const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
type: 'component',
|
||||
component: modalComponentEditSponsorshipObj,
|
||||
title: 'Edit Sponsorship',
|
||||
position: '', // default is "items-center"
|
||||
};
|
||||
|
||||
$: if ($ae_loc.mod.sponsorships.show_edit__sponsorship_obj) {
|
||||
console.log('Show Modal Edit');
|
||||
modalStore.trigger(modal_edit__sponsorship_obj);
|
||||
} else if ($ae_loc.mod.sponsorships.show_view__sponsorship_obj) {
|
||||
console.log('Show Modal View');
|
||||
modalStore.trigger(modal_view__sponsorship_obj);
|
||||
}
|
||||
|
||||
|
||||
// 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;
|
||||
@@ -288,12 +310,6 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
|
||||
return ae_sponsorship_obj_get_promise;
|
||||
}
|
||||
|
||||
const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
type: 'component',
|
||||
component: 'modalComponentEditSponsorshipObj',
|
||||
title: 'Edit Sponsorship',
|
||||
position: '', // default is "items-center"
|
||||
};
|
||||
|
||||
// const modal_view__sponsorship_obj: ModalSettings = {
|
||||
// type: 'component',
|
||||
@@ -307,13 +323,7 @@ const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
// $slct_trigger = null;
|
||||
// }
|
||||
|
||||
$: if ($ae_loc.mod.sponsorships.show_edit__sponsorship_obj) {
|
||||
console.log('Show Modal Edit');
|
||||
modalStore.trigger(modal_edit__sponsorship_obj);
|
||||
} else if ($ae_loc.mod.sponsorships.show_view__sponsorship_obj) {
|
||||
console.log('Show Modal View');
|
||||
modalStore.trigger(modal_view__sponsorship_obj);
|
||||
}
|
||||
|
||||
|
||||
// const modal: ModalSettings = {
|
||||
// type: 'alert',
|
||||
|
||||
Reference in New Issue
Block a user