Add API routes and expand v2 frontend

This commit is contained in:
James Cole
2023-09-20 06:18:25 +02:00
parent 0e3ebb9f1a
commit 6b5774a66d
8 changed files with 69 additions and 48 deletions

View File

@@ -13,7 +13,7 @@
x-text="account.name"></a>
<span class="small">
@include('partials.elements.amount', ['autoConversion' => true,'amount' => 'account.balance','native' => 'account.native_balance'])
@include('partials.elements.amount', ['autoConversion' => true,'type' => 'null','amount' => 'account.balance','native' => 'account.native_balance'])
</span>
</h3>
</div>
@@ -71,7 +71,7 @@
</template>
<template x-for="transaction in group.transactions">
<span>
@include('partials.elements.amount', ['autoConversion' => true,'amount' => 'transaction.amount','native' => 'transaction.native_amount'])
@include('partials.elements.amount', ['autoConversion' => true,'type' => 'transaction.type','amount' => 'transaction.amount','native' => 'transaction.native_amount'])
</span>
</template>
</td>

View File

@@ -8,7 +8,7 @@
</a>
</h3>
</div>
<div class="card-body p-0">
<div class="card-body">
<div class="row mb-2">
<template x-for="pie in group.payment_info">
<div :class='group.col_size'>
@@ -22,15 +22,15 @@
<table class="table table-striped table-hover">
<thead>
<tr>
<th>TODO Subscription</th>
<th>(Expected) amount</th>
<th>{{ __('firefly.subscription') }}</th>
<th>{{ __('firefly.expected_amount') }}</th>
</tr>
</thead>
<tbody>
<template x-for="bill in group.bills">
<tr>
<td>
<a href="#" :title="bill.name">
<a :href="'{{ route('subscriptions.show',['']) }}/' + bill.id" :title="bill.name">
<span x-text="bill.name"></span>
</a>
<template x-if="bill.paid">

View File

@@ -7,9 +7,16 @@
</span>
</template>
<template x-if="{{ $native }}_raw >= 0">
<span class="text-success">
<span x-text="{{ $native }}"></span>
</span>
<template x-if="'transfer' === {{ $type }}">
<span class="text-primary">
<span x-text="{{ $native }}"></span>
</span>
</template>
<template x-if="'transfer' !== {{ $type }}">
<span class="text-success">
<span x-text="{{ $native }}"></span>
</span>
</template>
</template>
</span>
</template>
@@ -29,13 +36,20 @@
</template>
@else
<template x-if="{{ $amount }}_raw < 0">
<span class="text-danger">
<span x-text="{{ $amount }}"></span>
</span>
<span class="text-danger">
<span x-text="{{ $amount }}"></span>
</span>
</template>
<template x-if="{{ $amount }}_raw >= 0">
<span class="text-success">
<span x-text="{{ $amount }}"></span>
</span>
<template x-if="'transfer' === {{ $type }}">
<span class="text-primary">
<span x-text="{{ $amount }}"></span>
</span>
</template>
<template x-if="'transfer' !== {{ $type }}">
<span class="text-success">
<span x-text="{{ $amount }}"></span>
</span>
</template>
</template>
@endif