Rebuild frontpage with better bills overview.

This commit is contained in:
James Cole
2023-09-17 09:45:34 +02:00
parent 518712d9e8
commit 35b0c20f88
57 changed files with 875 additions and 378 deletions

View File

@@ -198,38 +198,38 @@ class PiggyBankTransformer extends AbstractTransformer
}
return [
'id' => (string)$piggyBank->id,
'created_at' => $piggyBank->created_at->toAtomString(),
'updated_at' => $piggyBank->updated_at->toAtomString(),
'account_id' => (string)$piggyBank->account_id,
'account_name' => $accountName,
'name' => $piggyBank->name,
'currency_id' => (string)$currency->id,
'currency_code' => $currency->code,
'currency_symbol' => $currency->symbol,
'currency_decimal_places' => (int)$currency->decimal_places,
'native_id' => (string)$this->default->id,
'native_code' => $this->default->code,
'native_symbol' => $this->default->symbol,
'native_decimal_places' => (int)$this->default->decimal_places,
'current_amount' => $currentAmount,
'native_current_amount' => $nativeCurrentAmount,
'target_amount' => $targetAmount,
'native_target_amount' => $nativeTargetAmount,
'percentage' => $percentage,
'left_to_save' => $leftToSave,
'native_left_to_save' => $nativeLeftToSave,
'save_per_month' => $savePerMonth,
'native_save_per_month' => $nativeSavePerMonth,
'start_date' => $startDate,
'target_date' => $targetDate,
'order' => (int)$piggyBank->order,
'active' => $piggyBank->active,
'notes' => $note,
'object_group_id' => $group ? $group['object_group_id'] : null,
'object_group_order' => $group ? $group['object_group_order'] : null,
'object_group_title' => $group ? $group['object_group_title'] : null,
'links' => [
'id' => (string)$piggyBank->id,
'created_at' => $piggyBank->created_at->toAtomString(),
'updated_at' => $piggyBank->updated_at->toAtomString(),
'account_id' => (string)$piggyBank->account_id,
'account_name' => $accountName,
'name' => $piggyBank->name,
'currency_id' => (string)$currency->id,
'currency_code' => $currency->code,
'currency_symbol' => $currency->symbol,
'currency_decimal_places' => (int)$currency->decimal_places,
'native_currency_id' => (string)$this->default->id,
'native_currency_code' => $this->default->code,
'native_currency_symbol' => $this->default->symbol,
'native_currency_decimal_places' => (int)$this->default->decimal_places,
'current_amount' => $currentAmount,
'native_current_amount' => $nativeCurrentAmount,
'target_amount' => $targetAmount,
'native_target_amount' => $nativeTargetAmount,
'percentage' => $percentage,
'left_to_save' => $leftToSave,
'native_left_to_save' => $nativeLeftToSave,
'save_per_month' => $savePerMonth,
'native_save_per_month' => $nativeSavePerMonth,
'start_date' => $startDate,
'target_date' => $targetDate,
'order' => (int)$piggyBank->order,
'active' => $piggyBank->active,
'notes' => $note,
'object_group_id' => $group ? $group['object_group_id'] : null,
'object_group_order' => $group ? $group['object_group_order'] : null,
'object_group_title' => $group ? $group['object_group_title'] : null,
'links' => [
[
'rel' => 'self',
'uri' => '/piggy_banks/' . $piggyBank->id,