Skip to content

Firefly III: a personal finances manager

Expand view.

James Cole3811aff206ac
diff --git a/app/Policies/AccountPolicy.php b/app/Policies/AccountPolicy.php
index 3e4b6f85c6..8bedfaef0e 100644
--- a/app/Policies/AccountPolicy.php
+++ b/app/Policies/AccountPolicy.php
@@ -30,13 +30,10 @@ use Illuminate\Support\Facades\Log;
class AccountPolicy
{
/**
- * TODO needs better authentication.
+ * TODO needs better authentication, also for group.
*/
public function view(User $user, Account $account): bool
{
- die('OK1');
- return true;
-
return auth()->check() && $user->id === $account->user_id;
}
diff --git a/resources/assets/v2/src/pages/accounts/index.js b/resources/assets/v2/src/pages/accounts/index.js
index eb8e70bd25..422202ee24 100644
--- a/resources/assets/v2/src/pages/accounts/index.js
+++ b/resources/assets/v2/src/pages/accounts/index.js
@@ -345,7 +345,7 @@ let index = function () {
this.pageOptions.isLoading = true;
// sort instructions (only one column)
let sorting = this.pageOptions.sortingColumn;
- if('asc' === this.pageOptions.sortDirection) {
+ if('asc' === this.pageOptions.sortDirection && '' !== sorting) {
sorting = '-' + sorting;
}
//const sorting = [{column: this.pageOptions.sortingColumn, direction: this.pageOptions.sortDirection}];
diff --git a/resources/assets/v2/src/pages/dashboard/accounts.js b/resources/assets/v2/src/pages/dashboard/accounts.js
index 3bdd8a3076..e22da6a86c 100644
--- a/resources/assets/v2/src/pages/dashboard/accounts.js
+++ b/resources/assets/v2/src/pages/dashboard/accounts.js
@@ -243,10 +243,8 @@ export default () => ({
name: parent.attributes.name,
order: parent.attributes.order,
id: parent.id,
- balance_raw: parseFloat(parent.attributes.current_balance),
- balance: formatMoney(parent.attributes.current_balance, parent.attributes.currency_code),
- native_balance_raw: parseFloat(parent.attributes.native_current_balance),
- native_balance: formatMoney(parent.attributes.native_current_balance, parent.attributes.native_currency_code),
+ balance: parent.attributes.balance,
+ native_balance: parent.attributes.native_balance,
groups: groups,
});
// console.log(parent.attributes);
diff --git a/resources/assets/v2/src/pages/dashboard/dashboard.js b/resources/assets/v2/src/pages/dashboard/dashboard.js
index e23dea9867..bc9706b2a1 100644
--- a/resources/assets/v2/src/pages/dashboard/dashboard.js
+++ b/resources/assets/v2/src/pages/dashboard/dashboard.js
@@ -45,6 +45,8 @@ import {
Tooltip
} from "chart.js";
import 'chartjs-adapter-date-fns';
+import {showInternalsButton} from "../../support/page-settings/show-internals-button.js";
+import {showWizardButton} from "../../support/page-settings/show-wizard-button.js";
// register things
Chart.register({
@@ -75,6 +77,8 @@ const comps = {
piggies
};
+showInternalsButton();
+
//let i18n;
function loadPage(comps) {
diff --git a/resources/views/v2/accounts/index.blade.php b/resources/views/v2/accounts/index.blade.php
index 8a043a0ef3..712d58c2bc 100644
--- a/resources/views/v2/accounts/index.blade.php
+++ b/resources/views/v2/accounts/index.blade.php
@@ -422,6 +422,7 @@
</div>
</div>
+ <!-- TODO this is a repeated piece of code -->
<div class="modal fade" id="filterModal" tabindex="-1" aria-labelledby="filterModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
@@ -448,6 +449,7 @@
</div>
</div>
+ <!-- TODO this is a repeated piece of code -->
<div class="modal fade" id="wizardModal" tabindex="-1" aria-labelledby="wizardModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
diff --git a/resources/views/v2/index.blade.php b/resources/views/v2/index.blade.php
index 84b5ac5ef0..32ab8f3e3b 100644
--- a/resources/views/v2/index.blade.php
+++ b/resources/views/v2/index.blade.php
@@ -52,6 +52,30 @@
</div>
+ <!-- TODO this is a repeated piece of code -->
+ <div class="modal fade" id="filterModal" tabindex="-1" aria-labelledby="filterModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-sm">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h1 class="modal-title fs-5" id="filterModalLabel">TODO Options dialog</h1>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+ </div>
+ <div class="modal-body">
+ Bla bla bla
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><em
+ class="fa-solid fa-right-from-bracket"></em> Cancel
+ </button>
+ <button type="button" class="btn btn-primary" data-bs-dismiss="modal"><em
+ class="fa-solid fa-magnifying-glass"></em> Search
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
@endsection
@section('scripts')
@vite(['src/pages/dashboard/dashboard.js'])
diff --git a/resources/views/v2/partials/dashboard/account-list.blade.php b/resources/views/v2/partials/dashboard/account-list.blade.php
index 57d4c9dcf2..1adb6805ef 100644
--- a/resources/views/v2/partials/dashboard/account-list.blade.php
+++ b/resources/views/v2/partials/dashboard/account-list.blade.php
@@ -13,7 +13,12 @@
x-text="account.name"></a>
<span class="small">
- @include('partials.elements.amount', ['autoConversion' => true,'type' => 'null','amount' => 'account.balance','native' => 'account.native_balance'])
+ <template x-for="balance in account.balance">
+ <span>x</span>
+ </template>
+ <template x-for="balance in account.native_balance">
+ <span>Y</span>
+ </template>
</span>
</h3>
</div>