Refactoring Simbrief fares and aircraft (#1054)
* Refactoring simbrief fares and aircraft * Hide user full name/email * Sort PIREP fields desc; fix cargo counts * Change the sorting * Extra logs * Fix tests * Return fare information through the API * Style fixes * Test fix * Another test fix * More fixes * Set aircraft and fares in prefile * Formatting
This commit is contained in:
@@ -172,6 +172,24 @@ class FareService extends Service
|
||||
return $fare;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all the fares for an aircraft. check the pivot
|
||||
* table to see if the price/cost/capacity has been overridden
|
||||
* and return the correct amounts.
|
||||
*
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getForSubfleet(Subfleet $subfleet)
|
||||
{
|
||||
$fares = $subfleet->fares->map(function ($fare) {
|
||||
return $this->getFares($fare);
|
||||
});
|
||||
|
||||
return $fares;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach a fare to an flight
|
||||
*
|
||||
@@ -240,24 +258,6 @@ class FareService extends Service
|
||||
return $subfleet;
|
||||
}
|
||||
|
||||
/**
|
||||
* return all the fares for an aircraft. check the pivot
|
||||
* table to see if the price/cost/capacity has been overridden
|
||||
* and return the correct amounts.
|
||||
*
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getForSubfleet(Subfleet $subfleet)
|
||||
{
|
||||
$fares = $subfleet->fares->map(function ($fare) {
|
||||
return $this->getFares($fare);
|
||||
});
|
||||
|
||||
return $fares;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the fare from a subfleet
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user