sale order
SAP-ERP Portal CI/CD / build (push) Successful in 3m57s

This commit is contained in:
John
2026-10-05 18:45:17 +05:30
parent e725a6571b
commit eead8f5ffd
129 changed files with 14252 additions and 452 deletions
+4 -2
View File
@@ -48,10 +48,12 @@ router.get('/', verifyToken, requireApprovalStep('oee:entry', 'view'), async (re
const skip = Number(req.query.skip) || 0;
const tab = (req.query.tab || '').trim() || null;
const month = (req.query.month || '').trim() || null;
const monthFrom = (req.query.monthFrom || '').trim() || null;
const monthTo = (req.query.monthTo || '').trim() || null;
// If a specific tab was requested but the user isn't allowed it, return none.
if (tab && allow && !allow.includes(tab)) return res.json({ success: true, data: [] });
const data = await store.list({ company: cq(req), tab, month, allowTabs: allow, top, skip });
res.json({ success: true, data });
const { data, total } = await store.list({ company: cq(req), tab, month, monthFrom, monthTo, allowTabs: allow, top, skip });
res.json({ success: true, data, total });
} catch (err) { res.status(500).json({ success: false, message: err.message }); }
});