Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
First step of API powered list
Sander Dorigoc7f5a38d38b7
diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.phpindex 08bcec815a..d4fc06c978 100644--- a/app/Http/Controllers/Account/IndexController.php+++ b/app/Http/Controllers/Account/IndexController.php@@ -122,7 +122,7 @@ final class IndexController extends Controller'subTitleIcon' => $subTitleIcon,'subTitle' => $subTitle,'page' => $page,- 'accounts' => $accounts,+ // 'accounts' => $accounts,]);}diff --git a/resources/assets/v3/js/pages/accounts/index.js b/resources/assets/v3/js/pages/accounts/index.jsindex e24122830c..d4d3cd6c84 100644--- a/resources/assets/v3/js/pages/accounts/index.js+++ b/resources/assets/v3/js/pages/accounts/index.js@@ -31,7 +31,12 @@ window.enableDates = false;let index = function () {return {listPageSize: 50,+ objectType: 'invalid',init() {+ const page = window.location.href.split("/");+ this.objectType = page[page.length - 1].substring(0, 15);++getVariable("listPageSize").then((listPageSize) => {console.log(listPageSize);this.listPageSize = listPageSize;diff --git a/resources/views/accounts/index.blade.php b/resources/views/accounts/index.blade.phpindex 5b748a3628..95527050a9 100644--- a/resources/views/accounts/index.blade.php+++ b/resources/views/accounts/index.blade.php@@ -6,7 +6,54 @@<div class="card" id="account-index-{{ $objectType }}"><x-elements.card-header-with-menu :cardTitle="trans('firefly.'.$objectType.'_accounts')" :route="route('accounts.create', $objectType) . '?_from=' . urlencode($FF3_FROM)" :linkTitle="__('firefly.make_new_'. $objectType . '_account')"/><div class="card-body p-0">+ {{--<x-lists.accounts :accounts="$accounts" :objectType="$objectType" :page="$page ?? 1" />+ --}}+ <div class="m-2">+ TODO Pagination be here.+ </div>+ <table class="table table-valign-middle table-sm table-hover sortable">+ <thead>+ <tr>+ <th class="w-5"> </th>+ <th class="w-20">{{ trans('list.name') }}</th>+ <template x-if="'asset' === objectType">+ <th {{-- hide on LG and smaller. --}} class="d-lg-table-cell d-none">{{ trans('list.role') }}</th>+ </template>+ <template x-if="'liabilities' === objectType">+ <th>{{ trans('list.liability_type') }}</th>+ </template>+ <template x-if="'liabilities' === objectType">+ <th>{{ trans('form.liability_direction') }}</th>+ </template>+ <template x-if="'liabilities' === objectType">+ <th>{{ trans('list.interest') }} ({{ trans('list.interest_period') }})</th>+ </template>+ <th>{{ trans('form.account_number') }}</th>+ <template x-if="'liabilities' === objectType">+ <th class="text-end">{{ trans('list.currentBalance') }}</th>+ </template>+ <template x-if="'liabilities' === objectType">+ <th class="text-end">+ {{ trans('firefly.left_in_debt') }}+ </th>+ </template>+ <th {{-- hide on SM --}} class="d-md-table-cell d-none">{{ trans('list.active') }}</th>+ {{-- hide last activity to make room for other stuff --}}+ <template x-if="'liabilities' !== objectType">+ <th {{-- hide on LG and smaller. --}} class="d-lg-table-cell d-none">{{ trans('list.lastActivity') }}</th>+ </template>+ <th {{-- hide on SM --}} class="w-15 d-md-table-cell d-none text-end">{{ trans('list.balanceDiff') }}</th>+ <th> </th>+ </tr>+ </thead>+ </table>+++ <div class="m-2">+ TODO Pagination be here.+ </div>+</div><x-elements.card-footer-with-menu :route="route('accounts.create', $objectType) . '?_from=' . urlencode($FF3_FROM)" :linkTitle="__('firefly.make_new_'. $objectType . '_account')" /></div>