fix fetch error on creation

This commit is contained in:
2025-06-25 12:52:20 +02:00
parent 58bb20e608
commit 7397ba0ccc
5 changed files with 14 additions and 14 deletions

View File

@@ -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}

View File

@@ -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') {

View File

@@ -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;

View File

@@ -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'

View File

@@ -157,6 +157,7 @@
id: number | undefined;
}
) => {
console.log('handleNodeClickFunc', person);
openPersonPanel = true;
selectedPerson = { ...person, id: String(person.id) };
fetch('/api/person/' + person.id, {