chatgpt added offline items update

This commit is contained in:
2026-05-14 21:31:33 +02:00
parent 7e64c5b4cf
commit a739218fb0
5 changed files with 182 additions and 5 deletions
+1
View File
@@ -17,6 +17,7 @@
<link href="/static/bootstrap.min.css" rel="stylesheet">
<script src="/static/jquery.min.js"></script>
<script src="/static/bootstrap.min.js"></script>
<script src="/static/item_update_queue.js"></script>
<style>
body {
+16 -4
View File
@@ -6,17 +6,27 @@
// handle Delete
function handleDelete(button) {
window.location.href = '/item_delete/'+button.name ;
lappQueueItemRequest('/item_delete/'+button.name, {
coalesceKey: 'item:' + button.name
}).then(function (sent) {
if (sent) {
window.location.href = '/items_append/{{ listid }}';
}
});
}
// handle AddOne
function handleAddOne(button) {
const response = fetch('/item_addone/'+button.name);
lappQueueItemRequest('/item_addone/'+button.name, {
coalesceKey: 'item:' + button.name
});
}
// handle Add with quantity
function handleAddWithQuantity(button, q) {
const response = fetch('/item_addquantity/'+button.name+'/'+q);
lappQueueItemRequest('/item_addquantity/'+button.name+'/'+q, {
coalesceKey: 'item:' + button.name
});
}
//trigger change category button
@@ -27,7 +37,9 @@
// selected the category
function clickedUpdateCategory4Item(icon) {
image_to_update.src="{{ iconpath }}" + icon.name + ".svg"
const response = fetch('/item_update_category/'+image_to_update.name+'/'+icon.name);
lappQueueItemRequest('/item_update_category/'+image_to_update.name+'/'+icon.name, {
coalesceKey: 'category:' + image_to_update.name
});
$('#staticBackdrop').modal('hide');
}
+3 -1
View File
@@ -35,7 +35,9 @@
// handle Checboc clicks
function handleCBClick(cb) {
const response = fetch('/item_update/'+cb.name+'/'+cb.checked);
lappQueueItemRequest('/item_update/'+cb.name+'/'+cb.checked, {
coalesceKey: 'checked:' + cb.name
});
}
</script>