Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
Did some fixes to some files.
Browse files Browse the repository at this point in the history
  • Loading branch information
BossOfGames committed Oct 25, 2018
1 parent 3ab65ed commit 1b1fc81
Show file tree
Hide file tree
Showing 15 changed files with 2,728 additions and 2,063 deletions.
3 changes: 1 addition & 2 deletions Modules/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
OpenLogbook
SmartCARS
*
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function manualFile($id, Request $request)
$flight->status = 0;
}
$flight->save();
return action('BiddingController@show', ['id' => $flight->id]);
return redirect()->action('\Modules\MaterialCrew\Http\Controllers\BiddingController@show', ['id' => $flight->id]);
}

/**
Expand Down
14 changes: 9 additions & 5 deletions app/Http/Controllers/API/BidsAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BidsAPI extends Controller
public function getBid(Request $request)
{
// Ok lets find out if we can find the bid
$flights = ScheduleComplete::where('user_id', $request->query('userid'))->with('depapt')->with('arrapt')->with('airline')->with('aircraft')->get();
$flights = Flight::where('state', 1)->with('depapt')->with('arrapt')->with('airline')->with('aircraft')->get();
if ($request->query('format') == 'xacars') {
$user = User::where('username', $request->query('username'))->first();
$flight = self::getProperFlightNum($request->query('flightnum'), $user->id);
Expand All @@ -32,11 +32,15 @@ public function getBid(Request $request)
'status' => 404,
]);
}
foreach($flights as $f)
{
if (is_null($f->callsign))
{
$f->callsign = $f->airline->icao.$f->flightnum;
}
}
// Ok now lets do a general query
return response()->json([
'status' => 200,
'flights' => $flights,
]);
return response()->json($flights);
}

public function fileBid(Request $request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class BidsController extends Controller
class FlightsController extends Controller
{
/**
* Display a listing of the resource.
Expand All @@ -14,7 +14,7 @@ class BidsController extends Controller
*/
public function index()
{
//
return view('admin.flights.view');
}

/**
Expand Down
Loading

0 comments on commit 1b1fc81

Please sign in to comment.