Update log
This commit is contained in:
parent
2632526794
commit
725315ed32
|
|
@ -931,6 +931,11 @@ export default class LineConnection {
|
|||
},
|
||||
],
|
||||
}
|
||||
console.log(`${promptRecord.content}
|
||||
|
||||
Return ONLY a valid JSON array of strings.
|
||||
Here is the log:
|
||||
${log}`)
|
||||
const remoteUrl = process.env.ERP_URL_AUTH || 'https://stage.nswteam.net'
|
||||
const remoteResp = await axios.post(
|
||||
remoteUrl + '/api/transferPostData',
|
||||
|
|
@ -1994,7 +1999,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
|||
const skipReason = this.config.reasonSkipPhysical || snapshot?.reason || ''
|
||||
const isSkipped = typeof skipReason === 'string' && skipReason.trim().length > 0
|
||||
|
||||
const aiIssue = issues.length > 0 ? issues.join('\n') : ''
|
||||
const aiIssue = issues.length > 0 && Array.isArray(issues) ? issues.join('\n') : ''
|
||||
let summaryStatus = 'PASS'
|
||||
const match = aiIssue.match(/RESULT:\s*(PASS WITH WARNING|PASS|FAIL|INSUFFICIENT DATA)/im)
|
||||
if (match) {
|
||||
|
|
|
|||
|
|
@ -687,9 +687,8 @@ export async function updateNoteToERP(sn: string, note: string) {
|
|||
// urlAPI: '/api/stock-model-serial/get-list-for-test-log',
|
||||
// filter: {
|
||||
// where: {
|
||||
// _q: 'FOC1425Z3RN',
|
||||
// _q: sn,
|
||||
// },
|
||||
// orgId: ['5fadc798f070e4b64b53ac9c', '5fadc7b0f070e4b64b53ac9d'],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
|
|
@ -705,8 +704,7 @@ export async function updateNoteToERP(sn: string, note: string) {
|
|||
where: {
|
||||
_q: sn,
|
||||
},
|
||||
},
|
||||
orgId: ['5fadc798f070e4b64b53ac9c', '5fadc7b0f070e4b64b53ac9d'],
|
||||
}
|
||||
},
|
||||
headers: header,
|
||||
}
|
||||
|
|
@ -735,6 +733,12 @@ export async function updateNoteToERP(sn: string, note: string) {
|
|||
await axios.post(remoteUrl + '/api/stock-model-serial/data-save-for-test-log', payload, {
|
||||
headers: header,
|
||||
})
|
||||
// await axios.post("https://stage.nswteam.net/api/transferPostData", {
|
||||
// urlAPI: '/api/stock-model-serial/data-save-for-test-log',
|
||||
// data: payload
|
||||
// }, {
|
||||
// headers: header,
|
||||
// })
|
||||
} catch (error) {
|
||||
console.log('updateNoteToERP', error)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ const CardLine = ({
|
|||
}, [line?.latestScenario]);
|
||||
|
||||
function detectResultStatus(lines: string[]) {
|
||||
if (!lines || lines.length === 0) return null;
|
||||
if (!lines || lines.length === 0 || typeof lines === "string") return null;
|
||||
const text = lines.join("\n");
|
||||
|
||||
const match = text.match(
|
||||
|
|
|
|||
Loading…
Reference in New Issue