mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-03-11 06:48:13 +00:00
Compare commits
100 Commits
develop-20
...
develop-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
746f1fd300 | ||
|
|
9e5faf919f | ||
|
|
cc6cbe6605 | ||
|
|
dc6d708897 | ||
|
|
6189d24b98 | ||
|
|
f6e28dc88f | ||
|
|
75ea035630 | ||
|
|
4cdb14301d | ||
|
|
9f95221ba3 | ||
|
|
e3a67be412 | ||
|
|
5749b642ce | ||
|
|
baff7c67f9 | ||
|
|
ccc005942f | ||
|
|
5b83c33039 | ||
|
|
cc32578c5f | ||
|
|
80f410835b | ||
|
|
b537a3145d | ||
|
|
bfa1fcbaf8 | ||
|
|
56243907c4 | ||
|
|
5928dd72e6 | ||
|
|
c6bf0ff1cd | ||
|
|
19d1cf192b | ||
|
|
37d7dc7e3e | ||
|
|
95a3a194b8 | ||
|
|
3542387188 | ||
|
|
da1b002a64 | ||
|
|
46daee28e7 | ||
|
|
9ade5635d4 | ||
|
|
e14e80f33c | ||
|
|
0c824e21c8 | ||
|
|
fab1c68569 | ||
|
|
c1534657f2 | ||
|
|
39841de680 | ||
|
|
43a720b62b | ||
|
|
5ec54de29e | ||
|
|
397e37f344 | ||
|
|
b6f84c2b99 | ||
|
|
843f86fc66 | ||
|
|
0e8e364074 | ||
|
|
bbccbef578 | ||
|
|
ee11a8e3a0 | ||
|
|
e8618047bd | ||
|
|
f104b76f73 | ||
|
|
cb701d8506 | ||
|
|
70a334c56e | ||
|
|
e6b2db1e29 | ||
|
|
e8dffa0052 | ||
|
|
c4f0512f39 | ||
|
|
3268019d0c | ||
|
|
a0ef6a1fc8 | ||
|
|
99d0098b20 | ||
|
|
a7a54c042c | ||
|
|
c44e48a793 | ||
|
|
53b501ca73 | ||
|
|
322f70bcca | ||
|
|
35559c077b | ||
|
|
590ffe7c76 | ||
|
|
8a2d8f148e | ||
|
|
4f0e15e07d | ||
|
|
7463861e0c | ||
|
|
1e70fa28be | ||
|
|
26c6ca470b | ||
|
|
5e54034e0e | ||
|
|
25873ef734 | ||
|
|
1092b04b22 | ||
|
|
01ce74dd72 | ||
|
|
41430d8386 | ||
|
|
01eb19169c | ||
|
|
cfaa7d7c68 | ||
|
|
14d3312a10 | ||
|
|
87be478dd8 | ||
|
|
0b6877a20e | ||
|
|
7186f0ef60 | ||
|
|
538933691e | ||
|
|
46c49ddbd8 | ||
|
|
bcfb134b6e | ||
|
|
57981f1cf9 | ||
|
|
0310186fb7 | ||
|
|
4dcb38290e | ||
|
|
2f5c37048b | ||
|
|
370c8b16ae | ||
|
|
af0555592a | ||
|
|
9c07ddaed6 | ||
|
|
bb7355a566 | ||
|
|
1d48347f8c | ||
|
|
060b76ca9c | ||
|
|
2b2b9b6f7a | ||
|
|
f3dd05a0c0 | ||
|
|
47a91aa273 | ||
|
|
41bc236603 | ||
|
|
65349451ea | ||
|
|
e77b6a55a4 | ||
|
|
2379bcff11 | ||
|
|
7133156fa1 | ||
|
|
a59176689d | ||
|
|
bc2d8f3dfb | ||
|
|
ddf89a9d5a | ||
|
|
7daaba17f6 | ||
|
|
9cb5b1384f | ||
|
|
d892257e8b |
40
.ci/php-cs-fixer/composer.lock
generated
40
.ci/php-cs-fixer/composer.lock
generated
@@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/pcre",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/pcre.git",
|
||||
"reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace"
|
||||
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/4775f35b2d70865807c89d32c8e7385b86eb0ace",
|
||||
"reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
|
||||
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -59,7 +59,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/pcre/issues",
|
||||
"source": "https://github.com/composer/pcre/tree/3.1.2"
|
||||
"source": "https://github.com/composer/pcre/tree/3.1.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -75,7 +75,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-07T15:38:35+00:00"
|
||||
"time": "2024-03-19T10:26:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
@@ -160,16 +160,16 @@
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "3.0.3",
|
||||
"version": "3.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/xdebug-handler.git",
|
||||
"reference": "ced299686f41dce890debac69273b47ffe98a40c"
|
||||
"reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c",
|
||||
"reference": "ced299686f41dce890debac69273b47ffe98a40c",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255",
|
||||
"reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -180,7 +180,7 @@
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.1",
|
||||
"symfony/phpunit-bridge": "^6.0"
|
||||
"phpunit/phpunit": "^8.5 || ^9.6 || ^10.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -204,9 +204,9 @@
|
||||
"performance"
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"irc": "ircs://irc.libera.chat:6697/composer",
|
||||
"issues": "https://github.com/composer/xdebug-handler/issues",
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/3.0.3"
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/3.0.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -222,20 +222,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-02-25T21:32:43+00:00"
|
||||
"time": "2024-03-26T18:29:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v3.52.0",
|
||||
"version": "v3.52.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
||||
"reference": "a3564bd66f4bce9bc871ef18b690e2dc67a7f969"
|
||||
"reference": "6e77207f0d851862ceeb6da63e6e22c01b1587bc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a3564bd66f4bce9bc871ef18b690e2dc67a7f969",
|
||||
"reference": "a3564bd66f4bce9bc871ef18b690e2dc67a7f969",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/6e77207f0d851862ceeb6da63e6e22c01b1587bc",
|
||||
"reference": "6e77207f0d851862ceeb6da63e6e22c01b1587bc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -306,7 +306,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.52.0"
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.52.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -314,7 +314,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-18T18:40:11+00:00"
|
||||
"time": "2024-03-19T21:02:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
|
||||
28
.ci/phpmd/composer.lock
generated
28
.ci/phpmd/composer.lock
generated
@@ -9,16 +9,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "composer/pcre",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/pcre.git",
|
||||
"reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace"
|
||||
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/4775f35b2d70865807c89d32c8e7385b86eb0ace",
|
||||
"reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
|
||||
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -60,7 +60,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/pcre/issues",
|
||||
"source": "https://github.com/composer/pcre/tree/3.1.2"
|
||||
"source": "https://github.com/composer/pcre/tree/3.1.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -76,20 +76,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-07T15:38:35+00:00"
|
||||
"time": "2024-03-19T10:26:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "3.0.3",
|
||||
"version": "3.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/xdebug-handler.git",
|
||||
"reference": "ced299686f41dce890debac69273b47ffe98a40c"
|
||||
"reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c",
|
||||
"reference": "ced299686f41dce890debac69273b47ffe98a40c",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255",
|
||||
"reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -100,7 +100,7 @@
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.1",
|
||||
"symfony/phpunit-bridge": "^6.0"
|
||||
"phpunit/phpunit": "^8.5 || ^9.6 || ^10.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -124,9 +124,9 @@
|
||||
"performance"
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"irc": "ircs://irc.libera.chat:6697/composer",
|
||||
"issues": "https://github.com/composer/xdebug-handler/issues",
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/3.0.3"
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/3.0.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -142,7 +142,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-02-25T21:32:43+00:00"
|
||||
"time": "2024-03-26T18:29:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pdepend/pdepend",
|
||||
|
||||
@@ -111,7 +111,10 @@ PGSQL_SSL_CERT=null
|
||||
PGSQL_SSL_KEY=null
|
||||
PGSQL_SSL_CRL_FILE=null
|
||||
|
||||
# more PostgreSQL settings
|
||||
# For postgresql 15 and up, setting this to public will no longer work as expected, becasuse the
|
||||
# 'public' schema is without grants. This can be worked around by having a super user grant those
|
||||
# necessary privileges, but in security conscious setups that's not viable.
|
||||
# You will need to set this to the schema you want to use.
|
||||
PGSQL_SCHEMA=public
|
||||
|
||||
# If you're looking for performance improvements, you could install memcached or redis
|
||||
|
||||
2
.github/workflows/cleanup.yml
vendored
2
.github/workflows/cleanup.yml
vendored
@@ -7,7 +7,7 @@ permissions:
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
- cron: '0 1 * * *'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
prune:
|
||||
|
||||
2
.github/workflows/lock.yml
vendored
2
.github/workflows/lock.yml
vendored
@@ -3,7 +3,7 @@ name: 'Issues - Lock old issues'
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
concurrency:
|
||||
group: lock-threads
|
||||
|
||||
149
.github/workflows/release.yml
vendored
149
.github/workflows/release.yml
vendored
@@ -4,11 +4,11 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version to release'
|
||||
description: 'Release "v1.2.3" or "develop"'
|
||||
required: true
|
||||
default: 'develop'
|
||||
schedule:
|
||||
- cron: '15 0 * * MON,THU'
|
||||
- cron: '0 3 * * MON,THU'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
|
||||
- name: Cleanup translations
|
||||
id: cleanup-transactions
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:crowdin-warning'
|
||||
output: ''
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
GH_TOKEN: ''
|
||||
- name: Cleanup changelog
|
||||
id: cleanup-changelog
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:changelog'
|
||||
output: ''
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
|
||||
- name: Extract changelog
|
||||
id: extract-changelog
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:extract-changelog'
|
||||
output: 'output'
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
GH_TOKEN: ""
|
||||
- name: Replace version
|
||||
id: replace-version
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:version'
|
||||
output: ''
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
FF_III_VERSION: ${{ github.event_name == 'schedule' && 'develop' || github.event.inputs.version }}
|
||||
- name: Generate JSON v1
|
||||
id: json-v1
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:json-translations v1'
|
||||
output: ''
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
GH_TOKEN: ''
|
||||
- name: Generate JSON v2
|
||||
id: json-v2
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:json-translations v2'
|
||||
output: ''
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
GH_TOKEN: ''
|
||||
- name: Code cleanup
|
||||
id: code-cleanup
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:code'
|
||||
output: ''
|
||||
@@ -115,12 +115,12 @@ jobs:
|
||||
GH_TOKEN: ''
|
||||
- name: Build new JS
|
||||
run: |
|
||||
pwd
|
||||
npm install
|
||||
npm update
|
||||
npm run build
|
||||
- name: Build old JS
|
||||
id: old-js
|
||||
uses: JC5/firefly-iii-dev@v34
|
||||
uses: JC5/firefly-iii-dev@v36
|
||||
with:
|
||||
action: 'ff3:old-js'
|
||||
output: ''
|
||||
@@ -136,15 +136,51 @@ jobs:
|
||||
.ci/phpcs.sh
|
||||
- name: Release
|
||||
run: |
|
||||
# do some configuration
|
||||
sudo timedatectl set-timezone Europe/Amsterdam
|
||||
git config user.name github-actions
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
git config advice.addIgnoredFile false
|
||||
|
||||
# set some variables
|
||||
releaseName=$version
|
||||
originalName=$version
|
||||
zipName=FireflyIII-$version.zip
|
||||
tarName=FireflyIII-$version.tar.gz
|
||||
|
||||
# update composer (again)
|
||||
composer validate --strict
|
||||
composer update --no-dev --no-scripts --no-plugins
|
||||
composer dump-autoload
|
||||
|
||||
# if this is a develop build, slightly different variable names.
|
||||
if [[ "develop" == "$version" ]]; then
|
||||
[[ -z $(git status --untracked-files=normal --porcelain) ]] && echo "this branch is clean, no need to push..." && exit 0;
|
||||
releaseName=$version-$(date +'%Y%m%d')
|
||||
originalName=$releaseName
|
||||
zipName=FireflyIII-develop.zip
|
||||
tarName=FireflyIII-develop.tar.gz
|
||||
fi
|
||||
|
||||
# in both cases, if the release or tag already exists, add ".1" until it no longer exists.
|
||||
tagFound=true
|
||||
tagCount=1
|
||||
while [ "$tagFound" = true ]
|
||||
do
|
||||
if [ $(git tag -l "$releaseName") ]; then
|
||||
echo "Tag $releaseName exists already."
|
||||
releaseName="$originalName"."$tagCount"
|
||||
echo "Tag for release is now $releaseName"
|
||||
tagCount=$((tagCount+1))
|
||||
else
|
||||
echo "Tag $releaseName does not exist, can continue"
|
||||
tagFound=false
|
||||
fi
|
||||
done
|
||||
echo "Will use tag and release name $releaseName."
|
||||
|
||||
# add all content, except output.txt (this contains the changelog and/or the download instructions)
|
||||
echo 'Add all and reset output.txt'
|
||||
git add -A
|
||||
if test -f "output.txt"; then
|
||||
git reset output.txt
|
||||
@@ -152,19 +188,88 @@ jobs:
|
||||
git commit -m "Auto commit for release '$version' on $(date +'%Y-%m-%d')" || true
|
||||
git push
|
||||
|
||||
# zip and tar everything
|
||||
echo 'Zip and tar...'
|
||||
zip -rq $zipName . -x "*.git*" "*.ci*" "*.github*" "*node_modules*" "*output.txt*"
|
||||
touch $tarName
|
||||
tar --exclude=$tarName --exclude='./.git' --exclude='./.ci' --exclude='./.github' --exclude='./node_modules' --exclude='./output.txt' -czf $tarName .
|
||||
|
||||
# add sha256 sum
|
||||
echo 'Sha sum ...'
|
||||
sha256sum -b $zipName > $zipName.sha256
|
||||
sha256sum -b $tarName > $tarName.sha256
|
||||
|
||||
# create a development (nightly) release:
|
||||
if [[ "develop" == "$version" ]]; then
|
||||
echo "Create nightly release."
|
||||
git tag -a $version-$(date +'%Y%m%d') -m "Nightly development release '$version' on $(date +'%Y-%m-%d')"
|
||||
git push origin $version-$(date +'%Y%m%d')
|
||||
gh release create $version-$(date +'%Y%m%d') -p --verify-tag \
|
||||
-t "Development release for $(date +'%Y-%m-%d')" \
|
||||
-n "Bi-weekly development release of Firefly III with the latest fixes, translations and features. This release was created on **$(date +'%Y-%m-%d')** and may contain bugs. Use at your own risk. Docker users can find this release under the \`develop\` tag."
|
||||
else
|
||||
echo "Create default release."
|
||||
git tag -a $version -m "Here be changelog"
|
||||
git push origin $version
|
||||
gh release create $version -F output.txt -t "$version" --verify-tag
|
||||
echo 'Develop release.'
|
||||
# add text to output.txt (instructions)
|
||||
rm output.txt
|
||||
echo "Bi-weekly development release of Firefly III with the latest fixes, translations and features. Docker users can find this release under the \`develop\` tag." >> output.txt
|
||||
echo "" >> output.txt
|
||||
echo "This release was created on **$(date +'%Y-%m-%d')** and may contain unexpected bugs. Data loss is rare but is not impossible." >> output.txt
|
||||
echo "" >> output.txt
|
||||
echo "* Please read the installation instructions for [Docker](https://docs.firefly-iii.org/how-to/firefly-iii/installation/docker/), [Portainer](https://docs.firefly-iii.org/how-to/firefly-iii/installation/portainer/), [Kubernetes](https://docs.firefly-iii.org/how-to/firefly-iii/installation/kubernetes/) or [self-managed servers](https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-managed/)" >> output.txt
|
||||
echo "* Or read the upgrade instructions for [Docker](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/docker/), [Kubernetes](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/kubernetes/) or [self-managed servers](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/self-managed/)" >> output.txt
|
||||
echo "" >> output.txt
|
||||
echo ":warning: Please be careful with this pre-release, as is may not work as expected." >> output.txt
|
||||
|
||||
# create the release:
|
||||
echo "Create nightly release."
|
||||
git tag -a $releaseName -m "Nightly development release '$version' on $(date +'%Y-%m-%d')"
|
||||
git push origin $releaseName
|
||||
gh release create $releaseName -p --verify-tag \
|
||||
-t "Development release for $(date +'%Y-%m-%d')" \
|
||||
-F output.txt
|
||||
|
||||
# add zip file to release.
|
||||
gh release upload $releaseName $zipName
|
||||
gh release upload $releaseName $tarName
|
||||
|
||||
# add sha256 sum to release
|
||||
gh release upload $releaseName $zipName.sha256
|
||||
gh release upload $releaseName $tarName.sha256
|
||||
|
||||
# get current HEAD and add as file to the release
|
||||
HEAD=$(git rev-parse HEAD)
|
||||
echo $HEAD > HEAD.txt
|
||||
gh release upload $releaseName HEAD.txt
|
||||
else
|
||||
echo 'MAIN (real) release'
|
||||
sudo chown -R runner:docker output.txt
|
||||
# add text to output.txt (more instructions)
|
||||
echo '' >> output.txt
|
||||
echo '### Instructions' >> output.txt
|
||||
echo '' >> output.txt
|
||||
echo "* Installation instructions for [Docker](https://docs.firefly-iii.org/how-to/firefly-iii/installation/docker/), [Portainer](https://docs.firefly-iii.org/how-to/firefly-iii/installation/portainer/), [Kubernetes](https://docs.firefly-iii.org/how-to/firefly-iii/installation/kubernetes/) or [self-managed servers](https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-managed/)" >> output.txt
|
||||
echo "* Or read the upgrade instructions for [Docker](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/docker/), [Kubernetes](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/kubernetes/) or [self-managed servers](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/self-managed/)" >> output.txt
|
||||
|
||||
echo "Create default release."
|
||||
git tag -a $releaseName -m "Here be changelog"
|
||||
git push origin $releaseName
|
||||
gh release create $releaseName -F output.txt -t "$releaseName" --verify-tag
|
||||
|
||||
# add archive files to release
|
||||
gh release upload $releaseName $zipName
|
||||
gh release upload $releaseName $tarName
|
||||
|
||||
# add sha256 sums to release
|
||||
gh release upload $releaseName $zipName.sha256
|
||||
gh release upload $releaseName $tarName.sha256
|
||||
|
||||
# get current HEAD and add as file to the release
|
||||
HEAD=$(git rev-parse HEAD)
|
||||
echo $HEAD > HEAD.txt
|
||||
gh release upload $releaseName HEAD.txt
|
||||
|
||||
# remove all temporary files
|
||||
rm output.txt
|
||||
rm HEAD.txt
|
||||
rm $zipName
|
||||
rm $zipName.sha256
|
||||
rm $tarName
|
||||
rm $tarName.sha256
|
||||
|
||||
# merge main back into develop
|
||||
git checkout develop
|
||||
git merge main
|
||||
git push
|
||||
|
||||
10
.github/workflows/stale.yml
vendored
10
.github/workflows/stale.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: "Issues - Mark and close stale issues"
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
- cron: "0 4 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -18,16 +18,16 @@ jobs:
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: >
|
||||
Hi there!
|
||||
|
||||
Hi there!
|
||||
|
||||
This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
|
||||
|
||||
Thank you for your contributions.
|
||||
stale-pr-message: >
|
||||
Hi there!
|
||||
|
||||
Hi there!
|
||||
|
||||
This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,4 +9,4 @@ yarn-error.log
|
||||
coverage.xml
|
||||
|
||||
# ignore generated files.
|
||||
#public/build
|
||||
public/build
|
||||
|
||||
@@ -83,17 +83,17 @@ class AccountController extends Controller
|
||||
// user's preferences
|
||||
$defaultSet = $this->repository->getAccountsByType([AccountType::ASSET])->pluck('id')->toArray();
|
||||
|
||||
/** @var Preference $frontPage */
|
||||
$frontPage = app('preferences')->get('frontPageAccounts', $defaultSet);
|
||||
/** @var Preference $frontpage */
|
||||
$frontpage = app('preferences')->get('frontpageAccounts', $defaultSet);
|
||||
$default = app('amount')->getDefaultCurrency();
|
||||
|
||||
if (!(is_array($frontPage->data) && count($frontPage->data) > 0)) {
|
||||
$frontPage->data = $defaultSet;
|
||||
$frontPage->save();
|
||||
if (!(is_array($frontpage->data) && count($frontpage->data) > 0)) {
|
||||
$frontpage->data = $defaultSet;
|
||||
$frontpage->save();
|
||||
}
|
||||
|
||||
// get accounts:
|
||||
$accounts = $this->repository->getAccountsById($frontPage->data);
|
||||
$accounts = $this->repository->getAccountsById($frontpage->data);
|
||||
$chartData = [];
|
||||
|
||||
/** @var Account $account */
|
||||
|
||||
@@ -98,14 +98,14 @@ class AccountController extends Controller
|
||||
// user's preferences
|
||||
if (0 === $accounts->count()) {
|
||||
$defaultSet = $this->repository->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT])->pluck('id')->toArray();
|
||||
$frontPage = app('preferences')->get('frontPageAccounts', $defaultSet);
|
||||
$frontpage = app('preferences')->get('frontpageAccounts', $defaultSet);
|
||||
|
||||
if (!(is_array($frontPage->data) && count($frontPage->data) > 0)) {
|
||||
$frontPage->data = $defaultSet;
|
||||
$frontPage->save();
|
||||
if (!(is_array($frontpage->data) && count($frontpage->data) > 0)) {
|
||||
$frontpage->data = $defaultSet;
|
||||
$frontpage->save();
|
||||
}
|
||||
|
||||
$accounts = $this->repository->getAccountsById($frontPage->data);
|
||||
$accounts = $this->repository->getAccountsById($frontpage->data);
|
||||
}
|
||||
|
||||
// both options are overruled by "preselected"
|
||||
|
||||
73
app/Api/V2/Controllers/UserGroup/IndexController.php
Normal file
73
app/Api/V2/Controllers/UserGroup/IndexController.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/*
|
||||
* IndexController.php
|
||||
* Copyright (c) 2024 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/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V2\Controllers\UserGroup;
|
||||
|
||||
use FireflyIII\Api\V2\Controllers\Controller;
|
||||
use FireflyIII\Api\V2\Request\Model\Account\IndexRequest;
|
||||
use FireflyIII\Repositories\UserGroup\UserGroupRepositoryInterface;
|
||||
use FireflyIII\Transformers\V2\UserGroupTransformer;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
public const string RESOURCE_KEY = 'user_groups';
|
||||
|
||||
private UserGroupRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(UserGroupRepositoryInterface::class);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO see autocomplete/accountcontroller for list.
|
||||
*/
|
||||
public function index(IndexRequest $request): JsonResponse
|
||||
{
|
||||
$administrations = $this->repository->get();
|
||||
$pageSize = $this->parameters->get('limit');
|
||||
$count = $administrations->count();
|
||||
$administrations = $administrations->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
$paginator = new LengthAwarePaginator($administrations, $count, $pageSize, $this->parameters->get('page'));
|
||||
$transformer = new UserGroupTransformer();
|
||||
|
||||
$transformer->setParameters($this->parameters); // give params to transformer
|
||||
|
||||
return response()
|
||||
->json($this->jsonApiList(self::RESOURCE_KEY, $paginator, $transformer))
|
||||
->header('Content-Type', self::CONTENT_TYPE)
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,14 @@ class UpdateController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
public function useUserGroup(UserGroup $userGroup): JsonResponse
|
||||
{
|
||||
// group validation is already in place, so can just update the user.
|
||||
$this->repository->useUserGroup($userGroup);
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request, UserGroup $userGroup): JsonResponse
|
||||
{
|
||||
$all = $request->getAll();
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Api\V2\Request\UserGroup;
|
||||
|
||||
use FireflyIII\Enums\UserRoleEnum;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\Rules\IsDefaultUserGroupName;
|
||||
use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
@@ -53,7 +54,7 @@ class UpdateRequest extends FormRequest
|
||||
$userGroup = $this->route()->parameter('userGroup');
|
||||
|
||||
return [
|
||||
'title' => sprintf('required|min:1|max:255|unique:user_groups,title,%d', $userGroup->id),
|
||||
'title' => ['required', 'min:1', 'max:255', sprintf('unique:user_groups,title,%d', $userGroup->id), new IsDefaultUserGroupName($userGroup)],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ class CorrectDatabase extends Command
|
||||
// new!
|
||||
'firefly-iii:unify-group-accounts',
|
||||
'firefly-iii:trigger-credit-recalculation',
|
||||
'firefly-iii:migrate-preferences',
|
||||
];
|
||||
foreach ($commands as $command) {
|
||||
$this->friendlyLine(sprintf('Now executing command "%s"', $command));
|
||||
|
||||
@@ -50,7 +50,7 @@ class FixFrontpageAccounts extends Command
|
||||
|
||||
/** @var User $user */
|
||||
foreach ($users as $user) {
|
||||
$preference = app('preferences')->getForUser($user, 'frontPageAccounts');
|
||||
$preference = app('preferences')->getForUser($user, 'frontpageAccounts');
|
||||
if (null !== $preference) {
|
||||
$this->fixPreference($preference);
|
||||
}
|
||||
@@ -83,6 +83,6 @@ class FixFrontpageAccounts extends Command
|
||||
}
|
||||
}
|
||||
}
|
||||
app('preferences')->setForUser($preference->user, 'frontPageAccounts', $fixed);
|
||||
app('preferences')->setForUser($preference->user, 'frontpageAccounts', $fixed);
|
||||
}
|
||||
}
|
||||
|
||||
76
app/Console/Commands/Correction/MigratePreferences.php
Normal file
76
app/Console/Commands/Correction/MigratePreferences.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* MigratePreferences.php
|
||||
* Copyright (c) 2024 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\Console\Commands\Correction;
|
||||
|
||||
use FireflyIII\Models\Preference;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Command\Command as CommandAlias;
|
||||
|
||||
class MigratePreferences extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'firefly-iii:migrate-preferences';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Give Firefly III preferences a user group ID so they can be made administration specific.';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$items = config('firefly.admin_specific_prefs');
|
||||
$users = User::get();
|
||||
|
||||
/** @var User $user */
|
||||
foreach ($users as $user) {
|
||||
$count = 0;
|
||||
foreach ($items as $item) {
|
||||
$preference = Preference::where('name', $item)->where('user_id', $user->id)->first();
|
||||
if (null === $preference) {
|
||||
continue;
|
||||
}
|
||||
if (null !== $preference->user_group_id) {
|
||||
$preference->user_group_id = $user->user_group_id;
|
||||
$preference->save();
|
||||
++$count;
|
||||
}
|
||||
}
|
||||
if ($count > 0) {
|
||||
$this->info(sprintf('Migrated %d preference(s) for user #%d ("%s").', $count, $user->id, $user->email));
|
||||
}
|
||||
}
|
||||
|
||||
return CommandAlias::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ class CreateGroupMemberships extends Command
|
||||
// check if membership exists
|
||||
$userGroup = UserGroup::where('title', $user->email)->first();
|
||||
if (null === $userGroup) {
|
||||
$userGroup = UserGroup::create(['title' => $user->email]);
|
||||
$userGroup = UserGroup::create(['title' => $user->email, 'default_administration' => true]);
|
||||
}
|
||||
|
||||
$userRole = UserRole::where('title', UserRoleEnum::OWNER->value)->first();
|
||||
|
||||
65
app/Console/Commands/System/LaravelPassportKeys.php
Normal file
65
app/Console/Commands/System/LaravelPassportKeys.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* LaravelPassportKeys.php
|
||||
* Copyright (c) 2024 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\Console\Commands\System;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Symfony\Component\Console\Command\Command as CommandAlias;
|
||||
|
||||
class LaravelPassportKeys extends Command
|
||||
{
|
||||
use ShowsFriendlyMessages;
|
||||
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'firefly-iii:laravel-passport-keys';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Calls the Laravel "passport:keys" but doesn\'t exit 1.';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
Artisan::call('passport:keys --no-interaction', []);
|
||||
$result = Artisan::output();
|
||||
if (str_contains($result, 'Encryption keys already exist')) {
|
||||
$this->friendlyInfo('Encryption keys exist already.');
|
||||
|
||||
return CommandAlias::SUCCESS;
|
||||
}
|
||||
$this->friendlyPositive('Encryption keys have been created, nice!');
|
||||
|
||||
return CommandAlias::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
/*
|
||||
* ApplyRules.php
|
||||
* Copyright (c) 2020 james@firefly-iii.org
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
/*
|
||||
* Cron.php
|
||||
* Copyright (c) 2020 james@firefly-iii.org
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -17,7 +17,7 @@
|
||||
* 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/>.
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
@@ -69,6 +69,7 @@ class UpgradeDatabase extends Command
|
||||
'firefly-iii:create-group-memberships',
|
||||
'firefly-iii:upgrade-group-information',
|
||||
'firefly-iii:upgrade-currency-preferences',
|
||||
'firefly-iii:correct-database',
|
||||
];
|
||||
$args = [];
|
||||
if ($this->option('force')) {
|
||||
|
||||
@@ -41,7 +41,6 @@ enum UserRoleEnum: string
|
||||
// manage other financial objects:
|
||||
case MANAGE_BUDGETS = 'mng_budgets';
|
||||
case MANAGE_PIGGY_BANKS = 'mng_piggies';
|
||||
case MANAGE_REPETITIONS = 'mng_reps';
|
||||
case MANAGE_SUBSCRIPTIONS = 'mng_subscriptions';
|
||||
case MANAGE_RULES = 'mng_rules';
|
||||
case MANAGE_RECURRING = 'mng_recurring';
|
||||
@@ -51,7 +50,7 @@ enum UserRoleEnum: string
|
||||
// view and generate reports
|
||||
case VIEW_REPORTS = 'view_reports';
|
||||
|
||||
// view memberships. needs FULL to manage them.
|
||||
// view memberships AND roles. needs FULL to manage them.
|
||||
case VIEW_MEMBERSHIPS = 'view_memberships';
|
||||
|
||||
// everything the creator can, except remove/change original creator and delete group
|
||||
|
||||
@@ -145,13 +145,13 @@ class CreateController extends Controller
|
||||
Log::channel('audit')->info('Stored new account.', $data);
|
||||
|
||||
// update preferences if necessary:
|
||||
$frontPage = app('preferences')->get('frontPageAccounts', [])->data;
|
||||
if (!is_array($frontPage)) {
|
||||
$frontPage = [];
|
||||
$frontpage = app('preferences')->get('frontpageAccounts', [])->data;
|
||||
if (!is_array($frontpage)) {
|
||||
$frontpage = [];
|
||||
}
|
||||
if (AccountType::ASSET === $account->accountType->type) {
|
||||
$frontPage[] = $account->id;
|
||||
app('preferences')->set('frontPageAccounts', $frontPage);
|
||||
$frontpage[] = $account->id;
|
||||
app('preferences')->set('frontpageAccounts', $frontpage);
|
||||
}
|
||||
|
||||
// store attachment(s):
|
||||
|
||||
@@ -235,12 +235,12 @@ class BudgetLimitController extends Controller
|
||||
new Collection([$budgetLimit->budget]),
|
||||
$budgetLimit->transactionCurrency
|
||||
);
|
||||
$daysLeft = $this->activeDaysLeft($limit->start_date, $limit->end_date);
|
||||
$array['spent'] = $spentArr[$budgetLimit->transactionCurrency->id]['sum'] ?? '0';
|
||||
$array['left_formatted'] = app('amount')->formatAnything($limit->transactionCurrency, bcadd($array['spent'], $array['amount']));
|
||||
$array['amount_formatted'] = app('amount')->formatAnything($limit->transactionCurrency, $limit['amount']);
|
||||
$array['days_left'] = (string)$this->activeDaysLeft($limit->start_date, $limit->end_date);
|
||||
// left per day:
|
||||
$array['left_per_day'] = bcdiv(bcadd($array['spent'], $array['amount']), $array['days_left']);
|
||||
$array['days_left'] = (string)$daysLeft;
|
||||
$array['left_per_day'] = 0 === $daysLeft ? bcadd($array['spent'], $array['amount']) : bcdiv(bcadd($array['spent'], $array['amount']), $array['days_left']);
|
||||
|
||||
// left per day formatted.
|
||||
$array['amount'] = app('steam')->bcround($limit['amount'], $limit->transactionCurrency->decimal_places);
|
||||
|
||||
@@ -301,14 +301,14 @@ class AccountController extends Controller
|
||||
$end = clone session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$defaultSet = $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray();
|
||||
app('log')->debug('Default set is ', $defaultSet);
|
||||
$frontPage = app('preferences')->get('frontPageAccounts', $defaultSet);
|
||||
$frontPageArray = !is_array($frontPage->data) ? [] : $frontPage->data;
|
||||
app('log')->debug('Frontpage preference set is ', $frontPageArray);
|
||||
if (0 === count($frontPageArray)) {
|
||||
app('preferences')->set('frontPageAccounts', $defaultSet);
|
||||
$frontpage = app('preferences')->get('frontpageAccounts', $defaultSet);
|
||||
$frontpageArray = !is_array($frontpage->data) ? [] : $frontpage->data;
|
||||
app('log')->debug('Frontpage preference set is ', $frontpageArray);
|
||||
if (0 === count($frontpageArray)) {
|
||||
app('preferences')->set('frontpageAccounts', $defaultSet);
|
||||
app('log')->debug('frontpage set is empty!');
|
||||
}
|
||||
$accounts = $repository->getAccountsById($frontPageArray);
|
||||
$accounts = $repository->getAccountsById($frontpageArray);
|
||||
|
||||
return response()->json($this->accountBalanceChart($accounts, $start, $end));
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ class CategoryController extends Controller
|
||||
return response()->json($cache->get());
|
||||
}
|
||||
|
||||
$frontPageGenerator = new FrontpageChartGenerator($start, $end);
|
||||
$chartData = $frontPageGenerator->generate();
|
||||
$frontpageGenerator = new FrontpageChartGenerator($start, $end);
|
||||
$chartData = $frontpageGenerator->generate();
|
||||
$data = $this->generator->multiSet($chartData);
|
||||
$cache->store($data);
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class HomeController extends Controller
|
||||
$label = $request->get('label');
|
||||
$isCustomRange = false;
|
||||
|
||||
app('log')->debug('Received dateRange', ['start' => $stringStart, 'end' => $stringEnd, 'label' => $request->get('label')]);
|
||||
app('log')->debug('dateRange: Received dateRange', ['start' => $stringStart, 'end' => $stringEnd, 'label' => $request->get('label')]);
|
||||
// check if the label is "everything" or "Custom range" which will betray
|
||||
// a possible problem with the budgets.
|
||||
if ($label === (string)trans('firefly.everything') || $label === (string)trans('firefly.customRange')) {
|
||||
@@ -99,7 +99,7 @@ class HomeController extends Controller
|
||||
|
||||
$diff = $start->diffInDays($end, true) + 1;
|
||||
|
||||
if ($diff > 50) {
|
||||
if ($diff > 366) {
|
||||
$request->session()->flash('warning', (string)trans('firefly.warning_much_data', ['days' => (int)$diff]));
|
||||
}
|
||||
|
||||
@@ -129,10 +129,10 @@ class HomeController extends Controller
|
||||
}
|
||||
$subTitle = (string)trans('firefly.welcome_back');
|
||||
$transactions = [];
|
||||
$frontPage = app('preferences')->getFresh('frontPageAccounts', $repository->getAccountsByType([AccountType::ASSET])->pluck('id')->toArray());
|
||||
$frontPageArray = $frontPage->data;
|
||||
if (!is_array($frontPageArray)) {
|
||||
$frontPageArray = [];
|
||||
$frontpage = app('preferences')->getFresh('frontpageAccounts', $repository->getAccountsByType([AccountType::ASSET])->pluck('id')->toArray());
|
||||
$frontpageArray = $frontpage->data;
|
||||
if (!is_array($frontpageArray)) {
|
||||
$frontpageArray = [];
|
||||
}
|
||||
|
||||
/** @var Carbon $start */
|
||||
@@ -140,13 +140,13 @@ class HomeController extends Controller
|
||||
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$accounts = $repository->getAccountsById($frontPageArray);
|
||||
$accounts = $repository->getAccountsById($frontpageArray);
|
||||
$today = today(config('app.timezone'));
|
||||
|
||||
// sort frontpage accounts by order
|
||||
$accounts = $accounts->sortBy('order');
|
||||
|
||||
app('log')->debug('Frontpage accounts are ', $frontPageArray);
|
||||
app('log')->debug('Frontpage accounts are ', $frontpageArray);
|
||||
|
||||
/** @var BillRepositoryInterface $billRepository */
|
||||
$billRepository = app(BillRepositoryInterface::class);
|
||||
|
||||
@@ -130,7 +130,7 @@ class BoxController extends Controller
|
||||
$boxTitle = (string)trans('firefly.left_to_spend');
|
||||
$activeDaysLeft = $this->activeDaysLeft($start, $end); // see method description.
|
||||
$display = 1; // not overspent
|
||||
$leftPerDayAmount = bcdiv($leftToSpendAmount, (string)$activeDaysLeft);
|
||||
$leftPerDayAmount = 0 === (int) $activeDaysLeft ? $leftToSpendAmount : bcdiv($leftToSpendAmount, (string)$activeDaysLeft);
|
||||
app('log')->debug(sprintf('Left to spend per day is %s', $leftPerDayAmount));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class NewUserController extends Controller
|
||||
|
||||
// store frontpage preferences:
|
||||
$accounts = $this->repository->getAccountsByType([AccountType::ASSET])->pluck('id')->toArray();
|
||||
app('preferences')->set('frontPageAccounts', $accounts);
|
||||
app('preferences')->set('frontpageAccounts', $accounts);
|
||||
|
||||
// mark.
|
||||
app('preferences')->mark();
|
||||
|
||||
@@ -89,10 +89,10 @@ class PreferencesController extends Controller
|
||||
/** @var array<int, int> $accountIds */
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
$viewRange = app('navigation')->getViewRange(false);
|
||||
$frontPageAccountsPref = app('preferences')->get('frontPageAccounts', $accountIds);
|
||||
$frontPageAccounts = $frontPageAccountsPref->data;
|
||||
if (!is_array($frontPageAccounts)) {
|
||||
$frontPageAccounts = $accountIds;
|
||||
$frontpageAccountsPref = app('preferences')->get('frontpageAccounts', $accountIds);
|
||||
$frontpageAccounts = $frontpageAccountsPref->data;
|
||||
if (!is_array($frontpageAccounts)) {
|
||||
$frontpageAccounts = $accountIds;
|
||||
}
|
||||
$language = app('steam')->getLanguage();
|
||||
$languages = config('firefly.languages');
|
||||
@@ -128,8 +128,8 @@ class PreferencesController extends Controller
|
||||
$locales = ['equal' => (string)trans('firefly.equal_to_language')] + $locales;
|
||||
// an important fallback is that the frontPageAccount array gets refilled automatically
|
||||
// when it turns up empty.
|
||||
if (0 === count($frontPageAccounts)) {
|
||||
$frontPageAccounts = $accountIds;
|
||||
if (0 === count($frontpageAccounts)) {
|
||||
$frontpageAccounts = $accountIds;
|
||||
}
|
||||
|
||||
// for the demo user, the slackUrl is automatically emptied.
|
||||
@@ -139,7 +139,7 @@ class PreferencesController extends Controller
|
||||
$slackUrl = '';
|
||||
}
|
||||
|
||||
return view('preferences.index', compact('language', 'groupedAccounts', 'isDocker', 'frontPageAccounts', 'languages', 'darkMode', 'availableDarkModes', 'notifications', 'slackUrl', 'locales', 'locale', 'tjOptionalFields', 'viewRange', 'customFiscalYear', 'listPageSize', 'fiscalYearStart'));
|
||||
return view('preferences.index', compact('language', 'groupedAccounts', 'isDocker', 'frontpageAccounts', 'languages', 'darkMode', 'availableDarkModes', 'notifications', 'slackUrl', 'locales', 'locale', 'tjOptionalFields', 'viewRange', 'customFiscalYear', 'listPageSize', 'fiscalYearStart'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,12 +155,12 @@ class PreferencesController extends Controller
|
||||
public function postIndex(Request $request)
|
||||
{
|
||||
// front page accounts
|
||||
$frontPageAccounts = [];
|
||||
if (is_array($request->get('frontPageAccounts')) && count($request->get('frontPageAccounts')) > 0) {
|
||||
foreach ($request->get('frontPageAccounts') as $id) {
|
||||
$frontPageAccounts[] = (int)$id;
|
||||
$frontpageAccounts = [];
|
||||
if (is_array($request->get('frontpageAccounts')) && count($request->get('frontpageAccounts')) > 0) {
|
||||
foreach ($request->get('frontpageAccounts') as $id) {
|
||||
$frontpageAccounts[] = (int)$id;
|
||||
}
|
||||
app('preferences')->set('frontPageAccounts', $frontPageAccounts);
|
||||
app('preferences')->set('frontpageAccounts', $frontpageAccounts);
|
||||
}
|
||||
|
||||
// extract notifications:
|
||||
|
||||
45
app/Http/Controllers/UserGroup/CreateController.php
Normal file
45
app/Http/Controllers/UserGroup/CreateController.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
* CreateController.php
|
||||
* Copyright (c) 2024 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/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\UserGroup;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Foundation\Application;
|
||||
|
||||
class CreateController extends Controller
|
||||
{
|
||||
/**
|
||||
* @return Application|Factory|\Illuminate\Contracts\Foundation\Application|View
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$title = (string)trans('firefly.administrations_page_title');
|
||||
$subTitle = (string)trans('firefly.administrations_page_create_sub_title');
|
||||
$mainTitleIcon = 'fa-book';
|
||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||
|
||||
return view('administrations.create')->with(compact('title', 'subTitle', 'mainTitleIcon'));
|
||||
}
|
||||
}
|
||||
46
app/Http/Controllers/UserGroup/EditController.php
Normal file
46
app/Http/Controllers/UserGroup/EditController.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*
|
||||
* CreateController.php
|
||||
* Copyright (c) 2024 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/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\UserGroup;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Foundation\Application;
|
||||
|
||||
class EditController extends Controller
|
||||
{
|
||||
/**
|
||||
* @return Application|Factory|\Illuminate\Contracts\Foundation\Application|View
|
||||
*/
|
||||
public function edit(UserGroup $userGroup)
|
||||
{
|
||||
$title = (string)trans('firefly.administrations_page_title');
|
||||
$subTitle = (string)trans('firefly.administrations_page_edit_sub_title', ['title' => $userGroup->title]);
|
||||
$mainTitleIcon = 'fa-book';
|
||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||
|
||||
return view('administrations.edit')->with(compact('title', 'subTitle', 'mainTitleIcon'));
|
||||
}
|
||||
}
|
||||
47
app/Http/Controllers/UserGroup/IndexController.php
Normal file
47
app/Http/Controllers/UserGroup/IndexController.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/*
|
||||
* IndexController.php
|
||||
* Copyright (c) 2024 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/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\UserGroup;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
/**
|
||||
* Show all administrations.
|
||||
*
|
||||
* @return Factory|View
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$title = (string)trans('firefly.administrations_page_title');
|
||||
$subTitle = (string)trans('firefly.administrations_page_sub_title');
|
||||
$mainTitleIcon = 'fa-book';
|
||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||
|
||||
return view('administrations.index')->with(compact('title', 'subTitle', 'mainTitleIcon'));
|
||||
}
|
||||
}
|
||||
@@ -110,6 +110,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static EloquentBuilder|Account whereUserGroupId($value)
|
||||
*
|
||||
* @property null|UserGroup $userGroup
|
||||
* @property mixed $account_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
|
||||
@@ -61,6 +61,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static Builder|InvitedUser whereUpdatedAt($value)
|
||||
* @method static Builder|InvitedUser whereUserId($value)
|
||||
*
|
||||
* @property mixed $user_group_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class InvitedUser extends Model
|
||||
|
||||
@@ -54,6 +54,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static Builder|Preference whereUpdatedAt($value)
|
||||
* @method static Builder|Preference whereUserId($value)
|
||||
*
|
||||
* @property mixed $user_group_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Preference extends Model
|
||||
@@ -79,22 +81,39 @@ class Preference extends Model
|
||||
{
|
||||
if (auth()->check()) {
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$user = auth()->user();
|
||||
|
||||
// some preferences do not have an administration ID.
|
||||
// some need it, to make sure the correct one is selected.
|
||||
$userGroupId = (int)$user->user_group_id;
|
||||
$userGroupId = 0 === $userGroupId ? null : $userGroupId;
|
||||
|
||||
/** @var null|Preference $preference */
|
||||
$preference = $user->preferences()->where('name', $value)->first();
|
||||
$preference = null;
|
||||
$items = config('firefly.admin_specific_prefs');
|
||||
if (null !== $userGroupId && in_array($value, $items, true)) {
|
||||
// find a preference with a specific user_group_id
|
||||
$preference = $user->preferences()->where('user_group_id', $userGroupId)->where('name', $value)->first();
|
||||
}
|
||||
if (!in_array($value, $items, true)) {
|
||||
// find any one.
|
||||
$preference = $user->preferences()->where('name', $value)->first();
|
||||
}
|
||||
|
||||
// try again with ID, but this time don't care about the preferred user_group_id
|
||||
if (null === $preference) {
|
||||
$preference = $user->preferences()->where('id', (int)$value)->first();
|
||||
}
|
||||
if (null !== $preference) {
|
||||
return $preference;
|
||||
}
|
||||
$default = config('firefly.default_preferences');
|
||||
$default = config('firefly.default_preferences');
|
||||
if (array_key_exists($value, $default)) {
|
||||
$preference = new self();
|
||||
$preference->name = $value;
|
||||
$preference->data = $default[$value];
|
||||
$preference->user_id = (int)$user->id;
|
||||
$preference = new self();
|
||||
$preference->name = $value;
|
||||
$preference->data = $default[$value];
|
||||
$preference->user_id = (int)$user->id;
|
||||
$preference->user_group_id = in_array($value, $items, true) ? $userGroupId : null;
|
||||
$preference->save();
|
||||
|
||||
return $preference;
|
||||
|
||||
@@ -81,6 +81,7 @@ use Illuminate\Database\Query\Builder;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionTypeId($value)
|
||||
*
|
||||
* @property null|TransactionType $transactionType
|
||||
* @property mixed $user_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
|
||||
@@ -98,7 +98,7 @@ class UserGroup extends Model
|
||||
{
|
||||
use ReturnsIntegerIdTrait;
|
||||
|
||||
protected $fillable = ['title'];
|
||||
protected $fillable = ['title', 'default_administration'];
|
||||
|
||||
/**
|
||||
* Route binder. Converts the key in the URL to the specified object (or throw 404).
|
||||
|
||||
@@ -25,10 +25,9 @@ namespace FireflyIII\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Laravel\Passport\Passport;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
|
||||
/**
|
||||
* Class AppServiceProvider
|
||||
@@ -65,9 +64,14 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
return '';
|
||||
});
|
||||
Blade::if('partialroute', function (string $route) {
|
||||
$name = \Route::getCurrentRoute()->getName() ?? '';
|
||||
if (str_contains($name, $route)) {
|
||||
Blade::if('partialroute', function (string $route, string $firstParam = '') {
|
||||
$name = Route::getCurrentRoute()->getName() ?? '';
|
||||
if ('' === $firstParam && str_contains($name, $route)) {
|
||||
return true;
|
||||
}
|
||||
$params = Route::getCurrentRoute()->parameters() ?? [];
|
||||
$objectType = $params['objectType'] ?? '';
|
||||
if ($objectType === $firstParam && str_contains($name, $route)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -392,4 +392,28 @@ class UserRepository implements UserRepositoryInterface
|
||||
|
||||
return null !== $invitee;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getUserGroups(User $user): Collection
|
||||
{
|
||||
$memberships = $user->groupMemberships()->get();
|
||||
$set = [];
|
||||
$collection = new Collection();
|
||||
|
||||
/** @var GroupMembership $membership */
|
||||
foreach ($memberships as $membership) {
|
||||
/** @var null|UserGroup $group */
|
||||
$group = $membership->userGroup()->first();
|
||||
if (null !== $group) {
|
||||
$groupId = (int)$group->id;
|
||||
if (in_array($groupId, $set, true)) {
|
||||
continue;
|
||||
}
|
||||
$set[$groupId] = $group;
|
||||
}
|
||||
}
|
||||
$collection->push(...$set);
|
||||
|
||||
return $collection;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ interface UserRepositoryInterface
|
||||
|
||||
public function changeStatus(User $user, bool $isBlocked, string $code): bool;
|
||||
|
||||
public function getUserGroups(User $user): Collection;
|
||||
|
||||
/**
|
||||
* Returns a count of all users.
|
||||
*/
|
||||
|
||||
@@ -98,6 +98,7 @@ class UserGroupRepository implements UserGroupRepositoryInterface
|
||||
public function get(): Collection
|
||||
{
|
||||
$collection = new Collection();
|
||||
$set = [];
|
||||
$memberships = $this->user->groupMemberships()->get();
|
||||
|
||||
/** @var GroupMembership $membership */
|
||||
@@ -105,9 +106,14 @@ class UserGroupRepository implements UserGroupRepositoryInterface
|
||||
/** @var null|UserGroup $group */
|
||||
$group = $membership->userGroup()->first();
|
||||
if (null !== $group) {
|
||||
$collection->push($group);
|
||||
$groupId = (int)$group->id;
|
||||
if (in_array($groupId, $set, true)) {
|
||||
continue;
|
||||
}
|
||||
$set[$groupId] = $group;
|
||||
}
|
||||
}
|
||||
$collection->push(...$set);
|
||||
|
||||
return $collection;
|
||||
}
|
||||
@@ -282,4 +288,11 @@ class UserGroupRepository implements UserGroupRepositoryInterface
|
||||
|
||||
return $roles;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function useUserGroup(UserGroup $userGroup): void
|
||||
{
|
||||
$this->user->user_group_id = $userGroup->id;
|
||||
$this->user->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ interface UserGroupRepositoryInterface
|
||||
|
||||
public function get(): Collection;
|
||||
|
||||
public function useUserGroup(UserGroup $userGroup): void;
|
||||
|
||||
public function getAll(): Collection;
|
||||
|
||||
public function setUser(null|Authenticatable|User $user): void;
|
||||
|
||||
@@ -240,15 +240,19 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
public function getAccountsByType(array $types, ?array $sort = []): Collection
|
||||
{
|
||||
$sortable = ['name', 'active']; // TODO yes this is a duplicate array.
|
||||
$res = array_intersect([AccountType::ASSET, AccountType::MORTGAGE, AccountType::LOAN, AccountType::DEBT], $types);
|
||||
$query = $this->userGroup->accounts();
|
||||
$sortable = ['name', 'active']; // TODO yes this is a duplicate array.
|
||||
$res = array_intersect([AccountType::ASSET, AccountType::MORTGAGE, AccountType::LOAN, AccountType::DEBT], $types);
|
||||
$query = $this->userGroup->accounts();
|
||||
if (0 !== count($types)) {
|
||||
$query->accountTypeIn($types);
|
||||
}
|
||||
|
||||
// add sort parameters. At this point they're filtered to allowed fields to sort by:
|
||||
$hasActiveColumn = array_key_exists('active', $sort);
|
||||
if (count($sort) > 0) {
|
||||
if (false === $hasActiveColumn) {
|
||||
$query->orderBy('accounts.active', 'DESC');
|
||||
}
|
||||
foreach ($sort as $column => $direction) {
|
||||
if (in_array($column, $sortable, true)) {
|
||||
$query->orderBy(sprintf('accounts.%s', $column), $direction);
|
||||
@@ -258,9 +262,9 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
if (0 === count($sort)) {
|
||||
if (0 !== count($res)) {
|
||||
$query->orderBy('accounts.order', 'ASC');
|
||||
$query->orderBy('accounts.active', 'DESC');
|
||||
}
|
||||
$query->orderBy('accounts.active', 'DESC');
|
||||
$query->orderBy('accounts.order', 'ASC');
|
||||
$query->orderBy('accounts.name', 'ASC');
|
||||
}
|
||||
|
||||
|
||||
@@ -74,5 +74,7 @@ interface AccountRepositoryInterface
|
||||
|
||||
public function setUserGroup(UserGroup $userGroup): void;
|
||||
|
||||
public function getUserGroup(): UserGroup;
|
||||
|
||||
public function update(Account $account, array $data): Account;
|
||||
}
|
||||
|
||||
63
app/Rules/IsDefaultUserGroupName.php
Normal file
63
app/Rules/IsDefaultUserGroupName.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* IsTransferAccount.php
|
||||
* Copyright (c) 2020 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/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Rules;
|
||||
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
|
||||
/**
|
||||
* Class IsDefaultUserGroupName
|
||||
*/
|
||||
class IsDefaultUserGroupName implements ValidationRule
|
||||
{
|
||||
private UserGroup $userGroup;
|
||||
|
||||
public function __construct(UserGroup $userGroup)
|
||||
{
|
||||
$this->userGroup = $userGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function validate(string $attribute, mixed $value, \Closure $fail): void
|
||||
{
|
||||
app('log')->debug(sprintf('Now in %s(%s)', __METHOD__, $value));
|
||||
|
||||
// are you owner of this group and the name is the same? fail.
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
/** @var UserRepositoryInterface $userRepos */
|
||||
$userRepos = app(UserRepositoryInterface::class);
|
||||
|
||||
$roles = $userRepos->getRolesInGroup($user, $this->userGroup->id);
|
||||
if ($this->userGroup->title === $user->email && in_array('owner', $roles, true)) {
|
||||
$fail('validation.administration_owner_rename')->translate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,10 @@ class EitherConfigKey
|
||||
{
|
||||
public static array $static
|
||||
= [
|
||||
// currency conversion
|
||||
'cer.enabled',
|
||||
|
||||
// firefly iii settings
|
||||
'firefly.version',
|
||||
'firefly.api_version',
|
||||
'firefly.default_location',
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace FireflyIII\Support\Http\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Trait GetConfigurationData
|
||||
@@ -82,6 +83,8 @@ trait GetConfigurationData
|
||||
{
|
||||
$viewRange = app('navigation')->getViewRange(false);
|
||||
|
||||
Log::debug(sprintf('dateRange: the view range is "%s"', $viewRange));
|
||||
|
||||
/** @var Carbon $start */
|
||||
$start = session('start');
|
||||
|
||||
@@ -97,6 +100,7 @@ trait GetConfigurationData
|
||||
// first range is the current range:
|
||||
$title => [$start, $end],
|
||||
];
|
||||
Log::debug(sprintf('dateRange: the date range in the session is"%s" - "%s"', $start->format('Y-m-d'), $end->format('Y-m-d')));
|
||||
|
||||
// when current range is a custom range, add the current period as the next range.
|
||||
if ($isCustom) {
|
||||
|
||||
@@ -248,9 +248,9 @@ class Navigation
|
||||
'1M' => 'addMonth',
|
||||
'month' => 'addMonth',
|
||||
'monthly' => 'addMonth',
|
||||
'3M' => 'addMonths',
|
||||
'quarter' => 'addMonths',
|
||||
'quarterly' => 'addMonths',
|
||||
'3M' => 'addQuarter',
|
||||
'quarter' => 'addQuarter',
|
||||
'quarterly' => 'addQuarter',
|
||||
'6M' => 'addMonths',
|
||||
'half-year' => 'addMonths',
|
||||
'half_year' => 'addMonths',
|
||||
@@ -258,7 +258,7 @@ class Navigation
|
||||
'yearly' => 'addYear',
|
||||
'1Y' => 'addYear',
|
||||
];
|
||||
$modifierMap = ['quarter' => 3, '3M' => 3, 'quarterly' => 3, 'half-year' => 6, 'half_year' => 6, '6M' => 6];
|
||||
$modifierMap = ['half-year' => 6, 'half_year' => 6, '6M' => 6];
|
||||
$subDay = ['week', 'weekly', '1W', 'month', 'monthly', '1M', '3M', 'quarter', 'quarterly', '6M', 'half-year', 'half_year', '1Y', 'year', 'yearly'];
|
||||
|
||||
if ('custom' === $repeatFreq) {
|
||||
|
||||
@@ -31,6 +31,6 @@ class UrlValidator
|
||||
{
|
||||
public static function isValidWebhookURL(string $url): bool
|
||||
{
|
||||
return str_starts_with($url, 'https://hooks.slack.com/services/') || str_starts_with($url, 'https://discord.com/api/webhooks/');
|
||||
return str_starts_with($url, 'https://hooks.slack.com/services/') || str_starts_with($url, 'https://discord.com/api/webhooks/') || str_ends_with($url, '/slack');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,10 @@ namespace FireflyIII\Support;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Preference;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
/**
|
||||
* Class Preferences.
|
||||
@@ -40,20 +43,17 @@ class Preferences
|
||||
return new Collection();
|
||||
}
|
||||
|
||||
return Preference::where('user_id', $user->id)->get();
|
||||
return Preference::where('user_id', $user->id)
|
||||
->where(function (Builder $q) use ($user): void {
|
||||
$q->whereNull('user_group_id');
|
||||
$q->orWhere('user_group_id', $user->user_group_id);
|
||||
})
|
||||
->get()
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $default
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function get(string $name, $default = null): ?Preference
|
||||
public function get(string $name, null|array|bool|int|string $default = null): ?Preference
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
|
||||
/** @var null|User $user */
|
||||
$user = auth()->user();
|
||||
if (null === $user) {
|
||||
@@ -66,15 +66,12 @@ class Preferences
|
||||
return $this->getForUser($user, $name, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
$preference = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'user_id', 'name', 'data', 'updated_at', 'created_at']);
|
||||
// don't care about user group ID, except for some specific preferences.
|
||||
$userGroupId = $this->getUserGroupId($user, $name);
|
||||
$preference = Preference::where('user_group_id', $userGroupId)->where('user_id', $user->id)->where('name', $name)->first(['id', 'user_id', 'name', 'data', 'updated_at', 'created_at']);
|
||||
|
||||
if (null !== $preference && null === $preference->data) {
|
||||
$preference->delete();
|
||||
$preference = null;
|
||||
@@ -92,17 +89,11 @@ class Preferences
|
||||
return $this->setForUser($user, $name, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function delete(string $name): bool
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
$fullName = sprintf('preference%s%s', auth()->user()->id, $name);
|
||||
if (\Cache::has($fullName)) {
|
||||
\Cache::forget($fullName);
|
||||
if (Cache::has($fullName)) {
|
||||
Cache::forget($fullName);
|
||||
}
|
||||
Preference::where('user_id', auth()->user()->id)->where('name', $name)->delete();
|
||||
|
||||
@@ -111,29 +102,19 @@ class Preferences
|
||||
|
||||
public function forget(User $user, string $name): void
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
$key = sprintf('preference%s%s', $user->id, $name);
|
||||
\Cache::forget($key);
|
||||
\Cache::put($key, '', 5);
|
||||
Cache::forget($key);
|
||||
Cache::put($key, '', 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function setForUser(User $user, string $name, $value): Preference
|
||||
public function setForUser(User $user, string $name, null|array|bool|int|string $value): Preference
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
$fullName = sprintf('preference%s%s', $user->id, $name);
|
||||
\Cache::forget($fullName);
|
||||
$groupId = $this->getUserGroupId($user, $name);
|
||||
Cache::forget($fullName);
|
||||
|
||||
/** @var null|Preference $pref */
|
||||
$pref = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']);
|
||||
$pref = Preference::where('user_group_id', $groupId)->where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']);
|
||||
|
||||
if (null !== $pref && null === $value) {
|
||||
$pref->delete();
|
||||
@@ -144,18 +125,14 @@ class Preferences
|
||||
return new Preference();
|
||||
}
|
||||
if (null === $pref) {
|
||||
$pref = new Preference();
|
||||
$pref->user_id = (int)$user->id;
|
||||
$pref->name = $name;
|
||||
$pref = new Preference();
|
||||
$pref->user_id = (int)$user->id;
|
||||
$pref->user_group_id = $groupId;
|
||||
$pref->name = $name;
|
||||
}
|
||||
$pref->data = $value;
|
||||
|
||||
try {
|
||||
$pref->save();
|
||||
} catch (\PDOException $e) {
|
||||
throw new FireflyException(sprintf('Could not save preference: %s', $e->getMessage()), 0, $e);
|
||||
}
|
||||
\Cache::forever($fullName, $pref);
|
||||
$pref->save();
|
||||
Cache::forever($fullName, $pref);
|
||||
|
||||
return $pref;
|
||||
}
|
||||
@@ -165,19 +142,25 @@ class Preferences
|
||||
return Preference::where('user_id', $user->id)->where('name', 'LIKE', $search.'%')->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by name, has no user ID in it, because the method is called from an unauthenticated route any way.
|
||||
*/
|
||||
public function findByName(string $name): Collection
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
|
||||
return Preference::where('name', $name)->get();
|
||||
}
|
||||
|
||||
public function getArrayForUser(User $user, array $list): array
|
||||
{
|
||||
$result = [];
|
||||
$preferences = Preference::where('user_id', $user->id)->whereIn('name', $list)->get(['id', 'name', 'data']);
|
||||
$preferences = Preference::where('user_id', $user->id)
|
||||
->where(function (Builder $q) use ($user): void {
|
||||
$q->whereNull('user_group_id');
|
||||
$q->orWhere('user_group_id', $user->user_group_id);
|
||||
})
|
||||
->whereIn('name', $list)
|
||||
->get(['id', 'name', 'data'])
|
||||
;
|
||||
|
||||
/** @var Preference $preference */
|
||||
foreach ($preferences as $preference) {
|
||||
@@ -192,17 +175,8 @@ class Preferences
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $default
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getFresh(string $name, $default = null): ?Preference
|
||||
public function getFresh(string $name, null|array|bool|int|string $default = null): ?Preference
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
|
||||
/** @var null|User $user */
|
||||
$user = auth()->user();
|
||||
if (null === $user) {
|
||||
@@ -212,22 +186,6 @@ class Preferences
|
||||
return $preference;
|
||||
}
|
||||
|
||||
return $this->getFreshForUser($user, $name, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO remove me.
|
||||
*
|
||||
* @param null $default
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getFreshForUser(User $user, string $name, $default = null): ?Preference
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
|
||||
return $this->getForUser($user, $name, $default);
|
||||
}
|
||||
|
||||
@@ -252,19 +210,12 @@ class Preferences
|
||||
public function mark(): void
|
||||
{
|
||||
$this->set('lastActivity', microtime());
|
||||
\Session::forget('first');
|
||||
Session::forget('first');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function set(string $name, $value): Preference
|
||||
public function set(string $name, null|array|bool|int|string $value): Preference
|
||||
{
|
||||
if ('currencyPreference' === $name) {
|
||||
throw new FireflyException('No longer supports "currencyPreference", please refactor me.');
|
||||
}
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
if (null === $user) {
|
||||
// make new preference, return it:
|
||||
@@ -275,6 +226,17 @@ class Preferences
|
||||
return $pref;
|
||||
}
|
||||
|
||||
return $this->setForUser(auth()->user(), $name, $value);
|
||||
return $this->setForUser($user, $name, $value);
|
||||
}
|
||||
|
||||
private function getUserGroupId(User $user, string $preferenceName): ?int
|
||||
{
|
||||
$groupId = null;
|
||||
$items = config('firefly.admin_specific_prefs');
|
||||
if (in_array($preferenceName, $items, true)) {
|
||||
$groupId = (int)$user->user_group_id;
|
||||
}
|
||||
|
||||
return $groupId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
default:
|
||||
app('log')->error(sprintf('Cannot handle node %s', $class));
|
||||
|
||||
throw new FireflyException(sprintf('Firefly III search cant handle "%s"-nodes', $class));
|
||||
throw new FireflyException(sprintf('Firefly III search can\'t handle "%s"-nodes', $class));
|
||||
|
||||
case Subquery::class:
|
||||
// loop all notes in subquery:
|
||||
|
||||
@@ -88,7 +88,7 @@ class OAuthKeys
|
||||
public static function generateKeys(): void
|
||||
{
|
||||
\Artisan::registerCommand(new KeysCommand());
|
||||
\Artisan::call('passport:keys');
|
||||
\Artisan::call('firefly-iii:laravel-passport-keys');
|
||||
}
|
||||
|
||||
public static function storeKeysInDB(): void
|
||||
|
||||
@@ -110,7 +110,10 @@ class BillTransformer extends AbstractTransformer
|
||||
$nem = $nemDate->toAtomString();
|
||||
|
||||
// nullify again when it's outside the current view range.
|
||||
if ($nemDate->lt($this->parameters->get('start')) || $nemDate->gt($this->parameters->get('end'))) {
|
||||
if (
|
||||
(null !== $this->parameters->get('start') && $nemDate->lt($this->parameters->get('start')))
|
||||
|| (null !== $this->parameters->get('end') && $nemDate->gt($this->parameters->get('end')))
|
||||
) {
|
||||
$nem = null;
|
||||
$nemDate = null;
|
||||
$firstPayDate = null;
|
||||
|
||||
@@ -35,12 +35,15 @@ class PreferenceTransformer extends AbstractTransformer
|
||||
*/
|
||||
public function transform(Preference $preference): array
|
||||
{
|
||||
$userGroupId = 0 === $preference->user_group_id ? null : $preference->user_group_id;
|
||||
|
||||
return [
|
||||
'id' => $preference->id,
|
||||
'created_at' => $preference->created_at->toAtomString(),
|
||||
'updated_at' => $preference->updated_at->toAtomString(),
|
||||
'name' => $preference->name,
|
||||
'data' => $preference->data,
|
||||
'id' => $preference->id,
|
||||
'created_at' => $preference->created_at->toAtomString(),
|
||||
'updated_at' => $preference->updated_at->toAtomString(),
|
||||
'user_group_id' => $userGroupId,
|
||||
'name' => $preference->name,
|
||||
'data' => $preference->data,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,6 +137,18 @@ class AccountTransformer extends AbstractTransformer
|
||||
return $rightBalance <=> $leftBalance;
|
||||
});
|
||||
}
|
||||
if ('last_activity' === $column) {
|
||||
$dates = $this->lastActivity;
|
||||
$objects = $objects->sort(function (Account $left, Account $right) use ($dates, $direction) {
|
||||
$leftDate = $dates[$left->id] ?? Carbon::create(1900, 1, 1, 0, 0, 0);
|
||||
$rightDate = $dates[$right->id] ?? Carbon::create(1900, 1, 1, 0, 0, 0);
|
||||
if ('asc' === $direction) {
|
||||
return $leftDate->gt($rightDate) ? 1 : -1;
|
||||
}
|
||||
|
||||
return $rightDate->gt($leftDate) ? 1 : -1;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +180,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
|
||||
// no currency? use default
|
||||
$currency = $this->default;
|
||||
if (array_key_exists($id, $this->accountMeta) && 0 !== (int)$this->accountMeta[$id]['currency_id']) {
|
||||
if (array_key_exists($id, $this->accountMeta) && 0 !== (int)($this->accountMeta[$id]['currency_id'] ?? 0)) {
|
||||
$currency = $this->currencies[(int)$this->accountMeta[$id]['currency_id']];
|
||||
}
|
||||
// amounts and calculation.
|
||||
|
||||
@@ -36,10 +36,14 @@ use Illuminate\Support\Collection;
|
||||
class UserGroupTransformer extends AbstractTransformer
|
||||
{
|
||||
private array $memberships;
|
||||
private array $membershipsVisible;
|
||||
private array $inUse;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->memberships = [];
|
||||
$this->memberships = [];
|
||||
$this->membershipsVisible = [];
|
||||
$this->inUse = [];
|
||||
}
|
||||
|
||||
public function collectMetaData(Collection $objects): Collection
|
||||
@@ -51,8 +55,10 @@ class UserGroupTransformer extends AbstractTransformer
|
||||
|
||||
/** @var UserGroup $userGroup */
|
||||
foreach ($objects as $userGroup) {
|
||||
$userGroupId = $userGroup->id;
|
||||
$access = $user->hasRoleInGroupOrOwner($userGroup, UserRoleEnum::VIEW_MEMBERSHIPS) || $user->hasRole('owner');
|
||||
$userGroupId = $userGroup->id;
|
||||
$this->inUse[$userGroupId] = $user->user_group_id === $userGroupId;
|
||||
$access = $user->hasRoleInGroupOrOwner($userGroup, UserRoleEnum::VIEW_MEMBERSHIPS) || $user->hasRole('owner');
|
||||
$this->membershipsVisible[$userGroupId] = $access;
|
||||
if ($access) {
|
||||
$groupMemberships = $userGroup->groupMemberships()->get();
|
||||
|
||||
@@ -62,6 +68,7 @@ class UserGroupTransformer extends AbstractTransformer
|
||||
'user_id' => (string)$groupMembership->user_id,
|
||||
'user_email' => $groupMembership->user->email,
|
||||
'role' => $groupMembership->userRole->title,
|
||||
'you' => $groupMembership->user_id === $user->id,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -77,11 +84,13 @@ class UserGroupTransformer extends AbstractTransformer
|
||||
public function transform(UserGroup $userGroup): array
|
||||
{
|
||||
return [
|
||||
'id' => $userGroup->id,
|
||||
'created_at' => $userGroup->created_at->toAtomString(),
|
||||
'updated_at' => $userGroup->updated_at->toAtomString(),
|
||||
'title' => $userGroup->title,
|
||||
'members' => $this->memberships[$userGroup->id] ?? [],
|
||||
'id' => $userGroup->id,
|
||||
'created_at' => $userGroup->created_at->toAtomString(),
|
||||
'updated_at' => $userGroup->updated_at->toAtomString(),
|
||||
'in_use' => $this->inUse[$userGroup->id] ?? false,
|
||||
'title' => $userGroup->title,
|
||||
'can_see_members' => $this->membershipsVisible[$userGroup->id] ?? false,
|
||||
'members' => $this->memberships[$userGroup->id] ?? [],
|
||||
];
|
||||
// if the user has a specific role in this group, then collect the memberships.
|
||||
}
|
||||
|
||||
66
changelog.md
66
changelog.md
@@ -3,14 +3,74 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 6.1.11 - 2024-03-25
|
||||
|
||||
## 6.1.14 - 2024-xx-xx
|
||||
|
||||
### Changed
|
||||
- You will have to define again which asset accounts you want to see on the dashboard. Sorry about that.
|
||||
|
||||
## 6.1.13 - 2024-04-01
|
||||
|
||||
### Added
|
||||
|
||||
- sha256 checksums for the release files
|
||||
- git HEAD added to the release files for easier validation
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated pages in the `v2`-layout
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Issue 8648](https://github.com/firefly-iii/firefly-iii/issues/8648) (Crashes during initial setup with PG 16 dbs) reported by @Lysholm
|
||||
- [Issue 8725](https://github.com/firefly-iii/firefly-iii/issues/8725) (API: Call to `api/v1/bills` without arguments fails) reported by @dreautall
|
||||
- [Issue 8732](https://github.com/firefly-iii/firefly-iii/issues/8732) (Error "Division by zero" when opening the "Budget" section) reported by @mrResident
|
||||
- [PR 8735](https://github.com/firefly-iii/firefly-iii/pull/8735) (Fix `Division error by zero` in budget views) reported by @mansuf
|
||||
|
||||
## 6.1.12 - 2024-03-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Exclude debug files from release zip file
|
||||
- Drop a duplicate index
|
||||
- Replace broken Laravel Passport commands
|
||||
- [Issue 8692](https://github.com/firefly-iii/firefly-iii/issues/8692) (passport:install step issue when upgrading to 6.1.11) reported by @captainark
|
||||
- [Discussion 8694](https://github.com/orgs/firefly-iii/discussions/8694) (Getting error on accessing admin panel of Firefly 6.1.11) started by @jameswill
|
||||
|
||||
## 6.1.11 - 2024-03-20
|
||||
|
||||
### Added
|
||||
|
||||
- New expression engine by @michaelhthomas, still disabled though.
|
||||
- Missing database indexes to speed up performance.
|
||||
- A button to the experimental `v2`-layout to go back to `v1`.
|
||||
|
||||
### Changed
|
||||
|
||||
- New login/register screens
|
||||
- New CSP headers
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Dropped all old v3 code.
|
||||
- Dropped all generated JS and CSS, thanks @paulius-valiunas!
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Discussion 8569](https://github.com/orgs/firefly-iii/discussions/8569) (What is classed as an "automatic transaction" when it comes to notifications?) started by @digitlength
|
||||
- [Issue 8608](https://github.com/firefly-iii/firefly-iii/issues/8608) (404 error when deleting a category) reported by @Jademalo
|
||||
- [Issue 8616](https://github.com/firefly-iii/firefly-iii/issues/8616) (Create right now option for recurring transaction missing during weekend) reported by @Transportman
|
||||
- [PR 8634](https://github.com/firefly-iii/firefly-iii/pull/8634) ([trivial] fix broken link in readme) reported by @WardenJakx
|
||||
- [Issue 8632](https://github.com/firefly-iii/firefly-iii/issues/8632) (No search results returned when using `tag_contains` and `tag_starts`) reported by @Call-Me-G-Now
|
||||
- [Issue 8663](https://github.com/firefly-iii/firefly-iii/issues/8663) (Graph error on Reports) reported by @nicolopozzato
|
||||
- [Issue 8671](https://github.com/firefly-iii/firefly-iii/issues/8671) (Rule with -has_any_category:true trigger not triggering) reported by @pvieira84
|
||||
- [Issue 8672](https://github.com/firefly-iii/firefly-iii/issues/8672) (Can't remove foreign amount using the trash icon) reported by @danielnetop
|
||||
- [Issue 8668](https://github.com/firefly-iii/firefly-iii/issues/8668) (Not possible to upload CSV file as an attachment) reported by @dbtdsilva
|
||||
|
||||
### Removed
|
||||
|
||||
- Support for Mandrill because the necessary packages aren't maintained anymore.
|
||||
|
||||
|
||||
|
||||
## 6.1.10 - 2024-03-03
|
||||
|
||||
### Added
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
"@php artisan firefly-iii:upgrade-database",
|
||||
"@php artisan firefly-iii:correct-database",
|
||||
"@php artisan firefly-iii:report-integrity",
|
||||
"@php artisan passport:install",
|
||||
"@php artisan firefly-iii:laravel-passport-keys",
|
||||
"@php artisan firefly:instructions update"
|
||||
],
|
||||
"post-install-cmd": [
|
||||
|
||||
269
composer.lock
generated
269
composer.lock
generated
@@ -1670,16 +1670,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v11.0.7",
|
||||
"version": "v11.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "28eabe9dcdcb017a21ce226eda4538c5c8c93b1c"
|
||||
"reference": "1437cea6d2b04cbc83743fbb208e1a01efccd9ec"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/28eabe9dcdcb017a21ce226eda4538c5c8c93b1c",
|
||||
"reference": "28eabe9dcdcb017a21ce226eda4538c5c8c93b1c",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/1437cea6d2b04cbc83743fbb208e1a01efccd9ec",
|
||||
"reference": "1437cea6d2b04cbc83743fbb208e1a01efccd9ec",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1782,7 +1782,7 @@
|
||||
"league/flysystem-sftp-v3": "^3.0",
|
||||
"mockery/mockery": "^1.6",
|
||||
"nyholm/psr7": "^1.2",
|
||||
"orchestra/testbench-core": "^9.0",
|
||||
"orchestra/testbench-core": "^9.0.6",
|
||||
"pda/pheanstalk": "^5.0",
|
||||
"phpstan/phpstan": "^1.4.7",
|
||||
"phpunit/phpunit": "^10.5|^11.0",
|
||||
@@ -1871,20 +1871,20 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2024-03-15T23:17:58+00:00"
|
||||
"time": "2024-03-28T15:07:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/passport",
|
||||
"version": "v12.0.1",
|
||||
"version": "v12.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/passport.git",
|
||||
"reference": "37a5b5fbcae25dbb7c6a973957c2ce490e76946e"
|
||||
"reference": "21099f1aff81706781578a19335d8a4c7c96422a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/passport/zipball/37a5b5fbcae25dbb7c6a973957c2ce490e76946e",
|
||||
"reference": "37a5b5fbcae25dbb7c6a973957c2ce490e76946e",
|
||||
"url": "https://api.github.com/repos/laravel/passport/zipball/21099f1aff81706781578a19335d8a4c7c96422a",
|
||||
"reference": "21099f1aff81706781578a19335d8a4c7c96422a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1904,6 +1904,7 @@
|
||||
"nyholm/psr7": "^1.5",
|
||||
"php": "^8.0",
|
||||
"phpseclib/phpseclib": "^2.0|^3.0",
|
||||
"symfony/console": "^6.0|^7.0",
|
||||
"symfony/psr-http-message-bridge": "^2.1|^6.0|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -1946,20 +1947,20 @@
|
||||
"issues": "https://github.com/laravel/passport/issues",
|
||||
"source": "https://github.com/laravel/passport"
|
||||
},
|
||||
"time": "2024-03-14T16:27:37+00:00"
|
||||
"time": "2024-03-21T18:44:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/prompts",
|
||||
"version": "v0.1.16",
|
||||
"version": "v0.1.17",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/prompts.git",
|
||||
"reference": "ca6872ab6aec3ab61db3a61f83a6caf764ec7781"
|
||||
"reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/ca6872ab6aec3ab61db3a61f83a6caf764ec7781",
|
||||
"reference": "ca6872ab6aec3ab61db3a61f83a6caf764ec7781",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5",
|
||||
"reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2001,22 +2002,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/prompts/issues",
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.1.16"
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.1.17"
|
||||
},
|
||||
"time": "2024-02-21T19:25:27+00:00"
|
||||
"time": "2024-03-13T16:05:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sanctum",
|
||||
"version": "v4.0.0",
|
||||
"version": "v4.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/sanctum.git",
|
||||
"reference": "9e6e561308cace166de9ceae4ced820309fa8e13"
|
||||
"reference": "d1de99bf8d31199aaf93881561622489ab91ba58"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/sanctum/zipball/9e6e561308cace166de9ceae4ced820309fa8e13",
|
||||
"reference": "9e6e561308cace166de9ceae4ced820309fa8e13",
|
||||
"url": "https://api.github.com/repos/laravel/sanctum/zipball/d1de99bf8d31199aaf93881561622489ab91ba58",
|
||||
"reference": "d1de99bf8d31199aaf93881561622489ab91ba58",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2025,7 +2026,8 @@
|
||||
"illuminate/contracts": "^11.0",
|
||||
"illuminate/database": "^11.0",
|
||||
"illuminate/support": "^11.0",
|
||||
"php": "^8.2"
|
||||
"php": "^8.2",
|
||||
"symfony/console": "^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.6",
|
||||
@@ -2066,7 +2068,7 @@
|
||||
"issues": "https://github.com/laravel/sanctum/issues",
|
||||
"source": "https://github.com/laravel/sanctum"
|
||||
},
|
||||
"time": "2024-03-12T14:07:05+00:00"
|
||||
"time": "2024-03-19T20:09:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/serializable-closure",
|
||||
@@ -2195,16 +2197,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/ui",
|
||||
"version": "v4.5.0",
|
||||
"version": "v4.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/ui.git",
|
||||
"reference": "da3811f409297d13feccd5858ce748e7474b3d11"
|
||||
"reference": "a3562953123946996a503159199d6742d5534e61"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/ui/zipball/da3811f409297d13feccd5858ce748e7474b3d11",
|
||||
"reference": "da3811f409297d13feccd5858ce748e7474b3d11",
|
||||
"url": "https://api.github.com/repos/laravel/ui/zipball/a3562953123946996a503159199d6742d5534e61",
|
||||
"reference": "a3562953123946996a503159199d6742d5534e61",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2212,7 +2214,8 @@
|
||||
"illuminate/filesystem": "^9.21|^10.0|^11.0",
|
||||
"illuminate/support": "^9.21|^10.0|^11.0",
|
||||
"illuminate/validation": "^9.21|^10.0|^11.0",
|
||||
"php": "^8.0"
|
||||
"php": "^8.0",
|
||||
"symfony/console": "^6.0|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^7.35|^8.15|^9.0",
|
||||
@@ -2251,9 +2254,9 @@
|
||||
"ui"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/laravel/ui/tree/v4.5.0"
|
||||
"source": "https://github.com/laravel/ui/tree/v4.5.1"
|
||||
},
|
||||
"time": "2024-03-04T13:58:27+00:00"
|
||||
"time": "2024-03-21T18:12:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lcobucci/clock",
|
||||
@@ -2725,16 +2728,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "3.25.1",
|
||||
"version": "3.26.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "abbd664eb4381102c559d358420989f835208f18"
|
||||
"reference": "072735c56cc0da00e10716dd90d5a7f7b40b36be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/abbd664eb4381102c559d358420989f835208f18",
|
||||
"reference": "abbd664eb4381102c559d358420989f835208f18",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/072735c56cc0da00e10716dd90d5a7f7b40b36be",
|
||||
"reference": "072735c56cc0da00e10716dd90d5a7f7b40b36be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2799,7 +2802,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.25.1"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.26.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2811,7 +2814,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-16T12:53:19+00:00"
|
||||
"time": "2024-03-25T11:49:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-local",
|
||||
@@ -3088,16 +3091,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/uri",
|
||||
"version": "7.4.0",
|
||||
"version": "7.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/uri.git",
|
||||
"reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5"
|
||||
"reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri/zipball/bf414ba956d902f5d98bf9385fcf63954f09dce5",
|
||||
"reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4",
|
||||
"reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3166,7 +3169,7 @@
|
||||
"docs": "https://uri.thephpleague.com",
|
||||
"forum": "https://thephpleague.slack.com",
|
||||
"issues": "https://github.com/thephpleague/uri-src/issues",
|
||||
"source": "https://github.com/thephpleague/uri/tree/7.4.0"
|
||||
"source": "https://github.com/thephpleague/uri/tree/7.4.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3174,20 +3177,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-12-01T06:24:25+00:00"
|
||||
"time": "2024-03-23T07:42:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/uri-interfaces",
|
||||
"version": "7.4.0",
|
||||
"version": "7.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/uri-interfaces.git",
|
||||
"reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3"
|
||||
"reference": "8d43ef5c841032c87e2de015972c06f3865ef718"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/bd8c487ec236930f7bbc42b8d374fa882fbba0f3",
|
||||
"reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718",
|
||||
"reference": "8d43ef5c841032c87e2de015972c06f3865ef718",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3250,7 +3253,7 @@
|
||||
"docs": "https://uri.thephpleague.com",
|
||||
"forum": "https://thephpleague.slack.com",
|
||||
"issues": "https://github.com/thephpleague/uri-src/issues",
|
||||
"source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.0"
|
||||
"source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3258,7 +3261,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-24T15:40:42+00:00"
|
||||
"time": "2024-03-23T07:42:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
@@ -3363,16 +3366,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "34ccf6f6b49c915421c7886c88c0cb77f3ebbfd2"
|
||||
"reference": "4d599a6e2351d6b6bf21737accdfe1a4ce3fdbb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/34ccf6f6b49c915421c7886c88c0cb77f3ebbfd2",
|
||||
"reference": "34ccf6f6b49c915421c7886c88c0cb77f3ebbfd2",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4d599a6e2351d6b6bf21737accdfe1a4ce3fdbb1",
|
||||
"reference": "4d599a6e2351d6b6bf21737accdfe1a4ce3fdbb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3390,14 +3393,14 @@
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "^3.6.3 || ^4.0",
|
||||
"doctrine/orm": "^2.15.2 || ^3.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.18.0",
|
||||
"kylekatarnls/multi-tester": "^2.2.0",
|
||||
"ondrejmirtes/better-reflection": "^6.11.0.0",
|
||||
"phpmd/phpmd": "^2.13.0",
|
||||
"phpstan/extension-installer": "^1.3.0",
|
||||
"phpstan/phpstan": "^1.10.20",
|
||||
"phpunit/phpunit": "^10.2.2",
|
||||
"squizlabs/php_codesniffer": "^3.7.2"
|
||||
"friendsofphp/php-cs-fixer": "^3.52.1",
|
||||
"kylekatarnls/multi-tester": "^2.5.3",
|
||||
"ondrejmirtes/better-reflection": "^6.25.0.4",
|
||||
"phpmd/phpmd": "^2.15.0",
|
||||
"phpstan/extension-installer": "^1.3.1",
|
||||
"phpstan/phpstan": "^1.10.65",
|
||||
"phpunit/phpunit": "^10.5.15",
|
||||
"squizlabs/php_codesniffer": "^3.9.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/carbon"
|
||||
@@ -3465,7 +3468,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-13T12:42:37+00:00"
|
||||
"time": "2024-03-30T18:22:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/schema",
|
||||
@@ -5317,16 +5320,16 @@
|
||||
},
|
||||
{
|
||||
"name": "spatie/ignition",
|
||||
"version": "1.12.0",
|
||||
"version": "1.13.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/ignition.git",
|
||||
"reference": "5b6f801c605a593106b623e45ca41496a6e7d56d"
|
||||
"reference": "889bf1dfa59e161590f677728b47bf4a6893983b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/ignition/zipball/5b6f801c605a593106b623e45ca41496a6e7d56d",
|
||||
"reference": "5b6f801c605a593106b623e45ca41496a6e7d56d",
|
||||
"url": "https://api.github.com/repos/spatie/ignition/zipball/889bf1dfa59e161590f677728b47bf4a6893983b",
|
||||
"reference": "889bf1dfa59e161590f677728b47bf4a6893983b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5396,20 +5399,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-03T15:49:39+00:00"
|
||||
"time": "2024-03-29T14:03:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-html",
|
||||
"version": "3.6.0",
|
||||
"version": "3.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-html.git",
|
||||
"reference": "96ee6fc6b6484150c10c23985b3826b066aafc52"
|
||||
"reference": "df15763c190954ee46a74e0bf5b4b5bbf2e1f170"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/96ee6fc6b6484150c10c23985b3826b066aafc52",
|
||||
"reference": "96ee6fc6b6484150c10c23985b3826b066aafc52",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/df15763c190954ee46a74e0bf5b4b5bbf2e1f170",
|
||||
"reference": "df15763c190954ee46a74e0bf5b4b5bbf2e1f170",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5466,7 +5469,7 @@
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/spatie/laravel-html/tree/3.6.0"
|
||||
"source": "https://github.com/spatie/laravel-html/tree/3.7.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5474,20 +5477,20 @@
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-08T11:56:06+00:00"
|
||||
"time": "2024-03-23T11:28:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-ignition",
|
||||
"version": "2.4.2",
|
||||
"version": "2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-ignition.git",
|
||||
"reference": "351504f4570e32908839fc5a2dc53bf77d02f85e"
|
||||
"reference": "e23f4e8ce6644dc3d68b9d8a0aed3beaca0d6ada"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/351504f4570e32908839fc5a2dc53bf77d02f85e",
|
||||
"reference": "351504f4570e32908839fc5a2dc53bf77d02f85e",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/e23f4e8ce6644dc3d68b9d8a0aed3beaca0d6ada",
|
||||
"reference": "e23f4e8ce6644dc3d68b9d8a0aed3beaca0d6ada",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5497,7 +5500,7 @@
|
||||
"illuminate/support": "^10.0|^11.0",
|
||||
"php": "^8.1",
|
||||
"spatie/flare-client-php": "^1.3.5",
|
||||
"spatie/ignition": "^1.9",
|
||||
"spatie/ignition": "^1.13",
|
||||
"symfony/console": "^6.2.3|^7.0",
|
||||
"symfony/var-dumper": "^6.2.3|^7.0"
|
||||
},
|
||||
@@ -5566,7 +5569,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-02-09T16:08:40+00:00"
|
||||
"time": "2024-03-29T14:14:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/period",
|
||||
@@ -8894,23 +8897,23 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v3.12.2",
|
||||
"version": "v3.13.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||
"reference": "43555503052443964ce2c1c1f3b0378e58219eb8"
|
||||
"reference": "354a42f3e0b083cdd6f9da5a9d1c0c63b074547a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/43555503052443964ce2c1c1f3b0378e58219eb8",
|
||||
"reference": "43555503052443964ce2c1c1f3b0378e58219eb8",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/354a42f3e0b083cdd6f9da5a9d1c0c63b074547a",
|
||||
"reference": "354a42f3e0b083cdd6f9da5a9d1c0c63b074547a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/routing": "^9|^10|^11",
|
||||
"illuminate/session": "^9|^10|^11",
|
||||
"illuminate/support": "^9|^10|^11",
|
||||
"maximebf/debugbar": "~1.21.0",
|
||||
"maximebf/debugbar": "~1.22.0",
|
||||
"php": "^8.0",
|
||||
"symfony/finder": "^6|^7"
|
||||
},
|
||||
@@ -8923,7 +8926,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.10-dev"
|
||||
"dev-master": "3.13-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
@@ -8962,7 +8965,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.12.2"
|
||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.13.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8974,7 +8977,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-13T09:50:34+00:00"
|
||||
"time": "2024-04-01T16:39:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-ide-helper",
|
||||
@@ -9197,16 +9200,16 @@
|
||||
},
|
||||
{
|
||||
"name": "composer/pcre",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/pcre.git",
|
||||
"reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace"
|
||||
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/4775f35b2d70865807c89d32c8e7385b86eb0ace",
|
||||
"reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
|
||||
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9248,7 +9251,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/pcre/issues",
|
||||
"source": "https://github.com/composer/pcre/tree/3.1.2"
|
||||
"source": "https://github.com/composer/pcre/tree/3.1.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -9264,7 +9267,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-07T15:38:35+00:00"
|
||||
"time": "2024-03-19T10:26:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/deprecations",
|
||||
@@ -9603,25 +9606,27 @@
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.21.3",
|
||||
"version": "v1.22.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maximebf/php-debugbar.git",
|
||||
"reference": "0b407703b08ea0cf6ebc61e267cc96ff7000911b"
|
||||
"reference": "d7b6e1dc2dc85c01ed63ab158b00a7f46abdebcc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0b407703b08ea0cf6ebc61e267cc96ff7000911b",
|
||||
"reference": "0b407703b08ea0cf6ebc61e267cc96ff7000911b",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/d7b6e1dc2dc85c01ed63ab158b00a7f46abdebcc",
|
||||
"reference": "d7b6e1dc2dc85c01ed63ab158b00a7f46abdebcc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8",
|
||||
"php": "^7.2|^8",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/var-dumper": "^4|^5|^6|^7"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=7.5.20 <10.0",
|
||||
"dbrekelmans/bdi": "^1",
|
||||
"phpunit/phpunit": "^8|^9",
|
||||
"symfony/panther": "^1|^2.1",
|
||||
"twig/twig": "^1.38|^2.7|^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -9632,7 +9637,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.21-dev"
|
||||
"dev-master": "1.22-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -9663,22 +9668,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maximebf/php-debugbar/issues",
|
||||
"source": "https://github.com/maximebf/php-debugbar/tree/v1.21.3"
|
||||
"source": "https://github.com/maximebf/php-debugbar/tree/v1.22.1"
|
||||
},
|
||||
"time": "2024-03-12T14:23:07+00:00"
|
||||
"time": "2024-04-01T10:44:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
"version": "1.6.9",
|
||||
"version": "1.6.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mockery/mockery.git",
|
||||
"reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06"
|
||||
"reference": "81a161d0b135df89951abd52296adf97deb0723d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06",
|
||||
"reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06",
|
||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/81a161d0b135df89951abd52296adf97deb0723d",
|
||||
"reference": "81a161d0b135df89951abd52296adf97deb0723d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9690,8 +9695,8 @@
|
||||
"phpunit/phpunit": "<8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5 || ^9.6.10",
|
||||
"symplify/easy-coding-standard": "^12.0.8"
|
||||
"phpunit/phpunit": "^8.5 || ^9.6.17",
|
||||
"symplify/easy-coding-standard": "^12.1.14"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -9748,7 +9753,7 @@
|
||||
"security": "https://github.com/mockery/mockery/security/advisories",
|
||||
"source": "https://github.com/mockery/mockery"
|
||||
},
|
||||
"time": "2023-12-10T02:24:34+00:00"
|
||||
"time": "2024-03-21T18:34:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
@@ -10230,16 +10235,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "1.26.0",
|
||||
"version": "1.27.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "231e3186624c03d7e7c890ec662b81e6b0405227"
|
||||
"reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/231e3186624c03d7e7c890ec662b81e6b0405227",
|
||||
"reference": "231e3186624c03d7e7c890ec662b81e6b0405227",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/86e4d5a4b036f8f0be1464522f4c6b584c452757",
|
||||
"reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10271,22 +10276,22 @@
|
||||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.26.0"
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.27.0"
|
||||
},
|
||||
"time": "2024-02-23T16:05:55+00:00"
|
||||
"time": "2024-03-21T13:14:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.10.63",
|
||||
"version": "1.10.66",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "ad12836d9ca227301f5fb9960979574ed8628339"
|
||||
"reference": "94779c987e4ebd620025d9e5fdd23323903950bd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/ad12836d9ca227301f5fb9960979574ed8628339",
|
||||
"reference": "ad12836d9ca227301f5fb9960979574ed8628339",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/94779c987e4ebd620025d9e5fdd23323903950bd",
|
||||
"reference": "94779c987e4ebd620025d9e5fdd23323903950bd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10335,7 +10340,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-18T16:53:53+00:00"
|
||||
"time": "2024-03-28T16:17:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-deprecation-rules",
|
||||
@@ -10757,16 +10762,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.5.13",
|
||||
"version": "10.5.16",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "20a63fc1c6db29b15da3bd02d4b6cf59900088a7"
|
||||
"reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/20a63fc1c6db29b15da3bd02d4b6cf59900088a7",
|
||||
"reference": "20a63fc1c6db29b15da3bd02d4b6cf59900088a7",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd",
|
||||
"reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10838,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.13"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.16"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -10854,7 +10859,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-12T15:37:41+00:00"
|
||||
"time": "2024-03-28T10:08:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
@@ -11228,16 +11233,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "6.0.1",
|
||||
"version": "6.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951"
|
||||
"reference": "8074dbcd93529b357029f5cc5058fd3e43666984"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951",
|
||||
"reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984",
|
||||
"reference": "8074dbcd93529b357029f5cc5058fd3e43666984",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11252,7 +11257,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "6.0-dev"
|
||||
"dev-main": "6.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -11280,7 +11285,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/environment/issues",
|
||||
"security": "https://github.com/sebastianbergmann/environment/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/environment/tree/6.0.1"
|
||||
"source": "https://github.com/sebastianbergmann/environment/tree/6.1.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -11288,7 +11293,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-11T05:39:26+00:00"
|
||||
"time": "2024-03-23T08:47:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
|
||||
@@ -117,9 +117,9 @@ return [
|
||||
'expression_engine' => false,
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2024-03-18',
|
||||
'api_version' => '2.0.12',
|
||||
'db_version' => 23,
|
||||
'version' => 'develop/2024-04-02',
|
||||
'api_version' => '2.0.13',
|
||||
'db_version' => 24,
|
||||
|
||||
// generic settings
|
||||
'maxUploadSize' => 1073741824, // 1 GB
|
||||
@@ -215,11 +215,14 @@ return [
|
||||
'zoom_level' => env('MAP_DEFAULT_ZOOM', '6'),
|
||||
],
|
||||
|
||||
// administration specific preferences
|
||||
'admin_specific_prefs' => ['frontpageAccounts', 'lastActivity'],
|
||||
|
||||
// default user-related values
|
||||
'darkMode' => 'browser',
|
||||
'list_length' => 10, // to be removed if v1 is cancelled.
|
||||
'default_preferences' => [
|
||||
'frontPageAccounts' => [],
|
||||
'frontpageAccounts' => [],
|
||||
'listPageSize' => 50,
|
||||
'currencyPreference' => 'EUR',
|
||||
'language' => 'en_US',
|
||||
@@ -922,7 +925,7 @@ return [
|
||||
'sorting' => [
|
||||
'allowed' => [
|
||||
'transactions' => ['description', 'amount'],
|
||||
'accounts' => ['name', 'active', 'iban', 'balance'],
|
||||
'accounts' => ['name', 'active', 'iban', 'balance', 'last_activity'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
private const string QUERY_ERROR = 'Could not execute query (table "%s", field "%s"): %s';
|
||||
private const string EXPL = 'If the index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.';
|
||||
private const string EXPL = 'If the index already exists (see error), or if MySQL can\'t do it, this is not an problem. Otherwise, please open a GitHub discussion.';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -24,7 +24,6 @@ return new class () extends Migration {
|
||||
'journal_meta' => ['transaction_journal_id', 'data', 'name'],
|
||||
'category_transaction_journal' => ['transaction_journal_id'],
|
||||
'categories' => ['user_id', 'user_group_id'],
|
||||
'transaction_currencies' => ['code'],
|
||||
'transaction_groups' => ['user_id', 'user_group_id'],
|
||||
'transaction_journals' => ['user_id', 'user_group_id', 'date', 'transaction_group_id', 'transaction_type_id', 'transaction_currency_id', 'bill_id'],
|
||||
'transactions' => ['account_id', 'transaction_journal_id', 'transaction_currency_id', 'foreign_currency_id'],
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
try {
|
||||
Schema::table(
|
||||
'preferences',
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('preferences', 'user_group_id')) {
|
||||
$table->bigInteger('user_group_id', false, true)->nullable()->after('user_id');
|
||||
$table->foreign('user_group_id', 'preferences_to_ugi')->references('id')->on('user_groups')->onDelete('set null')->onUpdate('cascade');
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void {}
|
||||
};
|
||||
93
package-lock.json
generated
93
package-lock.json
generated
@@ -33,40 +33,45 @@
|
||||
"laravel-vite-plugin": "^0.8.1",
|
||||
"patch-package": "^8.0.0",
|
||||
"sass": "^1.72.0",
|
||||
"vite": "^4.5.2",
|
||||
"vite": "^4.5.3",
|
||||
"vite-plugin-manifest-sri": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ag-grid-community/client-side-row-model": {
|
||||
"version": "31.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/client-side-row-model/-/client-side-row-model-31.1.1.tgz",
|
||||
"integrity": "sha512-KBSPaEJ1q97xooJd7U6W8PUfzUDecnsvE+Y05Xg/s6i61fLKyDTxDVJB/kETxdST0+T8FgjFMaPjY0hAZBOhWg==",
|
||||
"version": "31.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/client-side-row-model/-/client-side-row-model-31.2.0.tgz",
|
||||
"integrity": "sha512-fiXFGUaOCZdJ5QSJaWIyeA+hzjOe0+KzU1PdxqUdUZiNmDv/MFQQd99Biyk76OS6i8eWDFcC1O/V7owfVTWflw==",
|
||||
"dependencies": {
|
||||
"@ag-grid-community/core": "31.1.1"
|
||||
"@ag-grid-community/core": "31.2.0",
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ag-grid-community/core": {
|
||||
"version": "31.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/core/-/core-31.1.1.tgz",
|
||||
"integrity": "sha512-WFN3yXpFR0uMJQZak6x4kzLl7nJPrrorUWf/KWH4ToP6PMZcc6cKT3jge3bJ0SBkzs2m7oQGnmi8rfTaHuXI4Q=="
|
||||
"version": "31.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/core/-/core-31.2.0.tgz",
|
||||
"integrity": "sha512-297AR2Z0i6zdpo+d1riWE9TpbsQ956Sd3rkgnjDaFzgGClsdy0SwInBs2281CHjaLQAhPzFelZ5XwcDTxHl4Tw==",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ag-grid-community/infinite-row-model": {
|
||||
"version": "31.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/infinite-row-model/-/infinite-row-model-31.1.1.tgz",
|
||||
"integrity": "sha512-cOuqOZD+V0ShwlxZy0Q5UJAD4ixO9GteCsJyvueAybq7BO8MfYCfjAS+Wk/z6hPEsuoGLk6lupIzneNVyDmzfA==",
|
||||
"version": "31.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/infinite-row-model/-/infinite-row-model-31.2.0.tgz",
|
||||
"integrity": "sha512-SS+RqziA1koxMruHnL3hwJCv8RALldmueah9NrqDj2HSja83NLf+gKluBGfKsFlQei+wG0+vF50fOrtb2OGu2Q==",
|
||||
"dependencies": {
|
||||
"@ag-grid-community/core": "31.1.1"
|
||||
"@ag-grid-community/core": "31.2.0",
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ag-grid-community/styles": {
|
||||
"version": "31.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/styles/-/styles-31.1.1.tgz",
|
||||
"integrity": "sha512-Q44beV3vD1jydB0smro9+nJY9g60uSjQ+cM8cHEIS9gDCG/37WiabdtQybJceeIHbne51MJPtOAa89y/TfnbQg=="
|
||||
"version": "31.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ag-grid-community/styles/-/styles-31.2.0.tgz",
|
||||
"integrity": "sha512-fU6wDpK0//dJLp5pwojuTUQPi4nVZ4iTBF1yaQw+6NXeGi0ma7rz7IOS6Idw0XXE3ELKGTuO7QUJmxxdL7kykw=="
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz",
|
||||
"integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz",
|
||||
"integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==",
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
@@ -542,12 +547,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/bootstrap": {
|
||||
@@ -1067,9 +1075,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz",
|
||||
"integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
@@ -1519,9 +1527,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.35",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz",
|
||||
"integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==",
|
||||
"version": "8.4.38",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
|
||||
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1540,7 +1548,7 @@
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.7",
|
||||
"picocolors": "^1.0.0",
|
||||
"source-map-js": "^1.0.2"
|
||||
"source-map-js": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
@@ -1630,17 +1638,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz",
|
||||
"integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.2",
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.3",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.1"
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -1677,9 +1685,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
@@ -1734,6 +1742,11 @@
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
|
||||
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
||||
@@ -1744,9 +1757,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "4.5.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz",
|
||||
"integrity": "sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==",
|
||||
"version": "4.5.3",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.3.tgz",
|
||||
"integrity": "sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.18.10",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"laravel-vite-plugin": "^0.8.1",
|
||||
"patch-package": "^8.0.0",
|
||||
"sass": "^1.72.0",
|
||||
"vite": "^4.5.2",
|
||||
"vite": "^4.5.3",
|
||||
"vite-plugin-manifest-sri": "^0.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{f as n}from"./vendor-029c0fc2.js";function e(){return{id:"",name:"",alpine_name:""}}function o(){return{description:[],amount:[],currency_code:[],foreign_amount:[],foreign_currency_code:[],source_account:[],destination_account:[],budget_id:[],category_name:[],piggy_bank_id:[],bill_id:[],tags:[],notes:[],internal_reference:[],external_url:[],latitude:[],longitude:[],zoom_level:[],date:[],interest_date:[],book_date:[],process_date:[],due_date:[],payment_date:[],invoice_date:[]}}function d(){let t=n(new Date,"yyyy-MM-dd HH:mm");return{description:"",amount:"",currency_code:"EUR",foreign_amount:"",foreign_currency_code:"",source_account:e(),destination_account:e(),budget_id:null,category_name:"",piggy_bank_id:null,bill_id:null,tags:[],notes:"",internal_reference:"",external_url:"",hasLocation:!1,latitude:null,longitude:null,zoomLevel:null,date:t,interest_date:"",book_date:"",process_date:"",due_date:"",payment_date:"",invoice_date:"",errors:o()}}export{d as c,o as d};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{a as s}from"./format-money-89cf90df.js";import{f as n}from"./vendor-029c0fc2.js";class c{show(a,t){return s.get("/api/v2/accounts/"+a,{params:t})}index(a){return s.get("/api/v2/accounts",{params:a})}transactions(a,t){const r={page:t.page??1};return t.hasOwnProperty("start")&&(r.start=n(t.start,"y-MM-dd")),t.hasOwnProperty("end")&&(r.end=n(t.end,"y-MM-dd")),s.get("/api/v2/accounts/"+a+"/transactions",{params:r})}}export{c as G};
|
||||
@@ -1 +0,0 @@
|
||||
import{a as s}from"./format-money-89cf90df.js";let t=class{list(a){return s.get("/api/v2/subscriptions",{params:a})}paid(a){return s.get("/api/v2/subscriptions/sum/paid",{params:a})}unpaid(a){return s.get("/api/v2/subscriptions/sum/unpaid",{params:a})}};class e{list(a){return s.get("/api/v2/piggy-banks",{params:a})}}export{t as G,e as a};
|
||||
@@ -1 +0,0 @@
|
||||
import{a as t}from"./format-money-89cf90df.js";class n{list(a){return t.get("/api/v2/transactions",{params:a})}infiniteList(a){return t.get("/api/v2/infinite/transactions",{params:a})}show(a,i){return t.get("/api/v2/transactions/"+a,{params:i})}}export{n as G};
|
||||
@@ -1 +0,0 @@
|
||||
.ag-theme-firefly-iii .ag-root,.ag-theme-firefly-iii .ag-root-wrapper{border:0}
|
||||
@@ -1 +0,0 @@
|
||||
import{a as d,d as h,f as p}from"./format-money-89cf90df.js";import{f as r,i as a}from"./vendor-029c0fc2.js";/* empty css */import{G as m}from"./get-23aadb69.js";class f{setElement(t){console.log("GenericEditor.setElement()",t),this.element=t,this.parent=t.parentElement,this.options={}}init(){this.options.type=this.element.dataset.type,this.options.id=this.element.dataset.id,this.options.value=this.element.dataset.value,this.options.index=this.element.dataset.index,this.options.model=this.element.dataset.model,this.options.field=this.element.dataset.field,console.log("GenericEditor["+this.options.index+"].init()")}replace(){console.log("GenericEditor["+this.options.index+"].replace()"),this.options.original=this.element.parentElement.innerHTML,this.options.type==="text"&&this.replaceText()}replaceText(){console.log("GenericEditor["+this.options.index+"].replaceText()");let t=this.formStart()+this.rowStart();t+=this.columnStart("7")+this.label()+this.textField()+this.closeDiv(),t+=this.columnStart("5")+this.buttonGroup()+this.closeDiv(),t+=this.closeDiv()+this.closeForm(),this.element.parentElement.innerHTML=t}textField(){return'<input data-index="'+this.options.index+'input" autocomplete="off" type="text" class="form-control form-control-sm" id="input" name="name" value="'+this.options.value+'" placeholder="'+this.options.value+'" autofocus>'}closeDiv(){return"</div>"}closeForm(){return"</form>"}formStart(){return'<form class="form-inline">'}rowStart(){return'<div class="row">'}columnStart(t){return t===""?'<div class="col">':'<div class="col-'+t+'">'}label(){return'<label class="sr-only" for="input">Field value</label>'}buttonGroup(){return'<div class="btn-group btn-group-sm" role="group" aria-label="Options"><button data-index="'+this.options.index+'" type="button" @click="cancelInlineEdit" class="btn btn-danger"><em class="fa-solid fa-xmark text-white"></em></button><button data-index="'+this.options.index+'" type="submit" @click="submitInlineEdit" class="btn btn-success"><em class="fa-solid fa-check"></em></button></div>'}cancel(){console.log("GenericEditor["+this.options.index+"].cancel()"),console.log(this.element),console.log(this.parent),this.parent.innerHTML=this.options.original}submitInlineEdit(t){console.log("Submit?")}}class b{put(t,n){return d.put("/api/v2/accounts/"+t,n)}}const l=window.location.href.split("/"),g=l[l.length-1];let w=function(){return{notifications:{error:{show:!1,text:"",url:""},success:{show:!1,text:"",url:""},wait:{show:!1,text:""}},totalPages:1,page:1,tableColumns:{name:{enabled:!0}},editors:{},sortingColumn:"",sortDirection:"",accounts:[],sort(e){return this.sortingColumn=e,this.sortDirection=this.sortDirection==="asc"?"desc":"asc",this.loadAccounts(),!1},formatMoney(e,t){return p(e,t)},format(e){return r(e,a.t("config.date_time_fns"))},init(){this.notifications.wait.show=!0,this.notifications.wait.text=a.t("firefly.wait_loading_data"),this.loadAccounts()},submitInlineEdit(e){e.preventDefault();const n=e.currentTarget.dataset.index,i=document.querySelectorAll('[data-index="'+n+'input"]')[0].value??"";if(i==="")return;const o=this.editors[n].options.field,s={};s[o]=i,console.log(s),console.log("New value is "+i+" for account #"+this.editors[n].options.id),new b().put(this.editors[n].options.id,s)},cancelInlineEdit(e){const n=e.currentTarget.dataset.index;this.editors[n].cancel()},triggerEdit(e){const t=e.currentTarget,n=t.dataset.index;this.editors[n]=new f,this.editors[n].setElement(t),this.editors[n].init(),this.editors[n].replace()},loadAccounts(){this.notifications.wait.show=!0,this.notifications.wait.text=a.t("firefly.wait_loading_data"),this.accounts=[];const e=[{column:this.sortingColumn,direction:this.sortDirection}];new m().index({sorting:e,type:g,page:this.page}).then(t=>{for(let n=0;n<t.data.data.length;n++)if(t.data.data.hasOwnProperty(n)){let i=t.data.data[n],o={id:parseInt(i.id),active:i.attributes.active,name:i.attributes.name,type:i.attributes.type,role:i.attributes.account_role,iban:i.attributes.iban===null?"":i.attributes.iban.match(/.{1,4}/g).join(" "),account_number:i.attributes.account_number===null?"":i.attributes.account_number,current_balance:i.attributes.current_balance,currency_code:i.attributes.currency_code,native_current_balance:i.attributes.native_current_balance,native_currency_code:i.attributes.native_currency_code,last_activity:i.attributes.last_activity===null?"":r(new Date(i.attributes.last_activity),"P")};this.accounts.push(o)}this.notifications.wait.show=!1})}}},c={index:w,dates:h};function u(){Object.keys(c).forEach(e=>{console.log(`Loading page component "${e}"`);let t=c[e]();Alpine.data(e,()=>t)}),Alpine.start()}document.addEventListener("firefly-iii-bootstrapped",()=>{console.log("Loaded through event listener."),u()});window.bootstrapped&&(console.log("Loaded through window variable."),u());
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 696 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1 +0,0 @@
|
||||
import{c as o}from"./create-empty-split-9549645c.js";import{f as _}from"./vendor-029c0fc2.js";function l(a,r){let n=[];for(let i in a)if(a.hasOwnProperty(i)){let e=a[i],t=o();t.transaction_journal_id=e.transaction_journal_id,t.transaction_group_id=r,t.bill_id=e.bill_id,t.bill_name=e.bill_name,t.budget_id=e.budget_id,t.budget_name=e.budget_name,t.category_name=e.category_name,t.category_id=e.category_id,t.piggy_bank_id=e.piggy_bank_id,t.piggy_bank_name=e.piggy_bank_name,t.book_date=e.book_date,t.due_date=e.due_date,t.interest_date=e.interest_date,t.invoice_date=e.invoice_date,t.payment_date=e.payment_date,t.process_date=e.process_date,t.external_url=e.external_url,t.internal_reference=e.internal_reference,t.notes=e.notes,t.tags=e.tags,t.amount=parseFloat(e.amount).toFixed(e.currency_decimal_places),t.currency_code=e.currency_code,e.foreign_amount!==null&&(t.forein_currency_code=e.foreign_currency_code,t.foreign_amount=parseFloat(e.foreign_amount).toFixed(e.foreign_currency_decimal_places)),t.date=_(new Date(e.date),"yyyy-MM-dd HH:mm"),t.description=e.description,t.destination_account={id:e.destination_id,name:e.destination_name,type:e.destination_type,alpine_name:e.destination_name},t.source_account={id:e.source_id,name:e.source_name,type:e.source_type,alpine_name:e.source_name},e.latitude!==null&&(t.hasLocation=!0,t.latitude=e.latitude,t.longitude=e.longitude,t.zoomLevel=e.zoom_level),n.push(t)}return n}export{l as p};
|
||||
@@ -1 +0,0 @@
|
||||
import{a as p}from"./format-money-89cf90df.js";class u{put(t,a){let r="/api/v2/transactions/"+parseInt(a.id);return p.put(r,t)}}export{u as P};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
.dark-editable-element{border-bottom:dashed 1px #0088cc;text-decoration:none;cursor:pointer}.dark-editable-element-disabled{border-bottom:none;cursor:default}.dark-editable-element-empty{font-style:italic;color:#d14}.dark-editable{max-width:none}.dark-editable-loader{font-size:5px;left:50%;top:50%;width:1em;height:1em;border-radius:50%;position:relative;text-indent:-9999em;-webkit-animation:load5 1.1s infinite ease;animation:load5 1.1s infinite ease;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes load5{0%,to{box-shadow:0 -2.6em #000,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #00000080,-1.8em -1.8em #000000b3}12.5%{box-shadow:0 -2.6em #000000b3,1.8em -1.8em #000,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #00000080}25%{box-shadow:0 -2.6em #00000080,1.8em -1.8em #000000b3,2.5em 0 #000,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #0003}37.5%{box-shadow:0 -2.6em #0003,1.8em -1.8em #00000080,2.5em 0 #000000b3,1.75em 1.75em #000,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #0003}50%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #00000080,1.75em 1.75em #000000b3,0 2.5em #000,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #0003}62.5%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #00000080,0 2.5em #000000b3,-1.8em 1.8em #000,-2.6em 0 #0003,-1.8em -1.8em #0003}75%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #00000080,-1.8em 1.8em #000000b3,-2.6em 0 #000,-1.8em -1.8em #0003}87.5%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #00000080,-2.6em 0 #000000b3,-1.8em -1.8em #000}}@keyframes load5{0%,to{box-shadow:0 -2.6em #000,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #00000080,-1.8em -1.8em #000000b3}12.5%{box-shadow:0 -2.6em #000000b3,1.8em -1.8em #000,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #00000080}25%{box-shadow:0 -2.6em #00000080,1.8em -1.8em #000000b3,2.5em 0 #000,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #0003}37.5%{box-shadow:0 -2.6em #0003,1.8em -1.8em #00000080,2.5em 0 #000000b3,1.75em 1.75em #000,0 2.5em #0003,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #0003}50%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #00000080,1.75em 1.75em #000000b3,0 2.5em #000,-1.8em 1.8em #0003,-2.6em 0 #0003,-1.8em -1.8em #0003}62.5%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #00000080,0 2.5em #000000b3,-1.8em 1.8em #000,-2.6em 0 #0003,-1.8em -1.8em #0003}75%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #00000080,-1.8em 1.8em #000000b3,-2.6em 0 #000,-1.8em -1.8em #0003}87.5%{box-shadow:0 -2.6em #0003,1.8em -1.8em #0003,2.5em 0 #0003,1.75em 1.75em #0003,0 2.5em #0003,-1.8em 1.8em #00000080,-2.6em 0 #000000b3,-1.8em -1.8em #000}}
|
||||
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
@@ -1,199 +0,0 @@
|
||||
{
|
||||
"_create-empty-split-9549645c.js": {
|
||||
"file": "assets/create-empty-split-9549645c.js",
|
||||
"imports": [
|
||||
"_vendor-029c0fc2.js"
|
||||
]
|
||||
},
|
||||
"_format-money-89cf90df.js": {
|
||||
"file": "assets/format-money-89cf90df.js",
|
||||
"imports": [
|
||||
"_vendor-029c0fc2.js"
|
||||
]
|
||||
},
|
||||
"_get-23aadb69.js": {
|
||||
"file": "assets/get-23aadb69.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_vendor-029c0fc2.js"
|
||||
]
|
||||
},
|
||||
"_get-58830780.js": {
|
||||
"file": "assets/get-58830780.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js"
|
||||
]
|
||||
},
|
||||
"_get-b646f004.js": {
|
||||
"file": "assets/get-b646f004.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js"
|
||||
]
|
||||
},
|
||||
"_parse-downloaded-splits-2d74acfc.js": {
|
||||
"file": "assets/parse-downloaded-splits-2d74acfc.js",
|
||||
"imports": [
|
||||
"_create-empty-split-9549645c.js",
|
||||
"_vendor-029c0fc2.js"
|
||||
]
|
||||
},
|
||||
"_put-c581fff2.js": {
|
||||
"file": "assets/put-c581fff2.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js"
|
||||
]
|
||||
},
|
||||
"_splice-errors-into-transactions-81484c73.js": {
|
||||
"file": "assets/splice-errors-into-transactions-81484c73.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_get-58830780.js",
|
||||
"_vendor-029c0fc2.js"
|
||||
]
|
||||
},
|
||||
"_vendor-029c0fc2.js": {
|
||||
"assets": [
|
||||
"assets/layers-1dbbe9d0.png",
|
||||
"assets/layers-2x-066daca8.png",
|
||||
"assets/marker-icon-574c3a5c.png"
|
||||
],
|
||||
"css": [
|
||||
"assets/vendor-52daf6b6.css"
|
||||
],
|
||||
"file": "assets/vendor-029c0fc2.js"
|
||||
},
|
||||
"grid-ff3-theme.css": {
|
||||
"file": "assets/grid-ff3-theme-badb0a41.css",
|
||||
"src": "grid-ff3-theme.css"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf": {
|
||||
"file": "assets/fa-brands-400-5656d596.ttf",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2": {
|
||||
"file": "assets/fa-brands-400-3a8924cd.woff2",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf": {
|
||||
"file": "assets/fa-regular-400-5d02dc9b.ttf",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2": {
|
||||
"file": "assets/fa-regular-400-2bccecf0.woff2",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf": {
|
||||
"file": "assets/fa-solid-900-fbbf06d7.ttf",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2": {
|
||||
"file": "assets/fa-solid-900-9fc85f3a.woff2",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2"
|
||||
},
|
||||
"node_modules/leaflet/dist/images/layers-2x.png": {
|
||||
"file": "assets/layers-2x-066daca8.png",
|
||||
"src": "node_modules/leaflet/dist/images/layers-2x.png"
|
||||
},
|
||||
"node_modules/leaflet/dist/images/layers.png": {
|
||||
"file": "assets/layers-1dbbe9d0.png",
|
||||
"src": "node_modules/leaflet/dist/images/layers.png"
|
||||
},
|
||||
"node_modules/leaflet/dist/images/marker-icon.png": {
|
||||
"file": "assets/marker-icon-574c3a5c.png",
|
||||
"src": "node_modules/leaflet/dist/images/marker-icon.png"
|
||||
},
|
||||
"resources/assets/v2/pages/accounts/index.js": {
|
||||
"css": [
|
||||
"assets/grid-ff3-theme-badb0a41.css"
|
||||
],
|
||||
"file": "assets/index-56152516.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_vendor-029c0fc2.js",
|
||||
"_get-23aadb69.js"
|
||||
],
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/pages/accounts/index.js"
|
||||
},
|
||||
"resources/assets/v2/pages/dashboard/dashboard.js": {
|
||||
"file": "assets/dashboard-f6f6ae3f.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_vendor-029c0fc2.js",
|
||||
"_get-23aadb69.js",
|
||||
"_get-b646f004.js",
|
||||
"_get-58830780.js"
|
||||
],
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/pages/dashboard/dashboard.js"
|
||||
},
|
||||
"resources/assets/v2/pages/transactions/create.js": {
|
||||
"file": "assets/create-dec509ea.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_create-empty-split-9549645c.js",
|
||||
"_splice-errors-into-transactions-81484c73.js",
|
||||
"_vendor-029c0fc2.js",
|
||||
"_get-58830780.js"
|
||||
],
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/pages/transactions/create.js"
|
||||
},
|
||||
"resources/assets/v2/pages/transactions/edit.js": {
|
||||
"file": "assets/edit-990ac3ab.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_get-b646f004.js",
|
||||
"_parse-downloaded-splits-2d74acfc.js",
|
||||
"_splice-errors-into-transactions-81484c73.js",
|
||||
"_vendor-029c0fc2.js",
|
||||
"_create-empty-split-9549645c.js",
|
||||
"_put-c581fff2.js",
|
||||
"_get-58830780.js"
|
||||
],
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/pages/transactions/edit.js"
|
||||
},
|
||||
"resources/assets/v2/pages/transactions/index.js": {
|
||||
"css": [
|
||||
"assets/grid-ff3-theme-badb0a41.css"
|
||||
],
|
||||
"file": "assets/index-979da1db.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_vendor-029c0fc2.js",
|
||||
"_put-c581fff2.js",
|
||||
"_get-b646f004.js"
|
||||
],
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/pages/transactions/index.js"
|
||||
},
|
||||
"resources/assets/v2/pages/transactions/show.css": {
|
||||
"file": "assets/show-8b1429e5.css",
|
||||
"src": "resources/assets/v2/pages/transactions/show.css"
|
||||
},
|
||||
"resources/assets/v2/pages/transactions/show.js": {
|
||||
"css": [
|
||||
"assets/show-8b1429e5.css"
|
||||
],
|
||||
"file": "assets/show-31120d76.js",
|
||||
"imports": [
|
||||
"_format-money-89cf90df.js",
|
||||
"_vendor-029c0fc2.js",
|
||||
"_get-b646f004.js",
|
||||
"_parse-downloaded-splits-2d74acfc.js",
|
||||
"_create-empty-split-9549645c.js"
|
||||
],
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/pages/transactions/show.js"
|
||||
},
|
||||
"resources/assets/v2/sass/app.scss": {
|
||||
"file": "assets/app-de4f62e0.css",
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/sass/app.scss"
|
||||
},
|
||||
"vendor.css": {
|
||||
"file": "assets/vendor-52daf6b6.css",
|
||||
"src": "vendor.css"
|
||||
}
|
||||
}
|
||||
3
public/v1/js/.gitignore
vendored
Normal file
3
public/v1/js/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.LICENSE.txt
|
||||
*.js
|
||||
#webhooks
|
||||
File diff suppressed because one or more lines are too long
@@ -1,16 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap v3.4.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.7.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2023-08-28T13:37Z
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
|
||||
/*!
|
||||
* Vue.js v2.7.16
|
||||
* (c) 2014-2023 Evan You
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user