mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-04 03:20:44 +00:00
Expand JSON.
This commit is contained in:
@@ -173,6 +173,7 @@ class Json implements JsonInterface
|
|||||||
$to = $entry->transactions[1]->account;
|
$to = $entry->transactions[1]->account;
|
||||||
$budget = $entry->budgets()->first();
|
$budget = $entry->budgets()->first();
|
||||||
$category = $entry->categories()->first();
|
$category = $entry->categories()->first();
|
||||||
|
$recurring = $entry->recurringTransaction()->first();
|
||||||
$arr = [
|
$arr = [
|
||||||
'date' => $entry->date->format('j F Y'),
|
'date' => $entry->date->format('j F Y'),
|
||||||
'description' => [
|
'description' => [
|
||||||
@@ -205,6 +206,11 @@ class Json implements JsonInterface
|
|||||||
$arr['components']['category_name'] = $category->name;
|
$arr['components']['category_name'] = $category->name;
|
||||||
$arr['components']['category_url'] = route('categories.show', $category->id);
|
$arr['components']['category_url'] = route('categories.show', $category->id);
|
||||||
}
|
}
|
||||||
|
if ($recurring) {
|
||||||
|
$arr['components']['recurring_id'] = $recurring->id;
|
||||||
|
$arr['components']['recurring_name'] = e($recurring->name);
|
||||||
|
$arr['components']['recurring_url'] = route('recurring.show', $recurring->id);
|
||||||
|
}
|
||||||
|
|
||||||
$data['data'][] = $arr;
|
$data['data'][] = $arr;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user