Skip to content

Commit

Permalink
🐛 fix status update from backend (#2247)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu authored Dec 29, 2023
1 parent 79fb53a commit c09ad58
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/Http/Controllers/Frontend/Admin/StatusEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ public function edit(Request $request): RedirectResponse {
);

$status->checkin->update([
'origin' => $originStation->ibnr,
'destination' => $destinationStation->ibnr,
'departure' => $newDeparture,
'arrival' => $newArrival,
'distance' => $distanceInMeters,
'points' => $pointCalculation->points,
'origin' => $originStation->ibnr,
'origin_stopover_id' => $newOrigin->id,
'destination' => $destinationStation->ibnr,
'destination_stopover_id' => $newDestination->id,
'departure' => $newDeparture,
'arrival' => $newArrival,
'distance' => $distanceInMeters,
'points' => $pointCalculation->points,
]);

StatusUpdateEvent::dispatch($status->refresh());
Expand Down

0 comments on commit c09ad58

Please sign in to comment.