From 744472f3da4c4d1ffe2293ff7f5e6bcbeabeb948 Mon Sep 17 00:00:00 2001 From: nguyentrungthat <80239428+nguentrungthat@users.noreply.github.com> Date: Sat, 20 Dec 2025 10:13:33 +0700 Subject: [PATCH] Update --- BACKEND/app/services/line_connection.ts | 8 ++++++-- FRONTEND/src/components/Modal/ModalScenario.tsx | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/BACKEND/app/services/line_connection.ts b/BACKEND/app/services/line_connection.ts index 09214e4..f67da06 100644 --- a/BACKEND/app/services/line_connection.ts +++ b/BACKEND/app/services/line_connection.ts @@ -182,7 +182,8 @@ export default class LineConnection { if (!this.config.inventory) this.outputInventory = this.outputInventory.slice(-3000) + message } - if (data.toString().includes('More')) this.writeCommand(' ') + if (data.toString().includes('More') || data.toString().includes('MORE')) + this.writeCommand(' ') // let output = cleanData(message) // console.log(`📨 [${this.config.port}] ${message}`) @@ -339,7 +340,10 @@ export default class LineConnection { lineId: this.config.id, title: script?.title, }) - if (script?.send_result || script?.sendResult) this.dataDPELP = '' + if (script?.send_result || script?.sendResult) { + this.dataDPELP = '' + this.config.inventory = '' + } if (script?.isReboot) { await sleep(10000) diff --git a/FRONTEND/src/components/Modal/ModalScenario.tsx b/FRONTEND/src/components/Modal/ModalScenario.tsx index bde43bc..47cf82b 100644 --- a/FRONTEND/src/components/Modal/ModalScenario.tsx +++ b/FRONTEND/src/components/Modal/ModalScenario.tsx @@ -365,7 +365,9 @@ function ModalScenario({ ); form.setFieldValue( "isReboot", - scenario.is_reboot + typeof scenario.isReboot !== "undefined" + ? scenario.isReboot + : scenario?.is_reboot ); form.setFieldValue( "send_result",