update sendDeviceInfo follow model special and RAM, flash
This commit is contained in:
parent
2a33901778
commit
00cb88b5f4
|
|
@ -290,17 +290,18 @@ export const sendDeviceInfora = async () => {
|
|||
});
|
||||
|
||||
await Promise.all(filePromises);
|
||||
let specialModel = allKeyValue
|
||||
.filter((i) => i.key === "MODEL_SPECIAL")
|
||||
.map((obj) => obj.$attributes.value);
|
||||
listInformation = listInformation.filter(
|
||||
(i) =>
|
||||
i.RAM !== "" ||
|
||||
i.flash !== "" ||
|
||||
specialModel.filter((m) => i.PID.includes(m)).length > 0
|
||||
);
|
||||
if (listInformation.length > 0) {
|
||||
console.log(listInformation);
|
||||
let specialModel = allKeyValue
|
||||
.filter((i) => i.key === "MODEL_SPECIAL")
|
||||
.map((obj) => obj.$attributes.value);
|
||||
listInformation = listInformation.filter(
|
||||
(i) =>
|
||||
i.RAM !== "" ||
|
||||
i.flash !== "" ||
|
||||
specialModel.filter((m) => i.PID.includes(m)).length > 0
|
||||
);
|
||||
|
||||
listInformation.map((inf) => {
|
||||
html += `<tr><td>${inf.PID}</td>
|
||||
<td>${inf.VID}</td>
|
||||
|
|
@ -311,8 +312,8 @@ export const sendDeviceInfora = async () => {
|
|||
});
|
||||
const options = {
|
||||
from: "admin@apactech.io",
|
||||
to: "joseph@apactech.io, ips@ipsupply.com.au",
|
||||
// to: "joseph@apactech.io",
|
||||
// to: "joseph@apactech.io, ips@ipsupply.com.au",
|
||||
to: "joseph@apactech.io",
|
||||
subject: "(AUTO-REPORT) SERIAL NUMBER",
|
||||
html:
|
||||
"<table border='1'>\
|
||||
|
|
|
|||
Loading…
Reference in New Issue