refactor(rfid): refactored station 3 (lines) and complete logic

This commit is contained in:
2025-03-26 22:10:05 -05:00
parent 96e7f742fe
commit bd11feb136
2 changed files with 20 additions and 13 deletions

View File

@@ -1,7 +0,0 @@
import {createLog} from "../../logger/logger.js";
export const sendEmail = async () => {
createLog("info", "lst", "general", "Preparing to send an email");
// settings
};

View File

@@ -17,11 +17,25 @@ export const station3Tags = async (tagData: TagData[]) => {
`There are ${tagData.length} tags, and ${tagData[0].reader} only allows 1 tag to create a label.` `There are ${tagData.length} tags, and ${tagData[0].reader} only allows 1 tag to create a label.`
); );
// get tag data // get tag data
tagStuff(tagData);
for (let i = 0; i < tagData.length; i++) {
const tag = {
...tagData[i],
runningNr: 0,
lastareaIn: "NeedsChecked",
};
tagStuff([tag]);
}
} else { } else {
//console.log("Generate the label and link it to the tag."); //console.log("Generate the label and link it to the tag.");
const tagdata = await tagStuff(tagData); const tag = { ...tagData[0], runningNr: 0 };
const tagdata = await tagStuff([tag]);
createLog("info", "rfid", "rfid", "Generate a label and link it to this tag."); createLog(
"debug",
"rfid",
"rfid",
"Generate a label and link it to this tag."
);
} }
}; };