Can also show and update notes.

This commit is contained in:
James Cole
2019-08-27 05:57:58 +02:00
parent f2c2d4e126
commit e209766ad0
2 changed files with 44 additions and 3 deletions

View File

@@ -91,7 +91,7 @@ class RecurrenceTransformer extends AbstractTransformer
$this->budgetRepos->setUser($recurrence->user);
$shortType = (string)config(sprintf('firefly.transactionTypesToShort.%s', $recurrence->transactionType->type));
$notes = $this->repository->getNoteText($recurrence);
// basic data.
$return = [
'id' => (int)$recurrence->id,
@@ -106,7 +106,7 @@ class RecurrenceTransformer extends AbstractTransformer
'apply_rules' => $recurrence->apply_rules,
'active' => $recurrence->active,
'nr_of_repetitions' => $recurrence->repetitions,
'notes' => $this->repository->getNoteText($recurrence),
'notes' => '' === $notes ? null : $notes,
'repetitions' => $this->getRepetitions($recurrence),
'transactions' => $this->getTransactions($recurrence),
'links' => [