From 9078781d61531b866a0c0d2788a6dcf2d6c3463f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 9 Mar 2024 19:31:27 +0100 Subject: [PATCH] New endpoint, fixed logo, better account overview. --- app/Api/V2/Controllers/Controller.php | 3 +- .../Model/Account/IndexController.php | 28 ++--- .../V2/Request/Model/Account/IndexRequest.php | 2 + .../Model/Transaction/InfiniteListRequest.php | 26 +---- app/Models/Account.php | 71 ++++++------ .../UserGroups/Account/AccountRepository.php | 33 +++--- app/Support/Request/GetSortInstructions.php | 54 +++++++++ app/Transformers/V2/AbstractTransformer.php | 5 +- app/Transformers/V2/AccountTransformer.php | 99 +++++++++++------ config/firefly.php | 44 ++++---- public/images/logo.png | Bin 0 -> 11034 bytes resources/assets/v2/boot/bootstrap.js | 4 + resources/assets/v2/pages/accounts/index.js | 27 ++++- .../assets/v2/sass/adminlte-filtered.scss | 105 ++++++++++++++++++ resources/assets/v2/sass/app.scss | 2 +- resources/views/v2/accounts/index.blade.php | 64 +++++++++-- .../v2/partials/layout/sidebar.blade.php | 2 +- 17 files changed, 412 insertions(+), 157 deletions(-) create mode 100644 app/Support/Request/GetSortInstructions.php create mode 100644 public/images/logo.png create mode 100644 resources/assets/v2/sass/adminlte-filtered.scss diff --git a/app/Api/V2/Controllers/Controller.php b/app/Api/V2/Controllers/Controller.php index 99f30570d0..110330f5a4 100644 --- a/app/Api/V2/Controllers/Controller.php +++ b/app/Api/V2/Controllers/Controller.php @@ -158,7 +158,8 @@ class Controller extends BaseController // the transformer, at this point, needs to collect information that ALL items in the collection // require, like meta-data and stuff like that, and save it for later. - $transformer->collectMetaData($objects); + $objects = $transformer->collectMetaData($objects); + $paginator->setCollection($objects); $resource = new FractalCollection($objects, $transformer, $key); $resource->setPaginator(new IlluminatePaginatorAdapter($paginator)); diff --git a/app/Api/V2/Controllers/Model/Account/IndexController.php b/app/Api/V2/Controllers/Model/Account/IndexController.php index 4679bee47e..912ac0a851 100644 --- a/app/Api/V2/Controllers/Model/Account/IndexController.php +++ b/app/Api/V2/Controllers/Model/Account/IndexController.php @@ -47,7 +47,7 @@ class IndexController extends Controller function ($request, $next) { $this->repository = app(AccountRepositoryInterface::class); // new way of user group validation - $userGroup = $this->validateUserGroup($request); + $userGroup = $this->validateUserGroup($request); if (null !== $userGroup) { $this->repository->setUserGroup($userGroup); } @@ -62,20 +62,23 @@ class IndexController extends Controller */ public function index(IndexRequest $request): JsonResponse { + $this->repository->resetAccountOrder(); - $types = $request->getAccountTypes(); - $accounts = $this->repository->getAccountsByType($types); - $pageSize = $this->parameters->get('limit'); - $count = $accounts->count(); - $accounts = $accounts->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize); - $paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page')); - $transformer = new AccountTransformer(); + $types = $request->getAccountTypes(); + $instructions = $request->getSortInstructions('accounts'); + $accounts = $this->repository->getAccountsByType($types, $instructions); + $pageSize = $this->parameters->get('limit'); + $count = $accounts->count(); + $accounts = $accounts->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize); + $paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page')); + $transformer = new AccountTransformer(); + + $this->parameters->set('sort', $instructions); $transformer->setParameters($this->parameters); // give params to transformer return response() ->json($this->jsonApiList('accounts', $paginator, $transformer)) - ->header('Content-Type', self::CONTENT_TYPE) - ; + ->header('Content-Type', self::CONTENT_TYPE); } public function infiniteList(InfiniteListRequest $request): JsonResponse @@ -83,7 +86,7 @@ class IndexController extends Controller $this->repository->resetAccountOrder(); // get accounts of the specified type, and return. - $types = $request->getAccountTypes(); + $types = $request->getAccountTypes(); // get from repository $accounts = $this->repository->getAccountsInOrder($types, $request->getSortInstructions('accounts'), $request->getStartRow(), $request->getEndRow()); @@ -95,7 +98,6 @@ class IndexController extends Controller return response() ->json($this->jsonApiList(self::RESOURCE_KEY, $paginator, $transformer)) - ->header('Content-Type', self::CONTENT_TYPE) - ; + ->header('Content-Type', self::CONTENT_TYPE); } } diff --git a/app/Api/V2/Request/Model/Account/IndexRequest.php b/app/Api/V2/Request/Model/Account/IndexRequest.php index b07559ef3a..e9c7b3039d 100644 --- a/app/Api/V2/Request/Model/Account/IndexRequest.php +++ b/app/Api/V2/Request/Model/Account/IndexRequest.php @@ -27,6 +27,7 @@ use Carbon\Carbon; use FireflyIII\Support\Http\Api\AccountFilter; use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; +use FireflyIII\Support\Request\GetSortInstructions; use Illuminate\Foundation\Http\FormRequest; /** @@ -39,6 +40,7 @@ class IndexRequest extends FormRequest use AccountFilter; use ChecksLogin; use ConvertsDataTypes; + use GetSortInstructions; /** * Get all data from the request. diff --git a/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php b/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php index 05e613185f..a7a17c75f9 100644 --- a/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php +++ b/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php @@ -29,6 +29,7 @@ use FireflyIII\Support\Http\Api\AccountFilter; use FireflyIII\Support\Http\Api\TransactionFilter; use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; +use FireflyIII\Support\Request\GetSortInstructions; use Illuminate\Foundation\Http\FormRequest; /** @@ -41,6 +42,7 @@ class InfiniteListRequest extends FormRequest use ChecksLogin; use ConvertsDataTypes; use TransactionFilter; + use GetSortInstructions; public function buildParams(): string { @@ -97,30 +99,6 @@ class InfiniteListRequest extends FormRequest return 0 === $page || $page > 65536 ? 1 : $page; } - public function getSortInstructions(string $key): array - { - $allowed = config(sprintf('firefly.sorting.allowed.%s', $key)); - $set = $this->get('sorting', []); - $result = []; - if (0 === count($set)) { - return []; - } - foreach ($set as $info) { - $column = $info['column'] ?? 'NOPE'; - $direction = $info['direction'] ?? 'NOPE'; - if ('asc' !== $direction && 'desc' !== $direction) { - // skip invalid direction - continue; - } - if (false === in_array($column, $allowed, true)) { - // skip invalid column - continue; - } - $result[$column] = $direction; - } - - return $result; - } public function getTransactionTypes(): array { diff --git a/app/Models/Account.php b/app/Models/Account.php index 9736462044..351a0cbb33 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -95,21 +95,21 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Account withTrashed() * @method static Builder|Account withoutTrashed() * - * @property Carbon $lastActivityDate - * @property string $startBalance - * @property string $endBalance - * @property string $difference - * @property string $interest - * @property string $interestPeriod - * @property string $accountTypeString - * @property Location $location - * @property string $liability_direction - * @property string $current_debt - * @property int $user_group_id + * @property Carbon $lastActivityDate + * @property string $startBalance + * @property string $endBalance + * @property string $difference + * @property string $interest + * @property string $interestPeriod + * @property string $accountTypeString + * @property Location $location + * @property string $liability_direction + * @property string $current_debt + * @property int $user_group_id * * @method static EloquentBuilder|Account whereUserGroupId($value) * - * @property null|UserGroup $userGroup + * @property null|UserGroup $userGroup * * @mixin Eloquent */ @@ -121,18 +121,18 @@ class Account extends Model use SoftDeletes; protected $casts - = [ - 'created_at' => 'datetime', - 'updated_at' => 'datetime', - 'user_id' => 'integer', - 'deleted_at' => 'datetime', - 'active' => 'boolean', - 'encrypted' => 'boolean', - ]; + = [ + 'created_at' => 'datetime', + 'updated_at' => 'datetime', + 'user_id' => 'integer', + 'deleted_at' => 'datetime', + 'active' => 'boolean', + 'encrypted' => 'boolean', + ]; - protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban']; + protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban']; - protected $hidden = ['encrypted']; + protected $hidden = ['encrypted']; private bool $joinedAccountTypes = false; /** @@ -146,10 +146,10 @@ class Account extends Model $accountId = (int)$value; /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); /** @var null|Account $account */ - $account = $user->accounts()->with(['accountType'])->find($accountId); + $account = $user->accounts()->with(['accountType'])->find($accountId); if (null !== $account) { return $account; } @@ -180,9 +180,8 @@ class Account extends Model { /** @var null|AccountMeta $metaValue */ $metaValue = $this->accountMeta() - ->where('name', 'account_number') - ->first() - ; + ->where('name', 'account_number') + ->first(); return null !== $metaValue ? $metaValue->data : ''; } @@ -240,7 +239,7 @@ class Account extends Model public function setVirtualBalanceAttribute(mixed $value): void { - $value = (string)$value; + $value = (string)$value; if ('' === $value) { $value = null; } @@ -260,7 +259,7 @@ class Account extends Model protected function accountId(): Attribute { return Attribute::make( - get: static fn ($value) => (int)$value, + get: static fn($value) => (int)$value, ); } @@ -270,14 +269,22 @@ class Account extends Model protected function accountTypeId(): Attribute { return Attribute::make( - get: static fn ($value) => (int)$value, + get: static fn($value) => (int)$value, ); } + // + protected function iban(): Attribute + { + return Attribute::make( + get: static fn($value) => null === $value ? null : trim(str_replace(' ', '', (string)$value)), + ); + } + protected function order(): Attribute { return Attribute::make( - get: static fn ($value) => (int)$value, + get: static fn($value) => (int)$value, ); } @@ -287,7 +294,7 @@ class Account extends Model protected function virtualBalance(): Attribute { return Attribute::make( - get: static fn ($value) => (string)$value, + get: static fn($value) => (string)$value, ); } } diff --git a/app/Repositories/UserGroups/Account/AccountRepository.php b/app/Repositories/UserGroups/Account/AccountRepository.php index d3f43220f0..e4e656254f 100644 --- a/app/Repositories/UserGroups/Account/AccountRepository.php +++ b/app/Repositories/UserGroups/Account/AccountRepository.php @@ -62,8 +62,7 @@ class AccountRepository implements AccountRepositoryInterface $q1->where('account_meta.name', '=', 'account_number'); $q1->where('account_meta.data', '=', $json); } - ) - ; + ); if (0 !== count($types)) { $dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id'); @@ -89,7 +88,7 @@ class AccountRepository implements AccountRepositoryInterface public function findByName(string $name, array $types): ?Account { - $query = $this->userGroup->accounts(); + $query = $this->userGroup->accounts(); if (0 !== count($types)) { $query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id'); @@ -113,8 +112,8 @@ class AccountRepository implements AccountRepositoryInterface public function getAccountCurrency(Account $account): ?TransactionCurrency { - $type = $account->accountType->type; - $list = config('firefly.valid_currency_account_types'); + $type = $account->accountType->type; + $list = config('firefly.valid_currency_account_types'); // return null if not in this list. if (!in_array($type, $list, true)) { @@ -239,16 +238,19 @@ class AccountRepository implements AccountRepositoryInterface public function getAccountsByType(array $types, ?array $sort = []): Collection { - $res = array_intersect([AccountType::ASSET, AccountType::MORTGAGE, AccountType::LOAN, AccountType::DEBT], $types); - $query = $this->userGroup->accounts(); + $sortable = ['name', 'active']; // TODO yes this is a duplicate array. + $res = array_intersect([AccountType::ASSET, AccountType::MORTGAGE, AccountType::LOAN, AccountType::DEBT], $types); + $query = $this->userGroup->accounts(); if (0 !== count($types)) { $query->accountTypeIn($types); } // add sort parameters. At this point they're filtered to allowed fields to sort by: - if (0 !== count($sort)) { - foreach ($sort as $param) { - $query->orderBy($param[0], $param[1]); + if (count($sort) > 0) { + foreach ($sort as $column => $direction) { + if (in_array($column, $sortable, true)) { + $query->orderBy(sprintf('accounts.%s', $column), $direction); + } } } @@ -267,12 +269,11 @@ class AccountRepository implements AccountRepositoryInterface { // search by group, not by user $dbQuery = $this->userGroup->accounts() - ->where('active', true) - ->orderBy('accounts.order', 'ASC') - ->orderBy('accounts.account_type_id', 'ASC') - ->orderBy('accounts.name', 'ASC') - ->with(['accountType']) - ; + ->where('active', true) + ->orderBy('accounts.order', 'ASC') + ->orderBy('accounts.account_type_id', 'ASC') + ->orderBy('accounts.name', 'ASC') + ->with(['accountType']); if ('' !== $query) { // split query on spaces just in case: $parts = explode(' ', $query); diff --git a/app/Support/Request/GetSortInstructions.php b/app/Support/Request/GetSortInstructions.php new file mode 100644 index 0000000000..f5eebea2cb --- /dev/null +++ b/app/Support/Request/GetSortInstructions.php @@ -0,0 +1,54 @@ +get('sorting', []); + $result = []; + if (0 === count($set)) { + return []; + } + foreach ($set as $info) { + $column = $info['column'] ?? 'NOPE'; + $direction = $info['direction'] ?? 'NOPE'; + if ('asc' !== $direction && 'desc' !== $direction) { + // skip invalid direction + continue; + } + if (false === in_array($column, $allowed, true)) { + // skip invalid column + continue; + } + $result[$column] = $direction; + } + + return $result; + } + +} diff --git a/app/Transformers/V2/AbstractTransformer.php b/app/Transformers/V2/AbstractTransformer.php index 9803753688..3964ca17f9 100644 --- a/app/Transformers/V2/AbstractTransformer.php +++ b/app/Transformers/V2/AbstractTransformer.php @@ -37,8 +37,11 @@ abstract class AbstractTransformer extends TransformerAbstract /** * This method is called exactly ONCE from FireflyIII\Api\V2\Controllers\Controller::jsonApiList + * + * @param Collection $objects + * @return Collection */ - abstract public function collectMetaData(Collection $objects): void; + abstract public function collectMetaData(Collection $objects): Collection; final public function getParameters(): ParameterBag { diff --git a/app/Transformers/V2/AccountTransformer.php b/app/Transformers/V2/AccountTransformer.php index 08d699a632..28cab1c69b 100644 --- a/app/Transformers/V2/AccountTransformer.php +++ b/app/Transformers/V2/AccountTransformer.php @@ -32,6 +32,7 @@ use FireflyIII\Models\AccountType; use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\Log; /** * Class AccountTransformer @@ -48,7 +49,7 @@ class AccountTransformer extends AbstractTransformer /** * @throws FireflyException */ - public function collectMetaData(Collection $objects): void + public function collectMetaData(Collection $objects): Collection { $this->currencies = []; $this->accountMeta = []; @@ -57,18 +58,17 @@ class AccountTransformer extends AbstractTransformer $this->convertedBalances = app('steam')->balancesByAccountsConverted($objects, $this->getDate()); /** @var CurrencyRepositoryInterface $repository */ - $repository = app(CurrencyRepositoryInterface::class); - $this->default = app('amount')->getDefaultCurrency(); + $repository = app(CurrencyRepositoryInterface::class); + $this->default = app('amount')->getDefaultCurrency(); // get currencies: - $accountIds = $objects->pluck('id')->toArray(); - $meta = AccountMeta::whereIn('account_id', $accountIds) - ->where('name', 'currency_id') - ->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data']) - ; - $currencyIds = $meta->pluck('data')->toArray(); + $accountIds = $objects->pluck('id')->toArray(); + $meta = AccountMeta::whereIn('account_id', $accountIds) + ->whereIn('name', ['currency_id','account_role','account_number']) + ->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data']); + $currencyIds = $meta->where('name','currency_id')->pluck('data')->toArray(); - $currencies = $repository->getByIds($currencyIds); + $currencies = $repository->getByIds($currencyIds); foreach ($currencies as $currency) { $id = $currency->id; $this->currencies[$id] = $currency; @@ -79,15 +79,47 @@ class AccountTransformer extends AbstractTransformer } // get account types: // select accounts.id, account_types.type from account_types left join accounts on accounts.account_type_id = account_types.id; - $accountTypes = AccountType::leftJoin('accounts', 'accounts.account_type_id', '=', 'account_types.id') - ->whereIn('accounts.id', $accountIds) - ->get(['accounts.id', 'account_types.type']) - ; + $accountTypes = AccountType::leftJoin('accounts', 'accounts.account_type_id', '=', 'account_types.id') + ->whereIn('accounts.id', $accountIds) + ->get(['accounts.id', 'account_types.type']); /** @var AccountType $row */ foreach ($accountTypes as $row) { $this->accountTypes[$row->id] = (string)config(sprintf('firefly.shortNamesByFullName.%s', $row->type)); } + + // TODO needs separate method. + $sort = $this->parameters->get('sort'); + if (count($sort) > 0) { + foreach ($sort as $column => $direction) { + // account_number + iban + if ('iban' === $column) { + $meta = $this->accountMeta; + $objects = $objects->sort(function (Account $left, Account $right) use ($meta, $direction) { + $leftIban = trim(sprintf('%s%s', $left->iban, ($meta[$left->id]['account_number'] ?? ''))); + $rightIban = trim(sprintf('%s%s', $right->iban, ($meta[$right->id]['account_number'] ?? ''))); + if ('asc' === $direction) { + return strcasecmp($leftIban, $rightIban); + } + return strcasecmp($rightIban, $leftIban); + }); + } + if('balance' === $column) { + $balances = $this->convertedBalances; + $objects = $objects->sort(function (Account $left, Account $right) use ($balances, $direction) { + $leftBalance = (float)($balances[$left->id]['native_balance'] ?? 0); + $rightBalance = (float)($balances[$right->id]['native_balance'] ?? 0); + if ('asc' === $direction) { + return $leftBalance <=> $rightBalance; + } + return $rightBalance <=> $leftBalance; + }); + } + } + + } + //$objects = $objects->sortByDesc('name'); + return $objects; } private function getDate(): Carbon @@ -105,15 +137,15 @@ class AccountTransformer extends AbstractTransformer */ public function transform(Account $account): array { - $id = $account->id; + $id = $account->id; // various meta - $accountRole = $this->accountMeta[$id]['account_role'] ?? null; - $accountType = $this->accountTypes[$id]; - $order = $account->order; + $accountRole = $this->accountMeta[$id]['account_role'] ?? null; + $accountType = $this->accountTypes[$id]; + $order = $account->order; // no currency? use default - $currency = $this->default; + $currency = $this->default; if (array_key_exists($id, $this->accountMeta) && 0 !== (int)$this->accountMeta[$id]['currency_id']) { $currency = $this->currencies[(int)$this->accountMeta[$id]['currency_id']]; } @@ -127,19 +159,20 @@ class AccountTransformer extends AbstractTransformer } return [ - 'id' => (string)$account->id, - 'created_at' => $account->created_at->toAtomString(), - 'updated_at' => $account->updated_at->toAtomString(), - 'active' => $account->active, - 'order' => $order, - 'name' => $account->name, - 'iban' => '' === $account->iban ? null : $account->iban, - 'type' => strtolower($accountType), - 'account_role' => $accountRole, - 'currency_id' => (string)$currency->id, - 'currency_code' => $currency->code, - 'currency_symbol' => $currency->symbol, - 'currency_decimal_places' => $currency->decimal_places, + 'id' => (string)$account->id, + 'created_at' => $account->created_at->toAtomString(), + 'updated_at' => $account->updated_at->toAtomString(), + 'active' => $account->active, + 'order' => $order, + 'name' => $account->name, + 'iban' => '' === (string)$account->iban ? null : $account->iban, + 'account_number' => $this->accountMeta[$id]['account_number'] ?? null, + 'type' => strtolower($accountType), + 'account_role' => $accountRole, + 'currency_id' => (string)$currency->id, + 'currency_code' => $currency->code, + 'currency_symbol' => $currency->symbol, + 'currency_decimal_places' => $currency->decimal_places, 'native_currency_id' => (string)$this->default->id, 'native_currency_code' => $this->default->code, @@ -173,7 +206,7 @@ class AccountTransformer extends AbstractTransformer 'links' => [ [ 'rel' => 'self', - 'uri' => '/accounts/'.$account->id, + 'uri' => '/accounts/' . $account->id, ], ], ]; diff --git a/config/firefly.php b/config/firefly.php index cb1a8ebe94..aedcdc71f7 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -432,7 +432,7 @@ return [ 'transfers' => 'fa-exchange', ], - 'bindables' => [ + 'bindables' => [ // models 'account' => Account::class, 'attachment' => Attachment::class, @@ -490,7 +490,7 @@ return [ 'userGroupBill' => UserGroupBill::class, 'userGroup' => UserGroup::class, ], - 'rule-actions' => [ + 'rule-actions' => [ 'set_category' => SetCategory::class, 'clear_category' => ClearCategory::class, 'set_budget' => SetBudget::class, @@ -521,7 +521,7 @@ return [ 'set_source_to_cash' => SetSourceToCashAccount::class, 'set_destination_to_cash' => SetDestinationToCashAccount::class, ], - 'context-rule-actions' => [ + 'context-rule-actions' => [ 'set_category', 'set_budget', 'add_tag', @@ -540,13 +540,13 @@ return [ 'convert_transfer', ], - 'test-triggers' => [ + 'test-triggers' => [ 'limit' => 10, 'range' => 200, ], // expected source types for each transaction type, in order of preference. - 'expected_source_types' => [ + 'expected_source_types' => [ 'source' => [ TransactionTypeModel::WITHDRAWAL => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], TransactionTypeEnum::DEPOSIT->value => [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE, AccountType::REVENUE, AccountType::CASH], @@ -591,7 +591,7 @@ return [ TransactionTypeModel::LIABILITY_CREDIT => [AccountType::LIABILITY_CREDIT, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], ], ], - 'allowed_opposing_types' => [ + 'allowed_opposing_types' => [ 'source' => [ AccountType::ASSET => [ AccountType::ASSET, @@ -681,7 +681,7 @@ return [ ], ], // depending on the account type, return the allowed transaction types: - 'allowed_transaction_types' => [ + 'allowed_transaction_types' => [ 'source' => [ AccountType::ASSET => [ TransactionTypeModel::WITHDRAWAL, @@ -750,7 +750,7 @@ return [ ], // having the source + dest will tell you the transaction type. - 'account_to_transaction' => [ + 'account_to_transaction' => [ AccountType::ASSET => [ AccountType::ASSET => TransactionTypeModel::TRANSFER, AccountType::CASH => TransactionTypeModel::WITHDRAWAL, @@ -815,7 +815,7 @@ return [ ], // allowed source -> destination accounts. - 'source_dests' => [ + 'source_dests' => [ TransactionTypeModel::WITHDRAWAL => [ AccountType::ASSET => [AccountType::EXPENSE, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE, AccountType::CASH], AccountType::LOAN => [AccountType::EXPENSE, AccountType::CASH], @@ -854,7 +854,7 @@ return [ ], ], // if you add fields to this array, don't forget to update the export routine (ExportDataGenerator). - 'journal_meta_fields' => [ + 'journal_meta_fields' => [ // sepa 'sepa_cc', 'sepa_ct_op', @@ -888,36 +888,36 @@ return [ 'recurrence_count', 'recurrence_date', ], - 'webhooks' => [ + 'webhooks' => [ 'max_attempts' => env('WEBHOOK_MAX_ATTEMPTS', 3), ], - 'can_have_virtual_amounts' => [AccountType::ASSET], - 'can_have_opening_balance' => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], - 'dynamic_creation_allowed' => [ + 'can_have_virtual_amounts' => [AccountType::ASSET], + 'can_have_opening_balance' => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], + 'dynamic_creation_allowed' => [ AccountType::EXPENSE, AccountType::REVENUE, AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION, AccountType::LIABILITY_CREDIT, ], - 'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'], - 'valid_cc_fields' => ['account_role', 'cc_monthly_payment_date', 'cc_type', 'account_number', 'currency_id', 'BIC', 'include_net_worth'], - 'valid_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'], + 'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'], + 'valid_cc_fields' => ['account_role', 'cc_monthly_payment_date', 'cc_type', 'account_number', 'currency_id', 'BIC', 'include_net_worth'], + 'valid_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'], // dynamic date ranges are as follows: - 'dynamic_date_ranges' => ['last7', 'last30', 'last90', 'last365', 'MTD', 'QTD', 'YTD'], + 'dynamic_date_ranges' => ['last7', 'last30', 'last90', 'last365', 'MTD', 'QTD', 'YTD'], // only used in v1 - 'allowed_sort_parameters' => ['order', 'name', 'iban'], + 'allowed_sort_parameters' => ['order', 'name', 'iban'], // preselected account lists possibilities: - 'preselected_accounts' => ['all', 'assets', 'liabilities'], + 'preselected_accounts' => ['all', 'assets', 'liabilities'], // allowed sort columns for API's - 'sorting' => [ + 'sorting' => [ 'allowed' => [ 'transactions' => ['description', 'amount'], - 'accounts' => ['name'], + 'accounts' => ['name', 'active', 'iban', 'balance'], ], ], ]; diff --git a/public/images/logo.png b/public/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..bed923b2270c5a47bf469cc52759ee63d012884d GIT binary patch literal 11034 zcmeHtbP5Pc!vI4m5+c&wqEe$EIdqqxbfc(%G=g-CA|WUU$j}Th zlt|av{LVT5!~5a=FxOnye)hBX+UwaX?t85meO*loQWjDO1VW*$g}e`eK+#t}VnQ%d z(qG>W{zyEuOuZox%FC-Cw4aCJ9vEasshgk--JMWAwqA}9A0M9^u20>(?QK0AZ@7Co zXKyL6Kp>nDZKTQr-<-`q{=Rg}g~~hIIML>&trcBWRZgC8P9aX!ln*wo8#GUTK6G=d z*z9b0=(Zv2SEp%SR{!&0{Nd*D`G=n$DyCSis_(1Qkwv3JIVT|6#7!w1PPK=*d;LPR z*S^eRGGDakug<@a%FI0`{2t`vH2cEZaq;DvP;|7G9N#Du{E;(2Xi`c{AV}m(J18}c zb}Rt`$s_o`ga4xx5{HG9P_4`aK+pqDQFaZSI8SZ`979fQ^vh0I0ZmP*R9F3ug~Pp! z@bXygD!DkD0dLq>CjPh&vB}L;A!@nAC^)*km7v>SxyNHHYR9Jz@*(S(108MG2j2F2 zJFNP<*E;Emy?O|5JN4@`RR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lr%>h-oU3*N4*T+Z)qd{&(;YO!Uzyk4Le)~H4niQxixQe z?E_S7iHDzapba#+A#ogrbw*y}-#U^}?@p$O+h=CS=Xpl|e&O#_7N zM!aryl`C(7(;T0tiYLk}ige&@4d)-AF$5O4U&qhzlNlSlm1=>QXmz&U$O{2<)ItU>pRE2|j2XCI*rUCYl)#e+_ z%aW~6JF)}Dc_QV1+oqBsH&kHLcj(UlZbXHx0O8IUs+dcB@QizMEJhpCM%Hk1F`k{}=@g$Ftha-y z{X9*)UFFwP3P94gKPLcjlWF%EAmkfflA2idRxL4h-Jc8XH6;ht9#E7S{QW{-gaPEd z;=ghFk8fve%IXg?AkVCjsv#0dj0cT0?Ch#N8!D3`tiP02rrs;swYX9((kURi*tX<3YnF8-)MBX1kEwv%Ta-}zUex|7g6;yl)`4h{e5q)KV>&E^hyZ|i}SwSao@~3`x0pXuo z<2ir|48j%HiT|!O@ET$?@S1&9^-6~t?rgC+tQ3CW%uWmEb_9Jh86Io*ud3RyM$>UU zQH1`Z$7hS!pf$m(SnDYO1vUO`JJqL)k7e|f@Lou+b{ZH~zHfSZl~`V!nWN6meTs@p zA^Em?9CUxx2j z*F!UCs-k=#kr6jB+d3K)$u16@0Cup)hVAb(Y>jTVa3AhZn!8BB82tCnPKL7Nuu zFafwLuNC-p8bmT`ybCjQ#8(**5}Exi{h(cm`rrliE+sdP896B*K4PN`fEW!{E*f#D zV&!y1=lxXaaqqRFVOg0t+ZuV$8YMnmTbLnw)fHovgfOBxXr#Jy0{|U#ykNa4@>H(c zVw#9RnTPV0%z-4e1Dgnhi%Z*ewde*7jUycyI$G=ge&tLq{^s@jD9A65k}@c;k- literal 0 HcmV?d00001 diff --git a/resources/assets/v2/boot/bootstrap.js b/resources/assets/v2/boot/bootstrap.js index ca6959b893..b9a9432ec5 100644 --- a/resources/assets/v2/boot/bootstrap.js +++ b/resources/assets/v2/boot/bootstrap.js @@ -36,12 +36,16 @@ import {getVariable} from "../store/get-variable.js"; import {getViewRange} from "../support/get-viewrange.js"; import {loadTranslations} from "../support/load-translations.js"; +import adminlte from 'admin-lte'; + + store.addPlugin(observePlugin); window.bootstrapped = false; window.store = store; + // always grab the preference "marker" from Firefly III. getFreshVariable('lastActivity').then((serverValue) => { const localValue = store.get('lastActivity'); diff --git a/resources/assets/v2/pages/accounts/index.js b/resources/assets/v2/pages/accounts/index.js index 31859e2382..9a4da9963b 100644 --- a/resources/assets/v2/pages/accounts/index.js +++ b/resources/assets/v2/pages/accounts/index.js @@ -51,9 +51,17 @@ let index = function () { enabled: true }, }, - + sortingColumn: '', + sortDirection: '', accounts: [], + sort(column) { + this.sortingColumn = column; + this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc'; + this.loadAccounts(); + return false; + }, + formatMoney(amount, currencyCode) { return formatMoney(amount, currencyCode); }, @@ -69,14 +77,29 @@ let index = function () { }, loadAccounts() { + this.notifications.wait.show = true; + this.notifications.wait.text = i18next.t('firefly.wait_loading_data') + this.accounts = []; + // sort instructions + // &sorting[0][column]=description&sorting[0][direction]=asc + const sorting = [{column: this.sortingColumn, direction: this.sortDirection}]; // one page only. - (new Get()).index({type: type, page: this.page}).then(response => { + (new Get()).index({sorting: sorting, type: type, page: this.page}).then(response => { for (let i = 0; i < response.data.data.length; i++) { if (response.data.data.hasOwnProperty(i)) { let current = response.data.data[i]; let account = { id: parseInt(current.id), + active: current.attributes.active, name: current.attributes.name, + type: current.attributes.type, + // role: current.attributes.account_role, + iban: null === current.attributes.iban ? '' : current.attributes.iban.match(/.{1,4}/g).join(' '), + account_number: null === current.attributes.account_number ? '' : current.attributes.account_number, + current_balance: current.attributes.current_balance, + currency_code: current.attributes.currency_code, + native_current_balance: current.attributes.native_current_balance, + native_currency_code: current.attributes.native_currency_code, }; this.accounts.push(account); } diff --git a/resources/assets/v2/sass/adminlte-filtered.scss b/resources/assets/v2/sass/adminlte-filtered.scss new file mode 100644 index 0000000000..5a322c63f9 --- /dev/null +++ b/resources/assets/v2/sass/adminlte-filtered.scss @@ -0,0 +1,105 @@ +/*! + * adminlte-filteres.scss + * Copyright (c) 2024 james@firefly-iii.org. + * + * This file is part of Firefly III (https://github.com/firefly-iii). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + + +// less adminlte code because the CSS is massive otherwise. +// copied from: + +/*! + * AdminLTE v4.0.0-alpha2 + * Author: Colorlib + * Website: AdminLTE.io + * License: Open source - MIT + */ + +// Bootstrap Configuration +// --------------------------------------------------- +@import "bootstrap/scss/functions"; + +// AdminLTE Configuration +// --------------------------------------------------- +@import "admin-lte/src/scss/bootstrap-variables"; // little modified are here + +// Bootstrap Configuration +// --------------------------------------------------- +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/variables-dark"; +@import "bootstrap/scss/maps"; +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/utilities"; + +// Bootstrap Layout & components +@import "bootstrap/scss/root"; +@import "bootstrap/scss/reboot"; +@import "bootstrap/scss/type"; +@import "bootstrap/scss/images"; +@import "bootstrap/scss/containers"; +@import "bootstrap/scss/grid"; +@import "bootstrap/scss/tables"; +@import "bootstrap/scss/forms"; +@import "bootstrap/scss/buttons"; +@import "bootstrap/scss/transitions"; +@import "bootstrap/scss/dropdown"; +@import "bootstrap/scss/button-group"; +@import "bootstrap/scss/nav"; +@import "bootstrap/scss/navbar"; +@import "bootstrap/scss/card"; +//@import "bootstrap/scss/accordion"; +@import "bootstrap/scss/breadcrumb"; +@import "bootstrap/scss/pagination"; +@import "bootstrap/scss/badge"; +@import "bootstrap/scss/alert"; +@import "bootstrap/scss/progress"; +@import "bootstrap/scss/list-group"; +@import "bootstrap/scss/close"; +//@import "bootstrap/scss/toasts"; +@import "bootstrap/scss/modal"; +@import "bootstrap/scss/tooltip"; +@import "bootstrap/scss/popover"; +//@import "bootstrap/scss/carousel"; +@import "bootstrap/scss/spinners"; +@import "bootstrap/scss/offcanvas"; +@import "bootstrap/scss/placeholders"; + +// Bootstrap Helpers +@import "bootstrap/scss/helpers"; + +// Bootstrap Utilities +@import "bootstrap/scss/utilities/api"; + + +// AdminLTE Configuration +// --------------------------------------------------- +@import "admin-lte/src/scss/variables"; +@import "admin-lte/src/scss/variables-dark"; +@import "admin-lte/src/scss/mixins"; + +// AdiminLTE Parts +// --------------------------------------------------- +@import "admin-lte/src/scss/parts/core"; +@import "admin-lte/src/scss/parts/components"; +@import "admin-lte/src/scss/parts/extra-components"; + +// @import "admin-lte/src/scss/parts/pages"; +@import "admin-lte/src/scss/pages/login_and_register"; + +@import "admin-lte/src/scss/parts/miscellaneous"; + + diff --git a/resources/assets/v2/sass/app.scss b/resources/assets/v2/sass/app.scss index 2d4cbaed8c..06a1b91471 100644 --- a/resources/assets/v2/sass/app.scss +++ b/resources/assets/v2/sass/app.scss @@ -38,7 +38,7 @@ $success: #64B624 !default; // @import "bootstrap/scss/bootstrap"; // admin LTE -@import "admin-lte/src/scss/adminlte"; +@import "adminlte-filtered"; // @import "~bootstrap-sass/assets/stylesheets/bootstrap"; diff --git a/resources/views/v2/accounts/index.blade.php b/resources/views/v2/accounts/index.blade.php index 138fc6e0a0..4a1780cbc2 100644 --- a/resources/views/v2/accounts/index.blade.php +++ b/resources/views/v2/accounts/index.blade.php @@ -57,11 +57,27 @@   - Active? - Name + + Active? + + + + + Name + + + Type - Account number - Current balance + + Account number + + + + + Current balance + + + Last activity Balance difference   @@ -70,20 +86,46 @@ diff --git a/resources/views/v2/partials/layout/sidebar.blade.php b/resources/views/v2/partials/layout/sidebar.blade.php index f434bfaca3..f5d131e399 100644 --- a/resources/views/v2/partials/layout/sidebar.blade.php +++ b/resources/views/v2/partials/layout/sidebar.blade.php @@ -4,7 +4,7 @@ - Firefly III Logo