This commit is contained in:
@@ -24,7 +24,9 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><h4>Site Config</h4></td>
|
||||
<td colspan="2"><h4>Site Config</h4>
|
||||
<p>Enter the database information for your legacy (v2 or v5) database</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Modules\Importer\Services\Importers;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\AircraftService;
|
||||
use App\Services\UserService;
|
||||
use Modules\Importer\Services\BaseImporter;
|
||||
|
||||
@@ -51,6 +52,8 @@ class FinalizeImporter extends BaseImporter
|
||||
protected function recalculateUserStats()
|
||||
{
|
||||
$this->comment('--- RECALCULATING USER STATS ---');
|
||||
|
||||
/** @var UserService $userSvc */
|
||||
$userSvc = app(UserService::class);
|
||||
|
||||
User::all()->each(function ($user) use ($userSvc) {
|
||||
@@ -58,6 +61,18 @@ class FinalizeImporter extends BaseImporter
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the aircraft stats with the newest/latest PIREPs
|
||||
*/
|
||||
protected function recalculateAircraftStats()
|
||||
{
|
||||
$this->comment('--- RECALCULATING AIRCRAFT STATS ---');
|
||||
|
||||
/** @var AircraftService $aircraftSvc */
|
||||
$aircraftSvc = app(AircraftService::class);
|
||||
$aircraftSvc->recalculateStats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the value store of any old value mappings
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user