This commit is contained in:
Rizki
2026-04-10 14:35:54 +07:00
parent 28ff36d7fe
commit 2f6585f26f
2 changed files with 4 additions and 2 deletions

View File

@ -390,7 +390,9 @@ class JustificationAdapter extends Adapter{
// apires.meta.message = "Record Not Found"; // apires.meta.message = "Record Not Found";
// } // }
callback(null, apires); callback(null, apires);
emailNotif.notifyOnSubmit(idxjustification); if (parseInt(status) !== -1) {
emailNotif.notifyOnSubmit(idxjustification);
}
} }
}); });
} catch (err) { } catch (err) {

View File

@ -69,7 +69,7 @@ function notifyOnSubmit(idxjustification) {
select t.nik, e.fullname select t.nik, e.fullname
from tbl_justificationttd t from tbl_justificationttd t
join dbssotcel.tbl_employee e on e.nik = t.nik join dbssotcel.tbl_employee e on e.nik = t.nik
where t.idxjustification = '${idxjustification}' and t.category = 'APR' and t.issigned = 0 and t.isdeleted = 0 where t.idxjustification = '${idxjustification}' and t.issigned = 0 and t.isdeleted = 0
order by t._idx asc limit 1 order by t._idx asc limit 1
`; `;
db.query(qryApprover, [], function(err2, rows2) { db.query(qryApprover, [], function(err2, rows2) {