mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-12 13:59:08 +02:00
fix fetch error on creation
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
|
||||
<div class="modal modal-open z-8">
|
||||
<div class="modal-box w-full max-w-xl gap-4">
|
||||
<div class="bg-base-100 sticky top-0 z-5">
|
||||
<div class="bg-base-100 z-5 sticky top-0">
|
||||
<ModalButtons onClose={closeModal} {createProfile} />
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
@@ -143,14 +143,6 @@
|
||||
{create_relationship_and_person()}
|
||||
</button>
|
||||
{/if}
|
||||
<button
|
||||
class="btn btn-secondary btn-sm"
|
||||
onclick={() => {
|
||||
editProfile(profile.id!);
|
||||
}}
|
||||
>
|
||||
{edit()}
|
||||
</button>
|
||||
{#if profile.label?.includes('DeletedPerson')}
|
||||
<button
|
||||
class="btn btn-error btn-sm"
|
||||
@@ -161,12 +153,18 @@
|
||||
{hard_delete()}
|
||||
</button>
|
||||
{:else}
|
||||
<button
|
||||
class="btn btn-secondary btn-sm"
|
||||
onclick={() => {
|
||||
editProfile(profile.id!);
|
||||
}}>
|
||||
{edit()}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-error btn-sm"
|
||||
onclick={() => {
|
||||
deleteProfile(profile.id!);
|
||||
}}
|
||||
>
|
||||
}}>
|
||||
{delete_profile()}
|
||||
</button>
|
||||
{/if}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
data as components['schemas']['FamilyRelationship'] & { type: string }
|
||||
).type.toLowerCase();
|
||||
let edgeLabel: string = $state(edgeType);
|
||||
let edgeColor: string;
|
||||
let edgeColor: string = $state('stroke: gray;');
|
||||
let srcPos;
|
||||
let tgtPos;
|
||||
if (edgeType === 'spouse') {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
export let deleteNode: () => void;
|
||||
export let createRelationshipAndNode: () => void;
|
||||
export let addRelationship: () => void;
|
||||
export let addAdmin: (() => void) | undefined;
|
||||
// export let addAdmin: (() => void) | undefined;
|
||||
|
||||
let contextMenu: HTMLDivElement;
|
||||
let isAdmin: boolean = false;
|
||||
|
@@ -115,7 +115,8 @@
|
||||
let newNode = {
|
||||
id: "person"+String(data.person?.Id),
|
||||
data: {
|
||||
...data.person?.Props
|
||||
...data.person?.Props,
|
||||
id: data.person?.Id,
|
||||
},
|
||||
position: { x: 0, y: 0 },
|
||||
type: 'personNode'
|
||||
|
@@ -157,6 +157,7 @@
|
||||
id: number | undefined;
|
||||
}
|
||||
) => {
|
||||
console.log('handleNodeClickFunc', person);
|
||||
openPersonPanel = true;
|
||||
selectedPerson = { ...person, id: String(person.id) };
|
||||
fetch('/api/person/' + person.id, {
|
||||
|
Reference in New Issue
Block a user