รายการแจ้งเตือนเพิ่มแนบเอกสารแนบท้ายคำสั่ง

This commit is contained in:
Bright 2025-09-01 13:47:27 +07:00
parent 7e474f6652
commit 2bb44003c0

View file

@ -581,9 +581,25 @@ export async function PayloadSendNoti(commandId: string) {
isReport: true,
isTemplate: false,
}
const attachments = {
attachments: [_payload]
};
let attachments = {}
if (_command.commandType.isUploadAttachment === true) {
const _payloadAtt = {
name: _command && _command.commandType
? `เอกสารแนบท้ายคำสั่ง${_command.commandType.name}`
: "",
url: `${process.env.API_URL}/salary/file/ระบบออกคำสั่ง/แนบท้าย/${commandId}/แนบท้าย`,
isReport: true,
isTemplate: false,
}
attachments = {
attachments: [_payload, _payloadAtt]
};
}
else {
attachments = {
attachments: [_payload]
};
}
return JSON.stringify(attachments);
}