mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 01:42:19 +00:00
Expand view.
This commit is contained in:
@@ -30,13 +30,10 @@ use Illuminate\Support\Facades\Log;
|
|||||||
class AccountPolicy
|
class AccountPolicy
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* TODO needs better authentication.
|
* TODO needs better authentication, also for group.
|
||||||
*/
|
*/
|
||||||
public function view(User $user, Account $account): bool
|
public function view(User $user, Account $account): bool
|
||||||
{
|
{
|
||||||
die('OK1');
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return auth()->check() && $user->id === $account->user_id;
|
return auth()->check() && $user->id === $account->user_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -345,7 +345,7 @@ let index = function () {
|
|||||||
this.pageOptions.isLoading = true;
|
this.pageOptions.isLoading = true;
|
||||||
// sort instructions (only one column)
|
// sort instructions (only one column)
|
||||||
let sorting = this.pageOptions.sortingColumn;
|
let sorting = this.pageOptions.sortingColumn;
|
||||||
if('asc' === this.pageOptions.sortDirection) {
|
if('asc' === this.pageOptions.sortDirection && '' !== sorting) {
|
||||||
sorting = '-' + sorting;
|
sorting = '-' + sorting;
|
||||||
}
|
}
|
||||||
//const sorting = [{column: this.pageOptions.sortingColumn, direction: this.pageOptions.sortDirection}];
|
//const sorting = [{column: this.pageOptions.sortingColumn, direction: this.pageOptions.sortDirection}];
|
||||||
|
@@ -243,10 +243,8 @@ export default () => ({
|
|||||||
name: parent.attributes.name,
|
name: parent.attributes.name,
|
||||||
order: parent.attributes.order,
|
order: parent.attributes.order,
|
||||||
id: parent.id,
|
id: parent.id,
|
||||||
balance_raw: parseFloat(parent.attributes.current_balance),
|
balance: parent.attributes.balance,
|
||||||
balance: formatMoney(parent.attributes.current_balance, parent.attributes.currency_code),
|
native_balance: parent.attributes.native_balance,
|
||||||
native_balance_raw: parseFloat(parent.attributes.native_current_balance),
|
|
||||||
native_balance: formatMoney(parent.attributes.native_current_balance, parent.attributes.native_currency_code),
|
|
||||||
groups: groups,
|
groups: groups,
|
||||||
});
|
});
|
||||||
// console.log(parent.attributes);
|
// console.log(parent.attributes);
|
||||||
|
@@ -45,6 +45,8 @@ import {
|
|||||||
Tooltip
|
Tooltip
|
||||||
} from "chart.js";
|
} from "chart.js";
|
||||||
import 'chartjs-adapter-date-fns';
|
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
|
// register things
|
||||||
Chart.register({
|
Chart.register({
|
||||||
@@ -75,6 +77,8 @@ const comps = {
|
|||||||
piggies
|
piggies
|
||||||
};
|
};
|
||||||
|
|
||||||
|
showInternalsButton();
|
||||||
|
|
||||||
//let i18n;
|
//let i18n;
|
||||||
|
|
||||||
function loadPage(comps) {
|
function loadPage(comps) {
|
||||||
|
@@ -422,6 +422,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 fade" id="filterModal" tabindex="-1" aria-labelledby="filterModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-sm">
|
<div class="modal-dialog modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@@ -448,6 +449,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 fade" id="wizardModal" tabindex="-1" aria-labelledby="wizardModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@@ -52,6 +52,30 @@
|
|||||||
|
|
||||||
</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">
|
||||||
|
<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
|
@endsection
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
@vite(['src/pages/dashboard/dashboard.js'])
|
@vite(['src/pages/dashboard/dashboard.js'])
|
||||||
|
@@ -13,7 +13,12 @@
|
|||||||
x-text="account.name"></a>
|
x-text="account.name"></a>
|
||||||
|
|
||||||
<span class="small">
|
<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>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user