mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Fix some code quality things.
This commit is contained in:
@@ -176,7 +176,9 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
return false;
|
||||
}
|
||||
// is allowed? Save the file, without encryption.
|
||||
$this->uploadDisk->put($attachment->fileName(), $content);
|
||||
$parts = explode('/', $attachment->fileName());
|
||||
$file = $parts[count($parts) - 1];
|
||||
$this->uploadDisk->put($file, $content);
|
||||
|
||||
// update attachment.
|
||||
$attachment->md5 = md5_file($path);
|
||||
|
@@ -26,7 +26,6 @@ namespace FireflyIII\Http\Controllers\Transaction;
|
||||
use FireflyIII\Events\StoredTransactionGroup;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Update\GroupCloneService;
|
||||
@@ -109,9 +108,9 @@ class CreateController extends Controller
|
||||
$sourceId = (int)request()->get('source');
|
||||
$destinationId = (int)request()->get('destination');
|
||||
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$cash = $repository->getCashAccount();
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$cash = $accountRepository->getCashAccount();
|
||||
$preFilled = session()->has('preFilled') ? session('preFilled') : [];
|
||||
$subTitle = (string)trans(sprintf('breadcrumbs.create_%s', strtolower((string)$objectType)));
|
||||
$subTitleIcon = 'fa-plus';
|
||||
|
@@ -54,7 +54,7 @@ class StartFireflySession extends StartSession
|
||||
//Log::debug(sprintf('storeCurrentUrl: Redirect is now "%s".', $safeUrl));
|
||||
$session->setPreviousUrl($safeUrl);
|
||||
|
||||
return;
|
||||
// return;
|
||||
}
|
||||
//Log::debug(sprintf('storeCurrentUrl: Refuse to set "%s" as current URL.', $safeUrl));
|
||||
}
|
||||
|
@@ -494,10 +494,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
public function getOpeningBalanceGroup(Account $account): ?TransactionGroup
|
||||
{
|
||||
$journal = $this->getOpeningBalance($account);
|
||||
$group = null;
|
||||
$group = $journal?->transactionGroup;
|
||||
|
||||
return $group;
|
||||
return $journal?->transactionGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -637,11 +635,9 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
*/
|
||||
public function oldestJournalDate(Account $account): ?Carbon
|
||||
{
|
||||
$result = null;
|
||||
$journal = $this->oldestJournal($account);
|
||||
$result = $journal?->date;
|
||||
|
||||
return $result;
|
||||
return $journal?->date;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -22,32 +22,7 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
|
||||
<!-- Custom Tabs -->
|
||||
<!--
|
||||
<div class="card">
|
||||
<div class="card-header d-flex p-0">
|
||||
<h3 class="card-title p-3">Tabs</h3>
|
||||
<ul class="nav nav-pills ml-auto p-2">
|
||||
<li class="nav-item"><a class="nav-link active" href="#main_chart" data-toggle="tab">Chart</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#budgets" data-toggle="tab">Budgets</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#categories" data-toggle="tab">Categories</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="main_chart">
|
||||
1: main chart
|
||||
</div>
|
||||
<div class="tab-pane" id="budgets">
|
||||
2: tree map from/to budget
|
||||
</div>
|
||||
<div class="tab-pane" id="categories">
|
||||
2: tree map from/to cat
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<!-- Custom Tabs will be put here (see file history). -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -162,7 +137,7 @@ export default {
|
||||
.then(response => {
|
||||
// console.log('Now getTransactions() DONE!');
|
||||
this.total = parseInt(response.data.meta.pagination.total);
|
||||
let transactions = response.data.data;
|
||||
// let transactions = response.data.data;
|
||||
// console.log('Have downloaded ' + transactions.length + ' transactions');
|
||||
// console.log(response.data);
|
||||
this.rawTransactions = response.data.data;
|
||||
|
@@ -332,6 +332,3 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@@ -219,7 +219,7 @@ export default {
|
||||
|
||||
// remove budget info from rawBudgets if it's there:
|
||||
this.filterBudgets(budgetId, currencyId);
|
||||
let name = this.budgets[current.attributes.budget_id].name;
|
||||
// let name = this.budgets[current.attributes.budget_id].name;
|
||||
// spent within budget:
|
||||
if (0.0 !== spentFloat && spentFloatPos < amount) {
|
||||
// console.log('Spent ' + name + ' in budget');
|
||||
|
@@ -20,24 +20,7 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!--
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
Treemap categories
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
Treemap accounts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<!-- charts here (see file history) -->
|
||||
<!-- page is ignored for the time being -->
|
||||
<TransactionListLarge
|
||||
:entries="rawTransactions"
|
||||
@@ -48,21 +31,6 @@
|
||||
v-on:jump-page="jumpToPage($event)"
|
||||
v-on:refreshed-cache-key="refreshedKey"
|
||||
/>
|
||||
<!--
|
||||
<div class="row">
|
||||
<div class="col-xl-2 col-lg-4 col-sm-6 col-xs-12" v-for="range in ranges">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{{ formatDate(range.start, 'yyyy-LL') }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<a :href="'./transactions/' + type + '/' + formatDate(range.start,'yyyy-LL-dd') + '/' + formatDate(range.end, 'yyyy-LL-dd')">Transactions</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@@ -169,10 +169,8 @@
|
||||
|
||||
</div>
|
||||
<div class="card-footer"> (button)
|
||||
<!--
|
||||
<a :href="'./transactions/create/' + type" class="btn btn-success"
|
||||
<a :href="'./transactions/create/TODO'" class="btn btn-success"
|
||||
:title="$t('firefly.create_new_transaction')">{{ $t('firefly.create_new_transaction') }}</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user