patch:
- fix topping bug where update value also save across states even already closed dialog - fix disconnect may throw error - add machine state payload from tcp socket - add command/sheet api request - add heartbeat message Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
parent
230e2ec342
commit
916e056389
8 changed files with 78 additions and 30 deletions
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
let socket = get(socketStore);
|
||||
if (socket) {
|
||||
socket.close(1011, 'logout');
|
||||
socket.close(1000, 'logout');
|
||||
}
|
||||
|
||||
socketStore.set(null);
|
||||
|
|
|
|||
|
|
@ -215,9 +215,9 @@
|
|||
|
||||
// set to edit state even if selected same group again
|
||||
value_event_state = ValueEvent.EDITED;
|
||||
if (current_editing_data['toppings']) {
|
||||
if (current_editing_data['toppings'] == undefined || current_editing_data['toppings'] == null) {
|
||||
let toppings_length = current_editing_data['toppings'].length;
|
||||
if (!changed_data['toppings']) {
|
||||
if (changed_data['toppings'] == undefined || changed_data['toppings'] == null) {
|
||||
changed_data['toppings'] = new Array<any>(toppings_length);
|
||||
|
||||
// console.log('filling change topping', JSON.stringify(changed_data));
|
||||
|
|
@ -250,10 +250,10 @@
|
|||
// set to edit state even if selected same group again
|
||||
value_event_state = ValueEvent.EDITED;
|
||||
let idx = getToppingSlotIndex(current_editing_data['mat_id']);
|
||||
if (current_editing_data['toppings']) {
|
||||
if (current_editing_data['toppings'] == undefined || current_editing_data['toppings'] == null) {
|
||||
let toppings_length = current_editing_data['toppings'].length;
|
||||
// case: topping not init
|
||||
if (!changed_data['toppings']) {
|
||||
if (changed_data['toppings'] == null || changed_data['toppings'] == undefined) {
|
||||
changed_data['toppings'] = new Array<any>(toppings_length);
|
||||
}
|
||||
}
|
||||
|
|
@ -272,25 +272,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
function beforeClosing() {
|
||||
if (value_event_state === ValueEvent.EDITED) {
|
||||
if (warnUserNotSaveChange) {
|
||||
// Discard all
|
||||
|
||||
warnUserNotSaveChange = false;
|
||||
// sheetOpenState = false;
|
||||
return true;
|
||||
} else {
|
||||
// show no save warning
|
||||
warnUserNotSaveChange = true;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
sheetOpenState = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// recipelist-value-editor.svelte?t=1773541064272:57 GET requested data: {"mat_id":1002,"mat_type":"bean","mat_name":"medium-roasts (1002)","params":{"esp-v2-press-value":"24"},"toppings":[{"ListGroupID":[1,0,0,0],"defaultIDSelect":1,"groupID":"1","isUse":true},{"ListGroupID":[6,0,0,0],"defaultIDSelect":31,"groupID":"6","isUse":true},{"ListGroupID":[7,0,0,0],"defaultIDSelect":33,"groupID":"7","isUse":true},{"ListGroupID":[0,0,0,0],"defaultIDSelect":0,"groupID":"0","isUse":false},{"ListGroupID":[0,0,0,0],"defaultIDSelect":0,"groupID":"0","isUse":false},{"ListGroupID":[0,0,0,0],"defaultIDSelect":0,"groupID":"0","isUse":false},{"ListGroupID":[530,0,0,0],"defaultIDSelect":532,"groupID":"530","isUse":true},{"ListGroupID":[500,0,0,0],"defaultIDSelect":502,"groupID":"500","isUse":true}],"current_topping_list":[],"has_mix_ord":false,"feed":{"pattern":0,"parameter":0},"water":{"cold":0,"yield":30},"powder":{"gram":7,"time":9},"syrup":{"gram":0,"time":0},"stir_time":120}
|
||||
// recipelist-value-editor.svelte?t=1773541064272:79 sending request edit 0
|
||||
// recipelist-value.svelte:224 request edit mat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue