Change LatestPireps Widget Sort Order (#1099)
* Change LatestPireps Widget Sort Order Latest pireps should be ordered by `submitted_at` instead of `created_at` . Pirep may be created even a day before others (with the pause/resume ability we have in acars) but it gets submitted once when the flight is ended, thus I think it should be our reference to sort them in proper order. * Trying to Pass UnitTest
This commit is contained in:
parent
43c33adcfe
commit
c2b0b69eb2
@ -8,6 +8,7 @@ use App\Repositories\PirepRepository;
|
||||
|
||||
/**
|
||||
* Show the latest PIREPs in a view
|
||||
* sorted nicely by their submit time
|
||||
*/
|
||||
class LatestPireps extends Widget
|
||||
{
|
||||
@ -28,7 +29,7 @@ class LatestPireps extends Widget
|
||||
PirepState::CANCELLED,
|
||||
PirepState::DRAFT,
|
||||
PirepState::IN_PROGRESS,
|
||||
], 'created_at', 'desc')
|
||||
], 'submitted_at', 'desc')
|
||||
->recent($this->config['count']);
|
||||
|
||||
return view('widgets.latest_pireps', [
|
||||
|
Loading…
Reference in New Issue
Block a user