perf: limit cut plan to active orders
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
This commit is contained in:
@@ -884,6 +884,10 @@ const listProductionOrders = async (filters = {}) => {
|
||||
)`);
|
||||
}
|
||||
|
||||
if (filters.activeOnly === 'true') {
|
||||
where.push(`po.status IN ('open', 'cutting', 'sewing', 'review', 'in_progress')`);
|
||||
}
|
||||
|
||||
const result = await pool.query(`
|
||||
${baseProductionOrderSelect}
|
||||
${where.length ? `WHERE ${where.join(' AND ')}` : ''}
|
||||
|
||||
Reference in New Issue
Block a user