incident call order

This commit is contained in:
Daniel Ponte 2025-01-10 20:20:00 -05:00
parent 5c07b8c15a
commit e01f20f1fc
5 changed files with 55 additions and 53 deletions

View file

@ -180,6 +180,7 @@ FROM incidents_calls ic, LATERAL (
FROM swept_calls sc WHERE sc.id = ic.swept_call_id FROM swept_calls sc WHERE sc.id = ic.swept_call_id
) c ) c
WHERE ic.incident_id = $1 WHERE ic.incident_id = $1
ORDER BY ic.call_date ASC
` `
type GetIncidentCallsRow struct { type GetIncidentCallsRow struct {

View file

@ -141,7 +141,8 @@ FROM incidents_calls ic, LATERAL (
sc.transcript sc.transcript
FROM swept_calls sc WHERE sc.id = ic.swept_call_id FROM swept_calls sc WHERE sc.id = ic.swept_call_id
) c ) c
WHERE ic.incident_id = @id; WHERE ic.incident_id = @id
ORDER BY ic.call_date ASC;
-- name: GetIncident :one -- name: GetIncident :one
SELECT SELECT