Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Build last views.
James Colef579a59474f1
diff --git a/app/Helpers/Functions/helpers.php b/app/Helpers/Functions/helpers.phpindex efb1c47825..a83a4aafc3 100644--- a/app/Helpers/Functions/helpers.php+++ b/app/Helpers/Functions/helpers.php@@ -358,6 +358,13 @@ if (!function_exists('menu_open_partial')) {}}+if (!function_exists('carbonize')) {+ function carbonize(string $date): Carbon+ {+ return new Carbon($date, config('app.timezone'));+ }+}+if (!function_exists('account_balance')) {function account_balance(Account $account): string{diff --git a/app/View/Components/Lists/Ale.php b/app/View/Components/Lists/Ale.phpnew file mode 100644index 0000000000..3411dc29f2--- /dev/null+++ b/app/View/Components/Lists/Ale.php@@ -0,0 +1,28 @@+<?php++namespace FireflyIII\View\Components\Lists;++use Closure;+use Illuminate\Contracts\View\View;+use Illuminate\Support\Collection;+use Illuminate\View\Component;++class Ale extends Component+{+ public array|Collection $logEntries;+ /**+ * Create a new component instance.+ */+ public function __construct(array|Collection $logEntries)+ {+ $this->logEntries = $logEntries;+ }++ /**+ * Get the view / contents that represent the component.+ */+ public function render(): View|Closure|string+ {+ return view('components.lists.ale');+ }+}diff --git a/resources/views/components/generic/amount.blade.php b/resources/views/components/generic/amount.blade.phpindex bf888318c3..16c6ba8ad0 100644--- a/resources/views/components/generic/amount.blade.php+++ b/resources/views/components/generic/amount.blade.php@@ -97,20 +97,3 @@@endif@endif--{{---<span class="text-end small">---{% elseif transaction.transaction_type_type == 'Reconciliation' %}-@else- {!! format_amount_by_symbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}- {% if null != transaction.foreign_amount %}- ({!! format_amount_by_symbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})- @endif- {% if convertToPrimary and null != transaction.pc_amount %}- ({!! format_amount_by_symbol(transaction.pc_amount, $primaryCurrency->symbol, foreign_currency_.decimal_places) }})- @endif-@endif- </span>- --}}diff --git a/resources/views/components/lists/ale.blade.php b/resources/views/components/lists/ale.blade.phpnew file mode 100644index 0000000000..ad3179806c--- /dev/null+++ b/resources/views/components/lists/ale.blade.php@@ -0,0 +1,121 @@+<table class="table" aria-label="Table">+ <thead>+ <tr>+ <td colspan="3"><em>{{ __('firefly.incomplete_ale') }}</em></td>+ </tr>+ </thead>+ <tbody>+ @foreach($logEntries as $logEntry)+ <tr>+ <th class="twenty" scope="row">+ {{-- link to object: --}}+ @if ('FireflyIII\\Models\\Rule' == $logEntry->changer_type)+ <a href="{{ route('rules.edit', [$logEntry->changer_id] ) }}">+ @endif+ @if ('FireflyIII\\User' == $logEntry->changer_type)+ <a href="{{ route('profile.index') }}">+ @endif+ {{ str_replace(['FireflyIII\\Models\\', 'FireflyIII\\'], '', $logEntry->changer_type) }}+ #{{ $logEntry->changer_id }}+ </a>+ </th>+ <td class="thirty" title="{{ $logEntry->created_at->isoFormat($dateTimeFormat) }}">+ {{ __('firefly.ale_action_' . $logEntry->action) }}+ </td>+ <td>+ {{-- this tag was added --}}+ @if ('add_tag' == $logEntry->action)+ <code>{{ $logEntry->after }}</code>+ @endif++ {{-- amount before and after --}}+ @if ('update_amount' == $logEntry->action)+ {!! format_amount_by_symbol($logEntry->before['amount'], $logEntry->before['currency_symbol'], $logEntry->before['decimal_places'], true) !!}+ →+ {!! format_amount_by_symbol($logEntry->after['amount'], $logEntry->after['currency_symbol'], $logEntry->after['decimal_places'], true) !!}+ @endif++ {{-- foreign amount before and after --}}+ @if ('update_foreign_amount' == $logEntry->action)+ {!! format_amount_by_symbol($logEntry->before['amount'], $logEntry->before['currency_symbol'], $logEntry->before['decimal_places'], true) !!}+ →+ {!! format_amount_by_symbol($logEntry->after['amount'], $logEntry->after['currency_symbol'], $logEntry->after['decimal_places'], true) !!}+ @endif++ {{-- group title before and after, if not null. --}}+ @if ('update_group_title' == $logEntry->action)+ <code><s>{{ $logEntry->before }}</s></code>+ →+ <code>{{ $logEntry->after }}</code>+ @endif+ @if ('clear_category' == $logEntry->action)+ <code><s>{{ $logEntry->before }}</s></code>+ @endif+ @if ('clear_tag' == $logEntry->action)+ <code><s>{{ $logEntry->before }}</s></code>+ @endif++ @if ('clear_notes' == $logEntry->action)+ @if (strlen($logEntry->before) > 25)+ <code><s>{{ substr($logEntry->before, 0, 25) }}...</s></code>+ @else+ <code><s>{{ $logEntry->before }}</s></code>+ @endif+ @endif++ @if ('set_bill' == $logEntry->action)+ <code>{{ $logEntry->after }}</code>+ @endif+ @if ('set_budget' == $logEntry->action)+ <code>{{ $logEntry->after }}</code>+ @endif+ @if ('set_category' == $logEntry->action)+ <code>{{ $logEntry->after }}</code>+ @endif+ @if ('set_source' == $logEntry->action)+ <code>{{ $logEntry->after }}</code>+ @endif+ @if ('set_destination' == $logEntry->action)+ <code>{{ $logEntry->after }}</code>+ @endif+ @if ('update_date' == $logEntry->action)+ <code><s>{{ carbonize($logEntry->before)->isoFormat($dateTimeFormat) }}</s></code>+ →+ <code>{{ carbonize($logEntry->after)->isoFormat($dateTimeFormat) }}</code>+ @endif+ @if ('update_transaction_type' == $logEntry->action)+ {{ trans('firefly.' . $logEntry->before) }} → {{ trans('firefly.' . $logEntry->after) }}+ @endif++ @if ('update_notes' == $logEntry->action)+ @if (strlen($logEntry->before) > 25)+ <code><s>{{ substr($logEntry->before, 0, 25) }}...</s></code>+ @else+ <code><s>{{ $logEntry->before }}</s></code>+ @endif++ →+ @if (strlen($logEntry->after) > 25)+ <code>{{ substr($logEntry->after, 0, 25) }}...</code>+ @else+ <code>{{ $logEntry->after }}</code>+ @endif+ @endif++ @if ('update_description' == $logEntry->action)+ <code><s>{{ $logEntry->before }}</s></code>+ →+ <code>{{ $logEntry->after }}</code>+ @endif+ @if ('add_to_piggy' == $logEntry->action)+ {{ trans('firefly.ale_action_log_add', ['amount' => format_amount_by_symbol($logEntry->after['amount'], $logEntry->after['currency_symbol'], $logEntry->after['decimal_places'], true), 'name' => $logEntry->after['piggy']]) }}+ @endif+ @if ('remove_from_piggy' == $logEntry->action)+ {{ trans('firefly.ale_action_log_remove', ['amount' => format_amount_by_symbol($logEntry->after['amount'], $logEntry->after['currency_symbol'], $logEntry->after['decimal_places'], true), 'name' => $logEntry->after['piggy']]) }}+ @endif+ </td>++ </tr>+ @endforeach+</tbody>+</table>diff --git a/resources/views/form/assetAccountCheckList.blade.php b/resources/views/form/assetAccountCheckList.blade.phpindex 86bd0ee290..0020efa8aa 100644--- a/resources/views/form/assetAccountCheckList.blade.php+++ b/resources/views/form/assetAccountCheckList.blade.php@@ -5,7 +5,6 @@<div class="col-sm-9">@foreach($accounts as $id => $account)<div class="form-check has-validation">- {{-- {% if account in selected or (selected|length == 0 and options.select_all == true) %} --}}@if(in_array($id, $selected) || (count($selected) == 0 && $options['select_all'] === true)){{ Html::checkbox($name . '[]', true, $id)->class('form-check-input')->id($id) }}@elsediff --git a/resources/views/profile/logout-other-sessions.blade.php b/resources/views/profile/logout-other-sessions.blade.phpindex 109dc7c90c..6fa90be1d4 100644--- a/resources/views/profile/logout-other-sessions.blade.php+++ b/resources/views/profile/logout-other-sessions.blade.php@@ -31,7 +31,7 @@</div></div></form>- {% include 'partials.password-modal' %}+ @include('partials.password-modal')@endsection@section('scripts')@vite(['js/pages/generic.js'])diff --git a/resources/views/transactions/show.blade.php b/resources/views/transactions/show.blade.phpindex 424d1c880c..2717165ccb 100644--- a/resources/views/transactions/show.blade.php+++ b/resources/views/transactions/show.blade.php@@ -99,7 +99,7 @@</h3></div><div class="card-body p-0">- {% include 'list.ale' with {logEntries: groupLogEntries} %}+ <x-lists.ale :log-entries="$groupLogEntries" /></div></div>@endif@@ -496,7 +496,7 @@<h3 class="card-title">{{ __('firefly.attachments') }}</h3></div><div class="card-body p-0">- {% include 'list.attachments' with {attachments: attachments[$journal['transaction_journal_id']]} %}+ <x-lists.attachments :attachments="$attachments[$journal['transaction_journal_id']]" /></div></div>@endif@@ -529,7 +529,7 @@</h3></div><div class="card-body p-0">- {% include 'list.ale' with {logEntries: logEntries[$journal['transaction_journal_id']]} %}+ <x-lists.ale :log-entries="$logEntries[$journal['transaction_journal_id']]" /></div></div>@endif