Update logging DPELP

This commit is contained in:
nguyentrungthat 2025-12-04 13:35:16 +07:00
parent f71f18393e
commit cbbfd4b1df
2 changed files with 36 additions and 1 deletions

View File

@ -452,6 +452,10 @@ export default class LineConnection {
data, data,
}) })
if (script?.title === 'DPELP') this.dataDPELP = result if (script?.title === 'DPELP') this.dataDPELP = result
console.log(
`DPELP DATA line ${this.config.lineNumber} of ${this.config.stationName}:`,
this.dataDPELP
)
if (this.config.latestScenario) if (this.config.latestScenario)
this.config.latestScenario = { ...this.config.latestScenario, detectAI: detectLog } this.config.latestScenario = { ...this.config.latestScenario, detectAI: detectLog }
this.config.data = data this.config.data = data

View File

@ -296,7 +296,11 @@ const CardLine = ({
)} )}
{line?.inventory?.pid && line?.inventory?.sn && ( {line?.inventory?.pid && line?.inventory?.sn && (
<CopyIcon <CopyIcon
value={`Line ${line.lineNumber || line.line_number || ""}: ${line.inventory?.pid}${line.inventory?.vid ? ` ${line.inventory.vid}` : ""} - ${line.inventory?.sn}`} value={`Line ${
line.lineNumber || line.line_number || ""
}: ${line.inventory?.pid}${
line.inventory?.vid ? ` ${line.inventory.vid}` : ""
} - ${line.inventory?.sn}`}
label="Copy PID + SN" label="Copy PID + SN"
copiedLabel="Copied PID + SN" copiedLabel="Copied PID + SN"
color="grape" color="grape"
@ -526,6 +530,33 @@ const CardLine = ({
</Flex> </Flex>
</Menu.Dropdown> </Menu.Dropdown>
</Menu> </Menu>
<Button
disabled={isDisabled}
variant="outline"
color="red"
// size="xs"
className={classes.buttonMenuTool}
onClick={() => {
if (!line?.lineClear && !line?.line_clear) {
notifications.show({
title: "Error",
message: "Clear line has not been configured",
color: "red",
});
return;
}
socket?.emit("clear_line", {
lineClear: line?.lineClear || line?.line_clear,
stationId: stationItem?.id,
});
setIsDisabled(true);
setTimeout(() => {
setIsDisabled(false);
}, 3000);
}}
>
Clear line
</Button>
<Flex justify={"space-between"} direction={"column"}> <Flex justify={"space-between"} direction={"column"}>
<hr style={{ width: "100%" }} /> <hr style={{ width: "100%" }} />
<Box style={{ textAlign: "center" }}> <Box style={{ textAlign: "center" }}>