Merge pull request 'Refactor CLI close logic and comment out debug log' (#14) from that into main
Reviewed-on: #14
This commit is contained in:
commit
3fedaa33de
|
|
@ -237,9 +237,9 @@ export default class LineConnection {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
// console.log(
|
||||||
`Write command "${cmd}" to line ${this.config.lineNumber} of ${this.config.stationName}`
|
// `Write command "${cmd.toString().replace(/\r/g, '\\r').replace(/\n/g, '\\n')}" to line ${this.config.lineNumber} of ${this.config.stationName}`
|
||||||
)
|
// )
|
||||||
|
|
||||||
this.client.write(cmd)
|
this.client.write(cmd)
|
||||||
if (userName) {
|
if (userName) {
|
||||||
|
|
|
||||||
|
|
@ -593,8 +593,9 @@ function App() {
|
||||||
</Tabs.Panel>
|
</Tabs.Panel>
|
||||||
))}
|
))}
|
||||||
onChange={(id) => {
|
onChange={(id) => {
|
||||||
if (selectedLines.length > 0) {
|
const station = stations.find((el) => el.id === Number(activeTab));
|
||||||
selectedLines.forEach((el) => {
|
if (station) {
|
||||||
|
(station?.lines || [])?.forEach((el) => {
|
||||||
if (el?.userOpenCLI === user?.userName)
|
if (el?.userOpenCLI === user?.userName)
|
||||||
socket?.emit("close_cli", {
|
socket?.emit("close_cli", {
|
||||||
lineId: el?.id,
|
lineId: el?.id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue