sorting of tickets by created at and status, still cant figure out select javascript