preparing to delete locations

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-21 08:49:18 +02:00
parent 4e9c8c0f69
commit 59e6a7001d
6 changed files with 51 additions and 20 deletions

View File

@@ -102,7 +102,7 @@
{:then data}
<div class="items">
{#if location}
<h3>{location.name}</h3>
<h3>{location.name} <button class="symbol" title={t('delete_object',{object:t('location')})} onclick={e => deleteLocation(location)}></button></h3>
{/if}
<ItemList items={data?.items.sort((a,b) => a.code.localeCompare(b.code))} bind:selected={item} drag_start={item => draggedItem = item} />
</div>

View File

@@ -52,9 +52,11 @@
});
if (res.ok){
yikes;
const saved = await res.json();
locations.push(saved);
return true;
} else {
error(ok);
error(res);
return false;
}
}
@@ -67,7 +69,6 @@
name: new_location_name,
parent: parent
}
console.log(JSON.parse(JSON.stringify(data)));
}
function show_loc_form(ev){