upd
This commit is contained in:
@ -390,8 +390,10 @@ class JustificationAdapter extends Adapter{
|
|||||||
// apires.meta.message = "Record Not Found";
|
// apires.meta.message = "Record Not Found";
|
||||||
// }
|
// }
|
||||||
callback(null, apires);
|
callback(null, apires);
|
||||||
|
if (parseInt(status) !== -1) {
|
||||||
emailNotif.notifyOnSubmit(idxjustification);
|
emailNotif.notifyOnSubmit(idxjustification);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
apires.meta.code = 500;
|
apires.meta.code = 500;
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user