mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Some better feedback in the import process.
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Import;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
@@ -25,6 +27,8 @@ class ImportResult
|
||||
|
||||
/** @var Collection */
|
||||
public $errors;
|
||||
/** @var TransactionJournal */
|
||||
public $journal;
|
||||
/** @var Collection */
|
||||
public $messages;
|
||||
/** @var int */
|
||||
@@ -102,6 +106,14 @@ class ImportResult
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isSuccess(): bool
|
||||
{
|
||||
return $this->status === self::IMPORT_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $errors
|
||||
*/
|
||||
@@ -110,6 +122,14 @@ class ImportResult
|
||||
$this->errors = $errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
*/
|
||||
public function setJournal(TransactionJournal $journal)
|
||||
{
|
||||
$this->journal = $journal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $messages
|
||||
*/
|
||||
|
Reference in New Issue
Block a user