preparing to delete locations
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user