This commit is contained in:
Rizki
2026-03-13 16:07:28 +07:00
parent a8e0091267
commit 7604f9cb44

View File

@ -416,7 +416,7 @@ class PrAdapter extends Adapter {
qry += "and " + swherenik + "status in(" + status + ") ";
qry += "order by id asc limit " + offset + ", " + limit;
// console.log(qry);
console.log("qry paging => ", qry);
db.query(qry, [], function (err, result, fields) {
if (err) {
apires.meta["message"] = err.toString();
@ -442,6 +442,11 @@ class PrAdapter extends Adapter {
"%' or trim(prnumber) like '%" +
keyword +
"%') ";
if (nik) {
if (!proc_users.includes(nik)) {
qry += 'and (iby="' + nik + '" or nikapproval="' + nik + '")';
}
}
qry =
qry +
"and " +
@ -452,7 +457,9 @@ class PrAdapter extends Adapter {
offset +
", " +
limit;
// console.log(qry);
console.log("qry => ", qry);
db.query(qry, [], function (err, result, fields) {
if (err) {
apires.meta["message"] = err.toString();