* Fix CSV imports giving Storage class not found #454 * Update yarn files for security alert
This commit is contained in:
parent
d9a1e6aba7
commit
1f65b744a0
@ -8,10 +8,14 @@ namespace App\Contracts;
|
||||
*
|
||||
* @method static create(array $attrs)
|
||||
* @method static Model find(int $id)
|
||||
* @method static Model select(array $array)
|
||||
* @method static Model where(array $array)
|
||||
* @method static Model firstOrCreate(array $where, array $array)
|
||||
* @method static Model updateOrCreate(array $array, array $attrs)
|
||||
* @method static truncate()
|
||||
* @method Model orderBy(string $column, string $order)
|
||||
* @method Model limit(int $limit)
|
||||
* @method Model first()
|
||||
*/
|
||||
abstract class Model extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
|
@ -14,10 +14,10 @@ use App\Repositories\AircraftRepository;
|
||||
use App\Repositories\AirportRepository;
|
||||
use App\Services\ExportService;
|
||||
use App\Services\ImportService;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Storage;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Laracasts\Flash\Flash;
|
||||
|
||||
/**
|
||||
* Class AircraftController
|
||||
|
@ -13,15 +13,11 @@ use App\Repositories\Criteria\WhereCriteria;
|
||||
use App\Services\ExportService;
|
||||
use App\Services\ImportService;
|
||||
use App\Support\Timezonelist;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Response;
|
||||
use Storage;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Laracasts\Flash\Flash;
|
||||
|
||||
/**
|
||||
* Class AirportController
|
||||
*/
|
||||
class AirportController extends Controller
|
||||
{
|
||||
private $airportRepo;
|
||||
@ -46,7 +42,7 @@ class AirportController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -68,7 +64,7 @@ class AirportController extends Controller
|
||||
/**
|
||||
* Show the form for creating a new Airport.
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -84,7 +80,7 @@ class AirportController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(CreateAirportRequest $request)
|
||||
{
|
||||
@ -102,7 +98,7 @@ class AirportController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -123,7 +119,7 @@ class AirportController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -148,7 +144,7 @@ class AirportController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, UpdateAirportRequest $request)
|
||||
{
|
||||
@ -173,7 +169,7 @@ class AirportController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -7,10 +7,9 @@ use App\Http\Requests\CreateAwardRequest;
|
||||
use App\Http\Requests\UpdateAwardRequest;
|
||||
use App\Repositories\AwardRepository;
|
||||
use App\Services\AwardService;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
|
||||
class AwardController extends Controller
|
||||
{
|
||||
@ -62,7 +61,7 @@ class AwardController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -76,8 +75,6 @@ class AwardController extends Controller
|
||||
|
||||
/**
|
||||
* Show the form for creating a new Fare.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -96,7 +93,7 @@ class AwardController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(CreateAwardRequest $request)
|
||||
{
|
||||
@ -112,7 +109,7 @@ class AwardController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -133,7 +130,7 @@ class AwardController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -161,7 +158,7 @@ class AwardController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, UpdateAwardRequest $request)
|
||||
{
|
||||
@ -183,7 +180,7 @@ class AwardController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -10,16 +10,12 @@ use App\Repositories\AirlineRepository;
|
||||
use App\Repositories\ExpenseRepository;
|
||||
use App\Services\ExportService;
|
||||
use App\Services\ImportService;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
* Class ExpenseController
|
||||
*/
|
||||
class ExpenseController extends Controller
|
||||
{
|
||||
private $airlineRepo;
|
||||
@ -122,7 +118,7 @@ class ExpenseController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -149,7 +145,7 @@ class ExpenseController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
@ -173,7 +169,7 @@ class ExpenseController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -9,16 +9,12 @@ use App\Http\Requests\UpdateFareRequest;
|
||||
use App\Repositories\FareRepository;
|
||||
use App\Services\ExportService;
|
||||
use App\Services\ImportService;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
* Class FareController
|
||||
*/
|
||||
class FareController extends Controller
|
||||
{
|
||||
private $fareRepo;
|
||||
@ -45,7 +41,7 @@ class FareController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -58,8 +54,6 @@ class FareController extends Controller
|
||||
|
||||
/**
|
||||
* Show the form for creating a new Fare.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -73,7 +67,7 @@ class FareController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(CreateFareRequest $request)
|
||||
{
|
||||
@ -89,7 +83,7 @@ class FareController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -107,7 +101,7 @@ class FareController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -128,7 +122,7 @@ class FareController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, UpdateFareRequest $request)
|
||||
{
|
||||
@ -149,7 +143,7 @@ class FareController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -8,12 +8,8 @@ use App\Services\FileService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Laracasts\Flash\Flash;
|
||||
|
||||
/**
|
||||
* Class FileController
|
||||
*/
|
||||
class FileController extends Controller
|
||||
{
|
||||
private $fileSvc;
|
||||
|
@ -10,9 +10,6 @@ use App\Services\FinanceService;
|
||||
use App\Support\Dates;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* Class FinanceController
|
||||
*/
|
||||
class FinanceController extends Controller
|
||||
{
|
||||
private $airlineRepo;
|
||||
@ -43,25 +40,14 @@ class FinanceController extends Controller
|
||||
public function index(Request $request)
|
||||
{
|
||||
$month = $request->query('month', date('Y-m'));
|
||||
$between = Dates::getMonthBoundary($month);
|
||||
$transaction_groups = $this->financeSvc->getAllAirlineTransactionsBetween($month);
|
||||
|
||||
$first_journal = Journal::where(['type' => JournalType::AIRLINE])
|
||||
$first_journal = Journal::select(['created_at'])
|
||||
->where(['type' => JournalType::AIRLINE])
|
||||
->orderBy('created_at', 'asc')
|
||||
->limit(1)
|
||||
->first();
|
||||
|
||||
$transaction_groups = [];
|
||||
$airlines = $this->airlineRepo->orderBy('icao')->all();
|
||||
|
||||
// group by the airline
|
||||
foreach ($airlines as $airline) {
|
||||
$transaction_groups[] = $this->financeSvc->getAirlineTransactionsBetween(
|
||||
$airline,
|
||||
$between[0],
|
||||
$between[1]
|
||||
);
|
||||
}
|
||||
|
||||
return view('admin.finances.index', [
|
||||
'current_month' => $month,
|
||||
'months_list' => Dates::getMonthsList($first_journal->created_at),
|
||||
|
@ -23,6 +23,7 @@ use App\Services\ImportService;
|
||||
use App\Support\Units\Time;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Laracasts\Flash\Flash;
|
||||
|
||||
/**
|
||||
|
@ -4,14 +4,10 @@ namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Contracts\Controller;
|
||||
use App\Repositories\FlightFieldRepository;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
|
||||
/**
|
||||
* Class FlightFieldController
|
||||
*/
|
||||
class FlightFieldController extends Controller
|
||||
{
|
||||
private $flightFieldRepo;
|
||||
@ -34,7 +30,7 @@ class FlightFieldController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -48,8 +44,6 @@ class FlightFieldController extends Controller
|
||||
|
||||
/**
|
||||
* Show the form for creating a new FlightField.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -63,7 +57,7 @@ class FlightFieldController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
@ -81,7 +75,7 @@ class FlightFieldController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -102,7 +96,7 @@ class FlightFieldController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -126,7 +120,7 @@ class FlightFieldController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
@ -150,7 +144,7 @@ class FlightFieldController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -21,16 +21,12 @@ use App\Services\FareService;
|
||||
use App\Services\PirepService;
|
||||
use App\Services\UserService;
|
||||
use App\Support\Units\Time;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
|
||||
/**
|
||||
* Class PirepController
|
||||
*/
|
||||
class PirepController extends Controller
|
||||
{
|
||||
private $airportRepo;
|
||||
@ -170,7 +166,7 @@ class PirepController extends Controller
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
public function fares(Request $request)
|
||||
{
|
||||
@ -192,7 +188,7 @@ class PirepController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -218,7 +214,7 @@ class PirepController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
public function pending(Request $request)
|
||||
{
|
||||
@ -238,7 +234,7 @@ class PirepController extends Controller
|
||||
/**
|
||||
* Show the form for creating a new Pirep.
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -279,7 +275,7 @@ class PirepController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -302,7 +298,7 @@ class PirepController extends Controller
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -388,7 +384,7 @@ class PirepController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -6,14 +6,10 @@ use App\Contracts\Controller;
|
||||
use App\Http\Requests\CreatePirepFieldRequest;
|
||||
use App\Http\Requests\UpdatePirepFieldRequest;
|
||||
use App\Repositories\PirepFieldRepository;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
|
||||
/**
|
||||
* Class PirepFieldController
|
||||
*/
|
||||
class PirepFieldController extends Controller
|
||||
{
|
||||
private $pirepFieldRepo;
|
||||
@ -36,7 +32,7 @@ class PirepFieldController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -51,7 +47,7 @@ class PirepFieldController extends Controller
|
||||
/**
|
||||
* Show the form for creating a new PirepField.
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -65,7 +61,7 @@ class PirepFieldController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(CreatePirepFieldRequest $request)
|
||||
{
|
||||
@ -85,7 +81,7 @@ class PirepFieldController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -107,7 +103,7 @@ class PirepFieldController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -158,7 +154,7 @@ class PirepFieldController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -9,14 +9,10 @@ use App\Repositories\RankRepository;
|
||||
use App\Repositories\SubfleetRepository;
|
||||
use App\Services\FleetService;
|
||||
use Cache;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
|
||||
/**
|
||||
* Class RankController
|
||||
*/
|
||||
class RankController extends Controller
|
||||
{
|
||||
private $fleetSvc;
|
||||
@ -67,7 +63,7 @@ class RankController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -82,7 +78,7 @@ class RankController extends Controller
|
||||
/**
|
||||
* Show the form for creating a new Ranking.
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -96,7 +92,7 @@ class RankController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(CreateRankRequest $request)
|
||||
{
|
||||
@ -115,7 +111,7 @@ class RankController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -137,7 +133,7 @@ class RankController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -165,7 +161,7 @@ class RankController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, UpdateRankRequest $request)
|
||||
{
|
||||
@ -190,7 +186,7 @@ class RankController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -8,9 +8,6 @@ use Igaster\LaravelTheme\Facades\Theme;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class SettingsController
|
||||
*/
|
||||
class SettingsController extends Controller
|
||||
{
|
||||
/**
|
||||
|
@ -18,16 +18,12 @@ use App\Services\ExportService;
|
||||
use App\Services\FareService;
|
||||
use App\Services\FleetService;
|
||||
use App\Services\ImportService;
|
||||
use Flash;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Response;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
* Class SubfleetController
|
||||
*/
|
||||
class SubfleetController extends Controller
|
||||
{
|
||||
private $aircraftRepo;
|
||||
@ -115,7 +111,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Repository\Exceptions\RepositoryException
|
||||
*
|
||||
* @return Response
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@ -129,8 +125,6 @@ class SubfleetController extends Controller
|
||||
|
||||
/**
|
||||
* Show the form for creating a new Subfleet.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -147,7 +141,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
*/
|
||||
public function store(CreateSubfleetRequest $request)
|
||||
{
|
||||
@ -163,7 +157,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -186,7 +180,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -217,7 +211,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, UpdateSubfleetRequest $request)
|
||||
{
|
||||
@ -239,7 +233,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
@ -269,8 +263,6 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function export(Request $request)
|
||||
@ -291,7 +283,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
public function import(Request $request)
|
||||
{
|
||||
@ -322,7 +314,7 @@ class SubfleetController extends Controller
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
protected function return_ranks_view(?Subfleet $subfleet)
|
||||
{
|
||||
@ -338,7 +330,7 @@ class SubfleetController extends Controller
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
protected function return_fares_view(?Subfleet $subfleet)
|
||||
{
|
||||
@ -357,7 +349,7 @@ class SubfleetController extends Controller
|
||||
* @param $id
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
public function ranks($id, Request $request)
|
||||
{
|
||||
@ -396,7 +388,7 @@ class SubfleetController extends Controller
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
protected function return_expenses_view(?Subfleet $subfleet)
|
||||
{
|
||||
@ -414,7 +406,7 @@ class SubfleetController extends Controller
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
public function expenses($id, Request $request)
|
||||
{
|
||||
@ -454,7 +446,7 @@ class SubfleetController extends Controller
|
||||
* @param $id
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed
|
||||
*/
|
||||
public function fares($id, Request $request)
|
||||
{
|
||||
|
@ -15,17 +15,13 @@ use App\Repositories\PirepRepository;
|
||||
use App\Repositories\UserRepository;
|
||||
use App\Services\UserService;
|
||||
use App\Support\Timezonelist;
|
||||
use DB;
|
||||
use Flash;
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Exceptions\RepositoryException;
|
||||
use Response;
|
||||
|
||||
/**
|
||||
* Class UserController
|
||||
*/
|
||||
class UserController extends Controller
|
||||
{
|
||||
private $airlineRepo;
|
||||
@ -80,7 +76,7 @@ class UserController extends Controller
|
||||
/**
|
||||
* Show the form for creating a new User.
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
@ -106,7 +102,7 @@ class UserController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(CreateUserRequest $request)
|
||||
{
|
||||
@ -122,7 +118,7 @@ class UserController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
@ -158,7 +154,7 @@ class UserController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -202,7 +198,7 @@ class UserController extends Controller
|
||||
*
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id, UpdateUserRequest $request)
|
||||
{
|
||||
@ -262,7 +258,7 @@ class UserController extends Controller
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ use App\Support\Money;
|
||||
use Carbon\Carbon;
|
||||
|
||||
/**
|
||||
* Class Journal
|
||||
* Holds various journals, depending on the morphed_type and morphed_id columns
|
||||
*
|
||||
* @property mixed id
|
||||
* @property Money $balance
|
||||
|
@ -6,15 +6,21 @@ use App\Contracts\Service;
|
||||
use App\Models\Airline;
|
||||
use App\Models\Journal;
|
||||
use App\Models\JournalTransaction;
|
||||
use App\Repositories\AirlineRepository;
|
||||
use App\Repositories\JournalRepository;
|
||||
use App\Support\Dates;
|
||||
use App\Support\Money;
|
||||
|
||||
class FinanceService extends Service
|
||||
{
|
||||
private $airlineRepo;
|
||||
private $journalRepo;
|
||||
|
||||
public function __construct(JournalRepository $journalRepo)
|
||||
{
|
||||
public function __construct(
|
||||
AirlineRepository $airlineRepo,
|
||||
JournalRepository $journalRepo
|
||||
) {
|
||||
$this->airlineRepo = $airlineRepo;
|
||||
$this->journalRepo = $journalRepo;
|
||||
}
|
||||
|
||||
@ -91,6 +97,32 @@ class FinanceService extends Service
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of the transactions for every airline in a given month
|
||||
*
|
||||
* @param string $month In Y-m format
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllAirlineTransactionsBetween($month): array
|
||||
{
|
||||
$between = Dates::getMonthBoundary($month);
|
||||
|
||||
$transaction_groups = [];
|
||||
$airlines = $this->airlineRepo->orderBy('icao')->all();
|
||||
|
||||
// group by the airline
|
||||
foreach ($airlines as $airline) {
|
||||
$transaction_groups[] = $this->getAirlineTransactionsBetween(
|
||||
$airline,
|
||||
$between[0],
|
||||
$between[1]
|
||||
);
|
||||
}
|
||||
|
||||
return $transaction_groups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of the transactions for an airline between two given dates. Returns an array
|
||||
* with `credits`, `debits` and `transactions` fields, where transactions contains the
|
||||
|
@ -15,8 +15,8 @@
|
||||
"animate.css": "~3.6",
|
||||
"axios": "^0.18.1",
|
||||
"bootstrap": "~4.3",
|
||||
"bootstrap3": "npm:bootstrap@~3.4",
|
||||
"bootstrap-sass": "^3.4.1",
|
||||
"bootstrap3": "npm:bootstrap@~3.4",
|
||||
"cookieconsent": "^3.1.0",
|
||||
"cross-env": "^5.1.6",
|
||||
"eonasdan-bootstrap-datetimepicker": "^4.17.47",
|
||||
|
@ -70,11 +70,11 @@
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@if(\App\Support\Utils::installerEnabled())
|
||||
{{--@if(\App\Support\Utils::installerEnabled())
|
||||
<div class="col-lg-12 alert alert-danger alert-important">
|
||||
<p>Remove the modules/Installer folder or set the module to disabled! It's a security risk</p>
|
||||
</div>
|
||||
@endif
|
||||
@endif--}}
|
||||
|
||||
<div class="col-12">
|
||||
@include('admin.flash.message')
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
|
||||
<div class="form-group col-12">
|
||||
{{ Form::label('csv_file', 'Chose a CSV file to import') }}
|
||||
{{ Form::label('csv_file', 'Choose a CSV file to import') }}
|
||||
{{ Form::file('csv_file', ['accept' => '.csv']) }}
|
||||
<p class="text-danger">{{ $errors->first('csv_file') }}</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user