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);
|
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) {
|
if (listInformation.length > 0) {
|
||||||
console.log(listInformation);
|
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) => {
|
listInformation.map((inf) => {
|
||||||
html += `<tr><td>${inf.PID}</td>
|
html += `<tr><td>${inf.PID}</td>
|
||||||
<td>${inf.VID}</td>
|
<td>${inf.VID}</td>
|
||||||
|
|
@ -311,8 +312,8 @@ export const sendDeviceInfora = async () => {
|
||||||
});
|
});
|
||||||
const options = {
|
const options = {
|
||||||
from: "admin@apactech.io",
|
from: "admin@apactech.io",
|
||||||
to: "joseph@apactech.io, ips@ipsupply.com.au",
|
// to: "joseph@apactech.io, ips@ipsupply.com.au",
|
||||||
// to: "joseph@apactech.io",
|
to: "joseph@apactech.io",
|
||||||
subject: "(AUTO-REPORT) SERIAL NUMBER",
|
subject: "(AUTO-REPORT) SERIAL NUMBER",
|
||||||
html:
|
html:
|
||||||
"<table border='1'>\
|
"<table border='1'>\
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue