mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-21 13:12:27 +00:00
Compare commits
7 Commits
v6.1.15
...
develop-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56c9026299 | ||
|
|
021ddfc36b | ||
|
|
feabfe54f0 | ||
|
|
565409b486 | ||
|
|
f57366da5f | ||
|
|
064217ccb0 | ||
|
|
fa3ccbda33 |
195
THANKS.md
Executable file
195
THANKS.md
Executable file
@@ -0,0 +1,195 @@
|
||||
# Thank you! :tada: :heart: :tada:
|
||||
|
||||
Over time, many people have contributed to Firefly III. Their efforts are not always visible, but always remembered and appreciated.
|
||||
Please find below all the people who contributed to the Firefly III code. Their names are mentioned in the year of their first contribution.
|
||||
|
||||
## 2024
|
||||
- imlonghao
|
||||
- Rahman Yusuf
|
||||
- Michael Thomas
|
||||
- WardenJakx
|
||||
- kuilin
|
||||
- Stevie Robinson
|
||||
- luzpaz
|
||||
- Lemuel Roberto Bonifácio
|
||||
- maureenferreira
|
||||
|
||||
## 2023
|
||||
- tieu1991
|
||||
- Maxco10
|
||||
- zqye
|
||||
- Mateus Pereira
|
||||
- josephbadow
|
||||
- Christian Desktop
|
||||
- Edgars
|
||||
- Hannah K
|
||||
- noxonad
|
||||
- Kaijia Feng
|
||||
- Marc Ordinas i Llopis
|
||||
- Kuba Turek
|
||||
- Julien Stébenne
|
||||
|
||||
## 2022
|
||||
- Johannes Zellner
|
||||
- Janne Heß
|
||||
- charlesteets
|
||||
- Nathan PERIER
|
||||
- Jan Willhaus
|
||||
- canoine
|
||||
- Rick Cuddy
|
||||
- James
|
||||
- Hugo Meyronneinc
|
||||
- naveen
|
||||
- neilnaveen
|
||||
- naveensrinivasan
|
||||
- Federico Micelli
|
||||
- George Hahn
|
||||
|
||||
## 2021
|
||||
- StillLoading
|
||||
- Igor Rzegocki
|
||||
- Lorenzo Breda
|
||||
- Hosh
|
||||
- Flightkick
|
||||
- alex6480
|
||||
- VREEdom
|
||||
- Hamza FADIL
|
||||
- Kasper Læssø Sørensen
|
||||
- Alex
|
||||
- Jeroen De Meerleer
|
||||
- Ruben van Erk
|
||||
- Fabian Zimmermann
|
||||
- Mirko Berger
|
||||
- KaihatsuOnline
|
||||
- MihataBG
|
||||
|
||||
## 2020
|
||||
- Hannes Körber
|
||||
- Julien Cassagne
|
||||
- bu4ak
|
||||
- Viktor Yakovlev
|
||||
- Oliver Kaufmann
|
||||
- Arvind Chembarpu
|
||||
- GrayStrider
|
||||
- psychowood
|
||||
- Hosh Sadiq
|
||||
- emansih
|
||||
- Aniruddha Maru
|
||||
- johnny
|
||||
- sephrat
|
||||
- bpatath
|
||||
- Florian Dupret
|
||||
- Maxim Kurbatov
|
||||
- Lucas Guima
|
||||
- Sandro
|
||||
- Ruben Verhoef
|
||||
- Daniel Idzerda
|
||||
- Calum Smith
|
||||
- Agraphie
|
||||
- Tomer Shvueli
|
||||
- Tomer S
|
||||
|
||||
## 2019
|
||||
- Pascal Jungblut
|
||||
- Justyn Shull
|
||||
- Timendum
|
||||
- Nicolas Lœuillet
|
||||
- Dominic Guhl
|
||||
- Melroy van den Berg
|
||||
- Henning Stein
|
||||
- Jan Klepek
|
||||
- Jonathan
|
||||
- Geoffrey “Frogeye” Preud'homme
|
||||
- Michael Fix
|
||||
- Juraj Mlich
|
||||
- Eddybrando Vásquez
|
||||
- hulloanson
|
||||
- Will Rouesnel
|
||||
- lastlink
|
||||
- Mr. Funk
|
||||
- Simon Taddiken
|
||||
- Joris
|
||||
- Bastiaan Nijkamp
|
||||
|
||||
## 2018
|
||||
- a1ex4
|
||||
- Daniel Quah
|
||||
- Marco Lourenço
|
||||
- Dennis Enderink
|
||||
- Luca Bognolo
|
||||
- Mike Conway
|
||||
- Ben
|
||||
- Mathieu Post
|
||||
- George Hertz
|
||||
- HamuZ HamuZ
|
||||
- David Meiseles
|
||||
- Erik Gelderblom
|
||||
- Luca Vallerini
|
||||
- Clemens Wijnekus
|
||||
- Jacob Weisz
|
||||
- Mateusz Gozdek
|
||||
- anmol26s
|
||||
- Kevin Hellemun
|
||||
- Shashank M Chakravarthy
|
||||
- Nico Schreiner
|
||||
- Paul Sohier
|
||||
- Brenden Conte
|
||||
- Ben Yanke
|
||||
- Andrew Prokhorenkov
|
||||
- devlearner
|
||||
- Kelvin
|
||||
- J'informatique
|
||||
|
||||
## 2017
|
||||
- Victor Mosin
|
||||
- Justin
|
||||
- Hugo van Duijn
|
||||
- Lukas Winkler
|
||||
- Marcin Szymanski
|
||||
- Jens Kat
|
||||
- koziolek
|
||||
- jleeong
|
||||
- Simon Hanna
|
||||
- richard & xeli.eu
|
||||
- Sergey Besedin
|
||||
- Welbert Serra
|
||||
- Joris de Vries
|
||||
- Patrick Kostjens
|
||||
- Enrico Lamperti
|
||||
- Christian Musa
|
||||
- Enno Lohmeier
|
||||
|
||||
## 2016
|
||||
- Sander
|
||||
- Toon Schoenmakers
|
||||
- Telyn
|
||||
- Sander Kleykens
|
||||
- Tom van der Werf
|
||||
- Matthew Peck
|
||||
- Sander Mulders
|
||||
- Bonno Nachtegaal-Karels
|
||||
- Niek Haarman
|
||||
- Edwin
|
||||
- Thijs Alkemade
|
||||
- zjean
|
||||
- Graham Miller
|
||||
- Robert Horlings
|
||||
- leander091
|
||||
|
||||
## 2015
|
||||
- Antonio Spinelli
|
||||
- Colin O'Dell
|
||||
- RonaldvanMeer
|
||||
- Richard Ebbers
|
||||
- Balazs Varkonyi
|
||||
- Niek van der Kooy
|
||||
- Ilya Kil
|
||||
|
||||
## 2014
|
||||
- Stewart Malik
|
||||
- Graham Campbell
|
||||
- Sander Dorigo
|
||||
- James Cole
|
||||
|
||||
|
||||
Thank you for all your support!
|
||||
@@ -32,6 +32,7 @@ use FireflyIII\Models\Preference;
|
||||
use FireflyIII\Transformers\PreferenceTransformer;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use League\Fractal\Resource\Item;
|
||||
@@ -97,6 +98,32 @@ class PreferencesController extends Controller
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO This endpoint is not documented.
|
||||
*
|
||||
* Return a single preference by name.
|
||||
*/
|
||||
public function showList(Collection $collection): JsonResponse
|
||||
{
|
||||
$manager = $this->getManager();
|
||||
$count = $collection->count();
|
||||
$pageSize = $this->parameters->get('limit');
|
||||
$preferences = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($preferences, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.preferences.show-list').$this->buildParams());
|
||||
|
||||
/** @var PreferenceTransformer $transformer */
|
||||
$transformer = app(PreferenceTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
$resource = new FractalCollection($preferences, $transformer, self::RESOURCE_KEY);
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/preferences/storePreference
|
||||
|
||||
@@ -55,11 +55,7 @@ class AccountController extends Controller
|
||||
function ($request, $next) {
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->adminRepository = app(AdminAccountRepositoryInterface::class);
|
||||
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->adminRepository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->adminRepository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -85,7 +81,7 @@ class AccountController extends Controller
|
||||
$types = $data['types'];
|
||||
$query = $data['query'];
|
||||
$date = $this->parameters->get('date') ?? today(config('app.timezone'));
|
||||
$result = $this->adminRepository->searchAccount((string)$query, $types, $data['limit']);
|
||||
$result = $this->adminRepository->searchAccount((string) $query, $types, $data['limit']);
|
||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||
$groupedResult = [];
|
||||
$allItems = [];
|
||||
@@ -99,19 +95,19 @@ class AccountController extends Controller
|
||||
$balance = app('steam')->balance($account, $date);
|
||||
$nameWithBalance = sprintf('%s (%s)', $account->name, app('amount')->formatAnything($currency, $balance, false));
|
||||
}
|
||||
$type = (string)trans(sprintf('firefly.%s', $account->accountType->type));
|
||||
$type = (string) trans(sprintf('firefly.%s', $account->accountType->type));
|
||||
$groupedResult[$type] ??= [
|
||||
'group ' => $type,
|
||||
'items' => [],
|
||||
];
|
||||
$allItems[] = [
|
||||
'id' => (string)$account->id,
|
||||
'value' => (string)$account->id,
|
||||
'id' => (string) $account->id,
|
||||
'value' => (string) $account->id,
|
||||
'name' => $account->name,
|
||||
'name_with_balance' => $nameWithBalance,
|
||||
'label' => $nameWithBalance,
|
||||
'type' => $account->accountType->type,
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_id' => (string) $currency->id,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
@@ -123,8 +119,8 @@ class AccountController extends Controller
|
||||
$allItems,
|
||||
static function (array $left, array $right): int {
|
||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||
$posLeft = (int)array_search($left['type'], $order, true);
|
||||
$posRight = (int)array_search($right['type'], $order, true);
|
||||
$posLeft = (int) array_search($left['type'], $order, true);
|
||||
$posRight = (int) array_search($right['type'], $order, true);
|
||||
|
||||
return $posLeft - $posRight;
|
||||
}
|
||||
|
||||
@@ -45,11 +45,7 @@ class CategoryController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(CategoryRepositoryInterface::class);
|
||||
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -45,11 +45,7 @@ class TagController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(TagRepositoryInterface::class);
|
||||
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -45,11 +45,7 @@ class TransactionController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(JournalRepositoryInterface::class);
|
||||
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -55,8 +55,7 @@ class AccountController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -64,12 +64,9 @@ class BudgetController extends Controller
|
||||
$this->blRepository = app(BudgetLimitRepositoryInterface::class);
|
||||
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
||||
$this->currency = app('amount')->getDefaultCurrency();
|
||||
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->opsRepository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->opsRepository->setUserGroup($userGroup);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -124,11 +121,11 @@ class BudgetController extends Controller
|
||||
foreach ($rows as $row) {
|
||||
$current = [
|
||||
'label' => $budget->name,
|
||||
'currency_id' => (string)$row['currency_id'],
|
||||
'currency_id' => (string) $row['currency_id'],
|
||||
'currency_code' => $row['currency_code'],
|
||||
'currency_name' => $row['currency_name'],
|
||||
'currency_decimal_places' => $row['currency_decimal_places'],
|
||||
'native_currency_id' => (string)$row['native_currency_id'],
|
||||
'native_currency_id' => (string) $row['native_currency_id'],
|
||||
'native_currency_code' => $row['native_currency_code'],
|
||||
'native_currency_name' => $row['native_currency_name'],
|
||||
'native_currency_decimal_places' => $row['native_currency_decimal_places'],
|
||||
@@ -189,12 +186,12 @@ class BudgetController extends Controller
|
||||
foreach ($array as $currencyId => $block) {
|
||||
$this->currencies[$currencyId] ??= TransactionCurrency::find($currencyId);
|
||||
$return[$currencyId] ??= [
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_id' => (string) $currencyId,
|
||||
'currency_code' => $block['currency_code'],
|
||||
'currency_name' => $block['currency_name'],
|
||||
'currency_symbol' => $block['currency_symbol'],
|
||||
'currency_decimal_places' => (int)$block['currency_decimal_places'],
|
||||
'native_currency_id' => (string)$this->currency->id,
|
||||
'currency_decimal_places' => (int) $block['currency_decimal_places'],
|
||||
'native_currency_id' => (string) $this->currency->id,
|
||||
'native_currency_code' => $this->currency->code,
|
||||
'native_currency_name' => $this->currency->name,
|
||||
'native_currency_symbol' => $this->currency->symbol,
|
||||
|
||||
@@ -57,10 +57,7 @@ class CategoryController extends Controller
|
||||
function ($request, $next) {
|
||||
$this->accountRepos = app(AccountRepositoryInterface::class);
|
||||
$this->currencyRepos = app(CurrencyRepositoryInterface::class);
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->accountRepos->setUserGroup($userGroup);
|
||||
}
|
||||
$this->accountRepos->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -100,25 +97,25 @@ class CategoryController extends Controller
|
||||
|
||||
/** @var array $journal */
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$currencyId = (int) $journal['currency_id'];
|
||||
$currency = $currencies[$currencyId] ?? $this->currencyRepos->find($currencyId);
|
||||
$currencies[$currencyId] = $currency;
|
||||
$categoryName = null === $journal['category_name'] ? (string)trans('firefly.no_category') : $journal['category_name'];
|
||||
$categoryName = null === $journal['category_name'] ? (string) trans('firefly.no_category') : $journal['category_name'];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$nativeAmount = $converter->convert($default, $currency, $journal['date'], $amount);
|
||||
$key = sprintf('%s-%s', $categoryName, $currency->code);
|
||||
if ((int)$journal['foreign_currency_id'] === $default->id) {
|
||||
if ((int) $journal['foreign_currency_id'] === $default->id) {
|
||||
$nativeAmount = app('steam')->positive($journal['foreign_amount']);
|
||||
}
|
||||
// create arrays
|
||||
$return[$key] ??= [
|
||||
'label' => $categoryName,
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_id' => (string) $currency->id,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'native_currency_id' => (string)$default->id,
|
||||
'native_currency_id' => (string) $default->id,
|
||||
'native_currency_code' => $default->code,
|
||||
'native_currency_name' => $default->name,
|
||||
'native_currency_symbol' => $default->symbol,
|
||||
@@ -138,7 +135,7 @@ class CategoryController extends Controller
|
||||
|
||||
// order by native amount
|
||||
usort($return, static function (array $a, array $b) {
|
||||
return (float)$a['native_amount'] < (float)$b['native_amount'] ? 1 : -1;
|
||||
return (float) $a['native_amount'] < (float) $b['native_amount'] ? 1 : -1;
|
||||
});
|
||||
$converter->summarize();
|
||||
|
||||
|
||||
@@ -45,11 +45,7 @@ class UpdateController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
// new way of user group validation
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -46,12 +46,7 @@ class IndexController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
|
||||
// new way of user group validation
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -46,12 +46,7 @@ class ShowController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
|
||||
// new way of user group validation
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -45,11 +45,7 @@ class SumController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -46,11 +46,7 @@ class IndexController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(PiggyBankRepositoryInterface::class);
|
||||
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -52,10 +52,8 @@ class NetWorthController extends Controller
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
// new way of user group validation
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
if (null !== $userGroup) {
|
||||
$this->netWorth->setUserGroup($userGroup);
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
}
|
||||
$this->netWorth->setUserGroup($userGroup);
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -151,8 +151,9 @@ class HomeController extends Controller
|
||||
}
|
||||
|
||||
/** @var Carbon $start */
|
||||
/** @var Carbon $end */
|
||||
$start = session('start', today(config('app.timezone'))->startOfMonth());
|
||||
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$accounts = $repository->getAccountsById($frontpageArray);
|
||||
$today = today(config('app.timezone'));
|
||||
|
||||
@@ -130,12 +130,12 @@ class MailError extends Job implements ShouldQueue
|
||||
}
|
||||
if (file_exists($file)) {
|
||||
Log::debug(sprintf('Read file in "%s"', $file));
|
||||
$limits = json_decode(file_get_contents($file), true);
|
||||
$limits = json_decode((string)file_get_contents($file), true);
|
||||
}
|
||||
// limit reached?
|
||||
foreach ($types as $type => $info) {
|
||||
Log::debug(sprintf('Now checking limit "%s"', $type), $info);
|
||||
if (!isset($limits[$type])) {
|
||||
if (!array_key_exists($type, $limits)) {
|
||||
Log::debug(sprintf('Limit "%s" reset to zero, did not exist yet.', $type));
|
||||
$limits[$type] = [
|
||||
'time' => time(),
|
||||
|
||||
@@ -81,7 +81,7 @@ trait ValidatesUserGroupTrait
|
||||
throw new AuthorizationException((string) trans('validation.belongs_user_or_user_group'));
|
||||
}
|
||||
Log::debug(sprintf('validateUserGroup: validate access of user to group #%d ("%s").', $groupId, $group->title));
|
||||
$roles = property_exists($this, 'acceptedRoles') ? $this->acceptedRoles : [];
|
||||
$roles = property_exists($this, 'acceptedRoles') ? $this->acceptedRoles : []; // @phpstan-ignore-line
|
||||
if (0 === count($roles)) {
|
||||
Log::debug('validateUserGroup: no roles defined, so no access.');
|
||||
|
||||
|
||||
@@ -159,9 +159,7 @@ trait ConvertsDataTypes
|
||||
|
||||
if (method_exists($this, 'validateUserGroup')) { // @phpstan-ignore-line
|
||||
$userGroup = $this->validateUserGroup($this);
|
||||
if (null !== $userGroup) {
|
||||
$repository->setUserGroup($userGroup);
|
||||
}
|
||||
$repository->setUserGroup($userGroup);
|
||||
}
|
||||
|
||||
// set administration ID
|
||||
|
||||
69
composer.lock
generated
69
composer.lock
generated
@@ -1670,16 +1670,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v11.4.0",
|
||||
"version": "v11.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "c1dc67c28811dc5be524a30b18f29ce62126716a"
|
||||
"reference": "e3c24268f1404805e15099b9f035fe310cb30753"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/c1dc67c28811dc5be524a30b18f29ce62126716a",
|
||||
"reference": "c1dc67c28811dc5be524a30b18f29ce62126716a",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/e3c24268f1404805e15099b9f035fe310cb30753",
|
||||
"reference": "e3c24268f1404805e15099b9f035fe310cb30753",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1871,20 +1871,20 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2024-04-16T14:38:51+00:00"
|
||||
"time": "2024-04-23T15:11:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/passport",
|
||||
"version": "v12.1.0",
|
||||
"version": "v12.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/passport.git",
|
||||
"reference": "ff4742c71c58a4941b8738496ba96dabdf5e395b"
|
||||
"reference": "b24c6462835a16163141fbe588533d16603212b7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/passport/zipball/ff4742c71c58a4941b8738496ba96dabdf5e395b",
|
||||
"reference": "ff4742c71c58a4941b8738496ba96dabdf5e395b",
|
||||
"url": "https://api.github.com/repos/laravel/passport/zipball/b24c6462835a16163141fbe588533d16603212b7",
|
||||
"reference": "b24c6462835a16163141fbe588533d16603212b7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1947,20 +1947,20 @@
|
||||
"issues": "https://github.com/laravel/passport/issues",
|
||||
"source": "https://github.com/laravel/passport"
|
||||
},
|
||||
"time": "2024-04-15T18:49:04+00:00"
|
||||
"time": "2024-04-17T17:56:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/prompts",
|
||||
"version": "v0.1.19",
|
||||
"version": "v0.1.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/prompts.git",
|
||||
"reference": "0ab75ac3434d9f610c5691758a6146a3d1940c18"
|
||||
"reference": "bf9a360c484976692de0f3792f30066f4f4b34a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/0ab75ac3434d9f610c5691758a6146a3d1940c18",
|
||||
"reference": "0ab75ac3434d9f610c5691758a6146a3d1940c18",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/bf9a360c484976692de0f3792f30066f4f4b34a2",
|
||||
"reference": "bf9a360c484976692de0f3792f30066f4f4b34a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2002,9 +2002,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/prompts/issues",
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.1.19"
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.1.20"
|
||||
},
|
||||
"time": "2024-04-16T14:20:35+00:00"
|
||||
"time": "2024-04-18T00:45:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sanctum",
|
||||
@@ -5189,16 +5189,16 @@
|
||||
},
|
||||
{
|
||||
"name": "spatie/backtrace",
|
||||
"version": "1.5.3",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/backtrace.git",
|
||||
"reference": "483f76a82964a0431aa836b6ed0edde0c248e3ab"
|
||||
"reference": "8373b9d51638292e3bfd736a9c19a654111b4a23"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/backtrace/zipball/483f76a82964a0431aa836b6ed0edde0c248e3ab",
|
||||
"reference": "483f76a82964a0431aa836b6ed0edde0c248e3ab",
|
||||
"url": "https://api.github.com/repos/spatie/backtrace/zipball/8373b9d51638292e3bfd736a9c19a654111b4a23",
|
||||
"reference": "8373b9d51638292e3bfd736a9c19a654111b4a23",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5206,6 +5206,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-json": "*",
|
||||
"laravel/serializable-closure": "^1.3",
|
||||
"phpunit/phpunit": "^9.3",
|
||||
"spatie/phpunit-snapshot-assertions": "^4.2",
|
||||
"symfony/var-dumper": "^5.1"
|
||||
@@ -5235,7 +5236,7 @@
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/spatie/backtrace/tree/1.5.3"
|
||||
"source": "https://github.com/spatie/backtrace/tree/1.6.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5247,7 +5248,7 @@
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2023-06-28T12:59:17+00:00"
|
||||
"time": "2024-04-24T13:22:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/flare-client-php",
|
||||
@@ -5403,16 +5404,16 @@
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-html",
|
||||
"version": "3.7.0",
|
||||
"version": "3.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-html.git",
|
||||
"reference": "df15763c190954ee46a74e0bf5b4b5bbf2e1f170"
|
||||
"reference": "35802bd9b276ce08e1d9d15584b17fdef965063b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/df15763c190954ee46a74e0bf5b4b5bbf2e1f170",
|
||||
"reference": "df15763c190954ee46a74e0bf5b4b5bbf2e1f170",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/35802bd9b276ce08e1d9d15584b17fdef965063b",
|
||||
"reference": "35802bd9b276ce08e1d9d15584b17fdef965063b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5469,7 +5470,7 @@
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/spatie/laravel-html/tree/3.7.0"
|
||||
"source": "https://github.com/spatie/laravel-html/tree/3.9.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5477,7 +5478,7 @@
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-23T11:28:29+00:00"
|
||||
"time": "2024-04-25T08:07:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-ignition",
|
||||
@@ -10761,16 +10762,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.5.19",
|
||||
"version": "10.5.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "c726f0de022368f6ed103e452a765d3304a996a4"
|
||||
"reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c726f0de022368f6ed103e452a765d3304a996a4",
|
||||
"reference": "c726f0de022368f6ed103e452a765d3304a996a4",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3",
|
||||
"reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10842,7 +10843,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.19"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -10858,7 +10859,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-04-17T14:06:18+00:00"
|
||||
"time": "2024-04-24T06:32:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
||||
@@ -62,7 +62,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'editor' => env('DEBUGBAR_EDITOR') ?: env('IGNITION_EDITOR', 'phpstorm'),
|
||||
'editor' => env('DEBUGBAR_EDITOR') ?? env('IGNITION_EDITOR', 'phpstorm'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -117,7 +117,7 @@ return [
|
||||
'expression_engine' => false,
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => '6.1.15',
|
||||
'version' => 'develop/2024-04-26',
|
||||
'api_version' => '2.0.14',
|
||||
'db_version' => 24,
|
||||
|
||||
|
||||
60
package-lock.json
generated
60
package-lock.json
generated
@@ -2943,39 +2943,39 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-core": {
|
||||
"version": "3.4.24",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.24.tgz",
|
||||
"integrity": "sha512-vbW/tgbwJYj62N/Ww99x0zhFTkZDTcGh3uwJEuadZ/nF9/xuFMC4693P9r+3sxGXISABpDKvffY5ApH9pmdd1A==",
|
||||
"version": "3.4.25",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.25.tgz",
|
||||
"integrity": "sha512-Y2pLLopaElgWnMNolgG8w3C5nNUVev80L7hdQ5iIKPtMJvhVpG0zhnBG/g3UajJmZdvW0fktyZTotEHD1Srhbg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.24.4",
|
||||
"@vue/shared": "3.4.24",
|
||||
"@vue/shared": "3.4.25",
|
||||
"entities": "^4.5.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-dom": {
|
||||
"version": "3.4.24",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.24.tgz",
|
||||
"integrity": "sha512-4XgABML/4cNndVsQndG6BbGN7+EoisDwi3oXNovqL/4jdNhwvP8/rfRMTb6FxkxIxUUtg6AI1/qZvwfSjxJiWA==",
|
||||
"version": "3.4.25",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.25.tgz",
|
||||
"integrity": "sha512-Ugz5DusW57+HjllAugLci19NsDK+VyjGvmbB2TXaTcSlQxwL++2PETHx/+Qv6qFwNLzSt7HKepPe4DcTE3pBWg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-core": "3.4.24",
|
||||
"@vue/shared": "3.4.24"
|
||||
"@vue/compiler-core": "3.4.25",
|
||||
"@vue/shared": "3.4.25"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "3.4.24",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.24.tgz",
|
||||
"integrity": "sha512-nRAlJUK02FTWfA2nuvNBAqsDZuERGFgxZ8sGH62XgFSvMxO2URblzulExsmj4gFZ8e+VAyDooU9oAoXfEDNxTA==",
|
||||
"version": "3.4.25",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.25.tgz",
|
||||
"integrity": "sha512-m7rryuqzIoQpOBZ18wKyq05IwL6qEpZxFZfRxlNYuIPDqywrXQxgUwLXIvoU72gs6cRdY6wHD0WVZIFE4OEaAQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.24.4",
|
||||
"@vue/compiler-core": "3.4.24",
|
||||
"@vue/compiler-dom": "3.4.24",
|
||||
"@vue/compiler-ssr": "3.4.24",
|
||||
"@vue/shared": "3.4.24",
|
||||
"@vue/compiler-core": "3.4.25",
|
||||
"@vue/compiler-dom": "3.4.25",
|
||||
"@vue/compiler-ssr": "3.4.25",
|
||||
"@vue/shared": "3.4.25",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.10",
|
||||
"postcss": "^8.4.38",
|
||||
@@ -2983,13 +2983,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-ssr": {
|
||||
"version": "3.4.24",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.24.tgz",
|
||||
"integrity": "sha512-ZsAtr4fhaUFnVcDqwW3bYCSDwq+9Gk69q2r/7dAHDrOMw41kylaMgOP4zRnn6GIEJkQznKgrMOGPMFnLB52RbQ==",
|
||||
"version": "3.4.25",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.25.tgz",
|
||||
"integrity": "sha512-H2ohvM/Pf6LelGxDBnfbbXFPyM4NE3hrw0e/EpwuSiYu8c819wx+SVGdJ65p/sFrYDd6OnSDxN1MB2mN07hRSQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.24",
|
||||
"@vue/shared": "3.4.24"
|
||||
"@vue/compiler-dom": "3.4.25",
|
||||
"@vue/shared": "3.4.25"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/component-compiler-utils": {
|
||||
@@ -3064,9 +3064,9 @@
|
||||
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA=="
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.4.24",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.24.tgz",
|
||||
"integrity": "sha512-BW4tajrJBM9AGAknnyEw5tO2xTmnqgup0VTnDAMcxYmqOX0RG0b9aSUGAbEKolD91tdwpA6oCwbltoJoNzpItw==",
|
||||
"version": "3.4.25",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.25.tgz",
|
||||
"integrity": "sha512-k0yappJ77g2+KNrIaF0FFnzwLvUBLUYr8VOwz+/6vLsmItFp51AcxLL7Ey3iPd7BIRyWPOcqUjMnm7OkahXllA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
@@ -3373,9 +3373,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/alpinejs": {
|
||||
"version": "3.13.9",
|
||||
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.9.tgz",
|
||||
"integrity": "sha512-BTEJ3fcUpqKlB+aFYSWGVEp8IP3vA96x7wUaNSdb5SJxV5i7s+/Bduxy9D6TokcqpW5MygsnG1eBEFfr4AnQSw==",
|
||||
"version": "3.13.10",
|
||||
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.10.tgz",
|
||||
"integrity": "sha512-86RB307VWICex0vG15Eq0x058cNNsvS57ohrjN6n/TJAVSFV+zXOK/E34nNHDHc6Poq+yTNCLqEzPqEkRBTMRQ==",
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "~3.1.1"
|
||||
}
|
||||
@@ -5095,9 +5095,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.746",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.746.tgz",
|
||||
"integrity": "sha512-jeWaIta2rIG2FzHaYIhSuVWqC6KJYo7oSBX4Jv7g+aVujKztfvdpf+n6MGwZdC5hQXbax4nntykLH2juIQrfPg==",
|
||||
"version": "1.4.749",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.749.tgz",
|
||||
"integrity": "sha512-LRMMrM9ITOvue0PoBrvNIraVmuDbJV5QC9ierz/z5VilMdPOVMjOtpICNld3PuXuTZ3CHH/UPxX9gHhAPwi+0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
"title": "\u6807\u9898"
|
||||
},
|
||||
"list": {
|
||||
"drag_and_drop": "Drag and drop",
|
||||
"drag_and_drop": "\u62d6\u653e",
|
||||
"active": "\u662f\u5426\u542f\u7528\uff1f",
|
||||
"name": "\u540d\u79f0",
|
||||
"type": "\u7c7b\u578b",
|
||||
"number": "Account number",
|
||||
"number": "\u8d26\u6237\u53f7\u7801",
|
||||
"liability_type": "\u503a\u52a1\u7c7b\u578b",
|
||||
"current_balance": "Current balance",
|
||||
"last_activity": "Last activity",
|
||||
"amount_due": "Amount due",
|
||||
"balance_difference": "Balance difference",
|
||||
"menu": "Menu"
|
||||
"current_balance": "\u5f53\u524d\u4f59\u989d",
|
||||
"last_activity": "\u6700\u540e\u6d3b\u52a8",
|
||||
"amount_due": "\u5230\u671f\u91d1\u989d",
|
||||
"balance_difference": "\u4f59\u989d\u5dee",
|
||||
"menu": "\u83dc\u5355"
|
||||
},
|
||||
"validation": {
|
||||
"bad_type_source": "Firefly III \u65e0\u6cd5\u786e\u5b9a\u57fa\u4e8e\u6b64\u6e90\u8d26\u6237\u7684\u4ea4\u6613\u7c7b\u578b\u3002",
|
||||
@@ -28,22 +28,22 @@
|
||||
},
|
||||
"firefly": {
|
||||
"spent": "\u652f\u51fa",
|
||||
"administration_owner": "Administration owner: {{email}}",
|
||||
"administration_you": "Your role: {{role}}",
|
||||
"administration_role_owner": "Owner",
|
||||
"administration_role_ro": "Read-only",
|
||||
"administration_role_mng_trx": "Manage transactions",
|
||||
"administration_role_mng_meta": "Manage classification and meta-data",
|
||||
"administration_role_mng_budgets": "Manage budgets",
|
||||
"administration_role_mng_piggies": "Manage piggy banks",
|
||||
"administration_role_mng_subscriptions": "Manage subscriptions",
|
||||
"administration_role_mng_rules": "Manage rules",
|
||||
"administration_role_mng_recurring": "Manage recurring transactions ",
|
||||
"administration_role_mng_webhooks": "Manage webhooks",
|
||||
"administration_role_mng_currencies": "Manage currencies",
|
||||
"administration_role_view_reports": "View reports",
|
||||
"administration_role_full": "Full access",
|
||||
"new_administration_created": "New financial administration \"{{title}}\" has been created",
|
||||
"administration_owner": "\u7ba1\u7406\u5458\u5f52\u5c5e: {{email}}",
|
||||
"administration_you": "\u4f60\u7684\u89d2\u8272: {{role}}",
|
||||
"administration_role_owner": "\u6240\u6709\u8005",
|
||||
"administration_role_ro": "\u53ea\u8bfb",
|
||||
"administration_role_mng_trx": "\u7ba1\u7406\u4ea4\u6613",
|
||||
"administration_role_mng_meta": "\u7ba1\u7406\u5206\u7c7b\u548c\u5143\u6570\u636e",
|
||||
"administration_role_mng_budgets": "\u7ba1\u7406\u9884\u7b97",
|
||||
"administration_role_mng_piggies": "\u7ba1\u7406\u5b58\u94b1\u7f50",
|
||||
"administration_role_mng_subscriptions": "\u7ba1\u7406\u8ba2\u9605",
|
||||
"administration_role_mng_rules": "\u7ba1\u7406\u89c4\u5219",
|
||||
"administration_role_mng_recurring": "\u7ba1\u7406\u5b9a\u671f\u4ea4\u6613 ",
|
||||
"administration_role_mng_webhooks": "\u7ba1\u7406 Webhooks",
|
||||
"administration_role_mng_currencies": "\u7ba1\u7406\u5e01\u79cd",
|
||||
"administration_role_view_reports": "\u67e5\u770b\u62a5\u8868",
|
||||
"administration_role_full": "\u5b8c\u5168\u8bbf\u95ee",
|
||||
"new_administration_created": "\u65b0\u7684\u8d22\u52a1\u7ba1\u7406\u5458 \"{{title}}\" \u5df2\u521b\u5efa",
|
||||
"left": "\u5269\u4f59",
|
||||
"paid": "\u5df2\u4ed8\u6b3e",
|
||||
"errors_submission_v2": "\u60a8\u63d0\u4ea4\u7684\u5185\u5bb9\u6709\u8bef\uff0c\u8bf7\u68c0\u67e5\u9519\u8bef\u4fe1\u606f: {{errorMessage}}",
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
"title": "\u6807\u9898"
|
||||
},
|
||||
"list": {
|
||||
"drag_and_drop": "Drag and drop",
|
||||
"drag_and_drop": "\u62d6\u653e",
|
||||
"active": "\u662f\u5426\u542f\u7528\uff1f",
|
||||
"name": "\u540d\u79f0",
|
||||
"type": "\u7c7b\u578b",
|
||||
"number": "Account number",
|
||||
"number": "\u8d26\u6237\u53f7\u7801",
|
||||
"liability_type": "\u503a\u52a1\u7c7b\u578b",
|
||||
"current_balance": "Current balance",
|
||||
"last_activity": "Last activity",
|
||||
"amount_due": "Amount due",
|
||||
"balance_difference": "Balance difference",
|
||||
"menu": "Menu"
|
||||
"current_balance": "\u5f53\u524d\u4f59\u989d",
|
||||
"last_activity": "\u6700\u540e\u6d3b\u52a8",
|
||||
"amount_due": "\u5230\u671f\u91d1\u989d",
|
||||
"balance_difference": "\u4f59\u989d\u5dee",
|
||||
"menu": "\u83dc\u5355"
|
||||
},
|
||||
"validation": {
|
||||
"bad_type_source": "Firefly III \u65e0\u6cd5\u786e\u5b9a\u57fa\u4e8e\u6b64\u6e90\u8d26\u6237\u7684\u4ea4\u6613\u7c7b\u578b\u3002",
|
||||
@@ -28,22 +28,22 @@
|
||||
},
|
||||
"firefly": {
|
||||
"spent": "\u652f\u51fa",
|
||||
"administration_owner": "Administration owner: {{email}}",
|
||||
"administration_you": "Your role: {{role}}",
|
||||
"administration_role_owner": "Owner",
|
||||
"administration_role_ro": "Read-only",
|
||||
"administration_role_mng_trx": "Manage transactions",
|
||||
"administration_role_mng_meta": "Manage classification and meta-data",
|
||||
"administration_role_mng_budgets": "Manage budgets",
|
||||
"administration_role_mng_piggies": "Manage piggy banks",
|
||||
"administration_role_mng_subscriptions": "Manage subscriptions",
|
||||
"administration_role_mng_rules": "Manage rules",
|
||||
"administration_role_mng_recurring": "Manage recurring transactions ",
|
||||
"administration_role_mng_webhooks": "Manage webhooks",
|
||||
"administration_role_mng_currencies": "Manage currencies",
|
||||
"administration_role_view_reports": "View reports",
|
||||
"administration_role_full": "Full access",
|
||||
"new_administration_created": "New financial administration \"{{title}}\" has been created",
|
||||
"administration_owner": "\u7ba1\u7406\u5458\u5f52\u5c5e: {{email}}",
|
||||
"administration_you": "\u4f60\u7684\u89d2\u8272: {{role}}",
|
||||
"administration_role_owner": "\u6240\u6709\u8005",
|
||||
"administration_role_ro": "\u53ea\u8bfb",
|
||||
"administration_role_mng_trx": "\u7ba1\u7406\u4ea4\u6613",
|
||||
"administration_role_mng_meta": "\u7ba1\u7406\u5206\u7c7b\u548c\u5143\u6570\u636e",
|
||||
"administration_role_mng_budgets": "\u7ba1\u7406\u9884\u7b97",
|
||||
"administration_role_mng_piggies": "\u7ba1\u7406\u5b58\u94b1\u7f50",
|
||||
"administration_role_mng_subscriptions": "\u7ba1\u7406\u8ba2\u9605",
|
||||
"administration_role_mng_rules": "\u7ba1\u7406\u89c4\u5219",
|
||||
"administration_role_mng_recurring": "\u7ba1\u7406\u5b9a\u671f\u4ea4\u6613 ",
|
||||
"administration_role_mng_webhooks": "\u7ba1\u7406 Webhooks",
|
||||
"administration_role_mng_currencies": "\u7ba1\u7406\u5e01\u79cd",
|
||||
"administration_role_view_reports": "\u67e5\u770b\u62a5\u8868",
|
||||
"administration_role_full": "\u5b8c\u5168\u8bbf\u95ee",
|
||||
"new_administration_created": "\u65b0\u7684\u8d22\u52a1\u7ba1\u7406\u5458 \"{{title}}\" \u5df2\u521b\u5efa",
|
||||
"left": "\u5269\u4f59",
|
||||
"paid": "\u5df2\u4ed8\u6b3e",
|
||||
"errors_submission_v2": "\u60a8\u63d0\u4ea4\u7684\u5185\u5bb9\u6709\u8bef\uff0c\u8bf7\u68c0\u67e5\u9519\u8bef\u4fe1\u606f: {{errorMessage}}",
|
||||
|
||||
@@ -72,6 +72,12 @@ let index = function () {
|
||||
page: 1,
|
||||
filters: {
|
||||
active: 'both',
|
||||
name: null,
|
||||
},
|
||||
pageOptions: {
|
||||
groupedAccounts: true,
|
||||
sortingColumn: sortingColumn,
|
||||
sortDirection: sortDirection,
|
||||
},
|
||||
|
||||
// available columns:
|
||||
@@ -131,8 +137,6 @@ let index = function () {
|
||||
},
|
||||
},
|
||||
editors: {},
|
||||
sortingColumn: sortingColumn,
|
||||
sortDirection: sortDirection,
|
||||
accounts: [],
|
||||
|
||||
accountRole(roleName) {
|
||||
@@ -140,12 +144,20 @@ let index = function () {
|
||||
},
|
||||
|
||||
sort(column) {
|
||||
this.sortingColumn = column;
|
||||
this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
|
||||
const url = './accounts/' + type + '?column=' + column + '&direction=' + this.sortDirection;
|
||||
this.pageOptions.sortingColumn = column;
|
||||
this.pageOptions.sortDirection = this.pageOptions.sortDirection === 'asc' ? 'desc' : 'asc';
|
||||
const url = './accounts/' + type + '?column=' + column + '&direction=' + this.pageOptions.sortDirection;
|
||||
|
||||
window.history.pushState({}, "", url);
|
||||
|
||||
// get sort column
|
||||
// TODO variable name in better place
|
||||
const columnKey = 'acc_index_' + type + '_sc';
|
||||
const directionKey = 'acc_index_' + type + '_sd';
|
||||
|
||||
setVariable(columnKey, this.pageOptions.sortingColumn);
|
||||
setVariable(directionKey, this.pageOptions.sortDirection);
|
||||
|
||||
this.loadAccounts();
|
||||
return false;
|
||||
},
|
||||
@@ -165,23 +177,53 @@ let index = function () {
|
||||
}
|
||||
}
|
||||
console.log('New settings', newSettings);
|
||||
setVariable('accts_columns_' + type, newSettings);
|
||||
setVariable('acc_index_' + type + '_columns', newSettings);
|
||||
},
|
||||
|
||||
init() {
|
||||
this.notifications.wait.show = true;
|
||||
this.notifications.wait.text = i18next.t('firefly.wait_loading_data')
|
||||
this.notifications.wait.text = i18next.t('firefly.wait_loading_data');
|
||||
|
||||
const key = 'accts_columns_' + type;
|
||||
// get column preference
|
||||
// TODO key in better variable
|
||||
const key = 'acc_index_' + type + '_columns';
|
||||
const defaultValue = {"drag_and_drop": false};
|
||||
|
||||
// get sort column
|
||||
const columnKey = 'acc_index_' + type + '_sc';
|
||||
const columnDefault = '';
|
||||
|
||||
// get sort direction
|
||||
const directionKey = 'acc_index_' + type + '_sd';
|
||||
const directionDefault = '';
|
||||
|
||||
|
||||
getVariable(key, defaultValue).then((response) => {
|
||||
for (let k in response) {
|
||||
if (response.hasOwnProperty(k) && this.tableColumns.hasOwnProperty(k)) {
|
||||
this.tableColumns[k].enabled = response[k] ?? true;
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
}).
|
||||
// get sorting preference, and overrule it if is not "" twice
|
||||
then(() => {
|
||||
return getVariable(columnKey, columnDefault).then((response) => {
|
||||
console.log('Sorting column is "' + response + '"');
|
||||
this.pageOptions.sortingColumn = '' === this.pageOptions.sortingColumn ? response : this.pageOptions.sortingColumn;
|
||||
})
|
||||
})
|
||||
.
|
||||
// get sorting preference, and overrule it if is not "" twice
|
||||
then(() => {
|
||||
return getVariable(directionKey, directionDefault).then((response) => {
|
||||
console.log('Sorting direction is "' + response + '"');
|
||||
this.pageOptions.sortDirection = '' === this.pageOptions.sortDirection ? response : this.pageOptions.sortDirection;
|
||||
})
|
||||
}).
|
||||
|
||||
|
||||
|
||||
then(() => {
|
||||
this.loadAccounts();
|
||||
});
|
||||
|
||||
@@ -230,7 +272,7 @@ let index = function () {
|
||||
loadAccounts() {
|
||||
|
||||
// sort instructions
|
||||
const sorting = [{column: this.sortingColumn, direction: this.sortDirection}];
|
||||
const sorting = [{column: this.pageOptions.sortingColumn, direction: this.pageOptions.sortDirection}];
|
||||
|
||||
// get start and end from the store:
|
||||
const start = new Date(window.store.get('start'));
|
||||
|
||||
@@ -39,6 +39,10 @@ export function getVariable(name, defaultValue = null) {
|
||||
return getter.getByName(name).then((response) => {
|
||||
return Promise.resolve(parseResponse(name, response));
|
||||
}).catch((error) => {
|
||||
if('' === defaultValue) {
|
||||
// do not try to store empty strings.
|
||||
return Promise.resolve(defaultValue);
|
||||
}
|
||||
// preference does not exist (yet).
|
||||
// POST it and then return it anyway.
|
||||
let poster = (new Post);
|
||||
|
||||
@@ -1420,34 +1420,34 @@ return [
|
||||
// Financial administrations
|
||||
'administration_index' => '财务管理',
|
||||
'administrations_index_menu' => '财务管理',
|
||||
'administrations_breadcrumb' => 'Financial administrations',
|
||||
'administrations_page_title' => 'Financial administrations',
|
||||
'administrations_page_sub_title' => 'Overview',
|
||||
'create_administration' => 'Create new administration',
|
||||
'administration_owner' => 'Administration owner: {{email}}',
|
||||
'administration_you' => 'Your role: {{role}}',
|
||||
'other_users_in_admin' => 'Other users in this administration',
|
||||
'administrations_create_breadcrumb' => 'Create new financial administration',
|
||||
'administrations_page_create_sub_title' => 'Create new financial administration',
|
||||
'basic_administration_information' => 'Basic administration information',
|
||||
'new_administration_created' => 'New financial administration "{{title}}" has been created',
|
||||
'edit_administration_breadcrumb' => 'Edit financial administration ":title"',
|
||||
'administrations_page_edit_sub_title' => 'Edit financial administration ":title"',
|
||||
'administrations_breadcrumb' => '财务管理',
|
||||
'administrations_page_title' => '财务管理',
|
||||
'administrations_page_sub_title' => '概览',
|
||||
'create_administration' => '创建新的管理',
|
||||
'administration_owner' => '管理员归属: {{email}}',
|
||||
'administration_you' => '你的角色: {{role}}',
|
||||
'other_users_in_admin' => '其他的管理员账户',
|
||||
'administrations_create_breadcrumb' => '创建新的财务管理',
|
||||
'administrations_page_create_sub_title' => '创建新的财务管理',
|
||||
'basic_administration_information' => '基础管理员信息',
|
||||
'new_administration_created' => '新的财务管理员 "{{title}}" 已创建',
|
||||
'edit_administration_breadcrumb' => '编辑财务管理员 ":title"',
|
||||
'administrations_page_edit_sub_title' => '编辑财务管理员 ":title"',
|
||||
|
||||
// roles
|
||||
'administration_role_owner' => 'Owner',
|
||||
'administration_role_ro' => 'Read-only',
|
||||
'administration_role_mng_trx' => 'Manage transactions',
|
||||
'administration_role_mng_meta' => 'Manage classification and meta-data',
|
||||
'administration_role_mng_budgets' => 'Manage budgets',
|
||||
'administration_role_mng_piggies' => 'Manage piggy banks',
|
||||
'administration_role_mng_subscriptions' => 'Manage subscriptions',
|
||||
'administration_role_mng_rules' => 'Manage rules',
|
||||
'administration_role_mng_recurring' => 'Manage recurring transactions ',
|
||||
'administration_role_mng_webhooks' => 'Manage webhooks',
|
||||
'administration_role_mng_currencies' => 'Manage currencies',
|
||||
'administration_role_view_reports' => 'View reports',
|
||||
'administration_role_full' => 'Full access',
|
||||
'administration_role_owner' => '所有者',
|
||||
'administration_role_ro' => '只读',
|
||||
'administration_role_mng_trx' => '管理交易',
|
||||
'administration_role_mng_meta' => '管理分类和元数据',
|
||||
'administration_role_mng_budgets' => '管理预算',
|
||||
'administration_role_mng_piggies' => '管理存钱罐',
|
||||
'administration_role_mng_subscriptions' => '管理订阅',
|
||||
'administration_role_mng_rules' => '管理规则',
|
||||
'administration_role_mng_recurring' => '管理定期交易 ',
|
||||
'administration_role_mng_webhooks' => '管理 Webhooks',
|
||||
'administration_role_mng_currencies' => '管理币种',
|
||||
'administration_role_view_reports' => '查看报表',
|
||||
'administration_role_full' => '完全访问',
|
||||
|
||||
// profile:
|
||||
'purge_data_title' => '从 Frefly III 清除数据',
|
||||
@@ -1962,19 +1962,19 @@ return [
|
||||
'interest_calc_quarterly' => '每季度',
|
||||
'initial_balance_account' => '初始余额账户“:account”',
|
||||
'list_options' => '列表选项',
|
||||
'account_column_opt_drag_and_drop' => 'Drag and drop',
|
||||
'account_column_opt_active' => 'Active',
|
||||
'account_column_opt_name' => 'Name',
|
||||
'account_column_opt_type' => 'Type',
|
||||
'account_column_opt_liability_type' => 'Liability type',
|
||||
'account_column_opt_liability_direction' => 'Liability direction',
|
||||
'account_column_opt_liability_interest' => 'Liability interest',
|
||||
'account_column_opt_number' => 'Account number',
|
||||
'account_column_opt_current_balance' => 'Current balance',
|
||||
'account_column_opt_amount_due' => 'Amount due',
|
||||
'account_column_opt_last_activity' => 'Last activity',
|
||||
'account_column_opt_balance_difference' => 'Balance difference',
|
||||
'account_column_opt_menu' => 'Menu',
|
||||
'account_column_opt_drag_and_drop' => '拖放',
|
||||
'account_column_opt_active' => '启用',
|
||||
'account_column_opt_name' => '名称',
|
||||
'account_column_opt_type' => '类别',
|
||||
'account_column_opt_liability_type' => '债务类型',
|
||||
'account_column_opt_liability_direction' => '赔偿责任方向',
|
||||
'account_column_opt_liability_interest' => '债务利息',
|
||||
'account_column_opt_number' => '账户号码',
|
||||
'account_column_opt_current_balance' => '当前余额',
|
||||
'account_column_opt_amount_due' => '到期金额',
|
||||
'account_column_opt_last_activity' => '最后活动',
|
||||
'account_column_opt_balance_difference' => '余额差',
|
||||
'account_column_opt_menu' => '菜单',
|
||||
|
||||
// categories:
|
||||
'new_category' => '新分类',
|
||||
@@ -2158,7 +2158,7 @@ return [
|
||||
'logout' => '退出登录',
|
||||
'logout_other_sessions' => '退出所有其他已登录设备',
|
||||
'toggleNavigation' => '切换导览',
|
||||
'toggle_dropdown' => 'Toggle dropdown',
|
||||
'toggle_dropdown' => '切换下拉列表',
|
||||
'searchPlaceholder' => '搜索…',
|
||||
'version' => '版本',
|
||||
'dashboard' => '仪表盘',
|
||||
|
||||
@@ -67,13 +67,13 @@ return [
|
||||
'source' => '来源',
|
||||
'next_expected_match' => '预期下次支付',
|
||||
'automatch' => '自动匹配?',
|
||||
'drag_and_drop' => 'Drag and drop',
|
||||
'number' => 'Account number',
|
||||
'current_balance' => 'Current balance',
|
||||
'last_activity' => 'Last activity',
|
||||
'amount_due' => 'Amount due',
|
||||
'balance_difference' => 'Balance difference',
|
||||
'menu' => 'Menu',
|
||||
'drag_and_drop' => '拖放',
|
||||
'number' => '账户号码',
|
||||
'current_balance' => '当前余额',
|
||||
'last_activity' => '最后活动',
|
||||
'amount_due' => '到期金额',
|
||||
'balance_difference' => '余额差',
|
||||
'menu' => '菜单',
|
||||
|
||||
/*
|
||||
* PLEASE DO NOT EDIT THIS FILE DIRECTLY.
|
||||
|
||||
@@ -68,8 +68,8 @@ return [
|
||||
'invalid_selection' => '您的选择无效',
|
||||
'belongs_user' => '此值关联至一个似乎不存在的对象。',
|
||||
'belongs_user_or_user_group' => '此值关联至当前财务管理中一个似乎不存在的对象。',
|
||||
'no_access_group' => 'The user has no access to this user group.',
|
||||
'no_accepted_roles_defined' => 'No access roles have been defined for this endpoint, access denied.',
|
||||
'no_access_group' => '用户没有访问此用户组的权限。',
|
||||
'no_accepted_roles_defined' => '此端点没有定义访问角色,访问被拒绝。',
|
||||
'at_least_one_transaction' => '至少需要一笔交易',
|
||||
'recurring_transaction_id' => '至少需要一笔交易。',
|
||||
'need_id_to_match' => '您需要提交一个含有ID的条目,API才能匹配。',
|
||||
@@ -302,7 +302,7 @@ return [
|
||||
|
||||
// no access to administration:
|
||||
'no_access_user_group' => '您没有管理员访问权限',
|
||||
'administration_owner_rename' => 'You can\'t rename your standard administration.',
|
||||
'administration_owner_rename' => '您不能重命名您的标准管理员',
|
||||
];
|
||||
|
||||
/*
|
||||
|
||||
@@ -59,68 +59,103 @@
|
||||
<td x-show="tableColumns.drag_and_drop.visible && tableColumns.drag_and_drop.enabled">
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.active.visible && tableColumns.active.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('active')">Active?</a>
|
||||
<em x-show="sortingColumn === 'active' && sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="sortingColumn === 'active' && sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
</td>
|
||||
<td x-show="tableColumns.active.visible && tableColumns.active.enabled"> </td>
|
||||
<td x-show="tableColumns.name.visible && tableColumns.name.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('name')">Name</a>
|
||||
<em x-show="sortingColumn === 'name' && sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-z-a"></em>
|
||||
<em x-show="sortingColumn === 'name' && sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-z-a"></em>
|
||||
<em>"Filtered"</em>
|
||||
</td>
|
||||
<td x-show="tableColumns.type.visible && tableColumns.type.enabled">Type</td>
|
||||
<td x-show="tableColumns.type.visible && tableColumns.type.enabled"> </td>
|
||||
<td x-show="tableColumns.liability_type.visible && tableColumns.liability_type.enabled">
|
||||
Liability type
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.liability_direction.visible && tableColumns.liability_direction.enabled">
|
||||
Liability direction
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.liability_interest.visible && tableColumns.liability_interest.enabled">
|
||||
Liability interest
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.number.visible && tableColumns.number.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('iban')">Account number</a>
|
||||
<em x-show="sortingColumn === 'iban' && sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-z-a"></em>
|
||||
<em x-show="sortingColumn === 'iban' && sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-z-a"></em>
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.current_balance.visible && tableColumns.current_balance.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('balance')">Current balance</a>
|
||||
<em x-show="sortingColumn === 'balance' && sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="sortingColumn === 'balance' && sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.amount_due.visible && tableColumns.amount_due.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('amount_due')">Amount due</a>
|
||||
<em x-show="sortingColumn === 'amount_due' && sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="sortingColumn === 'amount_due' && sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.last_activity.visible && tableColumns.last_activity.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('last_activity')">Last activity</a>
|
||||
<em x-show="sortingColumn === 'last_activity' && sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="sortingColumn === 'last_activity' && sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.balance_difference.visible && tableColumns.balance_difference.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('balance_difference')">Balance
|
||||
difference</a>
|
||||
<em x-show="sortingColumn === 'balance_difference' && sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="sortingColumn === 'balance_difference' && sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
|
||||
</td>
|
||||
<td x-show="tableColumns.menu.visible && tableColumns.menu.enabled"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th x-show="tableColumns.drag_and_drop.visible && tableColumns.drag_and_drop.enabled">
|
||||
|
||||
</th>
|
||||
<th x-show="tableColumns.active.visible && tableColumns.active.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('active')">Active?</a>
|
||||
<em x-show="pageOptions.sortingColumn === 'active' && pageOptions.sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="pageOptions.sortingColumn === 'active' && pageOptions.sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
</th>
|
||||
<th x-show="tableColumns.name.visible && tableColumns.name.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('name')">Name</a>
|
||||
<em x-show="pageOptions.sortingColumn === 'name' && pageOptions.sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-a-z"></em>
|
||||
<em x-show="pageOptions.sortingColumn === 'name' && pageOptions.sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-down-z-a"></em>
|
||||
</th>
|
||||
<th x-show="tableColumns.type.visible && tableColumns.type.enabled">Type</th>
|
||||
<th x-show="tableColumns.liability_type.visible && tableColumns.liability_type.enabled">
|
||||
Liability type
|
||||
</th>
|
||||
<th x-show="tableColumns.liability_direction.visible && tableColumns.liability_direction.enabled">
|
||||
Liability direction
|
||||
</th>
|
||||
<th x-show="tableColumns.liability_interest.visible && tableColumns.liability_interest.enabled">
|
||||
Liability interest
|
||||
</th>
|
||||
<th x-show="tableColumns.number.visible && tableColumns.number.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('iban')">Account number</a>
|
||||
<em x-show="pageOptions.sortingColumn === 'iban' && pageOptions.sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-z-a"></em>
|
||||
<em x-show="pageOptions.sortingColumn === 'iban' && pageOptions.sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-z-a"></em>
|
||||
</th>
|
||||
<th x-show="tableColumns.current_balance.visible && tableColumns.current_balance.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('balance')">Current balance</a>
|
||||
<em x-show="pageOptions.sortingColumn === 'balance' && pageOptions.sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="pageOptions.sortingColumn === 'balance' && pageOptions.sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
</th>
|
||||
<th x-show="tableColumns.amount_due.visible && tableColumns.amount_due.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('amount_due')">Amount due</a>
|
||||
<em x-show="pageOptions.sortingColumn === 'amount_due' && pageOptions.sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="pageOptions.sortingColumn === 'amount_due' && pageOptions.sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
</th>
|
||||
<th x-show="tableColumns.last_activity.visible && tableColumns.last_activity.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('last_activity')">Last activity</a>
|
||||
<em x-show="pageOptions.sortingColumn === 'last_activity' && pageOptions.sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="pageOptions.sortingColumn === 'last_activity' && pageOptions.sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
</th>
|
||||
<th x-show="tableColumns.balance_difference.visible && tableColumns.balance_difference.enabled">
|
||||
<a href="#" x-on:click.prevent="sort('balance_difference')">Balance
|
||||
difference</a>
|
||||
<em x-show="pageOptions.sortingColumn === 'balance_difference' && pageOptions.sortDirection === 'asc'"
|
||||
class="fa-solid fa-arrow-down-wide-short"></em>
|
||||
<em x-show="pageOptions.sortingColumn === 'balance_difference' && pageOptions.sortDirection === 'desc'"
|
||||
class="fa-solid fa-arrow-up-wide-short"></em>
|
||||
</th>
|
||||
<th x-show="tableColumns.menu.visible && tableColumns.menu.enabled"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template x-for="(account, index) in accounts" :key="index">
|
||||
@@ -268,30 +303,63 @@
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5>Visible columns</h5>
|
||||
<div class="mb-2">
|
||||
<template x-for="(column, key) in tableColumns" :key="key">
|
||||
<div class="form-check" x-show="column.visible">
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail3" class="col-sm-4 col-form-label">Visible columns</label>
|
||||
<div class="col-sm-8">
|
||||
<template x-for="(column, key) in tableColumns" :key="key">
|
||||
<div class="form-check form-switch form-check-inline" x-show="column.visible">
|
||||
<label>
|
||||
<input class="form-check-input" type="checkbox" x-model="column.enabled"
|
||||
@change="saveColumnSettings"> <span
|
||||
x-text="$t('list.'+key)"></span>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail3" class="col-sm-4 col-form-label">Active accounts?</label>
|
||||
<div class="col-sm-8">
|
||||
<select x-model="filters.active" class="form-control">
|
||||
<option value="active" label="Active accounts">Active accounts only</option>
|
||||
<option value="inactive" label="Inactive accounts">Inactive accounts only
|
||||
</option>
|
||||
<option value="both" label="Both">All accounts</option>
|
||||
</select>
|
||||
<div id="emailHelp" class="form-text">TODO Bla bla bla.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail3" class="col-sm-4 col-form-label">Group accounts</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-check form-switch">
|
||||
<label>
|
||||
<input class="form-check-input" type="checkbox" x-model="column.enabled"
|
||||
@change="saveColumnSettings"> <span x-text="$t('list.'+key)"></span>
|
||||
<input class="form-check-input" type="checkbox"
|
||||
x-model="pageOptions.groupedAccounts"><span>Group accounts</span>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<h5>Options</h5>
|
||||
<div class="mb-2">
|
||||
<select x-model="filters.active" class="form-control">
|
||||
<option value="active" label="Active accounts">Active accounts</option>
|
||||
<option value="inactive" label="Inactive accounts">Inactive accounts</option>
|
||||
<option value="both" label="Both">Both</option>
|
||||
</select>
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail3" class="col-sm-4 col-form-label">Show info boxes</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-check form-switch form-check-inline">
|
||||
<label>
|
||||
<input class="form-check-input" type="checkbox"> <span>Box A</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-switch form-check-inline">
|
||||
<label>
|
||||
<input class="form-check-input" type="checkbox"> <span>Box B</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-switch form-check-inline">
|
||||
<label>
|
||||
<input class="form-check-input" type="checkbox"> <span>Box C</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
- Group accounts <br>
|
||||
- default sort field<br>
|
||||
- default sort direction<br>
|
||||
- show info boxes (once they contain info)<br>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
|
||||
@@ -818,6 +818,7 @@ Route::group(
|
||||
static function (): void {
|
||||
Route::get('', ['uses' => 'PreferencesController@index', 'as' => 'index']);
|
||||
Route::post('', ['uses' => 'PreferencesController@store', 'as' => 'store']);
|
||||
// Route::get('{preferenceList}', ['uses' => 'PreferencesController@showList', 'as' => 'show-list'])->where('preferenceList', ',+');
|
||||
Route::get('{preference}', ['uses' => 'PreferencesController@show', 'as' => 'show']);
|
||||
Route::put('{preference}', ['uses' => 'PreferencesController@update', 'as' => 'update']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user