Compare commits

..

24 Commits

Author SHA1 Message Date
65f1d22205 🚀RELEASE v1.4.12 2023-05-18 21:35:16 +02:00
d867c08aba fix(donation/payment): Funny javascript number to float conversion where integers were needed 2023-05-18 21:34:41 +02:00
f1929e7cf9 Merge branch 'dev' of git.odit.services:lfk/frontend into dev
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 13:28:43 +02:00
373484c242 🚀RELEASE v1.4.11 2023-05-10 13:28:34 +02:00
f77460bb0c chore(deps): Lockfile 2023-05-10 13:28:21 +02:00
574e0dcb05 feat(orgs): Show total distance 2023-05-10 13:27:47 +02:00
7b19a0aa08 chore(deps): More bumps 2023-05-10 13:22:11 +02:00
08642d7618 new license file version [CI SKIP] 2023-05-10 11:21:43 +00:00
c3e9c27cd3 🚀RELEASE v1.4.10
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 13:21:10 +02:00
29a2854671 chore(deps): Bumped svelte-table 2023-05-10 13:20:44 +02:00
8e6786e722 chore(deps): Pin and bump 2023-05-10 13:19:25 +02:00
6ad40564e3 chore(deps): Bumped scanclientjs 2023-05-10 13:18:44 +02:00
776973bfe9 🚀RELEASE v1.4.9
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 16:32:00 +02:00
6025e43baa Fixed empty return 2023-05-09 16:29:41 +02:00
d9a47f882c Changed the in table replacement method 2023-05-09 16:29:25 +02:00
4235758a6d 🚀RELEASE v1.4.8
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 10:44:04 +02:00
59fe2dfabb Switched donor loading to non-paginated 2023-05-09 10:43:33 +02:00
6364536dcd 🚀RELEASE v1.4.7
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 20:30:20 +02:00
a8a771114d Paginated modal data loading 2023-05-04 20:28:21 +02:00
4e0a2c8301 Moved loading to onmount 2023-05-04 20:17:29 +02:00
b6fed92a17 🚀RELEASE v1.4.6
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 20:10:57 +02:00
97b57aeb0c fix(donor/detail): Set email to null to avoid vaidation errors 2023-05-04 20:10:21 +02:00
e25ed1fff9 fix(donor/detail): Set phone to null to avoid vaidation errors 2023-05-04 20:09:43 +02:00
a2ff5b8a14 fix(donor/details): don't load donations 2023-05-04 20:07:54 +02:00
13 changed files with 155 additions and 76 deletions

View File

@@ -2,10 +2,68 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [1.4.12](https://git.odit.services/lfk/frontend/compare/1.4.11...1.4.12)
- fix(donation/payment): Funny javascript number to float conversion where integers were needed [`d867c08`](https://git.odit.services/lfk/frontend/commit/d867c08aba234d3a7fe9e2311d37dc5e96fc2afc)
- new license file version [CI SKIP] [`08642d7`](https://git.odit.services/lfk/frontend/commit/08642d7618faeae31f0acfe776642c9fa156e5ff)
#### [1.4.11](https://git.odit.services/lfk/frontend/compare/1.4.10...1.4.11)
> 10 May 2023
- chore(deps): Lockfile [`f77460b`](https://git.odit.services/lfk/frontend/commit/f77460bb0c8ce6d0f3d83a077017d5fc7bf55af7)
- 🚀RELEASE v1.4.11 [`373484c`](https://git.odit.services/lfk/frontend/commit/373484c2424bea7ae0d70d342e0ae2076aab1b6a)
- feat(orgs): Show total distance [`574e0dc`](https://git.odit.services/lfk/frontend/commit/574e0dcb051305bde2fc76d8456a35baec0cf309)
- chore(deps): More bumps [`7b19a0a`](https://git.odit.services/lfk/frontend/commit/7b19a0aa08bb6c89c51d27c0d05777e8fcfdad17)
#### [1.4.10](https://git.odit.services/lfk/frontend/compare/1.4.9...1.4.10)
> 10 May 2023
- chore(deps): Bumped svelte-table [`29a2854`](https://git.odit.services/lfk/frontend/commit/29a2854671b3af5b85ea96d050a9076f47b6575d)
- 🚀RELEASE v1.4.10 [`c3e9c27`](https://git.odit.services/lfk/frontend/commit/c3e9c27cd3d4b916f1661d4958cabab038918587)
- chore(deps): Pin and bump [`8e6786e`](https://git.odit.services/lfk/frontend/commit/8e6786e72227b3f07cc805f0957d5b7fd123ec13)
- chore(deps): Bumped scanclientjs [`6ad4056`](https://git.odit.services/lfk/frontend/commit/6ad40564e3e342046f6ee19fab9e455ec3bbff9b)
#### [1.4.9](https://git.odit.services/lfk/frontend/compare/1.4.8...1.4.9)
> 9 May 2023
- 🚀RELEASE v1.4.9 [`776973b`](https://git.odit.services/lfk/frontend/commit/776973bfe9b34c26a1c80d5e458cc2644dd9036b)
- Changed the in table replacement method [`d9a47f8`](https://git.odit.services/lfk/frontend/commit/d9a47f882c1c6bcf98ef85d50d70c010d54b326e)
- Fixed empty return [`6025e43`](https://git.odit.services/lfk/frontend/commit/6025e43baa8516657a60a1de9a82c2189221c6ac)
#### [1.4.8](https://git.odit.services/lfk/frontend/compare/1.4.7...1.4.8)
> 9 May 2023
- Switched donor loading to non-paginated [`59fe2df`](https://git.odit.services/lfk/frontend/commit/59fe2dfabb224863876c4db31a965c34a51a9369)
- 🚀RELEASE v1.4.8 [`4235758`](https://git.odit.services/lfk/frontend/commit/4235758a6d1499715287d6ab193cc87c68d5742e)
#### [1.4.7](https://git.odit.services/lfk/frontend/compare/1.4.6...1.4.7)
> 4 May 2023
- Paginated modal data loading [`a8a7711`](https://git.odit.services/lfk/frontend/commit/a8a771114df6eb57d5b1d5497a5be49e619d4102)
- Moved loading to onmount [`4e0a2c8`](https://git.odit.services/lfk/frontend/commit/4e0a2c83015bde5e360c5fb2c0babbeaa03dc2b5)
- 🚀RELEASE v1.4.7 [`6364536`](https://git.odit.services/lfk/frontend/commit/6364536dcd840c71f7cb6afb31bbc4f160ac4f73)
#### [1.4.6](https://git.odit.services/lfk/frontend/compare/1.4.5...1.4.6)
> 4 May 2023
- 🚀RELEASE v1.4.6 [`b6fed92`](https://git.odit.services/lfk/frontend/commit/b6fed92a176af1c975484d9146ee5634e0031401)
- fix(donor/details): don't load donations [`a2ff5b8`](https://git.odit.services/lfk/frontend/commit/a2ff5b8a142ce4e6b8876f64935f9787ec44a51e)
- fix(donor/detail): Set email to null to avoid vaidation errors [`97b57ae`](https://git.odit.services/lfk/frontend/commit/97b57aeb0cc9058542a36dea9c8b2852169c250f)
- fix(donor/detail): Set phone to null to avoid vaidation errors [`e25ed1f`](https://git.odit.services/lfk/frontend/commit/e25ed1fff9b200605d5d2b78238b774ec7289aaa)
#### [1.4.5](https://git.odit.services/lfk/frontend/compare/1.4.4...1.4.5) #### [1.4.5](https://git.odit.services/lfk/frontend/compare/1.4.4...1.4.5)
> 4 May 2023
- Revert "revert: buggy pagination" [`dacb2f8`](https://git.odit.services/lfk/frontend/commit/dacb2f8ace373f6594fc64af133971af053f00c0) - Revert "revert: buggy pagination" [`dacb2f8`](https://git.odit.services/lfk/frontend/commit/dacb2f8ace373f6594fc64af133971af053f00c0)
- fix: Removed dynamic pagesize adjustments [`803d64c`](https://git.odit.services/lfk/frontend/commit/803d64c78caa570d31d6055e70e2d2af6834f04b) - fix: Removed dynamic pagesize adjustments [`803d64c`](https://git.odit.services/lfk/frontend/commit/803d64c78caa570d31d6055e70e2d2af6834f04b)
- 🚀RELEASE v1.4.5 [`0284f18`](https://git.odit.services/lfk/frontend/commit/0284f18beb8b24d4d4d071eca13bc5868666232c)
#### [1.4.4](https://git.odit.services/lfk/frontend/compare/1.4.3...1.4.4) #### [1.4.4](https://git.odit.services/lfk/frontend/compare/1.4.3...1.4.4)

View File

@@ -13,7 +13,7 @@
<body> <body>
<span style="display: none; visibility: hidden" id="buildinfo" <span style="display: none; visibility: hidden" id="buildinfo"
>RELEASE_INFO-1.4.5-RELEASE_INFO</span >RELEASE_INFO-1.4.12-RELEASE_INFO</span
> >
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<script src="/env.js"></script> <script src="/env.js"></script>

View File

@@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-frontend", "name": "@odit/lfk-frontend",
"version": "1.4.5", "version": "1.4.12",
"type": "module", "type": "module",
"scripts": { "scripts": {
"i18n-order": "node order.js", "i18n-order": "node order.js",
@@ -12,14 +12,14 @@
}, },
"license": "CC-BY-NC-SA-4.0", "license": "CC-BY-NC-SA-4.0",
"devDependencies": { "devDependencies": {
"@odit/license-exporter": "0.0.12", "@odit/license-exporter": "0.2.0",
"@sveltejs/vite-plugin-svelte": "2.1.1", "@sveltejs/vite-plugin-svelte": "2.1.1",
"auto-changelog": "2.4.0", "auto-changelog": "2.4.0",
"autoprefixer": "10.4.14", "autoprefixer": "10.4.14",
"postcss": "8.4.23", "postcss": "8.4.23",
"prettier": "^2.8.8", "prettier": "2.8.8",
"prettier-plugin-svelte": "^2.10.0", "prettier-plugin-svelte": "2.10.0",
"release-it": "15.10.1", "release-it": "15.10.3",
"svelte-select": "3.17.0", "svelte-select": "3.17.0",
"tailwindcss": "3.3.2", "tailwindcss": "3.3.2",
"vite": "4.3.3" "vite": "4.3.3"
@@ -42,10 +42,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@odit/lfk-client-js": "1.1.1", "@odit/lfk-client-js": "1.1.2",
"@paralleldrive/cuid2": "^2.2.0", "@paralleldrive/cuid2": "2.2.0",
"@tanstack/svelte-table": "^8.8.6", "@tanstack/svelte-table": "8.9.1",
"bwip-js": "^3.4.0", "bwip-js": "3.4.0",
"check-password-strength": "2.0.7", "check-password-strength": "2.0.7",
"csvtojson": "2.0.10", "csvtojson": "2.0.10",
"localforage": "1.10.0", "localforage": "1.10.0",

76
pnpm-lock.yaml generated
View File

@@ -2,16 +2,16 @@ lockfileVersion: '6.0'
dependencies: dependencies:
'@odit/lfk-client-js': '@odit/lfk-client-js':
specifier: 1.1.1 specifier: 1.1.2
version: 1.1.1 version: 1.1.2
'@paralleldrive/cuid2': '@paralleldrive/cuid2':
specifier: ^2.2.0 specifier: 2.2.0
version: 2.2.0 version: 2.2.0
'@tanstack/svelte-table': '@tanstack/svelte-table':
specifier: ^8.8.6 specifier: 8.9.1
version: 8.8.6(svelte@3.58.0) version: 8.9.1(svelte@3.58.0)
bwip-js: bwip-js:
specifier: ^3.4.0 specifier: 3.4.0
version: 3.4.0 version: 3.4.0
check-password-strength: check-password-strength:
specifier: 2.0.7 specifier: 2.0.7
@@ -46,8 +46,8 @@ dependencies:
devDependencies: devDependencies:
'@odit/license-exporter': '@odit/license-exporter':
specifier: 0.0.12 specifier: 0.2.0
version: 0.0.12 version: 0.2.0
'@sveltejs/vite-plugin-svelte': '@sveltejs/vite-plugin-svelte':
specifier: 2.1.1 specifier: 2.1.1
version: 2.1.1(svelte@3.58.0)(vite@4.3.3) version: 2.1.1(svelte@3.58.0)(vite@4.3.3)
@@ -61,14 +61,14 @@ devDependencies:
specifier: 8.4.23 specifier: 8.4.23
version: 8.4.23 version: 8.4.23
prettier: prettier:
specifier: ^2.8.8 specifier: 2.8.8
version: 2.8.8 version: 2.8.8
prettier-plugin-svelte: prettier-plugin-svelte:
specifier: ^2.10.0 specifier: 2.10.0
version: 2.10.0(prettier@2.8.8)(svelte@3.58.0) version: 2.10.0(prettier@2.8.8)(svelte@3.58.0)
release-it: release-it:
specifier: 15.10.1 specifier: 15.10.3
version: 15.10.1 version: 15.10.3
svelte-select: svelte-select:
specifier: 3.17.0 specifier: 3.17.0
version: 3.17.0 version: 3.17.0
@@ -518,12 +518,12 @@ packages:
'@octokit/openapi-types': 16.0.0 '@octokit/openapi-types': 16.0.0
dev: true dev: true
/@odit/lfk-client-js@1.1.1: /@odit/lfk-client-js@1.1.2:
resolution: {integrity: sha512-EVwK/kT8VBs0vLk64KgCsHCl2heWHJMWAmZAghEDZWPCPQWX9xL6UzRuKewLXl36/T9YKqZLfDyM5e3WfgLyOg==} resolution: {integrity: sha512-+RAvLfCYmuCbOLYPUoMV0rvpG9J3CJ9FoJDBfDboseyE3f7296rdAp7JCUhNtM7mmbXqgGosvz51DZQ5vm2v6Q==}
dev: false dev: false
/@odit/license-exporter@0.0.12: /@odit/license-exporter@0.2.0:
resolution: {integrity: sha512-k5KxyTOk3Qz/OzId5VNXKjYOz1C4cMVfRHbq3X0VS4BM2rRuIgabrg/lbmZXDM1ExJkdBXi9sqiQ4h7N5bVbLQ==} resolution: {integrity: sha512-RRyfQzDLoyLQlGSd8ThJQ3h0fiCe4tkmm935AUvSVQWP+p88FcnI4iaktKBJJVBnIpDhkv/7sDSA5dFc/QMM5w==}
hasBin: true hasBin: true
dependencies: dependencies:
yargs: 17.7.1 yargs: 17.7.1
@@ -587,18 +587,18 @@ packages:
defer-to-connect: 2.0.1 defer-to-connect: 2.0.1
dev: true dev: true
/@tanstack/svelte-table@8.8.6(svelte@3.58.0): /@tanstack/svelte-table@8.9.1(svelte@3.58.0):
resolution: {integrity: sha512-/5cJ9w4rhq6iqts8dR31JSOqavV6Ug6KZPFXpQaj3hs2JWQiNPw24tOOrFkXVaD4AQ6D2EEH/R0XoX9moQRY5A==} resolution: {integrity: sha512-c84SBP2rRbloBcA3/WFsfm0a4vJCeztbRxox4MHAPCwfLW955tmCYbIF6ihcDUZg5fsDvu992qdDEhKKLLxmEg==}
engines: {node: '>=12'} engines: {node: '>=12'}
peerDependencies: peerDependencies:
svelte: ^3.49.0 svelte: ^3.49.0
dependencies: dependencies:
'@tanstack/table-core': 8.8.5 '@tanstack/table-core': 8.9.1
svelte: 3.58.0 svelte: 3.58.0
dev: false dev: false
/@tanstack/table-core@8.8.5: /@tanstack/table-core@8.9.1:
resolution: {integrity: sha512-Xnwa1qxpgvSW7ozLiexmKp2PIYcLBiY/IizbdGriYCL6OOHuZ9baRhrrH51zjyz+61ly6K59rmt6AI/3RR+97Q==} resolution: {integrity: sha512-2+R83n8vMZND0q3W1lSiF7co9nFbeWbjAErFf27xwbeA9E0wtUu5ZDfgj+TZ6JzdAEQAgfxkk/QNFAKiS8E4MA==}
engines: {node: '>=12'} engines: {node: '>=12'}
dev: false dev: false
@@ -1748,8 +1748,8 @@ packages:
resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==}
dev: false dev: false
/globby@13.1.3: /globby@13.1.4:
resolution: {integrity: sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==} resolution: {integrity: sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies: dependencies:
dir-glob: 3.0.1 dir-glob: 3.0.1
@@ -1963,8 +1963,8 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dev: true dev: true
/inquirer@9.1.5: /inquirer@9.2.0:
resolution: {integrity: sha512-3ygAIh8gcZavV9bj6MTdYddG2zPSYswP808fKS46NOwlF0zZljVpnLCHODDqItWJDbDpLb3aouAxGaJbkxoppA==} resolution: {integrity: sha512-WWERbVqjsTXjXub1ZW0ZHDit1dyHqy0T9XIkky9TnmKAPrjU9Jkd59nZPK0dUuM3s73GZAZu2Jo4iFU3XSPVLA==}
engines: {node: '>=14.18.0'} engines: {node: '>=14.18.0'}
dependencies: dependencies:
ansi-escapes: 6.1.0 ansi-escapes: 6.1.0
@@ -2766,7 +2766,7 @@ packages:
got: 12.6.0 got: 12.6.0
registry-auth-token: 5.0.2 registry-auth-token: 5.0.2
registry-url: 6.0.1 registry-url: 6.0.1
semver: 7.3.8 semver: 7.5.0
dev: true dev: true
/parent-module@1.0.1: /parent-module@1.0.1:
@@ -3075,8 +3075,8 @@ packages:
rc: 1.2.8 rc: 1.2.8
dev: true dev: true
/release-it@15.10.1: /release-it@15.10.3:
resolution: {integrity: sha512-Wkk4aFHSo27vQwHIlcEy77lJwnQlh4UDQckc53gh5tKo7F22mAUEAe8SYQZJcFh7icdkf0OV70onhB1dDmeClA==} resolution: {integrity: sha512-OSdHOg76gwkpLbSLBK09GZQj5XWXwBP+S6v//rSoQKkjqklaCLK04Gl5NkTwNrQOHHiihs4ToesDNh2+w55k3w==}
engines: {node: '>=14.9'} engines: {node: '>=14.9'}
hasBin: true hasBin: true
dependencies: dependencies:
@@ -3087,9 +3087,9 @@ packages:
cosmiconfig: 8.1.3 cosmiconfig: 8.1.3
execa: 7.1.1 execa: 7.1.1
git-url-parse: 13.1.0 git-url-parse: 13.1.0
globby: 13.1.3 globby: 13.1.4
got: 12.6.0 got: 12.6.0
inquirer: 9.1.5 inquirer: 9.2.0
is-ci: 3.0.1 is-ci: 3.0.1
issue-parser: 6.0.0 issue-parser: 6.0.0
lodash: 4.17.21 lodash: 4.17.21
@@ -3101,7 +3101,7 @@ packages:
os-name: 5.1.0 os-name: 5.1.0
promise.allsettled: 1.0.6 promise.allsettled: 1.0.6
proxy-agent: 5.0.0 proxy-agent: 5.0.0
semver: 7.3.8 semver: 7.5.0
shelljs: 0.8.5 shelljs: 0.8.5
update-notifier: 6.0.2 update-notifier: 6.0.2
url-join: 5.0.0 url-join: 5.0.0
@@ -3219,19 +3219,19 @@ packages:
resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==}
engines: {node: '>=12'} engines: {node: '>=12'}
dependencies: dependencies:
semver: 7.3.8 semver: 7.5.0
dev: true dev: true
/semver@7.3.8: /semver@7.4.0:
resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} resolution: {integrity: sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw==}
engines: {node: '>=10'} engines: {node: '>=10'}
hasBin: true hasBin: true
dependencies: dependencies:
lru-cache: 6.0.0 lru-cache: 6.0.0
dev: true dev: true
/semver@7.4.0: /semver@7.5.0:
resolution: {integrity: sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw==} resolution: {integrity: sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==}
engines: {node: '>=10'} engines: {node: '>=10'}
hasBin: true hasBin: true
dependencies: dependencies:
@@ -3721,7 +3721,7 @@ packages:
is-yarn-global: 0.4.1 is-yarn-global: 0.4.1
latest-version: 7.0.0 latest-version: 7.0.0
pupa: 3.1.0 pupa: 3.1.0
semver: 7.3.8 semver: 7.5.0
semver-diff: 4.0.0 semver-diff: 4.0.0
xdg-basedir: 5.1.0 xdg-basedir: 5.1.0
dev: true dev: true
@@ -3932,7 +3932,7 @@ packages:
dev: false dev: false
/xregexp@2.0.0: /xregexp@2.0.0:
resolution: {integrity: sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==} resolution: {integrity: sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=}
dev: true dev: true
/y18n@5.0.8: /y18n@5.0.8:

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@
RunnerService, RunnerService,
} from "@odit/lfk-client-js"; } from "@odit/lfk-client-js";
import Select from "svelte-select"; import Select from "svelte-select";
import { createEventDispatcher } from "svelte"; import { createEventDispatcher, onMount } from "svelte";
import toast from "svelte-french-toast"; import toast from "svelte-french-toast";
export let modal_open; export let modal_open;
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
@@ -23,16 +23,6 @@
$: runners = []; $: runners = [];
$: is_fixed = false; $: is_fixed = false;
$: is_paid = false; $: is_paid = false;
DonorService.donorControllerGetAll().then((val) => {
donors = val.map((r) => {
return { label: getDonorLabel(r), value: r };
});
});
RunnerService.runnerControllerGetAll().then((val) => {
runners = val.map((r) => {
return { label: getDonorLabel(r), value: r };
});
});
$: amount_input = 0; $: amount_input = 0;
$: processed_last_submit = true; $: processed_last_submit = true;
$: is_amount_valid = amount_input > 0; $: is_amount_valid = amount_input > 0;
@@ -89,7 +79,7 @@
amountPerDistance: amount_cent, amountPerDistance: amount_cent,
}; };
DonationService.donationControllerPostDistance(postdata) DonationService.donationControllerPostDistance(postdata)
.then((result) => { .then((result) => {
donor = donors[0].id || 0; donor = donors[0].id || 0;
runner = runners[0].id || 0; runner = runners[0].id || 0;
amount_input = 0; amount_input = 0;
@@ -108,6 +98,22 @@
} }
} }
} }
onMount(async () => {
toast.loading($_("loading-donors"));
donors = (await DonorService.donorControllerGetAll()).map(
(r) => {
return { label: getDonorLabel(r), value: r };
}
);
runners = (await RunnerService.runnerControllerGetAll()).map(
(r) => {
return { label: getDonorLabel(r), value: r };
}
);
toast.dismiss();
toast.success($_("all-donors-loaded"));
});
</script> </script>
{#if modal_open} {#if modal_open}

View File

@@ -33,7 +33,7 @@
toast.loading($_("updating-donation")); toast.loading($_("updating-donation"));
const editable = Object.assign({}, original_data); const editable = Object.assign({}, original_data);
editable.donor = editable.donor.id; editable.donor = editable.donor.id;
editable.paidAmount = paid_amount_input * 100; editable.paidAmount = Math.round(paid_amount_input * 100);
if (editable.responseType == "DISTANCEDONATION" || editable.runner) { if (editable.responseType == "DISTANCEDONATION" || editable.runner) {
editable.runner = editable.runner.id; editable.runner = editable.runner.id;
DonationService.donationControllerPutDistance( DonationService.donationControllerPutDistance(
@@ -46,7 +46,7 @@
toast.dismiss(); toast.dismiss();
toast.success($_("donation-updated")); toast.success($_("donation-updated"));
dispatch("created", { donation: response }); dispatch("created", { donation: result });
}) })
.catch((err) => { .catch((err) => {
// //
@@ -61,7 +61,7 @@
// //
toast.dismiss(); toast.dismiss();
toast.success($_("donation-updated")); toast.success($_("donation-updated"));
dispatch("created", { donation: response }); dispatch("created", { donation: result });
}) })
.catch((err) => { .catch((err) => {
// //

View File

@@ -195,9 +195,12 @@
payment_modal_open={active_edits.length > 0} payment_modal_open={active_edits.length > 0}
paid_amount_input={(active_edits[0]?.paidAmount || 0) / 100} paid_amount_input={(active_edits[0]?.paidAmount || 0) / 100}
on:created={(event) => { on:created={(event) => {
current_donations[ current_donations = current_donations.map((d)=>{
current_donations.findIndex((d) => d.id === event.detail.donation.id) if(d.id === event.detail.donation.id){
].paidAmount = event.detail.donation.paidAmount; d.paidAmount = event.detail.donation.paidAmount;
}
return d;
})
options.update((options) => ({ options.update((options) => ({
...options, ...options,
data: current_donations, data: current_donations,

View File

@@ -12,7 +12,6 @@
$: delete_triggered = false; $: delete_triggered = false;
$: original_data = {}; $: original_data = {};
$: editable = {}; $: editable = {};
$: current_donations = [];
$: changes_performed = !( $: changes_performed = !(
JSON.stringify(original_data) === JSON.stringify(editable) JSON.stringify(original_data) === JSON.stringify(editable)
); );
@@ -29,11 +28,6 @@
isPhoneValidOrEmpty && isPhoneValidOrEmpty &&
((isAddress1Valid && iszipcodevalid && iscityvalid) || ((isAddress1Valid && iszipcodevalid && iscityvalid) ||
editable.address_checked === false); editable.address_checked === false);
const donation_promise = DonationService.donationControllerGetAll().then(
(val) => {
current_donations = val;
}
);
const promise = DonorService.donorControllerGetOne(params.donorid).then( const promise = DonorService.donorControllerGetOne(params.donorid).then(
(data) => { (data) => {
data_loaded = true; data_loaded = true;
@@ -69,7 +63,9 @@
editable.address = null; editable.address = null;
} }
if (editable.email) editable.email = editable.email; if (editable.email) editable.email = editable.email;
else editable.email = null;
if (editable.phone) editable.phone = editable.phone; if (editable.phone) editable.phone = editable.phone;
else editable.phone = null;
if (editable.middlename) editable.middlename = editable.middlename; if (editable.middlename) editable.middlename = editable.middlename;
editable.receiptNeeded = editable.address_checked; editable.receiptNeeded = editable.address_checked;
DonorService.donorControllerPut(original_data.id, editable) DonorService.donorControllerPut(original_data.id, editable)
@@ -96,7 +92,7 @@
</script> </script>
<ConfirmDonorDeletion bind:modal_open bind:delete_donor /> <ConfirmDonorDeletion bind:modal_open bind:delete_donor />
{#await promise && donation_promise} {#await promise}
{$_("loading-donor-details")} {$_("loading-donor-details")}
{:then} {:then}
<section class="container p-5 select-none"> <section class="container p-5 select-none">
@@ -206,8 +202,8 @@
> >
<br /> <br />
<span class="font-medium text-gray-700">{$_("donations")}:</span> <span class="font-medium text-gray-700">{$_("donations")}:</span>
{#if current_donations.filter((d) => d.donor.id == editable.id).length > 0} {#if original_data.donations.length > 0}
{#each current_donations.filter((o) => o.donor.id == editable.id) as d} {#each original_data.donations as d}
{#if d.responseType === "DISTANCEDONATION"} {#if d.responseType === "DISTANCEDONATION"}
<a <a
href="../donations/{d.id}" href="../donations/{d.id}"

View File

@@ -470,6 +470,11 @@
{/if} {/if}
</div> </div>
{/if} {/if}
<div class="text-sm w-full">
<span class="font-medium text-gray-700">{$_("distance")}</span>
<br />
<span class="text-gray-700">{(original_object.total_distance / 1000).toFixed(2)} km</span>
</div>
</div> </div>
</div> </div>
</section> </section>

View File

@@ -290,6 +290,13 @@
on:clear={() => (teamdata.parentGroup = null)} on:clear={() => (teamdata.parentGroup = null)}
/> />
</div> </div>
<div class="text-sm w-full">
<span class="font-medium text-gray-700">{$_("distance")}</span>
<br />
<span class="text-gray-700"
>{(original.total_distance / 1000).toFixed(2)} km</span
>
</div>
</section> </section>
{:else} {:else}
{#await promise} {#await promise}

View File

@@ -37,6 +37,7 @@
"all-associated-scans-will-get-deleted-as-well": "Alle Scans dieser Station werden ebenfalls gelöscht", "all-associated-scans-will-get-deleted-as-well": "Alle Scans dieser Station werden ebenfalls gelöscht",
"all-associated-teams-and-runners-will-be-deleted-too": "Alle assoziierten Teams und Läufer werden auch gelöscht!", "all-associated-teams-and-runners-will-be-deleted-too": "Alle assoziierten Teams und Läufer werden auch gelöscht!",
"all-cards-loaded": "Alle Karten geladen", "all-cards-loaded": "Alle Karten geladen",
"all-donors-loaded": "Alle Sponsoren geladen",
"already-paid": "Bereits bezahlt", "already-paid": "Bereits bezahlt",
"amount": "Anzahl", "amount": "Anzahl",
"amount-per-kilometer": "Betrag pro Kilometer", "amount-per-kilometer": "Betrag pro Kilometer",
@@ -270,6 +271,7 @@
"loading-contact-details": "Kontaktdaten werden geladen ...", "loading-contact-details": "Kontaktdaten werden geladen ...",
"loading-donation-details": "Lade Sponsoringdetails", "loading-donation-details": "Lade Sponsoringdetails",
"loading-donor-details": "Lade Details", "loading-donor-details": "Lade Details",
"loading-donors": "Sponsoren werden geladen",
"loading-group-detail": "Lade Gruppendetails...", "loading-group-detail": "Lade Gruppendetails...",
"loading-profile-data": "Lade Profildaten", "loading-profile-data": "Lade Profildaten",
"loading-runners": "Läufer werden geladen...", "loading-runners": "Läufer werden geladen...",

View File

@@ -37,6 +37,7 @@
"all-associated-scans-will-get-deleted-as-well": "All associated scans will get deleted as well", "all-associated-scans-will-get-deleted-as-well": "All associated scans will get deleted as well",
"all-associated-teams-and-runners-will-be-deleted-too": "All associated teams and runners will be deleted too!", "all-associated-teams-and-runners-will-be-deleted-too": "All associated teams and runners will be deleted too!",
"all-cards-loaded": "All cards loaded", "all-cards-loaded": "All cards loaded",
"all-donors-loaded": "All donors loaded",
"already-paid": "Already paid", "already-paid": "Already paid",
"amount": "Amount", "amount": "Amount",
"amount-per-kilometer": "Amount per kilometer", "amount-per-kilometer": "Amount per kilometer",
@@ -270,6 +271,7 @@
"loading-contact-details": "Loading contact details...", "loading-contact-details": "Loading contact details...",
"loading-donation-details": "Loading donation details", "loading-donation-details": "Loading donation details",
"loading-donor-details": "Loading donor details", "loading-donor-details": "Loading donor details",
"loading-donors": "Loading donors",
"loading-group-detail": "Loading group detail...", "loading-group-detail": "Loading group detail...",
"loading-profile-data": "Loading profile data", "loading-profile-data": "Loading profile data",
"loading-runners": "loading runners...", "loading-runners": "loading runners...",