mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Update budget box and rebuild frontend.
This commit is contained in:
parent
d403f4f9d3
commit
e3a71b64f8
85
app/Api/V2/Controllers/Model/Budget/ShowController.php
Normal file
85
app/Api/V2/Controllers/Model/Budget/ShowController.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/*
|
||||
* ShowController.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V2\Controllers\Model\Budget;
|
||||
|
||||
use FireflyIII\Api\V2\Controllers\Controller;
|
||||
use FireflyIII\Api\V2\Request\Generic\DateRequest;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\ConvertsExchangeRates;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
*/
|
||||
class ShowController extends Controller
|
||||
{
|
||||
use ConvertsExchangeRates;
|
||||
|
||||
private BudgetRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(BudgetRepositoryInterface::class);
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* TODO add URL
|
||||
*
|
||||
* @param DateRequest $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function budgeted(DateRequest $request, Budget $budget): JsonResponse
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->budgetedInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||
$converted = $this->cerSum(array_values($result));
|
||||
|
||||
return response()->json($converted);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* TODO add URL
|
||||
*
|
||||
* @param DateRequest $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function spent(DateRequest $request, Budget $budget): JsonResponse
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->spentInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||
$converted = $this->cerSum(array_values($result));
|
||||
|
||||
return response()->json($converted);
|
||||
}
|
||||
}
|
@ -25,7 +25,6 @@ namespace FireflyIII\Repositories\Budget;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use DB;
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
@ -752,4 +751,122 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
{
|
||||
return (int)$this->user->budgets()->max('order');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function spentInPeriodForBudget(Budget $budget, Carbon $start, Carbon $end): array
|
||||
{
|
||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
// exclude specific liabilities
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$repository->setUser($this->user);
|
||||
$subset = $repository->getAccountsByType(config('firefly.valid_liabilities'));
|
||||
$selection = new Collection();
|
||||
/** @var Account $account */
|
||||
foreach ($subset as $account) {
|
||||
if ('credit' === $repository->getMetaValue($account, 'liability_direction')) {
|
||||
$selection->push($account);
|
||||
}
|
||||
}
|
||||
|
||||
// start collecting:
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setUser($this->user)
|
||||
->setRange($start, $end)
|
||||
->excludeDestinationAccounts($selection)
|
||||
->setTypes([TransactionType::WITHDRAWAL])
|
||||
->setBudget($budget);
|
||||
|
||||
$journals = $collector->getExtractedJournals();
|
||||
$array = [];
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
'id' => (string)$currencyId,
|
||||
'name' => $journal['currency_name'],
|
||||
'symbol' => $journal['currency_symbol'],
|
||||
'code' => $journal['currency_code'],
|
||||
'decimal_places' => $journal['currency_decimal_places'],
|
||||
'sum' => '0',
|
||||
];
|
||||
$array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->negative($journal['amount']));
|
||||
|
||||
// also do foreign amount:
|
||||
$foreignId = (int)$journal['foreign_currency_id'];
|
||||
if (0 !== $foreignId) {
|
||||
$array[$foreignId] = $array[$foreignId] ?? [
|
||||
'id' => (string)$foreignId,
|
||||
'name' => $journal['foreign_currency_name'],
|
||||
'symbol' => $journal['foreign_currency_symbol'],
|
||||
'code' => $journal['foreign_currency_code'],
|
||||
'decimal_places' => $journal['foreign_currency_decimal_places'],
|
||||
'sum' => '0',
|
||||
];
|
||||
$array[$foreignId]['sum'] = bcadd($array[$foreignId]['sum'], app('steam')->negative($journal['foreign_amount']));
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function budgetedInPeriodForBudget(Budget $budget, Carbon $start, Carbon $end): array
|
||||
{
|
||||
Log::debug(sprintf('Now in budgetedInPeriod(#%d, "%s", "%s")', $budget->id, $start->format('Y-m-d'), $end->format('Y-m-d')));
|
||||
$return = [];
|
||||
/** @var BudgetLimitRepository $limitRepository */
|
||||
$limitRepository = app(BudgetLimitRepository::class);
|
||||
$limitRepository->setUser($this->user);
|
||||
|
||||
Log::debug(sprintf('Budget #%d: "%s"', $budget->id, $budget->name));
|
||||
$limits = $limitRepository->getBudgetLimits($budget, $start, $end);
|
||||
/** @var BudgetLimit $limit */
|
||||
foreach ($limits as $limit) {
|
||||
Log::debug(sprintf('Budget limit #%d', $limit->id));
|
||||
$currency = $limit->transactionCurrency;
|
||||
$return[$currency->id] = $return[$currency->id] ?? [
|
||||
'id' => (string)$currency->id,
|
||||
'name' => $currency->name,
|
||||
'symbol' => $currency->symbol,
|
||||
'code' => $currency->code,
|
||||
'decimal_places' => $currency->decimal_places,
|
||||
'sum' => '0',
|
||||
];
|
||||
// same period
|
||||
if ($limit->start_date->isSameDay($start) && $limit->end_date->isSameDay($end)) {
|
||||
$return[$currency->id]['sum'] = bcadd($return[$currency->id]['sum'], (string)$limit->amount);
|
||||
Log::debug(sprintf('Add full amount [1]: %s', $limit->amount));
|
||||
continue;
|
||||
}
|
||||
// limit is inside of date range
|
||||
if ($start->lte($limit->start_date) && $end->gte($limit->end_date)) {
|
||||
$return[$currency->id]['sum'] = bcadd($return[$currency->id]['sum'], (string)$limit->amount);
|
||||
Log::debug(sprintf('Add full amount [2]: %s', $limit->amount));
|
||||
continue;
|
||||
}
|
||||
$total = $limit->start_date->diffInDays($limit->end_date) + 1; // include the day itself.
|
||||
$days = $this->daysInOverlap($limit, $start, $end);
|
||||
$amount = bcmul(bcdiv((string)$limit->amount, (string)$total), (string)$days);
|
||||
$return[$currency->id]['sum'] = bcadd($return[$currency->id]['sum'], $amount);
|
||||
Log::debug(
|
||||
sprintf(
|
||||
'Amount per day: %s (%s over %d days). Total amount for %d days: %s',
|
||||
bcdiv((string)$limit->amount, (string)$total),
|
||||
$limit->amount,
|
||||
$total,
|
||||
$days,
|
||||
$amount
|
||||
)
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,16 @@ interface BudgetRepositoryInterface
|
||||
*/
|
||||
public function budgetedInPeriod(Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* Returns the amount that is budgeted in a period.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @return array
|
||||
*/
|
||||
public function budgetedInPeriodForBudget(Budget $budget, Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
@ -195,6 +205,16 @@ interface BudgetRepositoryInterface
|
||||
*/
|
||||
public function spentInPeriod(Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* Used in the v2 API to calculate the amount of money spent in a single budget..
|
||||
*
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function spentInPeriodForBudget(Budget $budget, Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
|
@ -11,14 +11,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.2",
|
||||
"@quasar/extras": "^1.15.10",
|
||||
"@quasar/extras": "^1.15.11",
|
||||
"apexcharts": "^3.32.1",
|
||||
"axios": "^0.21.1",
|
||||
"axios-cache-adapter": "^2.7.3",
|
||||
"core-js": "^3.6.5",
|
||||
"date-fns": "^2.28.0",
|
||||
"pinia": "^2.0.14",
|
||||
"quasar": "^2.11.5",
|
||||
"quasar": "^2.11.6",
|
||||
"vue": "3",
|
||||
"vue-i18n": "^9.0.0",
|
||||
"vue-router": "^4.0.0",
|
||||
|
32
frontend/src/api/v2/budgets/get.js
vendored
Normal file
32
frontend/src/api/v2/budgets/get.js
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
import {format} from "date-fns";
|
||||
|
||||
export default class Get {
|
||||
spent(identifier, start, end) {
|
||||
let url = '/api/v2/budgets/' + identifier + '/spent';
|
||||
let startStr = format(start, 'y-MM-dd');
|
||||
let endStr = format(end, 'y-MM-dd');
|
||||
return api.get(url, {params: {start: startStr, end: endStr}});
|
||||
}
|
||||
|
||||
}
|
@ -18,6 +18,11 @@
|
||||
- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!--
|
||||
TODO needs padding
|
||||
TODO needs better (hover) color.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="q-mt-sm q-mr-sm">
|
||||
<q-card bordered>
|
||||
@ -30,23 +35,45 @@
|
||||
</q-item>
|
||||
<q-separator/>
|
||||
<q-card-section>
|
||||
<div v-for="budget in budgets" :key="budget.id">
|
||||
<div class="row">
|
||||
<div v-for="(budget, index) in budgets" :key="budget.id">
|
||||
<div :class="'row bg-blue-1'">
|
||||
<div class="col">
|
||||
<router-link :to="{ name: 'budgets.show', params: {id: budget.id} }">
|
||||
{{ budget.name }}
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="limit in budget.limits">
|
||||
<div v-for="(limit, ii) in budget.limits">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<small>{{ formatAmount(limit.currency_code, limit.amount) }}</small><br>
|
||||
{{ formatDate(limit.start) }}<br>
|
||||
{{ formatDate(limit.end) }}
|
||||
<small>
|
||||
<span v-if="parseFloat(limit.amount) + parseFloat(limit.sum) > 0 || 0===parseFloat(limit.amount)">
|
||||
Spent {{ formatAmount(limit.currency_code, limit.sum) }}
|
||||
<span v-if="0 !== parseFloat(limit.amount)">
|
||||
from {{ formatAmount(limit.currency_code, limit.amount) }}
|
||||
</span>
|
||||
<span v-if="null !== limit.start && null !== limit.end">
|
||||
between
|
||||
{{ formatDate(limit.start) }} -
|
||||
{{ formatDate(limit.end) }}
|
||||
</span>
|
||||
</span>
|
||||
<span v-if="parseFloat(limit.amount) + parseFloat(limit.sum) < 0 && 0 !== parseFloat(limit.amount)">
|
||||
Overspent {{ formatAmount(limit.currency_code, (parseFloat(limit.amount) + parseFloat(limit.sum))*-1) }}
|
||||
<span v-if="0 !== parseFloat(limit.amount)">
|
||||
on {{ formatAmount(limit.currency_code, limit.amount) }}
|
||||
</span>
|
||||
<span v-if="null !== limit.start && null !== limit.end">
|
||||
between
|
||||
{{ formatDate(limit.start) }} -
|
||||
{{ formatDate(limit.end) }}
|
||||
</span>
|
||||
</span>
|
||||
</small>
|
||||
|
||||
</div>
|
||||
<div class="col">
|
||||
I am bar
|
||||
<q-linear-progress :indeterminate="budget.indeterminate" :value="limit.percentage" class="q-mt-md"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,7 +81,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
I am no budget<br/>
|
||||
No budget TODO<br/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
@ -66,6 +93,7 @@
|
||||
<script>
|
||||
import {useFireflyIIIStore} from "../../stores/fireflyiii";
|
||||
import List from '../../api/v2/budgets/list';
|
||||
import Get from '../../api/v2/budgets/get';
|
||||
import ListLimit from '../../api/v2/budget-limits/list';
|
||||
import format from "date-fns/format";
|
||||
|
||||
@ -73,6 +101,8 @@ export default {
|
||||
name: "BudgetBox",
|
||||
data() {
|
||||
return {
|
||||
altClassBudget: 'bg-blue-1',
|
||||
altClassBl: 'bg-red-2',
|
||||
budgets: [],
|
||||
locale: 'en-US',
|
||||
page: 1,
|
||||
@ -105,6 +135,7 @@ export default {
|
||||
return Intl.NumberFormat('en-US', {style: 'currency', currency: currencyCode}).format(amount);
|
||||
},
|
||||
loadBox: function () {
|
||||
console.log('loadBox');
|
||||
this.loadingBudgets = true;
|
||||
(new List).list(this.page).then((data) => {
|
||||
this.parseBudgets(data.data.data);
|
||||
@ -116,22 +147,96 @@ export default {
|
||||
this.loadingBudgets = false;
|
||||
this.processBudgets();
|
||||
});
|
||||
// load no-budget info.
|
||||
// todo go to next page as well.
|
||||
},
|
||||
parseBudgets: function (data) {
|
||||
console.log('parseBudgets');
|
||||
for (let i in data) {
|
||||
if (data.hasOwnProperty(i)) {
|
||||
const current = data[i];
|
||||
let entry = {
|
||||
id: parseInt(current.id),
|
||||
name: current.attributes.name,
|
||||
indeterminate: true,
|
||||
spent: [],
|
||||
limits: [],
|
||||
};
|
||||
this.budgets.push(
|
||||
{
|
||||
id: parseInt(current.id),
|
||||
name: current.attributes.name,
|
||||
limits: [],
|
||||
}
|
||||
entry
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
loadSpentInfo: function (id) {
|
||||
(new Get).spent(id, this.store.getRange.start, this.store.getRange.end).then((response) => {
|
||||
this.parseSpentInfo(response.data, id);
|
||||
});
|
||||
},
|
||||
parseSpentInfo: function (data, id) {
|
||||
// todo parse info and put in array.
|
||||
for (let i in this.budgets) {
|
||||
if (this.budgets.hasOwnProperty(i)) {
|
||||
let budget = this.budgets[i];
|
||||
if (budget.id === id) {
|
||||
for (let ii in budget.limits) {
|
||||
if (budget.limits.hasOwnProperty(ii)) {
|
||||
let limit = budget.limits[ii];
|
||||
for (let iii in data) {
|
||||
if (data.hasOwnProperty(iii)) {
|
||||
let spent = data[iii];
|
||||
if (spent.code === limit.currency_code) {
|
||||
limit.sum = spent.sum;
|
||||
let pct = (spent.sum * -1) / limit.amount;
|
||||
limit.percentage = Math.min(Math.max(0, pct), 1);
|
||||
budget.indeterminate = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let processed= false;
|
||||
for (let i in data) {
|
||||
let found = false;
|
||||
if (data.hasOwnProperty(i)) {
|
||||
let spent = data[i];
|
||||
for (let ii in budget.limits) {
|
||||
if (budget.limits.hasOwnProperty(ii)) {
|
||||
let limit = budget.limits[ii];
|
||||
if (spent.code === limit.currency_code) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
processed = true;
|
||||
budget.indeterminate = false;
|
||||
console.log();
|
||||
budget.limits.push(
|
||||
{
|
||||
id: 0,
|
||||
sum: spent.sum,
|
||||
amount: 0,
|
||||
currency_code: spent.code,
|
||||
start: null,
|
||||
end: null,
|
||||
// TODO calculate percentage from spent.
|
||||
percentage: 0,
|
||||
overspent: false,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!processed) {
|
||||
// limit but no expenses
|
||||
budget.indeterminate = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
processBudgets: function () {
|
||||
for (let i in this.budgets) {
|
||||
if (this.budgets.hasOwnProperty(i)) {
|
||||
@ -141,25 +246,30 @@ export default {
|
||||
// todo must also be paginated because you never know
|
||||
(new ListLimit).list(current.id, this.store.getRange.start, this.store.getRange.end, 1).then((data) => {
|
||||
this.parseBudgetLimits(data.data.data, current);
|
||||
this.loadSpentInfo(current.id);
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log('Processing...');
|
||||
},
|
||||
parseBudgetLimits: function (data, budget) {
|
||||
console.log('Parse for ' + budget.name);
|
||||
//console.log('Parse for ' + budget.name);
|
||||
for (let i in data) {
|
||||
if (data.hasOwnProperty(i)) {
|
||||
const current = data[i];
|
||||
budget.limits.push(
|
||||
{
|
||||
id: parseInt(current.id),
|
||||
amount: current.attributes.amount,
|
||||
currency_code: current.attributes.currency_code,
|
||||
start: new Date(current.attributes.start),
|
||||
end: new Date(current.attributes.end),
|
||||
percentage: 0,
|
||||
sum: 0,
|
||||
overspent: false,
|
||||
}
|
||||
);
|
||||
console.log(current);
|
||||
//console.log(current);
|
||||
//console.log('A ' + new Date(current.attributes.start));
|
||||
//console.log('B ' + this.store.getRange.start);
|
||||
}
|
||||
|
@ -1437,10 +1437,10 @@
|
||||
core-js "^3.6.5"
|
||||
core-js-compat "^3.6.5"
|
||||
|
||||
"@quasar/extras@^1.15.10":
|
||||
version "1.15.10"
|
||||
resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.15.10.tgz#515298377249765f9ca0027f6843f6a8e61efcd8"
|
||||
integrity sha512-6w8e+wPNfcWhzW43tlnJPHOrcNwAgaaNJ3zBz8k+BMqpenA3fHZhFhxCYEVRZVqPFE2IK/8nRiPBp4t9xlW5tA==
|
||||
"@quasar/extras@^1.15.11":
|
||||
version "1.15.11"
|
||||
resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.15.11.tgz#a54d60b14446b850a1e5fccab3f381a2e447a73f"
|
||||
integrity sha512-EEXL10EJQmL9jNs5fp0Kd/nyonG8hTODolj+qpYNPG3qEEoy3txr05Pdmp9qJYaXIzP9rOS9FGhFe9Mnq6MBBg==
|
||||
|
||||
"@quasar/fastclick@1.1.5":
|
||||
version "1.1.5"
|
||||
@ -5388,10 +5388,10 @@ qs@6.9.7:
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe"
|
||||
integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==
|
||||
|
||||
quasar@^2.11.5:
|
||||
version "2.11.5"
|
||||
resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.11.5.tgz#c8a74c8f7bf24b16cdf51f1257df1a38b68fdfb8"
|
||||
integrity sha512-rX4Rwp9wlCeB9A6RQUxEx/q84LMBVVm6WTECkoq8r/+NBgl9aHVexzZQBnRn2i61D0BJpdX5VcnMxAnJkTx/kA==
|
||||
quasar@^2.11.6:
|
||||
version "2.11.6"
|
||||
resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.11.6.tgz#9d200a0de44dc235915fee3ea3ff5673045fdcbc"
|
||||
integrity sha512-jJniWqTtfLHDuAT1YNx6ZZdZU7nM8vwscyM7IxmijaHq+fDpgjaujDQUlJWgn5ZMkqe3Yvg93MgSxjcL71oJIw==
|
||||
|
||||
queue-microtask@^1.2.2:
|
||||
version "1.2.3"
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
BIN
public/v3/fonts/fa-brands-400.7be2266f.woff2
Normal file
BIN
public/v3/fonts/fa-brands-400.7be2266f.woff2
Normal file
Binary file not shown.
BIN
public/v3/fonts/fa-regular-400.14640490.ttf
Normal file
BIN
public/v3/fonts/fa-regular-400.14640490.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/v3/fonts/fa-regular-400.8bedd7cf.woff2
Normal file
BIN
public/v3/fonts/fa-regular-400.8bedd7cf.woff2
Normal file
Binary file not shown.
BIN
public/v3/fonts/fa-solid-900.2877d54f.ttf
Normal file
BIN
public/v3/fonts/fa-solid-900.2877d54f.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/v3/fonts/fa-solid-900.bdb9e232.woff2
Normal file
BIN
public/v3/fonts/fa-solid-900.bdb9e232.woff2
Normal file
Binary file not shown.
BIN
public/v3/fonts/fa-v4compatibility.6c0a7b77.ttf
Normal file
BIN
public/v3/fonts/fa-v4compatibility.6c0a7b77.ttf
Normal file
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><base href=/v3/ ><title>Firefly III</title><meta charset=utf-8><meta content="Personal finances manager" name=description><meta content="telephone=no" name=format-detection><meta content=no name=msapplication-tap-highlight><meta content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width" name=viewport><link href=favicon-32x32.png rel=icon sizes=32x32 type=image/png><link href=favicon-16x16.png rel=icon sizes=16x16 type=image/png><link href=maskable76.png rel=apple-touch-icon sizes=76x76><link href=maskable120.png rel=apple-touch-icon sizes=120x120><link href=maskable152.png rel=apple-touch-icon sizes=152x152><link href=apple-touch-icon.png rel=apple-touch-icon sizes=180x180><link color=#3c8dbc href=safari-pinned-tab.svg rel=mask-icon><link href=maskable192.png rel=icon sizes=192x192><link href=maskable128.png rel=icon sizes=128x128><link href=manifest.webmanifest rel=manifest><meta content=#1e6581 name=msapplication-TileColor><meta content=maskable512.png name=msapplication-TileImage><meta content=no name=msapplication-tap-highlight><meta content="Firefly III" name=application-name><meta content="noindex, nofollow, noarchive, noodp, NoImageIndex, noydir" name=robots><meta content=yes name=apple-mobile-web-app-capable><meta content="Firefly III" name=apple-mobile-web-app-title><meta content="Firefly III" name=application-name><meta content=#3c8dbc name=msapplication-TileColor><meta content="mstile-144x144.png?v=3e8AboOwbd" name=msapplication-TileImage><meta content=#3c8dbc name=theme-color><script defer src=/v3/js/vendor.57fa50ec.js></script><script defer src=/v3/js/app.89886383.js></script><link href=/v3/css/vendor.4da34a2f.css rel=stylesheet><link href=/v3/css/app.50c7ba73.css rel=stylesheet></head><body><div id=q-app></div></body></html>
|
||||
<!DOCTYPE html><html><head><base href=/v3/ ><title>Firefly III</title><meta charset=utf-8><meta content="Personal finances manager" name=description><meta content="telephone=no" name=format-detection><meta content=no name=msapplication-tap-highlight><meta content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width" name=viewport><link href=favicon-32x32.png rel=icon sizes=32x32 type=image/png><link href=favicon-16x16.png rel=icon sizes=16x16 type=image/png><link href=maskable76.png rel=apple-touch-icon sizes=76x76><link href=maskable120.png rel=apple-touch-icon sizes=120x120><link href=maskable152.png rel=apple-touch-icon sizes=152x152><link href=apple-touch-icon.png rel=apple-touch-icon sizes=180x180><link color=#3c8dbc href=safari-pinned-tab.svg rel=mask-icon><link href=maskable192.png rel=icon sizes=192x192><link href=maskable128.png rel=icon sizes=128x128><link href=manifest.webmanifest rel=manifest><meta content=#1e6581 name=msapplication-TileColor><meta content=maskable512.png name=msapplication-TileImage><meta content=no name=msapplication-tap-highlight><meta content="Firefly III" name=application-name><meta content="noindex, nofollow, noarchive, noodp, NoImageIndex, noydir" name=robots><meta content=yes name=apple-mobile-web-app-capable><meta content="Firefly III" name=apple-mobile-web-app-title><meta content="Firefly III" name=application-name><meta content=#3c8dbc name=msapplication-TileColor><meta content="mstile-144x144.png?v=3e8AboOwbd" name=msapplication-TileImage><meta content=#3c8dbc name=theme-color><script defer src=/v3/js/vendor.aba07782.js></script><script defer src=/v3/js/app.8c79411c.js></script><link href=/v3/css/vendor.973c97fc.css rel=stylesheet><link href=/v3/css/app.50c7ba73.css rel=stylesheet></head><body><div id=q-app></div></body></html>
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
"use strict";(globalThis["webpackChunkfirefly_iii"]=globalThis["webpackChunkfirefly_iii"]||[]).push([[2306],{2306:(e,t,a)=>{a.r(t),a.d(t,{default:()=>D});var s=a(9835);const o={key:0},l={key:1};function n(e,t,a,n,i,r){const c=(0,s.up)("NewUser"),u=(0,s.up)("Dashboard"),d=(0,s.up)("q-page");return(0,s.wg)(),(0,s.j4)(d,null,{default:(0,s.w5)((()=>[0===e.assetCount?((0,s.wg)(),(0,s.iD)("div",o,[(0,s.Wm)(c,{onCreatedAccounts:e.refreshThenCount},null,8,["onCreatedAccounts"])])):(0,s.kq)("",!0),e.assetCount>0?((0,s.wg)(),(0,s.iD)("div",l,[(0,s.Wm)(u)])):(0,s.kq)("",!0)])),_:1})}var i=a(3836),r=a(3555);const c={class:"row"},u={class:"col-xl-4 col-lg-4 col-md-6 q-pr-sm"},d={class:"col-xl-4 col-lg-4 col-md-6 q-px-sm"},m={class:"col-xl-4 col-lg-4 col-md-6 q-pl-sm"},p={class:"row"},h={class:"col-12 q-pt-sm q-pb-sm"},f={class:"row"},g={class:"col"},b={class:"row"},w={class:"col"},_=(0,s._)("div",{class:"col"}," Category box ",-1),v=(0,s._)("div",{class:"row"},[(0,s._)("div",{class:"col"}," Expense Box "),(0,s._)("div",{class:"col"}," Revenue Box ")],-1),y=(0,s._)("div",{class:"row"},[(0,s._)("div",{class:"col"}," Piggy box "),(0,s._)("div",{class:"col"}," Bill box ")],-1);function C(e,t,a,o,l,n){const i=(0,s.up)("BillInsightBox"),r=(0,s.up)("SpendInsightBox"),C=(0,s.up)("NetWorthInsightBox"),x=(0,s.up)("AccountChart"),q=(0,s.up)("TransactionLists"),W=(0,s.up)("BudgetBox"),B=(0,s.up)("q-fab-action"),A=(0,s.up)("q-fab"),P=(0,s.up)("q-page-sticky"),k=(0,s.up)("q-page");return(0,s.wg)(),(0,s.j4)(k,{class:"q-ma-md"},{default:(0,s.w5)((()=>[(0,s._)("div",c,[(0,s._)("div",u,[(0,s.Wm)(i)]),(0,s._)("div",d,[(0,s.Wm)(r)]),(0,s._)("div",m,[(0,s.Wm)(C)])]),(0,s._)("div",p,[(0,s._)("div",h,[(0,s.Wm)(x)])]),(0,s._)("div",f,[(0,s._)("div",g,[(0,s.Wm)(q)])]),(0,s._)("div",b,[(0,s._)("div",w,[(0,s.Wm)(W)]),_]),v,y,(0,s.Wm)(P,{offset:[18,18],position:"bottom-right"},{default:(0,s.w5)((()=>[(0,s.Wm)(A,{color:"green",direction:"up",icon:"fas fa-chevron-up",label:"Actions","label-position":"left",square:"","vertical-actions-align":"right"},{default:(0,s.w5)((()=>[(0,s.Wm)(B,{label:e.$t("firefly.new_budget"),to:{name:"budgets.create"},color:"primary",icon:"fas fa-chart-pie",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.new_asset_account"),to:{name:"accounts.create",params:{type:"asset"}},color:"primary",icon:"far fa-money-bill-alt",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.newTransfer"),to:{name:"transactions.create",params:{type:"transfer"}},color:"primary",icon:"fas fa-exchange-alt",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.newDeposit"),to:{name:"transactions.create",params:{type:"deposit"}},color:"primary",icon:"fas fa-long-arrow-alt-right",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.newWithdrawal"),to:{name:"transactions.create",params:{type:"withdrawal"}},color:"primary",icon:"fas fa-long-arrow-alt-left",square:""},null,8,["label","to"])])),_:1})])),_:1})])),_:1})}const x={name:"Dashboard",components:{TransactionLists:(0,s.RC)((()=>a.e(936).then(a.bind(a,936)))),AccountChart:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(7700)]).then(a.bind(a,7700)))),NetWorthInsightBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(4777)]).then(a.bind(a,4777)))),BillInsightBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(7889)]).then(a.bind(a,7889)))),SpendInsightBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(8135)]).then(a.bind(a,8135)))),BudgetBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(7886)]).then(a.bind(a,8482))))}};var q=a(1639),W=a(9885),B=a(3388),A=a(9361),P=a(935),k=a(9984),Z=a.n(k);const I=(0,q.Z)(x,[["render",C]]),R=I;Z()(x,"components",{QPage:W.Z,QPageSticky:B.Z,QFab:A.Z,QFabAction:P.Z});const $=(0,s.aZ)({name:"PageIndex",components:{Dashboard:R,NewUser:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(3064),a.e(5389)]).then(a.bind(a,5389))))},data(){return{assetCount:1,$store:null}},mounted(){this.countAssetAccounts()},methods:{refreshThenCount:function(){this.$store=(0,r.S)(),this.$store.refreshCacheKey(),this.countAssetAccounts()},countAssetAccounts:function(){let e=new i.Z;e.list("asset",1,this.getCacheKey).then((e=>{this.assetCount=parseInt(e.data.meta.pagination.total)}))}}}),T=(0,q.Z)($,[["render",n]]),D=T;Z()($,"components",{QPage:W.Z})}}]);
|
||||
"use strict";(globalThis["webpackChunkfirefly_iii"]=globalThis["webpackChunkfirefly_iii"]||[]).push([[2306],{2306:(e,t,a)=>{a.r(t),a.d(t,{default:()=>D});var s=a(9835);const o={key:0},l={key:1};function n(e,t,a,n,i,r){const c=(0,s.up)("NewUser"),u=(0,s.up)("Dashboard"),d=(0,s.up)("q-page");return(0,s.wg)(),(0,s.j4)(d,null,{default:(0,s.w5)((()=>[0===e.assetCount?((0,s.wg)(),(0,s.iD)("div",o,[(0,s.Wm)(c,{onCreatedAccounts:e.refreshThenCount},null,8,["onCreatedAccounts"])])):(0,s.kq)("",!0),e.assetCount>0?((0,s.wg)(),(0,s.iD)("div",l,[(0,s.Wm)(u)])):(0,s.kq)("",!0)])),_:1})}var i=a(3836),r=a(3555);const c={class:"row"},u={class:"col-xl-4 col-lg-4 col-md-6 q-pr-sm"},d={class:"col-xl-4 col-lg-4 col-md-6 q-px-sm"},m={class:"col-xl-4 col-lg-4 col-md-6 q-pl-sm"},p={class:"row"},h={class:"col-12 q-pt-sm q-pb-sm"},f={class:"row"},g={class:"col"},b={class:"row"},w={class:"col"},_=(0,s._)("div",{class:"col"}," Category box ",-1),v=(0,s._)("div",{class:"row"},[(0,s._)("div",{class:"col"}," Expense Box "),(0,s._)("div",{class:"col"}," Revenue Box ")],-1),y=(0,s._)("div",{class:"row"},[(0,s._)("div",{class:"col"}," Piggy box "),(0,s._)("div",{class:"col"}," Bill box ")],-1);function C(e,t,a,o,l,n){const i=(0,s.up)("BillInsightBox"),r=(0,s.up)("SpendInsightBox"),C=(0,s.up)("NetWorthInsightBox"),x=(0,s.up)("AccountChart"),q=(0,s.up)("TransactionLists"),W=(0,s.up)("BudgetBox"),B=(0,s.up)("q-fab-action"),A=(0,s.up)("q-fab"),P=(0,s.up)("q-page-sticky"),k=(0,s.up)("q-page");return(0,s.wg)(),(0,s.j4)(k,{class:"q-ma-md"},{default:(0,s.w5)((()=>[(0,s._)("div",c,[(0,s._)("div",u,[(0,s.Wm)(i)]),(0,s._)("div",d,[(0,s.Wm)(r)]),(0,s._)("div",m,[(0,s.Wm)(C)])]),(0,s._)("div",p,[(0,s._)("div",h,[(0,s.Wm)(x)])]),(0,s._)("div",f,[(0,s._)("div",g,[(0,s.Wm)(q)])]),(0,s._)("div",b,[(0,s._)("div",w,[(0,s.Wm)(W)]),_]),v,y,(0,s.Wm)(P,{offset:[18,18],position:"bottom-right"},{default:(0,s.w5)((()=>[(0,s.Wm)(A,{color:"green",direction:"up",icon:"fas fa-chevron-up",label:"Actions","label-position":"left",square:"","vertical-actions-align":"right"},{default:(0,s.w5)((()=>[(0,s.Wm)(B,{label:e.$t("firefly.new_budget"),to:{name:"budgets.create"},color:"primary",icon:"fas fa-chart-pie",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.new_asset_account"),to:{name:"accounts.create",params:{type:"asset"}},color:"primary",icon:"far fa-money-bill-alt",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.newTransfer"),to:{name:"transactions.create",params:{type:"transfer"}},color:"primary",icon:"fas fa-exchange-alt",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.newDeposit"),to:{name:"transactions.create",params:{type:"deposit"}},color:"primary",icon:"fas fa-long-arrow-alt-right",square:""},null,8,["label","to"]),(0,s.Wm)(B,{label:e.$t("firefly.newWithdrawal"),to:{name:"transactions.create",params:{type:"withdrawal"}},color:"primary",icon:"fas fa-long-arrow-alt-left",square:""},null,8,["label","to"])])),_:1})])),_:1})])),_:1})}const x={name:"Dashboard",components:{TransactionLists:(0,s.RC)((()=>a.e(936).then(a.bind(a,936)))),AccountChart:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(7700)]).then(a.bind(a,7700)))),NetWorthInsightBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(4777)]).then(a.bind(a,4777)))),BillInsightBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(7889)]).then(a.bind(a,7889)))),SpendInsightBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(8135)]).then(a.bind(a,8135)))),BudgetBox:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(3922)]).then(a.bind(a,3922))))}};var q=a(1639),W=a(9885),B=a(3388),A=a(9361),P=a(935),k=a(9984),Z=a.n(k);const I=(0,q.Z)(x,[["render",C]]),R=I;Z()(x,"components",{QPage:W.Z,QPageSticky:B.Z,QFab:A.Z,QFabAction:P.Z});const $=(0,s.aZ)({name:"PageIndex",components:{Dashboard:R,NewUser:(0,s.RC)((()=>Promise.all([a.e(4736),a.e(3064),a.e(5389)]).then(a.bind(a,5389))))},data(){return{assetCount:1,$store:null}},mounted(){this.countAssetAccounts()},methods:{refreshThenCount:function(){this.$store=(0,r.S)(),this.$store.refreshCacheKey(),this.countAssetAccounts()},countAssetAccounts:function(){let e=new i.Z;e.list("asset",1,this.getCacheKey).then((e=>{this.assetCount=parseInt(e.data.meta.pagination.total)}))}}}),T=(0,q.Z)($,[["render",n]]),D=T;Z()($,"components",{QPage:W.Z})}}]);
|
1
public/v3/js/3922.0d52278f.js
vendored
Normal file
1
public/v3/js/3922.0d52278f.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
"use strict";(globalThis["webpackChunkfirefly_iii"]=globalThis["webpackChunkfirefly_iii"]||[]).push([[4647],{4647:(t,e,a)=>{a.r(e),a.d(e,{default:()=>P});var i=a(9835),s=a(6970);const r=(0,i.Uk)("Edit"),o=(0,i.Uk)("Delete");function n(t,e,a,n,l,p){const u=(0,i.up)("q-th"),g=(0,i.up)("q-tr"),d=(0,i.up)("router-link"),h=(0,i.up)("q-td"),m=(0,i.up)("q-item-label"),c=(0,i.up)("q-item-section"),w=(0,i.up)("q-item"),f=(0,i.up)("q-list"),b=(0,i.up)("q-btn-dropdown"),y=(0,i.up)("q-table"),_=(0,i.up)("q-page"),k=(0,i.Q2)("close-popup");return(0,i.wg)(),(0,i.j4)(_,null,{default:(0,i.w5)((()=>[(0,i.Wm)(y,{pagination:l.pagination,"onUpdate:pagination":e[0]||(e[0]=t=>l.pagination=t),columns:l.columns,loading:l.loading,rows:l.rows,title:t.$t("firefly.object_groups"),class:"q-ma-md","row-key":"id",onRequest:p.onRequest},{header:(0,i.w5)((t=>[(0,i.Wm)(g,{props:t},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t.cols,(e=>((0,i.wg)(),(0,i.j4)(u,{key:e.name,props:t},{default:(0,i.w5)((()=>[(0,i.Uk)((0,s.zw)(e.label),1)])),_:2},1032,["props"])))),128))])),_:2},1032,["props"])])),body:(0,i.w5)((t=>[(0,i.Wm)(g,{props:t},{default:(0,i.w5)((()=>[(0,i.Wm)(h,{key:"title",props:t},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{to:{name:"groups.show",params:{id:t.row.id}},class:"text-primary"},{default:(0,i.w5)((()=>[(0,i.Uk)((0,s.zw)(t.row.title),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,i.Wm)(h,{key:"menu",props:t},{default:(0,i.w5)((()=>[(0,i.Wm)(b,{color:"primary",label:"Actions",size:"sm"},{default:(0,i.w5)((()=>[(0,i.Wm)(f,null,{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(w,{to:{name:"groups.edit",params:{id:t.row.id}},clickable:""},{default:(0,i.w5)((()=>[(0,i.Wm)(c,null,{default:(0,i.w5)((()=>[(0,i.Wm)(m,null,{default:(0,i.w5)((()=>[r])),_:1})])),_:1})])),_:2},1032,["to"])),[[k]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(w,{clickable:"",onClick:e=>p.deleteGroup(t.row.id,t.row.title)},{default:(0,i.w5)((()=>[(0,i.Wm)(c,null,{default:(0,i.w5)((()=>[(0,i.Wm)(m,null,{default:(0,i.w5)((()=>[o])),_:1})])),_:1})])),_:2},1032,["onClick"])),[[k]])])),_:2},1024)])),_:2},1024)])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["pagination","columns","loading","rows","title","onRequest"])])),_:1})}var l=a(7913),p=a(1569);class u{list(t,e,a){let i="/api/v1/object_groups";return p.api.get(i,{params:{page:e,cache:a,type:t}})}}var g=a(3555);const d={name:"Index",watch:{$route(t){"groups.index"===t.name&&(this.page=1,this.updateBreadcrumbs(),this.triggerUpdate())}},data(){return{rows:[],pagination:{sortBy:"desc",descending:!1,page:1,rowsPerPage:5,rowsNumber:100},loading:!1,columns:[{name:"title",label:"Title",field:"title",align:"left"},{name:"menu",label:" ",field:"menu",align:"right"}],store:null}},computed:{},created(){this.pagination.rowsPerPage=this.getListPageSize,this.store=(0,g.S)()},mounted(){this.type=this.$route.params.type,null!==this.store.getRange.start&&null!==this.store.getRange.end||this.store.$onAction((({name:t,$store:e,args:a,after:i,onError:s})=>{i((e=>{"setRange"===t&&(this.range=e,this.triggerUpdate())}))})),null!==this.store.getRange.start&&null!==this.store.getRange.end&&(this.range={start:this.store.getRange.start,end:this.store.getRange.end},this.triggerUpdate())},methods:{deleteGroup:function(t,e){this.$q.dialog({title:"Confirm",message:'Do you want to delete group "'+e+'"? Any resources in this group will be saved.',cancel:!0,persistent:!0}).onOk((()=>{this.destroyGroup(t)}))},destroyGroup:function(t){new l.Z("object_groups").destroy(t).then((()=>{this.store.refreshCacheKey(),this.triggerUpdate()}))},updateBreadcrumbs:function(){this.$route.meta.pageTitle="firefly.groups",this.$route.meta.breadcrumbs=[{title:"groups"}]},onRequest:function(t){this.page=t.pagination.page,this.triggerUpdate()},triggerUpdate:function(){if(this.loading)return;if(null===this.range.start||null===this.range.end)return;this.loading=!0;const t=new u;this.rows=[],t.list(this.page,this.getCacheKey).then((t=>{this.pagination.rowsPerPage=t.data.meta.pagination.per_page,this.pagination.rowsNumber=t.data.meta.pagination.total,this.pagination.page=this.page;for(let e in t.data.data)if(t.data.data.hasOwnProperty(e)){let a=t.data.data[e],i={id:a.id,title:a.attributes.title};this.rows.push(i)}this.loading=!1}))}}};var h=a(1639),m=a(9885),c=a(9497),w=a(3532),f=a(1682),b=a(7220),y=a(2045),_=a(3246),k=a(490),q=a(1233),Z=a(3115),W=a(2146),Q=a(9984),R=a.n(Q);const U=(0,h.Z)(d,[["render",n]]),P=U;R()(d,"components",{QPage:m.Z,QTable:c.Z,QTr:w.Z,QTh:f.Z,QTd:b.Z,QBtnDropdown:y.Z,QList:_.Z,QItem:k.Z,QItemSection:q.Z,QItemLabel:Z.Z}),R()(d,"directives",{ClosePopup:W.Z})}}]);
|
||||
"use strict";(globalThis["webpackChunkfirefly_iii"]=globalThis["webpackChunkfirefly_iii"]||[]).push([[4647],{4647:(t,e,a)=>{a.r(e),a.d(e,{default:()=>P});var i=a(9835),s=a(6970);const r=(0,i.Uk)("Edit"),o=(0,i.Uk)("Delete");function n(t,e,a,n,l,p){const u=(0,i.up)("q-th"),g=(0,i.up)("q-tr"),d=(0,i.up)("router-link"),h=(0,i.up)("q-td"),m=(0,i.up)("q-item-label"),c=(0,i.up)("q-item-section"),w=(0,i.up)("q-item"),f=(0,i.up)("q-list"),b=(0,i.up)("q-btn-dropdown"),y=(0,i.up)("q-table"),_=(0,i.up)("q-page"),k=(0,i.Q2)("close-popup");return(0,i.wg)(),(0,i.j4)(_,null,{default:(0,i.w5)((()=>[(0,i.Wm)(y,{pagination:l.pagination,"onUpdate:pagination":e[0]||(e[0]=t=>l.pagination=t),columns:l.columns,loading:l.loading,rows:l.rows,title:t.$t("firefly.object_groups"),class:"q-ma-md","row-key":"id",onRequest:p.onRequest},{header:(0,i.w5)((t=>[(0,i.Wm)(g,{props:t},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t.cols,(e=>((0,i.wg)(),(0,i.j4)(u,{key:e.name,props:t},{default:(0,i.w5)((()=>[(0,i.Uk)((0,s.zw)(e.label),1)])),_:2},1032,["props"])))),128))])),_:2},1032,["props"])])),body:(0,i.w5)((t=>[(0,i.Wm)(g,{props:t},{default:(0,i.w5)((()=>[(0,i.Wm)(h,{key:"title",props:t},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{to:{name:"groups.show",params:{id:t.row.id}},class:"text-primary"},{default:(0,i.w5)((()=>[(0,i.Uk)((0,s.zw)(t.row.title),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,i.Wm)(h,{key:"menu",props:t},{default:(0,i.w5)((()=>[(0,i.Wm)(b,{color:"primary",label:"Actions",size:"sm"},{default:(0,i.w5)((()=>[(0,i.Wm)(f,null,{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(w,{to:{name:"groups.edit",params:{id:t.row.id}},clickable:""},{default:(0,i.w5)((()=>[(0,i.Wm)(c,null,{default:(0,i.w5)((()=>[(0,i.Wm)(m,null,{default:(0,i.w5)((()=>[r])),_:1})])),_:1})])),_:2},1032,["to"])),[[k]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(w,{clickable:"",onClick:e=>p.deleteGroup(t.row.id,t.row.title)},{default:(0,i.w5)((()=>[(0,i.Wm)(c,null,{default:(0,i.w5)((()=>[(0,i.Wm)(m,null,{default:(0,i.w5)((()=>[o])),_:1})])),_:1})])),_:2},1032,["onClick"])),[[k]])])),_:2},1024)])),_:2},1024)])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["pagination","columns","loading","rows","title","onRequest"])])),_:1})}var l=a(7913),p=a(1569);class u{list(t,e,a){let i="/api/v1/object_groups";return p.api.get(i,{params:{page:e,cache:a,type:t}})}}var g=a(3555);const d={name:"Index",watch:{$route(t){"groups.index"===t.name&&(this.page=1,this.updateBreadcrumbs(),this.triggerUpdate())}},data(){return{rows:[],pagination:{sortBy:"desc",descending:!1,page:1,rowsPerPage:5,rowsNumber:100},loading:!1,columns:[{name:"title",label:"Title",field:"title",align:"left"},{name:"menu",label:" ",field:"menu",align:"right"}],store:null}},computed:{},created(){this.pagination.rowsPerPage=this.getListPageSize,this.store=(0,g.S)()},mounted(){this.type=this.$route.params.type,null!==this.store.getRange.start&&null!==this.store.getRange.end||this.store.$onAction((({name:t,$store:e,args:a,after:i,onError:s})=>{i((e=>{"setRange"===t&&(this.range=e,this.triggerUpdate())}))})),null!==this.store.getRange.start&&null!==this.store.getRange.end&&(this.range={start:this.store.getRange.start,end:this.store.getRange.end},this.triggerUpdate())},methods:{deleteGroup:function(t,e){this.$q.dialog({title:"Confirm",message:'Do you want to delete group "'+e+'"? Any resources in this group will be saved.',cancel:!0,persistent:!0}).onOk((()=>{this.destroyGroup(t)}))},destroyGroup:function(t){new l.Z("object_groups").destroy(t).then((()=>{this.store.refreshCacheKey(),this.triggerUpdate()}))},updateBreadcrumbs:function(){this.$route.meta.pageTitle="firefly.groups",this.$route.meta.breadcrumbs=[{title:"groups"}]},onRequest:function(t){this.page=t.pagination.page,this.triggerUpdate()},triggerUpdate:function(){if(this.loading)return;if(null===this.range.start||null===this.range.end)return;this.loading=!0;const t=new u;this.rows=[],t.list(this.page,this.getCacheKey).then((t=>{this.pagination.rowsPerPage=t.data.meta.pagination.per_page,this.pagination.rowsNumber=t.data.meta.pagination.total,this.pagination.page=this.page;for(let e in t.data.data)if(t.data.data.hasOwnProperty(e)){let a=t.data.data[e],i={id:a.id,title:a.attributes.title};this.rows.push(i)}this.loading=!1}))}}};var h=a(1639),m=a(9885),c=a(2429),w=a(3532),f=a(1682),b=a(7220),y=a(2045),_=a(3246),k=a(490),q=a(1233),Z=a(3115),W=a(2146),Q=a(9984),R=a.n(Q);const U=(0,h.Z)(d,[["render",n]]),P=U;R()(d,"components",{QPage:m.Z,QTable:c.Z,QTr:w.Z,QTh:f.Z,QTd:b.Z,QBtnDropdown:y.Z,QList:_.Z,QItem:k.Z,QItemSection:q.Z,QItemLabel:Z.Z}),R()(d,"directives",{ClosePopup:W.Z})}}]);
|
@ -1 +1 @@
|
||||
"use strict";(globalThis["webpackChunkfirefly_iii"]=globalThis["webpackChunkfirefly_iii"]||[]).push([[5114],{5114:(e,t,a)=>{a.r(t),a.d(t,{default:()=>$});var o=a(9835),i=a(6970);const n=(0,o.Uk)("Edit"),s=(0,o.Uk)("Delete");function l(e,t,a,l,r,p){const u=(0,o.up)("q-th"),d=(0,o.up)("q-tr"),g=(0,o.up)("router-link"),w=(0,o.up)("q-td"),h=(0,o.up)("q-item-label"),c=(0,o.up)("q-item-section"),m=(0,o.up)("q-item"),f=(0,o.up)("q-list"),b=(0,o.up)("q-btn-dropdown"),k=(0,o.up)("q-table"),y=(0,o.up)("q-fab-action"),q=(0,o.up)("q-fab"),_=(0,o.up)("q-page-sticky"),W=(0,o.up)("q-page"),Z=(0,o.Q2)("close-popup");return(0,o.wg)(),(0,o.j4)(W,null,{default:(0,o.w5)((()=>[(0,o.Wm)(k,{pagination:r.pagination,"onUpdate:pagination":t[0]||(t[0]=e=>r.pagination=e),columns:r.columns,loading:r.loading,rows:r.rows,title:e.$t("firefly.webhooks"),class:"q-ma-md","row-key":"id",onRequest:p.onRequest},{header:(0,o.w5)((e=>[(0,o.Wm)(d,{props:e},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.cols,(t=>((0,o.wg)(),(0,o.j4)(u,{key:t.name,props:e},{default:(0,o.w5)((()=>[(0,o.Uk)((0,i.zw)(t.label),1)])),_:2},1032,["props"])))),128))])),_:2},1032,["props"])])),body:(0,o.w5)((e=>[(0,o.Wm)(d,{props:e},{default:(0,o.w5)((()=>[(0,o.Wm)(w,{key:"title",props:e},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{to:{name:"webhooks.show",params:{id:e.row.id}},class:"text-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,i.zw)(e.row.title),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,o.Wm)(w,{key:"menu",props:e},{default:(0,o.w5)((()=>[(0,o.Wm)(b,{color:"primary",label:"Actions",size:"sm"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.wy)(((0,o.wg)(),(0,o.j4)(m,{to:{name:"webhooks.edit",params:{id:e.row.id}},clickable:""},{default:(0,o.w5)((()=>[(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[n])),_:1})])),_:1})])),_:2},1032,["to"])),[[Z]]),(0,o.wy)(((0,o.wg)(),(0,o.j4)(m,{clickable:"",onClick:t=>p.deleteWebhook(e.row.id,e.row.title)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[s])),_:1})])),_:1})])),_:2},1032,["onClick"])),[[Z]])])),_:2},1024)])),_:2},1024)])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["pagination","columns","loading","rows","title","onRequest"]),(0,o.Wm)(_,{offset:[18,18],position:"bottom-right"},{default:(0,o.w5)((()=>[(0,o.Wm)(q,{color:"green",direction:"up",icon:"fas fa-chevron-up",label:"Actions","label-position":"left",square:"","vertical-actions-align":"right"},{default:(0,o.w5)((()=>[(0,o.Wm)(y,{to:{name:"webhooks.create"},color:"primary",icon:"fas fa-exchange-alt",label:"New webhook",square:""},null,8,["to"])])),_:1})])),_:1})])),_:1})}var r=a(7913),p=a(1569);class u{list(e,t){let a="/api/v1/webhooks";return p.api.get(a,{params:{page:e,cache:t}})}}var d=a(3555);const g={name:"Index",watch:{$route(e){"webhooks.index"===e.name&&(this.page=1,this.updateBreadcrumbs(),this.triggerUpdate())}},data(){return{rows:[],pagination:{sortBy:"desc",descending:!1,page:1,rowsPerPage:5,rowsNumber:100},loading:!1,columns:[{name:"title",label:"Title",field:"title",align:"left"},{name:"menu",label:" ",field:"menu",align:"right"}],store:null}},computed:{},created(){this.pagination.rowsPerPage=this.getListPageSize,this.store=(0,d.S)()},mounted(){this.triggerUpdate()},methods:{deleteWebhook:function(e,t){this.$q.dialog({title:"Confirm",message:'Do you want to delete webhook "'+t+'"?',cancel:!0,persistent:!0}).onOk((()=>{this.destroyWebhook(e)}))},destroyWebhook:function(e){new r.Z("webhooks").destroy(e).then((()=>{this.store.refreshCacheKey(),this.triggerUpdate()}))},updateBreadcrumbs:function(){this.$route.meta.pageTitle="firefly.webhooks",this.$route.meta.breadcrumbs=[{title:"webhooks"}]},onRequest:function(e){this.page=e.pagination.page,this.triggerUpdate()},triggerUpdate:function(){if(this.loading)return;this.loading=!0;const e=new u;this.rows=[],e.list(this.page,this.getCacheKey).then((e=>{this.pagination.rowsPerPage=e.data.meta.pagination.per_page,this.pagination.rowsNumber=e.data.meta.pagination.total,this.pagination.page=this.page;for(let t in e.data.data)if(e.data.data.hasOwnProperty(t)){let a=e.data.data[t],o={id:a.id,title:a.attributes.title};this.rows.push(o)}this.loading=!1}))}}};var w=a(1639),h=a(9885),c=a(9497),m=a(3532),f=a(1682),b=a(7220),k=a(2045),y=a(3246),q=a(490),_=a(1233),W=a(3115),Z=a(3388),Q=a(9361),P=a(935),U=a(2146),v=a(9984),C=a.n(v);const T=(0,w.Z)(g,[["render",l]]),$=T;C()(g,"components",{QPage:h.Z,QTable:c.Z,QTr:m.Z,QTh:f.Z,QTd:b.Z,QBtnDropdown:k.Z,QList:y.Z,QItem:q.Z,QItemSection:_.Z,QItemLabel:W.Z,QPageSticky:Z.Z,QFab:Q.Z,QFabAction:P.Z}),C()(g,"directives",{ClosePopup:U.Z})}}]);
|
||||
"use strict";(globalThis["webpackChunkfirefly_iii"]=globalThis["webpackChunkfirefly_iii"]||[]).push([[5114],{5114:(e,t,a)=>{a.r(t),a.d(t,{default:()=>$});var o=a(9835),i=a(6970);const n=(0,o.Uk)("Edit"),s=(0,o.Uk)("Delete");function l(e,t,a,l,r,p){const u=(0,o.up)("q-th"),d=(0,o.up)("q-tr"),g=(0,o.up)("router-link"),w=(0,o.up)("q-td"),h=(0,o.up)("q-item-label"),c=(0,o.up)("q-item-section"),m=(0,o.up)("q-item"),f=(0,o.up)("q-list"),b=(0,o.up)("q-btn-dropdown"),k=(0,o.up)("q-table"),y=(0,o.up)("q-fab-action"),q=(0,o.up)("q-fab"),_=(0,o.up)("q-page-sticky"),W=(0,o.up)("q-page"),Z=(0,o.Q2)("close-popup");return(0,o.wg)(),(0,o.j4)(W,null,{default:(0,o.w5)((()=>[(0,o.Wm)(k,{pagination:r.pagination,"onUpdate:pagination":t[0]||(t[0]=e=>r.pagination=e),columns:r.columns,loading:r.loading,rows:r.rows,title:e.$t("firefly.webhooks"),class:"q-ma-md","row-key":"id",onRequest:p.onRequest},{header:(0,o.w5)((e=>[(0,o.Wm)(d,{props:e},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.cols,(t=>((0,o.wg)(),(0,o.j4)(u,{key:t.name,props:e},{default:(0,o.w5)((()=>[(0,o.Uk)((0,i.zw)(t.label),1)])),_:2},1032,["props"])))),128))])),_:2},1032,["props"])])),body:(0,o.w5)((e=>[(0,o.Wm)(d,{props:e},{default:(0,o.w5)((()=>[(0,o.Wm)(w,{key:"title",props:e},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{to:{name:"webhooks.show",params:{id:e.row.id}},class:"text-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,i.zw)(e.row.title),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,o.Wm)(w,{key:"menu",props:e},{default:(0,o.w5)((()=>[(0,o.Wm)(b,{color:"primary",label:"Actions",size:"sm"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.wy)(((0,o.wg)(),(0,o.j4)(m,{to:{name:"webhooks.edit",params:{id:e.row.id}},clickable:""},{default:(0,o.w5)((()=>[(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[n])),_:1})])),_:1})])),_:2},1032,["to"])),[[Z]]),(0,o.wy)(((0,o.wg)(),(0,o.j4)(m,{clickable:"",onClick:t=>p.deleteWebhook(e.row.id,e.row.title)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[s])),_:1})])),_:1})])),_:2},1032,["onClick"])),[[Z]])])),_:2},1024)])),_:2},1024)])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["pagination","columns","loading","rows","title","onRequest"]),(0,o.Wm)(_,{offset:[18,18],position:"bottom-right"},{default:(0,o.w5)((()=>[(0,o.Wm)(q,{color:"green",direction:"up",icon:"fas fa-chevron-up",label:"Actions","label-position":"left",square:"","vertical-actions-align":"right"},{default:(0,o.w5)((()=>[(0,o.Wm)(y,{to:{name:"webhooks.create"},color:"primary",icon:"fas fa-exchange-alt",label:"New webhook",square:""},null,8,["to"])])),_:1})])),_:1})])),_:1})}var r=a(7913),p=a(1569);class u{list(e,t){let a="/api/v1/webhooks";return p.api.get(a,{params:{page:e,cache:t}})}}var d=a(3555);const g={name:"Index",watch:{$route(e){"webhooks.index"===e.name&&(this.page=1,this.updateBreadcrumbs(),this.triggerUpdate())}},data(){return{rows:[],pagination:{sortBy:"desc",descending:!1,page:1,rowsPerPage:5,rowsNumber:100},loading:!1,columns:[{name:"title",label:"Title",field:"title",align:"left"},{name:"menu",label:" ",field:"menu",align:"right"}],store:null}},computed:{},created(){this.pagination.rowsPerPage=this.getListPageSize,this.store=(0,d.S)()},mounted(){this.triggerUpdate()},methods:{deleteWebhook:function(e,t){this.$q.dialog({title:"Confirm",message:'Do you want to delete webhook "'+t+'"?',cancel:!0,persistent:!0}).onOk((()=>{this.destroyWebhook(e)}))},destroyWebhook:function(e){new r.Z("webhooks").destroy(e).then((()=>{this.store.refreshCacheKey(),this.triggerUpdate()}))},updateBreadcrumbs:function(){this.$route.meta.pageTitle="firefly.webhooks",this.$route.meta.breadcrumbs=[{title:"webhooks"}]},onRequest:function(e){this.page=e.pagination.page,this.triggerUpdate()},triggerUpdate:function(){if(this.loading)return;this.loading=!0;const e=new u;this.rows=[],e.list(this.page,this.getCacheKey).then((e=>{this.pagination.rowsPerPage=e.data.meta.pagination.per_page,this.pagination.rowsNumber=e.data.meta.pagination.total,this.pagination.page=this.page;for(let t in e.data.data)if(e.data.data.hasOwnProperty(t)){let a=e.data.data[t],o={id:a.id,title:a.attributes.title};this.rows.push(o)}this.loading=!1}))}}};var w=a(1639),h=a(9885),c=a(2429),m=a(3532),f=a(1682),b=a(7220),k=a(2045),y=a(3246),q=a(490),_=a(1233),W=a(3115),Z=a(3388),Q=a(9361),P=a(935),U=a(2146),v=a(9984),C=a.n(v);const T=(0,w.Z)(g,[["render",l]]),$=T;C()(g,"components",{QPage:h.Z,QTable:c.Z,QTr:m.Z,QTh:f.Z,QTd:b.Z,QBtnDropdown:k.Z,QList:y.Z,QItem:q.Z,QItemSection:_.Z,QItemLabel:W.Z,QPageSticky:Z.Z,QFab:Q.Z,QFabAction:P.Z}),C()(g,"directives",{ClosePopup:U.Z})}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
public/v3/js/7886.1ed9f731.js
vendored
1
public/v3/js/7886.1ed9f731.js
vendored
@ -1 +0,0 @@
|
||||
"use strict";(globalThis["webpackChunkfirefly_iii"]=globalThis["webpackChunkfirefly_iii"]||[]).push([[7886],{8482:(t,e,a)=>{a.r(e),a.d(e,{default:()=>x});var s=a(9835),n=a(6970);const i={class:"q-mt-sm q-mr-sm"},r=(0,s._)("strong",null," Budgets ",-1),o={class:"row"},l={class:"col"},u={class:"row"},d={class:"col"},c=(0,s._)("br",null,null,-1),g=(0,s._)("br",null,null,-1),m=(0,s._)("div",{class:"col"}," I am bar ",-1),p=(0,s._)("div",{class:"row"},[(0,s._)("div",{class:"col"},[(0,s.Uk)(" I am no budget"),(0,s._)("br")])],-1);function h(t,e,a,h,f,_){const w=(0,s.up)("q-item-label"),b=(0,s.up)("q-item-section"),v=(0,s.up)("q-item"),y=(0,s.up)("q-separator"),B=(0,s.up)("router-link"),D=(0,s.up)("q-card-section"),k=(0,s.up)("q-card");return(0,s.wg)(),(0,s.iD)("div",i,[(0,s.Wm)(k,{bordered:""},{default:(0,s.w5)((()=>[(0,s.Wm)(v,null,{default:(0,s.w5)((()=>[(0,s.Wm)(b,null,{default:(0,s.w5)((()=>[(0,s.Wm)(w,null,{default:(0,s.w5)((()=>[r])),_:1})])),_:1})])),_:1}),(0,s.Wm)(y),(0,s.Wm)(D,null,{default:(0,s.w5)((()=>[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(f.budgets,(t=>((0,s.wg)(),(0,s.iD)("div",{key:t.id},[(0,s._)("div",o,[(0,s._)("div",l,[(0,s.Wm)(B,{to:{name:"budgets.show",params:{id:t.id}}},{default:(0,s.w5)((()=>[(0,s.Uk)((0,n.zw)(t.name),1)])),_:2},1032,["to"])])]),((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.limits,(t=>((0,s.wg)(),(0,s.iD)("div",null,[(0,s._)("div",u,[(0,s._)("div",d,[(0,s._)("small",null,(0,n.zw)(_.formatAmount(t.currency_code,t.amount)),1),c,(0,s.Uk)(" "+(0,n.zw)(_.formatDate(t.start)),1),g,(0,s.Uk)(" "+(0,n.zw)(_.formatDate(t.end)),1)]),m])])))),256))])))),128)),p])),_:1})])),_:1})])}var f=a(3555),_=a(1569);class w{list(t){let e="/api/v2/budgets";return _.api.get(e,{params:{page:t}})}}var b=a(8898);class v{list(t,e,a,s){let n="/api/v2/budgets/"+t+"/limits",i=(0,b.Z)(e,"y-MM-dd"),r=(0,b.Z)(a,"y-MM-dd");return _.api.get(n,{params:{page:s,start:i,end:r}})}}const y={name:"BudgetBox",data(){return{budgets:[],locale:"en-US",page:1,loadingBudgets:!1,dateFormat:""}},mounted(){this.store=(0,f.S)(),this.dateFormat=this.$t("config.month_and_day_fns"),this.store.$onAction((({name:t,store:e,args:a,after:s,onError:n})=>{s((e=>{"setRange"===t&&(this.locale=this.store.getLocale,this.loadBox())}))})),null!==this.store.getRange.start&&null!==this.store.getRange.end&&this.loadBox()},methods:{formatDate:function(t){return(0,b.Z)(new Date(t),this.$t("config.month_and_day_fns"))},formatAmount:function(t,e){return Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)},loadBox:function(){this.loadingBudgets=!0,(new w).list(this.page).then((t=>{if(this.parseBudgets(t.data.data),t.data.meta.pagination.current_page<t.data.meta.pagination.total_pages)return this.page=t.data.meta.pagination.current_page+1,void this.loadBox();this.loadingBudgets=!1,this.processBudgets()}))},parseBudgets:function(t){for(let e in t)if(t.hasOwnProperty(e)){const a=t[e];this.budgets.push({id:parseInt(a.id),name:a.attributes.name,limits:[]})}},processBudgets:function(){for(let t in this.budgets)if(this.budgets.hasOwnProperty(t)){const e=this.budgets[t];(new v).list(e.id,this.store.getRange.start,this.store.getRange.end,1).then((t=>{this.parseBudgetLimits(t.data.data,e)}))}console.log("Processing...")},parseBudgetLimits:function(t,e){console.log("Parse for "+e.name);for(let a in t)if(t.hasOwnProperty(a)){const s=t[a];e.limits.push({amount:s.attributes.amount,currency_code:s.attributes.currency_code,start:new Date(s.attributes.start),end:new Date(s.attributes.end)}),console.log(s)}}}};var B=a(1639),D=a(4458),k=a(490),Z=a(1233),q=a(3115),I=a(926),W=a(3190),Q=a(9984),S=a.n(Q);const U=(0,B.Z)(y,[["render",h]]),x=U;S()(y,"components",{QCard:D.Z,QItem:k.Z,QItemSection:Z.Z,QItemLabel:q.Z,QSeparator:I.Z,QCardSection:W.Z})}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -117,8 +117,11 @@ Route::group(
|
||||
Route::get('', ['uses' => 'Budget\ListController@index', 'as' => 'index']);
|
||||
Route::get('{budget}', ['uses' => 'Budget\ShowController@show', 'as' => 'show']);
|
||||
Route::get('{budget}/limits', ['uses' => 'BudgetLimit\ListController@index', 'as' => 'budget-limits.index']);
|
||||
Route::get('sum/budgeted', ['uses' => 'Budget\SumController@budgeted', 'as' => 'sum.budgeted']);
|
||||
Route::get('sum/budgeted', ['uses' => 'Budget\ShowController@budgeted', 'as' => 'sum.budgeted']);
|
||||
Route::get('sum/spent', ['uses' => 'Budget\SumController@spent', 'as' => 'sum.spent']);
|
||||
Route::get('{budget}/budgeted', ['uses' => 'Budget\SumController@budgeted', 'as' => 'budget.budgeted']);
|
||||
Route::get('{budget}/spent', ['uses' => 'Budget\ShowController@spent', 'as' => 'budget.spent']);
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -101,7 +101,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'accounts.create',
|
||||
static function (Generator $breadcrumbs, string $what) {
|
||||
$breadcrumbs->parent('accounts.index', $what);
|
||||
$breadcrumbs->parent('accounts.index', [$what]);
|
||||
$breadcrumbs->push(trans('firefly.new_'.strtolower(e($what)).'_account'), route('accounts.create', [$what]));
|
||||
}
|
||||
);
|
||||
@ -111,7 +111,7 @@ try {
|
||||
static function (Generator $breadcrumbs, Account $account, Carbon $start = null, Carbon $end = null) {
|
||||
$what = config('firefly.shortNamesByFullName.'.$account->accountType->type);
|
||||
|
||||
$breadcrumbs->parent('accounts.index', $what);
|
||||
$breadcrumbs->parent('accounts.index', [$what]);
|
||||
$breadcrumbs->push(limitStringLength($account->name), route('accounts.show.all', [$account->id]));
|
||||
if (null !== $start && null !== $end) {
|
||||
$title = trans(
|
||||
@ -131,7 +131,7 @@ try {
|
||||
static function (Generator $breadcrumbs, Account $account) {
|
||||
$what = config('firefly.shortNamesByFullName.'.$account->accountType->type);
|
||||
|
||||
$breadcrumbs->parent('accounts.index', $what);
|
||||
$breadcrumbs->parent('accounts.index', [$what]);
|
||||
$breadcrumbs->push(limitStringLength($account->name), route('accounts.show', [$account->id]));
|
||||
}
|
||||
);
|
||||
@ -139,7 +139,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'accounts.reconcile',
|
||||
static function (Generator $breadcrumbs, Account $account) {
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
$breadcrumbs->parent('accounts.show', [$account]);
|
||||
$breadcrumbs->push(trans('firefly.reconcile_account', ['account' => $account->name]), route('accounts.reconcile', [$account->id]));
|
||||
}
|
||||
);
|
||||
@ -147,7 +147,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'accounts.reconcile.show',
|
||||
static function (Generator $breadcrumbs, Account $account, TransactionJournal $journal) {
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
$breadcrumbs->parent('accounts.show', [$account]);
|
||||
$title = trans('firefly.reconciliation').' "'.$journal->description.'"';
|
||||
$breadcrumbs->push($title, route('accounts.reconcile.show', [$journal->id]));
|
||||
}
|
||||
@ -156,7 +156,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'accounts.delete',
|
||||
static function (Generator $breadcrumbs, Account $account) {
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
$breadcrumbs->parent('accounts.show', [$account]);
|
||||
$breadcrumbs->push(trans('firefly.delete_account', ['name' => limitStringLength($account->name)]), route('accounts.delete', [$account->id]));
|
||||
}
|
||||
);
|
||||
@ -164,7 +164,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'accounts.edit',
|
||||
static function (Generator $breadcrumbs, Account $account) {
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
$breadcrumbs->parent('accounts.show', [$account]);
|
||||
$what = config('firefly.shortNamesByFullName.'.$account->accountType->type);
|
||||
|
||||
$breadcrumbs->push(
|
||||
@ -300,12 +300,12 @@ try {
|
||||
if ($object instanceof TransactionJournal) {
|
||||
$group = $object->transactionGroup;
|
||||
if (null !== $group && $group instanceof TransactionGroup) {
|
||||
$breadcrumbs->parent('transactions.show', $object->transactionGroup);
|
||||
$breadcrumbs->parent('transactions.show', [$object->transactionGroup]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($object instanceof Bill) {
|
||||
$breadcrumbs->parent('bills.show', $object);
|
||||
$breadcrumbs->parent('bills.show', [$object]);
|
||||
}
|
||||
$breadcrumbs->push(
|
||||
limitStringLength(trans('firefly.edit_attachment', ['name' => $attachment->filename])),
|
||||
@ -318,10 +318,10 @@ try {
|
||||
static function (Generator $breadcrumbs, Attachment $attachment) {
|
||||
$object = $attachment->attachable;
|
||||
if ($object instanceof TransactionJournal) {
|
||||
$breadcrumbs->parent('transactions.show', $object->transactionGroup);
|
||||
$breadcrumbs->parent('transactions.show', [$object->transactionGroup]);
|
||||
}
|
||||
if ($object instanceof Bill) {
|
||||
$breadcrumbs->parent('bills.show', $object);
|
||||
$breadcrumbs->parent('bills.show', [$object]);
|
||||
}
|
||||
$breadcrumbs->push(
|
||||
trans('firefly.delete_attachment', ['name' => limitStringLength($attachment->filename)]),
|
||||
@ -349,14 +349,14 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'bills.edit',
|
||||
static function (Generator $breadcrumbs, Bill $bill) {
|
||||
$breadcrumbs->parent('bills.show', $bill);
|
||||
$breadcrumbs->parent('bills.show', [$bill]);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => limitStringLength($bill->name)]), route('bills.edit', [$bill->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::for(
|
||||
'bills.delete',
|
||||
static function (Generator $breadcrumbs, Bill $bill) {
|
||||
$breadcrumbs->parent('bills.show', $bill);
|
||||
$breadcrumbs->parent('bills.show', [$bill]);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => limitStringLength($bill->name)]), route('bills.delete', [$bill->id]));
|
||||
}
|
||||
);
|
||||
@ -388,14 +388,14 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'subscriptions.edit',
|
||||
static function (Generator $breadcrumbs, Bill $bill) {
|
||||
$breadcrumbs->parent('subscriptions.show', $bill);
|
||||
$breadcrumbs->parent('subscriptions.show',[$bill]);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => limitStringLength($bill->name)]), route('subscriptions.edit', [$bill->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::for(
|
||||
'subscriptions.delete',
|
||||
static function (Generator $breadcrumbs, Bill $bill) {
|
||||
$breadcrumbs->parent('subscriptions.show', $bill);
|
||||
$breadcrumbs->parent('subscriptions.show', [$bill]);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => limitStringLength($bill->name)]), route('subscriptions.delete', [$bill->id]));
|
||||
}
|
||||
);
|
||||
@ -427,14 +427,14 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'budgets.edit',
|
||||
static function (Generator $breadcrumbs, Budget $budget) {
|
||||
$breadcrumbs->parent('budgets.show', $budget);
|
||||
$breadcrumbs->parent('budgets.show', [$budget]);
|
||||
$breadcrumbs->push(trans('firefly.edit_budget', ['name' => limitStringLength($budget->name)]), route('budgets.edit', [$budget->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::for(
|
||||
'budgets.delete',
|
||||
static function (Generator $breadcrumbs, Budget $budget) {
|
||||
$breadcrumbs->parent('budgets.show', $budget);
|
||||
$breadcrumbs->parent('budgets.show', [$budget]);
|
||||
$breadcrumbs->push(trans('firefly.delete_budget', ['name' => limitStringLength($budget->name)]), route('budgets.delete', [$budget->id]));
|
||||
}
|
||||
);
|
||||
@ -515,14 +515,14 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'categories.edit',
|
||||
static function (Generator $breadcrumbs, Category $category) {
|
||||
$breadcrumbs->parent('categories.show.all', $category);
|
||||
$breadcrumbs->parent('categories.show.all', [$category]);
|
||||
$breadcrumbs->push(trans('firefly.edit_category', ['name' => limitStringLength($category->name)]), route('categories.edit', [$category->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::for(
|
||||
'categories.delete',
|
||||
static function (Generator $breadcrumbs, Category $category) {
|
||||
$breadcrumbs->parent('categories.show', $category);
|
||||
$breadcrumbs->parent('categories.show', [$category]);
|
||||
$breadcrumbs->push(trans('firefly.delete_category', ['name' => limitStringLength($category->name)]), route('categories.delete', [$category->id]));
|
||||
}
|
||||
);
|
||||
@ -641,14 +641,14 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'piggy-banks.edit',
|
||||
static function (Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
|
||||
$breadcrumbs->parent('piggy-banks.show', [$piggyBank]);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => $piggyBank->name]), route('piggy-banks.edit', [$piggyBank->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::for(
|
||||
'piggy-banks.delete',
|
||||
static function (Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
|
||||
$breadcrumbs->parent('piggy-banks.show', [$piggyBank]);
|
||||
$breadcrumbs->push(trans('firefly.delete_piggy_bank', ['name' => $piggyBank->name]), route('piggy-banks.delete', [$piggyBank->id]));
|
||||
}
|
||||
);
|
||||
@ -664,7 +664,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'piggy-banks.add-money-mobile',
|
||||
static function (Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
|
||||
$breadcrumbs->parent('piggy-banks.show', [$piggyBank]);
|
||||
$breadcrumbs->push(trans('firefly.add_money_to_piggy', ['name' => $piggyBank->name]), route('piggy-banks.add-money-mobile', [$piggyBank->id]));
|
||||
}
|
||||
);
|
||||
@ -672,7 +672,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'piggy-banks.remove-money-mobile',
|
||||
static function (Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
|
||||
$breadcrumbs->parent('piggy-banks.show', [$piggyBank]);
|
||||
$breadcrumbs->push(
|
||||
trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]),
|
||||
route('piggy-banks.remove-money-mobile', [$piggyBank->id])
|
||||
@ -1019,7 +1019,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'tags.edit',
|
||||
static function (Generator $breadcrumbs, Tag $tag) {
|
||||
$breadcrumbs->parent('tags.show', $tag);
|
||||
$breadcrumbs->parent('tags.show', [$tag]);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => $tag->tag]), route('tags.edit', [$tag->id]));
|
||||
}
|
||||
);
|
||||
@ -1027,7 +1027,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'tags.delete',
|
||||
static function (Generator $breadcrumbs, Tag $tag) {
|
||||
$breadcrumbs->parent('tags.show', $tag);
|
||||
$breadcrumbs->parent('tags.show', [$tag]);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => $tag->tag]), route('tags.delete', [$tag->id]));
|
||||
}
|
||||
);
|
||||
@ -1094,7 +1094,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'transactions.create',
|
||||
static function (Generator $breadcrumbs, string $objectType) {
|
||||
$breadcrumbs->parent('transactions.index', $objectType);
|
||||
$breadcrumbs->parent('transactions.index', [$objectType]);
|
||||
$breadcrumbs->push(trans(sprintf('breadcrumbs.create_%s', strtolower($objectType))), route('transactions.create', [$objectType]));
|
||||
}
|
||||
);
|
||||
@ -1102,7 +1102,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'transactions.edit',
|
||||
static function (Generator $breadcrumbs, TransactionGroup $group) {
|
||||
$breadcrumbs->parent('transactions.show', $group);
|
||||
$breadcrumbs->parent('transactions.show', [$group]);
|
||||
|
||||
/** @var TransactionJournal $first */
|
||||
$first = $group->transactionJournals()->first();
|
||||
@ -1118,7 +1118,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'accounts.reconcile.edit',
|
||||
static function (Generator $breadcrumbs, TransactionJournal $journal) {
|
||||
$breadcrumbs->parent('transactions.show', $journal);
|
||||
$breadcrumbs->parent('transactions.show', [$journal]);
|
||||
$breadcrumbs->push(
|
||||
trans('breadcrumbs.edit_reconciliation', ['description' => limitStringLength($journal->description)]),
|
||||
route('accounts.reconcile.edit', [$journal->id])
|
||||
@ -1129,7 +1129,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'transactions.delete',
|
||||
static function (Generator $breadcrumbs, TransactionGroup $group) {
|
||||
$breadcrumbs->parent('transactions.show', $group);
|
||||
$breadcrumbs->parent('transactions.show', [$group]);
|
||||
|
||||
$journal = $group->transactionJournals->first();
|
||||
$breadcrumbs->push(
|
||||
@ -1162,7 +1162,7 @@ try {
|
||||
return;
|
||||
}
|
||||
|
||||
$breadcrumbs->parent('transactions.index', $type);
|
||||
$breadcrumbs->parent('transactions.index', [$type]);
|
||||
$breadcrumbs->push($title, route('transactions.show', [$group->id]));
|
||||
}
|
||||
);
|
||||
@ -1170,7 +1170,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'transactions.convert.index',
|
||||
static function (Generator $breadcrumbs, TransactionGroup $group, string $groupTitle) {
|
||||
$breadcrumbs->parent('transactions.show', $group);
|
||||
$breadcrumbs->parent('transactions.show', [$group]);
|
||||
$breadcrumbs->push(
|
||||
trans('firefly.breadcrumb_convert_group', ['description' => limitStringLength($groupTitle)]),
|
||||
route('transactions.convert.index', [$group->id, 'something'])
|
||||
@ -1184,7 +1184,7 @@ try {
|
||||
static function (Generator $breadcrumbs, array $journals): void {
|
||||
if (0 !== count($journals)) {
|
||||
$objectType = strtolower(reset($journals)['transaction_type_type']);
|
||||
$breadcrumbs->parent('transactions.index', $objectType);
|
||||
$breadcrumbs->parent('transactions.index', [$objectType]);
|
||||
$breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.edit', ['']));
|
||||
|
||||
return;
|
||||
@ -1197,7 +1197,7 @@ try {
|
||||
'transactions.mass.delete',
|
||||
static function (Generator $breadcrumbs, array $journals) {
|
||||
$objectType = strtolower(reset($journals)['transaction_type_type']);
|
||||
$breadcrumbs->parent('transactions.index', $objectType);
|
||||
$breadcrumbs->parent('transactions.index',[ $objectType]);
|
||||
$breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.delete', ['']));
|
||||
}
|
||||
);
|
||||
@ -1209,7 +1209,7 @@ try {
|
||||
if (0 !== count($journals)) {
|
||||
$ids = Arr::pluck($journals, 'transaction_journal_id');
|
||||
$first = reset($journals);
|
||||
$breadcrumbs->parent('transactions.index', strtolower($first['transaction_type_type']));
|
||||
$breadcrumbs->parent('transactions.index', [strtolower($first['transaction_type_type'])]);
|
||||
$breadcrumbs->push(trans('firefly.mass_bulk_journals'), route('transactions.bulk.edit', $ids));
|
||||
|
||||
return;
|
||||
@ -1271,7 +1271,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'webhooks.delete',
|
||||
static function (Generator $breadcrumbs, Webhook $webhook) {
|
||||
$breadcrumbs->parent('webhooks.show', $webhook);
|
||||
$breadcrumbs->parent('webhooks.show', [$webhook]);
|
||||
$breadcrumbs->push(trans('firefly.delete_webhook', ['title' => limitStringLength($webhook->title)]), route('webhooks.delete', [$webhook->id]));
|
||||
}
|
||||
);
|
||||
@ -1279,7 +1279,7 @@ try {
|
||||
Breadcrumbs::for(
|
||||
'webhooks.edit',
|
||||
static function (Generator $breadcrumbs, Webhook $webhook) {
|
||||
$breadcrumbs->parent('webhooks.show', $webhook);
|
||||
$breadcrumbs->parent('webhooks.show', [$webhook]);
|
||||
$breadcrumbs->push(trans('firefly.edit_webhook', ['title' => limitStringLength($webhook->title)]), route('webhooks.edit', [$webhook->id]));
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user