mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-24 08:00:12 -06:00
Some small fixes in UI
This commit is contained in:
parent
9fdaf1cee8
commit
cc218e203f
@ -31,6 +31,7 @@ use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Support\Http\Api\ConvertsExchangeRates;
|
||||
use FireflyIII\Support\NullArrayObject;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class TransactionGroupTransformer
|
||||
@ -261,6 +262,10 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
if (null === $string) {
|
||||
return null;
|
||||
}
|
||||
return Carbon::createFromFormat('Y-m-d', $string);
|
||||
Log::debug(sprintf('Now in date("%s")', $string));
|
||||
if(10 === strlen($string)) {
|
||||
return Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'));
|
||||
}
|
||||
return Carbon::createFromFormat('Y-m-d H:i:s', $string, config('app.timezone'));
|
||||
}
|
||||
}
|
||||
|
@ -41,9 +41,9 @@
|
||||
<div v-for="limit in budget.limits">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<small>{{ limit.amount }}</small><br>
|
||||
{{ limit.start }}<br>
|
||||
{{ limit.end }}
|
||||
<small>{{ formatAmount(limit.currency_code, limit.amount) }}</small><br>
|
||||
{{ formatDate(limit.start) }}<br>
|
||||
{{ formatDate(limit.end) }}
|
||||
</div>
|
||||
<div class="col">
|
||||
I am bar
|
||||
@ -67,6 +67,7 @@
|
||||
import {useFireflyIIIStore} from "../../stores/fireflyiii";
|
||||
import List from '../../api/v2/budgets/list';
|
||||
import ListLimit from '../../api/v2/budget-limits/list';
|
||||
import format from "date-fns/format";
|
||||
|
||||
export default {
|
||||
name: "BudgetBox",
|
||||
@ -75,11 +76,13 @@ export default {
|
||||
budgets: [],
|
||||
locale: 'en-US',
|
||||
page: 1,
|
||||
loadingBudgets: false
|
||||
loadingBudgets: false,
|
||||
dateFormat: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.store = useFireflyIIIStore();
|
||||
this.dateFormat = this.$t('config.month_and_day_fns');
|
||||
this.store.$onAction(
|
||||
({name, store, args, after, onError,}) => {
|
||||
after((result) => {
|
||||
@ -95,6 +98,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate: function (date) {
|
||||
return format(new Date(date), this.$t('config.month_and_day_fns'));
|
||||
},
|
||||
formatAmount: function (currencyCode, amount) {
|
||||
return Intl.NumberFormat('en-US', {style: 'currency', currency: currencyCode}).format(amount);
|
||||
},
|
||||
loadBox: function () {
|
||||
this.loadingBudgets = true;
|
||||
(new List).list(this.page).then((data) => {
|
||||
@ -145,12 +154,14 @@ export default {
|
||||
budget.limits.push(
|
||||
{
|
||||
amount: current.attributes.amount,
|
||||
currency_code: current.attributes.currency_code,
|
||||
start: new Date(current.attributes.start),
|
||||
end: new Date(current.attributes.end),
|
||||
}
|
||||
);
|
||||
console.log('A ' + new Date(current.attributes.start));
|
||||
console.log('B ' + this.store.getRange.start);
|
||||
console.log(current);
|
||||
//console.log('A ' + new Date(current.attributes.start));
|
||||
//console.log('B ' + this.store.getRange.start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
<tbody>
|
||||
<tr v-for="transaction in transactions">
|
||||
<td class="text-left">
|
||||
<router-link :to="{ name: 'transactions.show', params: {id: transaction.transactionGroupId} }">
|
||||
<router-link :class="$q.dark.isActive ? 'text-red' : 'text-blue'" :to="{ name: 'transactions.show', params: {id: transaction.transactionGroupId} }">
|
||||
<strong v-if="transaction.transactions.length > 1">
|
||||
{{ transaction.transactionGroupTitle }}<br/>
|
||||
</strong>
|
||||
@ -52,7 +52,7 @@
|
||||
{{ tr.description }}
|
||||
<br/>
|
||||
</span>
|
||||
<router-link v-if="transaction.transactions.length === 1"
|
||||
<router-link :class="$q.dark.isActive ? 'text-red' : 'text-blue'" v-if="transaction.transactions.length === 1"
|
||||
:to="{ name: 'transactions.show', params: {id: transaction.transactionGroupId} }">
|
||||
{{ tr.description }}
|
||||
</router-link>
|
||||
@ -66,7 +66,7 @@
|
||||
<span v-if="transaction.transactions.length > 1"><br></span>
|
||||
<span v-for="tr in transaction.transactions">
|
||||
|
||||
<router-link :to="{ name: 'accounts.show', params: {id: tr.destination_id} }">
|
||||
<router-link :class="$q.dark.isActive ? 'text-red' : 'text-blue'" :to="{ name: 'accounts.show', params: {id: tr.destination_id} }">
|
||||
{{ tr.destination_name }}
|
||||
</router-link>
|
||||
<br v-if="transaction.transactions.length > 1"/>
|
||||
|
@ -66,9 +66,9 @@
|
||||
future. Until then, please leave your feedback here:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/firefly-iii/firefly-iii/discussions/5589">GitHub discussion</a></li>
|
||||
<li><a href="https://gitter.im/firefly-iii/firefly-iii">Gitter.im chat</a></li>
|
||||
<li><a href="mailto:james@firefly-iii.org">james@firefly-iii.org</a></li>
|
||||
<li><a :class="$q.dark.isActive ? 'text-red' : 'text-blue'" href="https://github.com/firefly-iii/firefly-iii/discussions/5589">GitHub discussion</a></li>
|
||||
<li><a :class="$q.dark.isActive ? 'text-red' : 'text-blue'" href="https://gitter.im/firefly-iii/firefly-iii">Gitter.im chat</a></li>
|
||||
<li><a :class="$q.dark.isActive ? 'text-red' : 'text-blue'" href="mailto:james@firefly-iii.org">james@firefly-iii.org</a></li>
|
||||
</ul>
|
||||
<p>
|
||||
Thanks again,<br>
|
||||
|
Loading…
Reference in New Issue
Block a user