feat:finalize background imports
This commit is contained in:
@@ -48,19 +48,12 @@ class BackupImport implements WithMultipleSheets, WithEvents
|
||||
|
||||
Artisan::queue(RefreshMarketData::class, ['--user' => $this->backupImportModel->user_id, '--force' => true])
|
||||
->chain([
|
||||
fn() => Artisan::call(RefreshDividendData::class, ['--user' => $this->backupImportModel->user_id, '--force' => true])
|
||||
])
|
||||
->chain([
|
||||
fn() => Artisan::call(SyncHoldingData::class, ['--user' => $this->backupImportModel->user_id])
|
||||
])
|
||||
->chain([
|
||||
function() {
|
||||
fn() => Artisan::call(RefreshDividendData::class, ['--user' => $this->backupImportModel->user_id, '--force' => true]),
|
||||
fn() => Artisan::call(SyncHoldingData::class, ['--user' => $this->backupImportModel->user_id]),
|
||||
fn() => User::find($this->backupImportModel->user_id)->portfolios->each(function($portfolio) {
|
||||
|
||||
User::find($this->backupImportModel->user_id)->portfolios->each(function($portfolio) {
|
||||
|
||||
Artisan::call(SyncDailyChange::class, ['portfolio_id' => $portfolio->id]);
|
||||
});
|
||||
}
|
||||
Artisan::queue(SyncDailyChange::class, ['portfolio_id' => $portfolio->id]);
|
||||
})
|
||||
]);
|
||||
},
|
||||
ImportFailed::class => fn(ImportFailed $event) => $this->backupImportModel->update([
|
||||
|
||||
+1
-1
@@ -370,5 +370,5 @@
|
||||
"Importing transactions...": "Importing transactions...",
|
||||
"Importing daily changes...": "Importing daily changes...",
|
||||
"Import completed successfully!": "Import completed successfully!",
|
||||
"Your import will continue in the background.": "Your import will continue in the background."
|
||||
"Your import will continue in the background": "Your import will continue in the background"
|
||||
}
|
||||
+1
-1
@@ -370,5 +370,5 @@
|
||||
"Importing transactions...": "Importando transacciones...",
|
||||
"Importing daily changes...": "Importando cambios diarios...",
|
||||
"Import completed successfully!": "¡La importación se completó con éxito!",
|
||||
"Your import will continue in the background.": "La importación continuará en segundo plano."
|
||||
"Your import will continue in the background": "La importación continuará en segundo plano"
|
||||
}
|
||||
@@ -123,7 +123,7 @@ new class extends Component {
|
||||
|
||||
<x-button wire:click="$toggle('importStatusDialog')"> {{ __('Try again') }} </x-button>
|
||||
@else
|
||||
<div wire:poll="checkImportStatus" class="text-gray-400 text-sm">{{ __('Your import will continue in the background.') }}</div>
|
||||
<div wire:poll="checkImportStatus" class="text-gray-400 text-sm">{{ __('Your import will continue in the background') }}</div>
|
||||
<x-ib-flex-spacer />
|
||||
<x-button wire:click="$toggle('importStatusDialog')"> {{ __('Close') }} </x-button>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user