implemented moving of items
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
let top_level = $state(null);
|
||||
|
||||
async function move_dragged_to(new_loc){
|
||||
const data = { item : draggedItem, target: new_loc };
|
||||
const data = { item : draggedItem.id, target: new_loc.id };
|
||||
const url = api('stock/move_item');
|
||||
const res = await fetch(url,{
|
||||
credentials : 'include',
|
||||
@@ -32,7 +32,10 @@
|
||||
});
|
||||
if (res.ok){
|
||||
yikes();
|
||||
} else error(res);
|
||||
location = new_loc;
|
||||
} else {
|
||||
error(res);
|
||||
}
|
||||
}
|
||||
|
||||
async function loadLocation(){
|
||||
|
||||
Reference in New Issue
Block a user