fix: exclude RMM alert tickets (source=8) from kiosk stats - show only human-generated tickets
This commit is contained in:
parent
2ebf8e6732
commit
1d1b4d2a71
2 changed files with 23 additions and 15 deletions
|
|
@ -3,7 +3,7 @@ import { postgresClient } from '@/lib/services/postgres-client';
|
|||
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
// Get recent ticket activity for ticker feed
|
||||
// Get recent ticket activity for ticker feed - exclude RMM alerts (source = 8)
|
||||
const activityResult = await postgresClient.query(
|
||||
`SELECT
|
||||
t.ticket_number,
|
||||
|
|
@ -18,6 +18,7 @@ export async function GET(request: NextRequest) {
|
|||
LEFT JOIN companies c ON t.company_id = c.id
|
||||
LEFT JOIN statuses s ON t.status = s.value
|
||||
WHERE t.completed_date IS NULL
|
||||
AND (t.source IS NULL OR t.source != 8)
|
||||
ORDER BY t.last_activity_date DESC NULLS LAST
|
||||
LIMIT 50`
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue