3 Commits

Author SHA1 Message Date
Moritz Utcke
39b02f4de4 Database 2025-04-21 17:17:38 -03:00
Moritz Utcke
92817b6b8e Schema 2025-04-21 15:05:48 -03:00
Moritz Utcke
079d913451 Initial Translation 2025-04-21 12:58:39 -03:00
199 changed files with 23435 additions and 87082 deletions

3
.crontab Normal file
View File

@@ -0,0 +1,3 @@
# Jeden Monat müssen wir die neuen Klimafaktoren vom DWD abholen, der Cronjob läuft immer am 28. für die höchste Wahrscheinlichkeit
# dass die Daten schon da sind, falls der DWD mal später dran ist...
0 12 28 * * bun ./src/cronjobs/update-dwd-klimafaktoren.ts

18
.env
View File

@@ -1,16 +1,2 @@
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
POSTGRES_DB=main
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=main
POSTGRES_PASSWORD=hHMP8cd^N3SnzGRR
DB_CONTAINER_NAME=database
POSTGRES_DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
POSTGRES_DATABASE_URL_EXTERNAL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_CONTAINER_NAME}:${POSTGRES_PORT}/${POSTGRES_DB}"
DB_USER=main
DB_PASSWORD=hHMP8cd^N3SnzGRR

View File

@@ -1,76 +0,0 @@
name: Auto Merge Staging into Main
on:
schedule:
- cron: '0 2 * * *' # 2:00 UTC = 4:00 Europäische Zeit
workflow_dispatch:
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Git user
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Fetch all branches
run: |
git fetch origin main
git fetch origin staging
- name: Check if main has commits not in staging
id: check
run: |
git fetch origin
if [ $(git rev-list --count origin/staging..origin/main) -gt 0 ]; then
echo "❌ Staging is behind main and requires manual merging."
exit 1
fi
- name: Create PR from staging to main
id: create_pr
run: |
PR_URL=$(gh pr create --base main --head staging --title "Auto-merge staging into main" --body "This PR was created automatically by GitHub Actions. It merges the latest \`staging\` into \`main\`.")
echo "PR_URL=$PR_URL" >> $GITHUB_OUTPUT
PR_NUMBER=$(echo $PR_URL | awk -F'/' '{print $NF}')
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge on PR
if: steps.create_pr.outputs.PR_NUMBER != ''
run: |
gh pr merge ${{ steps.create_pr.outputs.PR_NUMBER }} --merge --auto
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify_failure:
needs: merge
if: failure()
runs-on: ubuntu-latest
steps:
- name: Send Discord notification on failure
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d "{\"content\": \"🚨 Auto-Merge fehlgeschlagen! Bitte manuell prüfen: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}
notify_success:
needs: merge
if: success()
runs-on: ubuntu-latest
steps:
- name: Send Discord notification on success
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d "{\"content\": \"✅ Auto-Merge ausgeführt! Ergebnis jetzt auf [GitHub](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) und [online-energieausweis.org](https://online-energieausweis.org) einsehen.\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}

View File

@@ -1,6 +1,8 @@
name: Development Pipeline
on:
pull_request:
branches: [dev]
push:
branches: [dev]
@@ -28,4 +30,4 @@ jobs:
git clean -f -d
git pull origin dev
git status
make prod-no-backup
make prod

View File

@@ -1,18 +0,0 @@
name: Enforce PR Source
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
jobs:
check-pr-source:
runs-on: ubuntu-latest
steps:
- name: Enforce only staging → main
run: |
if [[ "${{ github.head_ref }}" != "staging" ]]; then
echo "ERROR: Only 'staging' branch may create PRs into 'main'!"
exit 1
fi

View File

@@ -1,28 +0,0 @@
name: PR Rules Enforcement
on:
pull_request:
branches:
- main
- staging
jobs:
check-pr:
runs-on: ubuntu-latest
name: Validate Pull Request Sources
steps:
- name: Prevent dev merges
run: |
if [[ "${{ github.head_ref }}" == "dev" && "${{ github.base_ref }}" == "main" ]]; then
echo "ERROR: Merging 'dev' into 'main' is forbidden!"
exit 1
fi
- name: Allow only staging into main
if: github.base_ref == 'main'
run: |
if [[ "${{ github.head_ref }}" != "staging" ]]; then
echo "ERROR: Only 'staging' branch is allowed to merge into 'main'. Current: '${{ github.head_ref }}'"
exit 1
fi

39
.ssh/id_rsa Normal file
View File

@@ -0,0 +1,39 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAzUGXt3GYcT3344iWGGGcgL0zDKhkrieikZ+yqzDpLuEzRwu3epuT
mvmHpT45awHyWr6pgOPpD7MGSDo13BVRAjCapYC23RL87E3ZRaH6aezVtV+tjl6vcCRtQx
4uQWOtGzV8Mi84ErBxt3xKo19ieyVoJnJig9W7oLbf46I0/3Jz31SRQokfoDc7TFHrtVE2
1UZgxNuDfKMhMsBaZcPNP+Rbpcs7s8Bd3Q1PfrbA6bTGGa4DYAR5Hgm+z/FMcu1PSrAA4f
x+YxQrgNC4TNl8T3HSsGnnthNoQMCcl3LcAiy0C1JaWqXWGjYwawnfUdgB2nhb9i5t+yvb
T/UL1+obIhJRx9EaK4CScNraa0ZWmawl/NY6Dumvly8OpeUwMaynsZEFPEZVxdXFUHVRLR
74NGx23sq6qPYZuy5bFhbPJqIXsh2Pl6gvFE6HZcm5U6jgJOaHt98MSFIkILtWeab0cSmC
Aokt8XF+/ezu37mbEvNzCNZpFYG9d6MXuK5HOG0xAAAFqMTKAD/EygA/AAAAB3NzaC1yc2
EAAAGBAM1Bl7dxmHE99+OIlhhhnIC9MwyoZK4nopGfsqsw6S7hM0cLt3qbk5r5h6U+OWsB
8lq+qYDj6Q+zBkg6NdwVUQIwmqWAtt0S/OxN2UWh+mns1bVfrY5er3AkbUMeLkFjrRs1fD
IvOBKwcbd8SqNfYnslaCZyYoPVu6C23+OiNP9yc99UkUKJH6A3O0xR67VRNtVGYMTbg3yj
ITLAWmXDzT/kW6XLO7PAXd0NT362wOm0xhmuA2AEeR4Jvs/xTHLtT0qwAOH8fmMUK4DQuE
zZfE9x0rBp57YTaEDAnJdy3AIstAtSWlql1ho2MGsJ31HYAdp4W/Yubfsr20/1C9fqGyIS
UcfRGiuAknDa2mtGVpmsJfzWOg7pr5cvDqXlMDGsp7GRBTxGVcXVxVB1US0e+DRsdt7Kuq
j2GbsuWxYWzyaiF7Idj5eoLxROh2XJuVOo4CTmh7ffDEhSJCC7Vnmm9HEpggKJLfFxfv3s
7t+5mxLzcwjWaRWBvXejF7iuRzhtMQAAAAMBAAEAAAGAOgLIWPHzlknf1kCDv2dTHrWaiI
DNV8Ve9o5upmCf/v5qCjHfDPmMibftpP/FpZ86unf5mzKO6796zo4ZK9cgeqB3DMCorinQ
Lw8/kaUai7aCngzpFfxf1C+Pa/FLPHLp+W8v51UeIXYZ5bRsuejbAhgL7BXXDxCow178Py
9YkDvuUNfraCUuOY9ypHrgxfGqsDOAZRLvghnu55Oi2PEygNTPLDgY6xA61x+McLFBK6xK
cvaSAKCzBJDXi5jUtQSpqykEpPSQHnD1PvbsLWIJoaolhaew9gv0ADu3iVIWFLeBMAuwQB
N6fWRjJBT3hD9vmQ39OOCDkbpoATugAu3EOvY9pGLzN0Xf1Epc71eHLJj79hDC4H7Brz7A
bOmkUNFtLOZR4ZoHfpm8N3taZ7IdXX/PA3VLCh9qhbFcaUp3uTpXRxTSvHBL03Gl/BQY19
23FevrBH4GobkMpRVCWFFLawC4e9GPPB2QvQAq19W4RvoKmrOZCAa+VoKZKzCsLqG7AAAA
wA9sQSy5+KfXVrkQOaF8OrEBI4g2yd8Q3RNpGMVIWfFtKIL1CCht9UxaOnJC7r/xos9Y6H
LVnMB9tozQTFf0R3S8H90AAyS6uEzuW6BWDwbQBJvmkPL8gG/AszZWJU9JBfiAHvaWM00A
QwzIv2+veCA2TcYIKhyiXg8r6fOQNLYkSYPpasycJy0nFknCC5Ma6XBgdzHm8QGSD4NfTZ
jbO+uK2z5ZzM+BUprj4Af3vOXqiDD66aZbKdcwzcTRLVy/rgAAAMEA8B/4ilNBG7Z/sYGB
zcBz52dkCG4tfsiY1dDYqEsDnLxF39giZj7Q0yLOHf52lt4GVEneCa5v8Q8jnN6zHZHt9A
C4P6DxtD/D28CGF3smMw6ai+W7fsl1OgEIYfSA9iKzh+sA3egSakiqKAk4H9soE9ZgERkx
cFuDljNGk+cekdzizpE2bmHfx4FscBcJxlZAeI35jSV5u6wzIkB2W13bq8nEI8VRu/n+PV
luxwuy6B5bUfuUDxL9W9Wr9P8t9mkHAAAAwQDa03teSRCRU/ymaua+sv3ysIDOUeSb09vf
8wX9xQpFq50CM99S3bGnwWk4A66JlK70rfWb3yoo5+Bmi22VRckQbhFhGBSWjnkKtAz5Mo
dXHOlcfPcXtxpOW4xwCsoNhnwaELt09b2BjkwWl5gdYUPHs2rIhSupK3otFN5j5GuVd6gf
bSuqavru4Xi5sySWyhKX2y+FkCDeNeOkIFeA12NNvoF4w+osLoz4GLdtydEhwSXUP9U+mr
lRqC1/Jc8qggcAAAAxbW9yaXR6QG1vcml0ei1BU1VTLVRVRi1HYW1pbmctQTE1LUZBNTA3
TlYtRkE1MDdOVgEC
-----END OPENSSH PRIVATE KEY-----

1
.ssh/id_rsa.pub Normal file
View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDNQZe3cZhxPffjiJYYYZyAvTMMqGSuJ6KRn7KrMOku4TNHC7d6m5Oa+YelPjlrAfJavqmA4+kPswZIOjXcFVECMJqlgLbdEvzsTdlFofpp7NW1X62OXq9wJG1DHi5BY60bNXwyLzgSsHG3fEqjX2J7JWgmcmKD1bugtt/jojT/cnPfVJFCiR+gNztMUeu1UTbVRmDE24N8oyEywFplw80/5FulyzuzwF3dDU9+tsDptMYZrgNgBHkeCb7P8Uxy7U9KsADh/H5jFCuA0LhM2XxPcdKwaee2E2hAwJyXctwCLLQLUlpapdYaNjBrCd9R2AHaeFv2Lm37K9tP9QvX6hsiElHH0RorgJJw2tprRlaZrCX81joO6a+XLw6l5TAxrKexkQU8RlXF1cVQdVEtHvg0bHbeyrqo9hm7LlsWFs8moheyHY+XqC8UTodlyblTqOAk5oe33wxIUiQgu1Z5pvRxKYICiS3xcX797O7fuZsS83MI1mkVgb13oxe4rkc4bTE= moritz@moritz-ASUS-TUF-Gaming-A15-FA507NV-FA507NV

View File

@@ -1,16 +0,0 @@
FROM postgres:latest
ENV POSTGRES_USER ${POSTGRES_USER}
ENV POSTGRES_PASSWORD ${POSTGRES_PASSWORD}
ENV POSTGRES_DB ${POSTGRES_DB}
COPY ./prisma/migrations/ /docker-entrypoint-initdb.d/
EXPOSE 5432
# Use a loop to copy migration.sql from each folder to the corresponding directory in the build context
RUN for folder in /docker-entrypoint-initdb.d/*; do \
if [ -d "$folder" ]; then \
cp "$folder/migration.sql" "$folder.sql"; \
rm -rf "$folder"; \
fi \
done

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
.PHONY: dev online-energieausweis all prod backup run-database build-database install-dependencies wait-for-database prod database prisma-studio backup-database-cronjob update-dwd-klimafaktoren-cron
.PHONY: dev online-energieausweis all prod backup run-database build-database install-dependencies wait-for-database prod database prisma-studio backup-database-cronjob
DB_CONTAINER_NAME := database
DB_NAME := main
@@ -10,7 +10,7 @@ PERSISTENT_DIR := $(HOME)/persistent/$(APP_NAME)
BACKUP_FILENAME := $(HOME)/backups/$(shell date +"%Y-%m-%d_%H-%M-%S").sql.gz
online-energieausweis:
NODE_ENV="development" bun run dev --host
bun run dev --host
dev: database online-energieausweis
@@ -30,7 +30,6 @@ run-database: stop-database
docker volume create $(DB_VOLUME)
docker build -t $(DB_CONTAINER_NAME) .
docker run -d --name $(DB_CONTAINER_NAME) \
--restart=always \
-e POSTGRES_USER=$(DB_USER) \
-e POSTGRES_PASSWORD=$(DB_PASSWORD) \
-p $(DB_PORT):5432 \
@@ -58,12 +57,7 @@ all:
mkdir -p ~/logs
bun run dev 2>&1 | tee ~/logs/`date '+%d-%m-%Y_%H:%M:%S'`.log
update-dwd-klimafaktoren-cron:
pm2 start bun --name "update-dwd-klimafaktoren-cron" --cron "0 12 28 * *" -- src/cronjobs/update-dwd-klimafaktoren.ts
prod: prod-no-backup backup-database-cronjob
prod-no-backup: install-dependencies prisma-studio update-dwd-klimafaktoren-cron
prod: install-dependencies prisma-studio backup-database-cronjob
bun run build
mkdir -p ~/logs
mkdir -p ~/persistent/online-energieausweis
@@ -74,4 +68,4 @@ prod-no-backup: install-dependencies prisma-studio update-dwd-klimafaktoren-cron
backup-database-cronjob:
- pm2 delete daily-db-backup
pm2 start bash --name "daily-db-backup" --no-autorestart --cron "0 0 * * *" -- backup-database.bash
pm2 start bash --name "daily-db-backup" --cron "0 0 * * *" -- backup-database.bash

View File

@@ -13,17 +13,13 @@ export AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
# Den Key dafür findet man auf https://dcd.ionos.com/latest/?lang=en#/key-management
docker exec -t online-energieausweis-database-1 pg_dump --data-only -U main main | brotli --best > $FILE_NAME
aws s3 cp $FILE_NAME s3://ibc-db-backup/ --profile ionos --endpoint-url https://s3.eu-central-3.ionoscloud.com --storage-class STANDARD
aws s3 cp $FILE_NAME s3://ibc-db-backup/ --profile ionos --endpoint-url https://s3-eu-central-1.ionoscloud.com --storage-class STANDARD
echo "Uploaded $FILE_NAME"
docker exec -t online-energieausweis-database-1 pg_dumpall -c -U main | brotli --best > $FILE_NAME_COMPLETE
<<<<<<< HEAD
aws s3 cp $FILE_NAME_COMPLETE s3://ibc-db-backup/ --profile ionos --endpoint-url https://s3-eu-central-3.ionoscloud.com --storage-class STANDARD
=======
aws s3 cp $FILE_NAME_COMPLETE s3://ibc-db-backup/ --profile ionos --endpoint-url https://s3.eu-central-3.ionoscloud.com --storage-class STANDARD
>>>>>>> dev
aws s3 cp $FILE_NAME_COMPLETE s3://ibc-db-backup/ --profile ionos --endpoint-url https://s3-eu-central-1.ionoscloud.com --storage-class STANDARD
echo "Uploaded $FILE_NAME_COMPLETE"

154
bun.lock
View File

@@ -15,7 +15,6 @@
"@pdfme/common": "^5.2.16",
"@pdfme/generator": "^5.2.16",
"@pdfme/ui": "^5.2.16",
"@svelte-plugins/datepicker": "^1.0.11",
"@trpc/client": "^10.45.2",
"@trpc/server": "^10.45.2",
"astro": "^4.16.17",
@@ -39,7 +38,6 @@
"nodemailer": "^6.10.0",
"pdf-lib": "^1.17.1",
"postcss-nested": "^7.0.2",
"puppeteer": "^24.7.2",
"radix-svelte-icons": "^1.0.0",
"sass": "^1.83.4",
"sharp": "^0.33.5",
@@ -47,6 +45,7 @@
"soap": "^1.1.8",
"sqids": "^0.3.0",
"ssh2-sftp-client": "^12.0.0",
"surrealdb": "^1.3.2",
"svelte": "^3.59.2",
"svelte-dialogs": "^1.2.2",
"svelte-preprocess": "^5.1.4",
@@ -54,7 +53,6 @@
"tailwindcss": "^3.4.17",
"trpc-openapi": "^1.2.0",
"uuid": "^9.0.1",
"winston": "^3.17.0",
"zod": "^3.24.1",
},
"devDependencies": {
@@ -256,7 +254,7 @@
"@cfcs/core": ["@cfcs/core@0.0.6", "", { "dependencies": { "@egjs/component": "^3.0.2" } }, "sha512-FxfJMwoLB8MEMConeXUCqtMGqxdtePQxRBOiGip9ULcYYam3WfCgoY6xdnMaSkYvRvmosp5iuG+TiPofm65+Pw=="],
"@colors/colors": ["@colors/colors@1.6.0", "", {}, "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA=="],
"@colors/colors": ["@colors/colors@1.5.0", "", {}, "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ=="],
"@csstools/selector-resolve-nested": ["@csstools/selector-resolve-nested@3.0.0", "", { "peerDependencies": { "postcss-selector-parser": "^7.0.0" } }, "sha512-ZoK24Yku6VJU1gS79a5PFmC8yn3wIapiKmPgun0hZgEI5AOqgH2kiPRsPz1qkGv4HL+wuDLH83yQyk6inMYrJQ=="],
@@ -268,8 +266,6 @@
"@cypress/xvfb": ["@cypress/xvfb@1.2.4", "", { "dependencies": { "debug": "^3.1.0", "lodash.once": "^4.1.1" } }, "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q=="],
"@dabh/diagnostics": ["@dabh/diagnostics@2.0.3", "", { "dependencies": { "colorspace": "1.1.x", "enabled": "2.0.x", "kuler": "^2.0.0" } }, "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA=="],
"@daybrush/utils": ["@daybrush/utils@1.13.0", "", {}, "sha512-ALK12C6SQNNHw1enXK+UO8bdyQ+jaWNQ1Af7Z3FNxeAwjYhQT7do+TRE4RASAJ3ObaS2+TJ7TXR3oz2Gzbw0PQ=="],
"@dnd-kit/accessibility": ["@dnd-kit/accessibility@3.1.1", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0" } }, "sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw=="],
@@ -524,8 +520,6 @@
"@proload/core": ["@proload/core@0.3.3", "", { "dependencies": { "deepmerge": "^4.2.2", "escalade": "^3.1.1" } }, "sha512-7dAFWsIK84C90AMl24+N/ProHKm4iw0akcnoKjRvbfHifJZBLhaDsDus1QJmhG12lXj4e/uB/8mB/0aduCW+NQ=="],
"@puppeteer/browsers": ["@puppeteer/browsers@2.10.2", "", { "dependencies": { "debug": "^4.4.0", "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.5.0", "semver": "^7.7.1", "tar-fs": "^3.0.8", "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" } }, "sha512-i4Ez+s9oRWQbNjtI/3+jxr7OH508mjAKvza0ekPJem0ZtmsYHP3B5dq62+IaBHKaGCOuqJxXzvFLUhJvQ6jtsQ=="],
"@rc-component/async-validator": ["@rc-component/async-validator@5.0.4", "", { "dependencies": { "@babel/runtime": "^7.24.4" } }, "sha512-qgGdcVIF604M9EqjNF0hbUTz42bz/RDtxWdWuU5EQe3hi7M8ob54B6B35rOsvX5eSvIHIzT9iH1R3n+hk3CGfg=="],
"@rc-component/color-picker": ["@rc-component/color-picker@2.0.1", "", { "dependencies": { "@ant-design/fast-color": "^2.0.6", "@babel/runtime": "^7.23.6", "classnames": "^2.2.6", "rc-util": "^5.38.1" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, "sha512-WcZYwAThV/b2GISQ8F+7650r5ZZJ043E57aVBFkQ+kSY4C6wdofXgB0hBx+GPGpIU0Z81eETNoDUJMr7oy/P8Q=="],
@@ -712,8 +706,6 @@
"@smithy/util-waiter": ["@smithy/util-waiter@4.0.2", "", { "dependencies": { "@smithy/abort-controller": "^4.0.1", "@smithy/types": "^4.1.0", "tslib": "^2.6.2" } }, "sha512-piUTHyp2Axx3p/kc2CIJkYSv0BAaheBQmbACZgQSSfWUumWNW+R1lL+H9PDBxKJkvOeEX+hKYEFiwO8xagL8AQ=="],
"@svelte-plugins/datepicker": ["@svelte-plugins/datepicker@1.0.11", "", {}, "sha512-Tqc07QLyRkCpc3Glg6oRLTUApLtCrOh52d6vJ7L32QI17HrwvcDDjaH3LF3X1SBm3CWdMrnqfJp3xjUZmB4wzw=="],
"@sveltejs/vite-plugin-svelte": ["@sveltejs/vite-plugin-svelte@2.5.3", "", { "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^1.0.4", "debug": "^4.3.4", "deepmerge": "^4.3.1", "kleur": "^4.1.5", "magic-string": "^0.30.3", "svelte-hmr": "^0.15.3", "vitefu": "^0.2.4" }, "peerDependencies": { "svelte": "^3.54.0 || ^4.0.0 || ^5.0.0-next.0", "vite": "^4.0.0" } }, "sha512-erhNtXxE5/6xGZz/M9eXsmI7Pxa6MS7jyTy06zN3Ck++ldrppOnOlJwHHTsMC7DHDQdgUp4NAc4cDNQ9eGdB/w=="],
"@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@1.0.4", "", { "dependencies": { "debug": "^4.3.4" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^2.2.0", "svelte": "^3.54.0 || ^4.0.0", "vite": "^4.0.0" } }, "sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ=="],
@@ -722,8 +714,6 @@
"@tailwindcss/typography": ["@tailwindcss/typography@0.5.16", "", { "dependencies": { "lodash.castarray": "^4.4.0", "lodash.isplainobject": "^4.0.6", "lodash.merge": "^4.6.2", "postcss-selector-parser": "6.0.10" }, "peerDependencies": { "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" } }, "sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA=="],
"@tootallnate/quickjs-emscripten": ["@tootallnate/quickjs-emscripten@0.23.0", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="],
"@trpc/client": ["@trpc/client@10.45.2", "", { "peerDependencies": { "@trpc/server": "10.45.2" } }, "sha512-ykALM5kYWTLn1zYuUOZ2cPWlVfrXhc18HzBDyRhoPYN0jey4iQHEFSEowfnhg1RvYnrAVjNBgHNeSAXjrDbGwg=="],
"@trpc/server": ["@trpc/server@10.45.2", "", {}, "sha512-wOrSThNNE4HUnuhJG6PfDRp4L2009KDVxsd+2VYH8ro6o/7/jwYZ8Uu5j+VaW+mOmc8EHerHzGcdbGNQSAUPgg=="],
@@ -824,8 +814,6 @@
"@types/ssh2-sftp-client": ["@types/ssh2-sftp-client@9.0.4", "", { "dependencies": { "@types/ssh2": "^1.0.0" } }, "sha512-gnIn56MTB9W3A3hPL/1sHI23t8YwcE3eVYa1O2XjT9vaqimFdtNHxyQiy5Y78+ociQTKazMSD8YyMEO4QjNMrg=="],
"@types/triple-beam": ["@types/triple-beam@1.3.5", "", {}, "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw=="],
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
"@types/uuid": ["@types/uuid@9.0.8", "", {}, "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="],
@@ -922,8 +910,6 @@
"assert-plus": ["assert-plus@1.0.0", "", {}, "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw=="],
"ast-types": ["ast-types@0.13.4", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w=="],
"astral-regex": ["astral-regex@2.0.0", "", {}, "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ=="],
"astring": ["astring@1.9.0", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="],
@@ -954,30 +940,16 @@
"axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="],
"b4a": ["b4a@1.6.7", "", {}, "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg=="],
"babel-runtime": ["babel-runtime@6.26.0", "", { "dependencies": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" } }, "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g=="],
"bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="],
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
"bare-events": ["bare-events@2.5.4", "", {}, "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA=="],
"bare-fs": ["bare-fs@4.1.3", "", { "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", "bare-stream": "^2.6.4" }, "peerDependencies": { "bare-buffer": "*" }, "optionalPeers": ["bare-buffer"] }, "sha512-OeEZYIg+2qepaWLyphaOXHAHKo3xkM8y3BeGAvHdMN8GNWvEAU1Yw6rYpGzu/wDDbKxgEjVeVDpgGhDzaeMpjg=="],
"bare-os": ["bare-os@3.6.1", "", {}, "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g=="],
"bare-path": ["bare-path@3.0.0", "", { "dependencies": { "bare-os": "^3.0.1" } }, "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw=="],
"bare-stream": ["bare-stream@2.6.5", "", { "dependencies": { "streamx": "^2.21.0" }, "peerDependencies": { "bare-buffer": "*", "bare-events": "*" }, "optionalPeers": ["bare-buffer", "bare-events"] }, "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA=="],
"base-64": ["base-64@1.0.0", "", {}, "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="],
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
"basic-ftp": ["basic-ftp@5.0.5", "", {}, "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg=="],
"bcrypt-pbkdf": ["bcrypt-pbkdf@1.0.2", "", { "dependencies": { "tweetnacl": "^0.14.3" } }, "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w=="],
"binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="],
@@ -1060,8 +1032,6 @@
"chownr": ["chownr@2.0.0", "", {}, "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="],
"chromium-bidi": ["chromium-bidi@4.1.1", "", { "dependencies": { "mitt": "^3.0.1", "zod": "^3.24.1" }, "peerDependencies": { "devtools-protocol": "*" } }, "sha512-biR7t4vF3YluE6RlMSk9IWk+b9U+WWyzHp+N2pL9vRTk+UXHYRTVp7jTK58ZNzMLBgoLMHY4QyJMbeuw3eKxqg=="],
"ci-info": ["ci-info@4.1.0", "", {}, "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A=="],
"cjs-module-lexer": ["cjs-module-lexer@1.4.3", "", {}, "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q=="],
@@ -1080,8 +1050,6 @@
"cli-truncate": ["cli-truncate@2.1.0", "", { "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" } }, "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg=="],
"cliui": ["cliui@8.0.1", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="],
"clone": ["clone@2.1.2", "", {}, "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w=="],
"clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],
@@ -1104,8 +1072,6 @@
"colorette": ["colorette@2.0.19", "", {}, "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ=="],
"colorspace": ["colorspace@1.1.4", "", { "dependencies": { "color": "^3.1.3", "text-hex": "1.0.x" } }, "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w=="],
"combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
"comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="],
@@ -1154,8 +1120,6 @@
"core-util-is": ["core-util-is@1.0.2", "", {}, "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="],
"cosmiconfig": ["cosmiconfig@9.0.0", "", { "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg=="],
"cpu-features": ["cpu-features@0.0.10", "", { "dependencies": { "buildcheck": "~0.0.6", "nan": "^2.19.0" } }, "sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA=="],
"crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="],
@@ -1192,8 +1156,6 @@
"dashdash": ["dashdash@1.14.1", "", { "dependencies": { "assert-plus": "^1.0.0" } }, "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g=="],
"data-uri-to-buffer": ["data-uri-to-buffer@6.0.2", "", {}, "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw=="],
"date-fns": ["date-fns@4.1.0", "", {}, "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg=="],
"dayjs": ["dayjs@1.11.13", "", {}, "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="],
@@ -1214,8 +1176,6 @@
"defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="],
"degenerator": ["degenerator@5.0.1", "", { "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", "esprima": "^4.0.1" } }, "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ=="],
"del": ["del@6.1.1", "", { "dependencies": { "globby": "^11.0.1", "graceful-fs": "^4.2.4", "is-glob": "^4.0.1", "is-path-cwd": "^2.2.0", "is-path-inside": "^3.0.2", "p-map": "^4.0.0", "rimraf": "^3.0.2", "slash": "^3.0.0" } }, "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg=="],
"delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
@@ -1244,8 +1204,6 @@
"devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="],
"devtools-protocol": ["devtools-protocol@0.0.1425554", "", {}, "sha512-uRfxR6Nlzdzt0ihVIkV+sLztKgs7rgquY/Mhcv1YNCWDh5IZgl5mnn2aeEnW5stYTE0wwiF4RYVz8eMEpV1SEw=="],
"dezalgo": ["dezalgo@1.0.4", "", { "dependencies": { "asap": "^2.0.0", "wrappy": "1" } }, "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig=="],
"dfa": ["dfa@1.2.0", "", {}, "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q=="],
@@ -1282,8 +1240,6 @@
"emoji-regex-xs": ["emoji-regex-xs@1.0.0", "", {}, "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg=="],
"enabled": ["enabled@2.0.0", "", {}, "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ=="],
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
"end-of-stream": ["end-of-stream@1.4.4", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q=="],
@@ -1322,8 +1278,6 @@
"escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
"escodegen": ["escodegen@2.1.0", "", { "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2" }, "optionalDependencies": { "source-map": "~0.6.1" }, "bin": { "esgenerate": "bin/esgenerate.js", "escodegen": "bin/escodegen.js" } }, "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w=="],
"eslint": ["eslint@8.15.0", "", { "dependencies": { "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "bin": { "eslint": "bin/eslint.js" } }, "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA=="],
"eslint-config-prettier": ["eslint-config-prettier@8.1.0", "", { "peerDependencies": { "eslint": ">=7.0.0" }, "bin": { "eslint-config-prettier": "bin/cli.js" } }, "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw=="],
@@ -1384,8 +1338,6 @@
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
"fast-fifo": ["fast-fifo@1.3.2", "", {}, "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="],
"fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="],
"fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="],
@@ -1400,8 +1352,6 @@
"fd-slicer": ["fd-slicer@1.1.0", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
"fecha": ["fecha@4.2.3", "", {}, "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw=="],
"figures": ["figures@3.2.0", "", { "dependencies": { "escape-string-regexp": "^1.0.5" } }, "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg=="],
"file-entry-cache": ["file-entry-cache@6.0.1", "", { "dependencies": { "flat-cache": "^3.0.4" } }, "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg=="],
@@ -1426,8 +1376,6 @@
"flattie": ["flattie@1.1.1", "", {}, "sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ=="],
"fn.name": ["fn.name@1.1.0", "", {}, "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw=="],
"follow-redirects": ["follow-redirects@1.15.9", "", {}, "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ=="],
"fontkit": ["fontkit@2.0.4", "", { "dependencies": { "@swc/helpers": "^0.5.12", "brotli": "^1.3.2", "clone": "^2.1.2", "dfa": "^1.2.0", "fast-deep-equal": "^3.1.3", "restructure": "^3.0.0", "tiny-inflate": "^1.0.3", "unicode-properties": "^1.4.0", "unicode-trie": "^2.0.0" } }, "sha512-syetQadaUEDNdxdugga9CpEYVaQIxOwk7GlwZWWZ19//qW4zE5bknOKeMBDYAASwnpaSHKJITRLMF9m1fp3s6g=="],
@@ -1474,8 +1422,6 @@
"gesto": ["gesto@1.19.4", "", { "dependencies": { "@daybrush/utils": "^1.13.0", "@scena/event-emitter": "^1.0.2" } }, "sha512-hfr/0dWwh0Bnbb88s3QVJd1ZRJeOWcgHPPwmiH6NnafDYvhTsxg+SLYu+q/oPNh9JS3V+nlr6fNs8kvPAtcRDQ=="],
"get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
"get-east-asian-width": ["get-east-asian-width@1.3.0", "", {}, "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ=="],
"get-intrinsic": ["get-intrinsic@1.2.7", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", "get-proto": "^1.0.0", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA=="],
@@ -1488,8 +1434,6 @@
"get-tsconfig": ["get-tsconfig@4.10.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A=="],
"get-uri": ["get-uri@6.0.4", "", { "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4" } }, "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ=="],
"getopts": ["getopts@2.3.0", "", {}, "sha512-5eDf9fuSXwxBL6q5HX+dhDj+dslFGWzU5thZ9kNKUkcPtaPdatmUFKwHFrLb/uf/WpA4BHET+AX3Scl56cAjpA=="],
"getos": ["getos@3.2.1", "", { "dependencies": { "async": "^3.2.0" } }, "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q=="],
@@ -1612,8 +1556,6 @@
"intersection-observer": ["intersection-observer@0.12.2", "", {}, "sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg=="],
"ip-address": ["ip-address@9.0.5", "", { "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" } }, "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g=="],
"ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="],
"iron-webcrypto": ["iron-webcrypto@1.2.1", "", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="],
@@ -1622,7 +1564,7 @@
"is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="],
"is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="],
"is-arrayish": ["is-arrayish@0.3.2", "", {}, "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="],
"is-base64": ["is-base64@1.1.0", "", { "bin": { "is-base64": "bin/is-base64", "is_base64": "bin/is-base64" } }, "sha512-Nlhg7Z2dVC4/PTvIFkgVVNvPHSO2eR/Yd0XzhGiXCXEvWnptXlXa/clQ8aePPiMuxEGcWfzWbGw2Fe3d+Y3v1g=="],
@@ -1674,6 +1616,8 @@
"isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
"isows": ["isows@1.0.6", "", { "peerDependencies": { "ws": "*" } }, "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw=="],
"isstream": ["isstream@0.1.2", "", {}, "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g=="],
"jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
@@ -1734,8 +1678,6 @@
"knex": ["knex@2.5.1", "", { "dependencies": { "colorette": "2.0.19", "commander": "^10.0.0", "debug": "4.3.4", "escalade": "^3.1.1", "esm": "^3.2.25", "get-package-type": "^0.1.0", "getopts": "2.3.0", "interpret": "^2.2.0", "lodash": "^4.17.21", "pg-connection-string": "2.6.1", "rechoir": "^0.8.0", "resolve-from": "^5.0.0", "tarn": "^3.0.2", "tildify": "2.0.0" }, "bin": { "knex": "bin/cli.js" } }, "sha512-z78DgGKUr4SE/6cm7ku+jHvFT0X97aERh/f0MUKAKgFnwCYBEW4TFBqtHWFYiJFid7fMrtpZ/gxJthvz5mEByA=="],
"kuler": ["kuler@2.0.0", "", {}, "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A=="],
"lazy-ass": ["lazy-ass@1.6.0", "", {}, "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw=="],
"lazystream": ["lazystream@1.0.1", "", { "dependencies": { "readable-stream": "^2.0.5" } }, "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw=="],
@@ -1788,8 +1730,6 @@
"log-update": ["log-update@4.0.0", "", { "dependencies": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", "slice-ansi": "^4.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg=="],
"logform": ["logform@2.7.0", "", { "dependencies": { "@colors/colors": "1.6.0", "@types/triple-beam": "^1.3.2", "fecha": "^4.2.0", "ms": "^2.1.1", "safe-stable-stringify": "^2.3.1", "triple-beam": "^1.3.0" } }, "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ=="],
"longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="],
"loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="],
@@ -1954,8 +1894,6 @@
"minizlib": ["minizlib@2.1.2", "", { "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" } }, "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg=="],
"mitt": ["mitt@3.0.1", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="],
"mkdirp": ["mkdirp@1.0.4", "", { "bin": { "mkdirp": "bin/cmd.js" } }, "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="],
"module-details-from-path": ["module-details-from-path@1.0.3", "", {}, "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A=="],
@@ -1982,8 +1920,6 @@
"neotraverse": ["neotraverse@0.6.18", "", {}, "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA=="],
"netmask": ["netmask@2.0.2", "", {}, "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg=="],
"new-github-issue-url": ["new-github-issue-url@0.2.1", "", {}, "sha512-md4cGoxuT4T4d/HDOXbrUHkTKrp/vp+m3aOA7XXVYwNsUNMK49g3SQicTSeV5GIz/5QVGAeYRAOlyp9OvlgsYA=="],
"nlcst-to-string": ["nlcst-to-string@4.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0" } }, "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA=="],
@@ -2034,8 +1970,6 @@
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
"one-time": ["one-time@1.0.0", "", { "dependencies": { "fn.name": "1.x.x" } }, "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g=="],
"onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="],
"oniguruma-to-es": ["oniguruma-to-es@2.3.0", "", { "dependencies": { "emoji-regex-xs": "^1.0.0", "regex": "^5.1.1", "regex-recursion": "^5.1.1" } }, "sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g=="],
@@ -2068,10 +2002,6 @@
"p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="],
"pac-proxy-agent": ["pac-proxy-agent@7.2.0", "", { "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", "socks-proxy-agent": "^8.0.5" } }, "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA=="],
"pac-resolver": ["pac-resolver@7.0.1", "", { "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" } }, "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg=="],
"package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],
"pako": ["pako@1.0.11", "", {}, "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="],
@@ -2182,18 +2112,12 @@
"proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="],
"proxy-agent": ["proxy-agent@6.5.0", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.5" } }, "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A=="],
"proxy-from-env": ["proxy-from-env@1.0.0", "", {}, "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A=="],
"pump": ["pump@3.0.2", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw=="],
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
"puppeteer": ["puppeteer@24.7.2", "", { "dependencies": { "@puppeteer/browsers": "2.10.2", "chromium-bidi": "4.1.1", "cosmiconfig": "^9.0.0", "devtools-protocol": "0.0.1425554", "puppeteer-core": "24.7.2", "typed-query-selector": "^2.12.0" }, "bin": { "puppeteer": "lib/cjs/puppeteer/node/cli.js" } }, "sha512-ifYqoY6wGs0yZeFuFPn8BE9FhuveXkarF+eO18I2e/axdoCh4Qh1AE+qXdJBhdaeoPt6eRNTY4Dih29Jbq8wow=="],
"puppeteer-core": ["puppeteer-core@24.7.2", "", { "dependencies": { "@puppeteer/browsers": "2.10.2", "chromium-bidi": "4.1.1", "debug": "^4.4.0", "devtools-protocol": "0.0.1425554", "typed-query-selector": "^2.12.0", "ws": "^8.18.1" } }, "sha512-P9pZyTmJqKODFCnkZgemCpoFA4LbAa8+NumHVQKyP5X9IgdNS1ZnAnIh1sMAwhF8/xEUGf7jt+qmNLlKieFw1Q=="],
"qs": ["qs@6.13.0", "", { "dependencies": { "side-channel": "^1.0.6" } }, "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg=="],
"queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
@@ -2358,8 +2282,6 @@
"request-progress": ["request-progress@3.0.0", "", { "dependencies": { "throttleit": "^1.0.0" } }, "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg=="],
"require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="],
"require-in-the-middle": ["require-in-the-middle@7.5.2", "", { "dependencies": { "debug": "^4.3.5", "module-details-from-path": "^1.0.3", "resolve": "^1.22.8" } }, "sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ=="],
"resize-observer-polyfill": ["resize-observer-polyfill@1.5.1", "", {}, "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="],
@@ -2402,8 +2324,6 @@
"safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
"safe-stable-stringify": ["safe-stable-stringify@2.5.0", "", {}, "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="],
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
"sander": ["sander@0.5.1", "", { "dependencies": { "es6-promise": "^3.1.2", "graceful-fs": "^4.1.3", "mkdirp": "^0.5.1", "rimraf": "^2.5.2" } }, "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA=="],
@@ -2470,14 +2390,8 @@
"slice-ansi": ["slice-ansi@3.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" } }, "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ=="],
"smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
"soap": ["soap@1.1.8", "", { "dependencies": { "axios": "^1.7.9", "axios-ntlm": "^1.4.2", "debug": "^4.4.0", "formidable": "^3.5.2", "get-stream": "^6.0.1", "lodash": "^4.17.21", "sax": "^1.4.1", "strip-bom": "^3.0.0", "whatwg-mimetype": "4.0.0", "xml-crypto": "^6.0.0" } }, "sha512-fDNGyGsPkQP3bZX/366Ud5Kpjo9mCMh7ZKYIc3uipBEPPM2ZqCNkv1Z2/w0qpzpYFLL7do8WWwVUAjAwuUe1AQ=="],
"socks": ["socks@2.8.4", "", { "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" } }, "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ=="],
"socks-proxy-agent": ["socks-proxy-agent@8.0.5", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
"sorcery": ["sorcery@0.11.1", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.14", "buffer-crc32": "^1.0.0", "minimist": "^1.2.0", "sander": "^0.5.0" }, "bin": { "sorcery": "bin/sorcery" } }, "sha512-o7npfeJE6wi6J9l0/5LKshFzZ2rMatRiCDwYeDQaOzqdzRJwALhX7mk/A/ecg6wjMu7wdZbmXfD2S/vpOg0bdQ=="],
"source-map": ["source-map@0.7.4", "", {}, "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA=="],
@@ -2504,14 +2418,10 @@
"sshpk": ["sshpk@1.18.0", "", { "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", "bcrypt-pbkdf": "^1.0.0", "dashdash": "^1.12.0", "ecc-jsbn": "~0.1.1", "getpass": "^0.1.1", "jsbn": "~0.1.0", "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" }, "bin": { "sshpk-conv": "bin/sshpk-conv", "sshpk-sign": "bin/sshpk-sign", "sshpk-verify": "bin/sshpk-verify" } }, "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ=="],
"stack-trace": ["stack-trace@0.0.10", "", {}, "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg=="],
"statuses": ["statuses@2.0.1", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="],
"stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="],
"streamx": ["streamx@2.22.0", "", { "dependencies": { "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" }, "optionalDependencies": { "bare-events": "^2.2.0" } }, "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw=="],
"string-convert": ["string-convert@0.2.1", "", {}, "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A=="],
"string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
@@ -2550,6 +2460,8 @@
"supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="],
"surrealdb": ["surrealdb@1.3.2", "", { "dependencies": { "isows": "^1.0.6", "uuidv7": "^1.0.1" }, "peerDependencies": { "tslib": "^2.6.3", "typescript": "^5.0.0" } }, "sha512-mL7nij33iuon3IQP72F46fgX3p2LAxFCWCBDbZB7IohZ13RTEwJVNq7nZeP1eMSceQUpKzS6OHIWOuF9LYAkNw=="],
"svelte": ["svelte@3.59.2", "", {}, "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA=="],
"svelte-dialogs": ["svelte-dialogs@1.2.2", "", { "peerDependencies": { "svelte": "^3.5.0" } }, "sha512-Pf25Xua2nDIIR4v45PNbn+yFrFLNc0ns9+sO8Ms77Hm/CdxFuXm01XO8Qkw8Ej66BvboX+kIJ3TCm8uwP/XmyQ=="],
@@ -2566,8 +2478,6 @@
"tar": ["tar@6.2.1", "", { "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" } }, "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A=="],
"tar-fs": ["tar-fs@3.0.8", "", { "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" }, "optionalDependencies": { "bare-fs": "^4.0.1", "bare-path": "^3.0.0" } }, "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg=="],
"tar-stream": ["tar-stream@2.2.0", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="],
"tarn": ["tarn@3.0.2", "", {}, "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ=="],
@@ -2580,10 +2490,6 @@
"terminal-link": ["terminal-link@2.1.1", "", { "dependencies": { "ansi-escapes": "^4.2.1", "supports-hyperlinks": "^2.0.0" } }, "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ=="],
"text-decoder": ["text-decoder@1.2.3", "", { "dependencies": { "b4a": "^1.6.4" } }, "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA=="],
"text-hex": ["text-hex@1.0.0", "", {}, "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg=="],
"text-table": ["text-table@0.2.0", "", {}, "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw=="],
"thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="],
@@ -2628,8 +2534,6 @@
"trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="],
"triple-beam": ["triple-beam@1.4.1", "", {}, "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg=="],
"trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="],
"trpc-openapi": ["trpc-openapi@1.2.0", "", { "dependencies": { "co-body": "^6.1.0", "h3": "^1.6.4", "lodash.clonedeep": "^4.5.0", "node-mocks-http": "^1.12.2", "openapi-types": "^12.1.1", "zod-to-json-schema": "^3.21.1" }, "peerDependencies": { "@trpc/server": "^10.0.0", "zod": "^3.14.4" } }, "sha512-pfYoCd/3KYXWXvUPZBKJw455OOwngKN/6SIcj7Yit19OMLJ+8yVZkEvGEeg5wUSwfsiTdRsKuvqkRPXVSwV7ew=="],
@@ -2658,8 +2562,6 @@
"type-is": ["type-is@1.6.18", "", { "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" } }, "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g=="],
"typed-query-selector": ["typed-query-selector@2.12.0", "", {}, "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg=="],
"typedarray": ["typedarray@0.0.6", "", {}, "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="],
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
@@ -2720,6 +2622,8 @@
"uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="],
"uuidv7": ["uuidv7@1.0.2", "", { "bin": { "uuidv7": "cli.js" } }, "sha512-8JQkH4ooXnm1JCIhqTMbtmdnYEn6oKukBxHn1Ic9878jMkL7daTI7anTExfY18VRCX7tcdn5quzvCb6EWrR8PA=="],
"v8-compile-cache": ["v8-compile-cache@2.4.0", "", {}, "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw=="],
"validate-npm-package-license": ["validate-npm-package-license@3.0.4", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="],
@@ -2758,10 +2662,6 @@
"widest-line": ["widest-line@5.0.0", "", { "dependencies": { "string-width": "^7.0.0" } }, "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA=="],
"winston": ["winston@3.17.0", "", { "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", "logform": "^2.7.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", "winston-transport": "^4.9.0" } }, "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw=="],
"winston-transport": ["winston-transport@4.9.0", "", { "dependencies": { "logform": "^2.7.0", "readable-stream": "^3.6.2", "triple-beam": "^1.3.0" } }, "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A=="],
"word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="],
"wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
@@ -2778,14 +2678,10 @@
"xxhash-wasm": ["xxhash-wasm@1.1.0", "", {}, "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA=="],
"y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="],
"yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="],
"yaml": ["yaml@2.7.0", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA=="],
"yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="],
"yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
"yauzl": ["yauzl@2.10.0", "", { "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } }, "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g=="],
@@ -2870,8 +2766,6 @@
"@prisma/schema-files-loader/fs-extra": ["fs-extra@11.1.1", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ=="],
"@puppeteer/browsers/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
"@rollup/pluginutils/estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
"@sveltejs/vite-plugin-svelte/vitefu": ["vitefu@0.2.5", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "optionalPeers": ["vite"] }, "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q=="],
@@ -2916,12 +2810,8 @@
"chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
"cli-table3/@colors/colors": ["@colors/colors@1.5.0", "", {}, "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ=="],
"co-body/qs": ["qs@6.14.0", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w=="],
"colorspace/color": ["color@3.2.1", "", { "dependencies": { "color-convert": "^1.9.3", "color-string": "^1.6.0" } }, "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA=="],
"csvtojson/strip-bom": ["strip-bom@2.0.0", "", { "dependencies": { "is-utf8": "^0.2.0" } }, "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g=="],
"cypress/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
@@ -2934,7 +2824,7 @@
"dir-glob/path-type": ["path-type@4.0.0", "", {}, "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="],
"escodegen/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
"error-ex/is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="],
"eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@2.1.0", "", {}, "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw=="],
@@ -2972,10 +2862,6 @@
"ignore-walk/minimatch": ["minimatch@5.1.6", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="],
"ip-address/jsbn": ["jsbn@1.1.0", "", {}, "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="],
"ip-address/sprintf-js": ["sprintf-js@1.1.3", "", {}, "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA=="],
"is-wsl/is-docker": ["is-docker@2.2.1", "", { "bin": { "is-docker": "cli.js" } }, "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="],
"knex/commander": ["commander@10.0.1", "", {}, "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug=="],
@@ -3034,10 +2920,6 @@
"p-locate/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
"pac-proxy-agent/http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
"pac-proxy-agent/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
"parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
"path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
@@ -3058,14 +2940,6 @@
"prop-types/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],
"proxy-agent/http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
"proxy-agent/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
"proxy-agent/lru-cache": ["lru-cache@7.18.3", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="],
"proxy-agent/proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="],
"rc-align/rc-util": ["rc-util@4.21.1", "", { "dependencies": { "add-dom-event-listener": "^1.1.0", "prop-types": "^15.5.10", "react-is": "^16.12.0", "react-lifecycles-compat": "^3.0.4", "shallowequal": "^1.1.0" } }, "sha512-Z+vlkSQVc1l8O2UjR3WQ+XdWlhj5q9BMQNLk2iOBch75CqPfrJyGtcWMcnhRlNuDu0Ndtt4kLVO8JI8BrABobg=="],
"rc-animate/rc-util": ["rc-util@4.21.1", "", { "dependencies": { "add-dom-event-listener": "^1.1.0", "prop-types": "^15.5.10", "react-is": "^16.12.0", "react-lifecycles-compat": "^3.0.4", "shallowequal": "^1.1.0" } }, "sha512-Z+vlkSQVc1l8O2UjR3WQ+XdWlhj5q9BMQNLk2iOBch75CqPfrJyGtcWMcnhRlNuDu0Ndtt4kLVO8JI8BrABobg=="],
@@ -3098,8 +2972,6 @@
"serve-static/send": ["send@0.19.0", "", { "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", "on-finished": "2.4.1", "range-parser": "~1.2.1", "statuses": "2.0.1" } }, "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw=="],
"simple-swizzle/is-arrayish": ["is-arrayish@0.3.2", "", {}, "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="],
"soap/strip-bom": ["strip-bom@3.0.0", "", {}, "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA=="],
"sorcery/buffer-crc32": ["buffer-crc32@1.0.0", "", {}, "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w=="],
@@ -3118,8 +2990,6 @@
"tar/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],
"tar-fs/tar-stream": ["tar-stream@3.1.7", "", { "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ=="],
"temp-write/temp-dir": ["temp-dir@1.0.0", "", {}, "sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ=="],
"temp-write/uuid": ["uuid@3.4.0", "", { "bin": { "uuid": "./bin/uuid" } }, "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="],
@@ -3182,8 +3052,6 @@
"boxen/wrap-ansi/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
"colorspace/color/color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="],
"express/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="],
"express/send/encodeurl": ["encodeurl@1.0.2", "", {}, "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="],
@@ -3334,8 +3202,6 @@
"boxen/wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
"colorspace/color/color-convert/color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="],
"form-render/color/color-convert/color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="],
"npm-packlist/glob/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],

View File

@@ -1,9 +1,16 @@
version: '3'
services:
database:
build: ./
restart: always
surrealdb:
env_file:
- .env
entrypoint:
- /surreal
- start
- --user
- $DB_USER
- --pass
- $DB_PASSWORD
image: surrealdb/surrealdb:latest
ports:
- 5432:5432
- 8000:8000

1
index.ts Normal file
View File

@@ -0,0 +1 @@
console.log("Hello via Bun!");

View File

@@ -29,7 +29,6 @@
"@pdfme/common": "^5.2.16",
"@pdfme/generator": "^5.2.16",
"@pdfme/ui": "^5.2.16",
"@svelte-plugins/datepicker": "^1.0.11",
"@trpc/client": "^10.45.2",
"@trpc/server": "^10.45.2",
"astro": "^4.16.17",
@@ -53,7 +52,6 @@
"nodemailer": "^6.10.0",
"pdf-lib": "^1.17.1",
"postcss-nested": "^7.0.2",
"puppeteer": "^24.7.2",
"radix-svelte-icons": "^1.0.0",
"sass": "^1.83.4",
"sharp": "^0.33.5",
@@ -61,6 +59,7 @@
"soap": "^1.1.8",
"sqids": "^0.3.0",
"ssh2-sftp-client": "^12.0.0",
"surrealdb": "^1.3.2",
"svelte": "^3.59.2",
"svelte-dialogs": "^1.2.2",
"svelte-preprocess": "^5.1.4",
@@ -68,7 +67,6 @@
"tailwindcss": "^3.4.17",
"trpc-openapi": "^1.2.0",
"uuid": "^9.0.1",
"winston": "^3.17.0",
"zod": "^3.24.1"
},
"devDependencies": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

View File

@@ -1,9 +0,0 @@
-- AlterTable
ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "fenster_art_1" SET DATA TYPE TEXT,
ALTER COLUMN "fenster_art_2" SET DATA TYPE TEXT,
ALTER COLUMN "dachfenster_art" SET DATA TYPE TEXT,
ALTER COLUMN "haustuer_art" SET DATA TYPE TEXT,
ALTER COLUMN "dach_daemmung" SET DATA TYPE TEXT,
ALTER COLUMN "decke_daemmung" SET DATA TYPE TEXT,
ALTER COLUMN "aussenwand_daemmung" SET DATA TYPE TEXT,
ALTER COLUMN "boden_daemmung" SET DATA TYPE TEXT;

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 10 MiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 10 MiB

View File

@@ -2,46 +2,30 @@
# === Configuration ===
BUCKET_NAME="ibc-db-backup"
ENDPOINT_URL="https://s3.eu-central-3.ionoscloud.com"
ENDPOINT_URL="https://s3-eu-central-1.ionoscloud.com"
LOCAL_DOWNLOAD_DIR="./" # Where to save the file
# === Check if a custom file is given as a command line argument ===
if [ $# -eq 1 ]; then
CUSTOM_FILE="$1"
echo "🔍 Using custom file: $CUSTOM_FILE"
# Check if the file exists
if [ ! -f "$CUSTOM_FILE" ]; then
echo "❌ Custom file does not exist: $CUSTOM_FILE"
exit 1
fi
LATEST_FILE="$CUSTOM_FILE"
FILENAME=$(basename "$LATEST_FILE")
SQL_FILE="${FILENAME%.br}" # Remove .br suffix
else
echo "🔍 No custom file provided, searching for latest .sql.br file in S3"
# === Get latest file from IONOS S3 bucket ===
LATEST_FILE=$(aws s3api list-objects-v2 \
--bucket "$BUCKET_NAME" \
--prefix "data-dump" \
--endpoint-url "$ENDPOINT_URL" \
--query 'Contents | sort_by(@, &LastModified) | [-1].Key' \
--output text)
# === Get latest file from IONOS S3 bucket ===
LATEST_FILE=$(aws s3api list-objects-v2 \
--bucket "$BUCKET_NAME" \
--prefix "data-dump" \
--endpoint-url "$ENDPOINT_URL" \
--query 'Contents | sort_by(@, &LastModified) | [-1].Key' \
--output text)
# === Check if file was found ===
if [ "$LATEST_FILE" == "None" ] || [ -z "$LATEST_FILE" ]; then
echo "❌ No matching .sql.br file found."
exit 1
fi
echo "🔍 Latest file found: $LATEST_FILE"
FILENAME=$(basename "$LATEST_FILE")
SQL_FILE="${FILENAME%.br}" # Remove .br suffix
echo "📥 Downloading $LATEST_FILE"
aws s3 cp "s3://$BUCKET_NAME/$LATEST_FILE" "$LOCAL_DOWNLOAD_DIR" \
--endpoint-url "$ENDPOINT_URL"
# === Check if file was found ===
if [ "$LATEST_FILE" == "None" ] || [ -z "$LATEST_FILE" ]; then
echo "❌ No matching .sql.br file found."
exit 1
fi
FILENAME=$(basename "$LATEST_FILE")
SQL_FILE="${FILENAME%.br}" # Remove .br suffix
echo "📥 Downloading $LATEST_FILE"
aws s3 cp "s3://$BUCKET_NAME/$LATEST_FILE" "$LOCAL_DOWNLOAD_DIR" \
--endpoint-url "$ENDPOINT_URL"
# === Decompress with Brotli ===
echo "🗜️ Decompressing $FILENAME -> $SQL_FILE"
brotli -d "$FILENAME"

View File

@@ -5,8 +5,10 @@ export const createCaller = createCallerFactory({
"klimafaktoren": await import("../src/pages/api/klimafaktoren.ts"),
"postleitzahlen": await import("../src/pages/api/postleitzahlen.ts"),
"unterlage": await import("../src/pages/api/unterlage.ts"),
"auth/access-token": await import("../src/pages/api/auth/access-token.ts"),
"auth/passwort-vergessen": await import("../src/pages/api/auth/passwort-vergessen.ts"),
"auth/refresh-token": await import("../src/pages/api/auth/refresh-token.ts"),
"admin/ausstellen": await import("../src/pages/api/admin/ausstellen.ts"),
"admin/bedarfsausweis-ausstellen": await import("../src/pages/api/admin/bedarfsausweis-ausstellen.ts"),
"admin/bestellbestaetigung": await import("../src/pages/api/admin/bestellbestaetigung.ts"),
"admin/erinnern": await import("../src/pages/api/admin/erinnern.ts"),
"admin/nicht-ausstellen": await import("../src/pages/api/admin/nicht-ausstellen.ts"),
@@ -14,9 +16,6 @@ export const createCaller = createCallerFactory({
"admin/stornieren": await import("../src/pages/api/admin/stornieren.ts"),
"aufnahme": await import("../src/pages/api/aufnahme/index.ts"),
"ausweise": await import("../src/pages/api/ausweise/index.ts"),
"auth/access-token": await import("../src/pages/api/auth/access-token.ts"),
"auth/passwort-vergessen": await import("../src/pages/api/auth/passwort-vergessen.ts"),
"auth/refresh-token": await import("../src/pages/api/auth/refresh-token.ts"),
"bedarfsausweis-gewerbe/[id]": await import("../src/pages/api/bedarfsausweis-gewerbe/[id].ts"),
"bedarfsausweis-gewerbe": await import("../src/pages/api/bedarfsausweis-gewerbe/index.ts"),
"bedarfsausweis-wohnen/[id]": await import("../src/pages/api/bedarfsausweis-wohnen/[id].ts"),
@@ -26,10 +25,10 @@ export const createCaller = createCallerFactory({
"geg-nachweis-gewerbe": await import("../src/pages/api/geg-nachweis-gewerbe/index.ts"),
"geg-nachweis-wohnen/[id]": await import("../src/pages/api/geg-nachweis-wohnen/[id].ts"),
"geg-nachweis-wohnen": await import("../src/pages/api/geg-nachweis-wohnen/index.ts"),
"objekt": await import("../src/pages/api/objekt/index.ts"),
"rechnung/[id]": await import("../src/pages/api/rechnung/[id].ts"),
"rechnung/anfordern": await import("../src/pages/api/rechnung/anfordern.ts"),
"rechnung": await import("../src/pages/api/rechnung/index.ts"),
"objekt": await import("../src/pages/api/objekt/index.ts"),
"ticket": await import("../src/pages/api/ticket/index.ts"),
"user": await import("../src/pages/api/user/index.ts"),
"user/self": await import("../src/pages/api/user/self.ts"),

View File

@@ -10,11 +10,8 @@ import {
VerbrauchsausweisWohnenClient,
} from "#components/Ausweis/types.js";
import {
Aufnahme,
BedarfsausweisWohnen,
Bild,
Enums,
Objekt,
Unterlage,
VerbrauchsausweisGewerbe,
VerbrauchsausweisWohnen,
@@ -531,12 +528,12 @@ export async function bedarfsausweisWohnenSpeichern(
export async function ausweisSpeichern(
ausweis:
| VerbrauchsausweisWohnen
| VerbrauchsausweisGewerbe
| BedarfsausweisWohnen,
objekt: Objekt,
aufnahme: Aufnahme,
bilder: Bild[],
| VerbrauchsausweisWohnenClient
| VerbrauchsausweisGewerbeClient
| BedarfsausweisWohnenClient,
objekt: ObjektClient,
aufnahme: AufnahmeClient,
bilder: BildClient[],
unterlagen: Unterlage[],
ausweisart: Enums.Ausweisart
) {

View File

@@ -1,15 +0,0 @@
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { Benutzer } from "#lib/client/prisma.js";
import { api } from "astro-typesafe-api/client";
import Cookies from "js-cookie";
export async function benutzerLesen(benutzerId: string): Promise<Benutzer> {
const benutzer = await api.user.GET.fetch({ id: benutzerId }
, {
headers: {
Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
});
return benutzer[0];
}

View File

@@ -1,5 +1,5 @@
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { Aufnahme, Benutzer, Objekt } from "#lib/client/prisma.js";
import { Aufnahme, Objekt } from "#lib/client/prisma.js";
import { api } from "astro-typesafe-api/client";
import Cookies from "js-cookie";
@@ -162,31 +162,3 @@ export async function objektSpeichern(objekt: Objekt & { id?: string }): Promise
return id;
}
}
export async function benutzerSpeichern(benutzer: Partial<Benutzer>): Promise<string> {
const completeBenutzer: Benutzer = {
id: benutzer.id,
name: benutzer.name ?? null,
email: benutzer.email,
passwort: "",
adresse: benutzer.adresse ?? null,
anrede: benutzer.anrede ?? null,
firma: benutzer.firma ?? null,
vorname: benutzer.vorname ?? null,
ort: benutzer.ort ?? null,
plz: benutzer.plz ?? null,
profilbild: benutzer.profilbild ?? null,
telefon: benutzer.telefon ?? null,
updated_at: new Date(),
verified: benutzer.verified ?? false,
};
await api.user.POST.fetch(completeBenutzer
, {
headers: {
Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
});
return benutzer.id;
}

View File

@@ -1,121 +0,0 @@
<script lang="ts">
import { Aufnahme, BedarfsausweisWohnen, Enums, Objekt, Rechnung, VerbrauchsausweisGewerbe, VerbrauchsausweisWohnen } from "#lib/server/prisma.js";
import moment from "moment";
import { DatePicker } from "@svelte-plugins/datepicker"
export let bestellungen: (Rechnung & {
ausweis: (VerbrauchsausweisWohnen | BedarfsausweisWohnen | VerbrauchsausweisGewerbe) & { aufnahme: Aufnahme & { objekt: Objekt }}
})[];
export let provisionen: Record<Enums.Ausweisart, number>;
export let partnerCodeErstesMal: Date;
export let email: string;
const bestellungenNachMonat: Record<string, (typeof bestellungen)> = {};
for (const bestellung of bestellungen) {
const monat = moment(bestellung.created_at).format("Y-MM");
if (monat in bestellungenNachMonat) {
bestellungenNachMonat[monat].push(bestellung)
} else {
bestellungenNachMonat[monat] = [bestellung]
}
}
// Wir brauchen alle Monate zwischen dem ersten Mal, dass der partner_code benutzt wurde bis zum heutigen Zeitpunkt.
const months: Record<string, string> = {
"01": "Januar", "02": "Februar", "03": "März", "04": "April",
"05": "Mai", "06": "Juni", "07": "Juli", "08": "August",
"09": "September", "10": "Oktober", "11": "November", "12": "Dezember"
};
function getMonthlyPeriods(minTime?: Date): moment.Moment[] {
const min = minTime ? moment(minTime) : moment();
const start = min.clone().startOf('month');
const end = moment().add(1, 'month').startOf('month');
const monthsArray: moment.Moment[] = [];
const current = start.clone();
while (current.isBefore(end)) {
monthsArray.push(current.clone());
current.add(1, 'month');
}
return monthsArray.reverse(); // Most recent month first
}
const periods = getMonthlyPeriods(partnerCodeErstesMal)
let isOpen = false;
export let startDate = moment(partnerCodeErstesMal).startOf('month').toDate();
export let endDate = moment().endOf('month').toDate();
$: formattedStartDate = moment(startDate).format("DD.MM.YYYY");
$: formattedEndDate = moment(endDate).format("DD.MM.YYYY");
function toggleDatePicker() {
isOpen = !isOpen;
}
const onChange = ({ startDate, endDate }: { startDate: number, endDate: number }) => {
window.location.href = `/dashboard/abrechnung?start=${moment(startDate).format("YYYY-MM-DD")}&end=${moment(endDate).format("YYYY-MM-DD")}`;
};
</script>
<div class="fixed top-0 left-0 right-0 bg-white p-4 shadow z-10">
<div class="flex justify-between items-center">
<DatePicker bind:isOpen bind:startDate bind:endDate isRange={true} onDateChange={onChange} isMultipane={true}>
<input type="text" class="w-min" readonly value={`${formattedStartDate} - ${formattedEndDate}`} on:click={toggleDatePicker} />
</DatePicker>
<p>Abrechnungsübersicht für <strong>{email}</strong></p>
</div>
</div>
<main class="my-24 flex justify-center max-w-6xl mx-auto px-4">
{#if !bestellungen || bestellungen.length === 0}
<p class="text-center text-gray-500">Keine Bestellungen gefunden.</p>
{/if}
{#each periods as dt}
{@const jahrMonat = dt.format("Y-MM")}
{#if jahrMonat in bestellungenNachMonat && bestellungenNachMonat[jahrMonat].length > 0}
<!-- Echo dropdown foreach month. -->
{@const provisionMonat = bestellungenNachMonat[jahrMonat].reduce((acc, bestellung) => {
return acc + provisionen[bestellung.ausweis.ausweisart] || 0;
}, 0) * 1.19}
<!-- <div onclick="$(this).nextUntil('.dropdown_month').filter('table').toggle(); $('#betrag_gesamt').html('Abrechnungsbetrag $month_name: <b>$provision_month €</b>')" class='dropdown_month'>
<p>$month_name $year_name - Klicke, um Tabelle anzuzeigen</p>
<a target='_blank' rel='noreferrer noopener' href='/user/abrechnung/pdf.php?month={dt.format("m")}&year={dt.format("Y")}'>PDF Ansehen</a>
</div> -->
<table class="w-full mb-4 border-collapse border border-gray-300">
<thead>
<tr class="bg-primary text-white">
<td class="text-center font-bold">ID</td>
<td class="text-center font-bold">DATUM</td>
<td class="text-center font-bold">GEBÄUDEADRESSE </td>
<td class="text-center font-bold">PLZ </td>
<td class="text-center font-bold">ORT </td>
<td class="text-center font-bold">AUSWEIS</td>
<td class="text-center font-bold w-48">BETRAG NETTO</td>
</tr>
</thead>
<tbody class="text-sm">
<tr class="bg-secondary text-white">
<td class="text-center font-bold" colspan="6">{months[dt.format("MM")]} {dt.format("YYYY")}</td>
<td class="text-right font-bold w-48" style="font-family: monospace;">{provisionMonat.toFixed(2)}</td>
</tr>
</tbody>
{#each bestellungenNachMonat[jahrMonat] as bestellung}
{@const provisionBestellung = provisionen[bestellung.ausweis.ausweisart] || 0}
<tr>
<td class="text-center px-4 w-24" style="font-family: monospace;">{bestellung.id}</td>
<td class="text-center font-bold w-32">{moment(bestellung.created_at).format("DD.MM.YYYY")}</td>
<td class="text-left w-64">{bestellung.ausweis.aufnahme.objekt.adresse}</td>
<td class="text-center w-16">{bestellung.ausweis.aufnahme.objekt.plz}</td>
<td class="text-left w-64">{bestellung.ausweis.aufnahme.objekt.ort}</td>
<td class="text-center w-32">{bestellung.ausweis.ausweisart}</td>
<td class="text-right w-48" style="font-family: monospace;">{provisionBestellung.toFixed(2)}</td>
</tr>
{/each}
</table>
{/if}
{/each}
</main>

View File

@@ -131,11 +131,11 @@
window.history.pushState(
{},
"",
`${location.pathname}?ausweis_id=${ausweis.id}`
`${location.pathname}?id=${ausweis.id}`
);
blockLocalStorageSync = true;
localStorage.clear()
window.location.href = `/dashboard/objekte/${ausweis.id}`
window.location.href = `/speichern-erfolgreich?id=${ausweis.id}`
}
}
@@ -214,8 +214,8 @@ grid-cols-1 gap-x-2 gap-y-4
/>
<div class="text-center xs:text-left justify-self-stretch">
<b>Selbsteingabe online</b><br>inkl. ausführlicher&nbsp;telefonischer
Beratung!
<b>Verbrauchsausweis online</b><br>inkl. ausführlicher&nbsp;telefonischer
Beratung
</div>
<div class="text-center xs:text-right">
@@ -234,7 +234,7 @@ grid-cols-1 gap-x-2 gap-y-4
/>
<div class="text-center xs:text-left justify-self-stretch">
<b>Wir übernehmen die Eingabe</b><br>Sie übermitteln die nötigen Unterlagen per Upload oder E-Mail.
<b>Verbrauchsausweis offline</b><br>Sie schicken uns 3&nbsp;Verbrauchsabrechnungen&nbsp;zu)
</div>
<div class="text-center xs:text-right">

View File

@@ -20,14 +20,10 @@
export let ausweisart: Enums.Ausweisart;
</script>
<!--
{#if ausweisart=="BedarfsausweisWohnen"}
<AngabenZurHeizunganlage bind:ausweis/>
{/if}
-->
<div
id="sanierungszustand"
class="bereich-box grid

View File

@@ -41,7 +41,6 @@ const brennstoffe: [
["Fernwärme KWK EB", "kWh", 1.0, 0.0, 0.04],
["Fernwärme HKW FB", "kWh", 1.0, 1.3, 0.4],
["Fernwärme HKW EB", "kWh", 1.0, 0.1, 0.06],
["Fernwärme Hamburg", "kWh", 1.0, 0.33, 0.064],
["Erdgas", "kWh", 1.0, 1.1, 0.24],
["Heizöl", "kWh", 1.0, 1.1, 0.31],
["Heizöl", "l", 10.0, 1.1, 0.31],

View File

@@ -14,7 +14,6 @@ import {
GEGNachweisWohnen,
BedarfsausweisGewerbe,
GEGNachweisGewerbe,
GEGEinpreisung
} from "#lib/client/prisma.js";
import { z, ZodSchema } from "zod";
@@ -80,8 +79,6 @@ export type BenutzerClient = OmitKeys<Benutzer, "passwort">;
export type RechnungClient = Rechnung
export type GEGEinpreisungClient = GEGEinpreisung
export function ZodOverlap<T, S = z.ZodType<T, z.ZodTypeDef, T>>(arg: S): S {
return arg;
}
@@ -100,7 +97,7 @@ export type OptionalNullable<T> = T extends object ? {
[K in keyof PickNotNullable<T>]: OptionalNullable<T[K]>
} : T;
export const IDWithPrefix = z.string().refine((value) => {
export const UUidWithPrefix = z.string().refine((value) => {
const prefixedUUidRegex = /^([A-Z]{2})[0-9A-Z]{6,9}$/i
const match = value.match(prefixedUUidRegex)
@@ -113,7 +110,7 @@ export const IDWithPrefix = z.string().refine((value) => {
})
export function getAusweisartFromId(id: string): Enums.Ausweisart | null {
if (!IDWithPrefix.safeParse(id).success) {
if (!UUidWithPrefix.safeParse(id).success) {
return null
}

View File

@@ -0,0 +1,939 @@
<script lang="ts">
import { endEnergieVerbrauchVerbrauchsausweis_2016 } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016.js";
import moment from "moment";
import {
AufnahmeClient,
getAusweisartFromId,
ObjektClient,
BildClient,
VerbrauchsausweisWohnenClient,
} from "./Ausweis/types.js";
import AusweisPruefenTooltip from "./AusweisPruefenTooltip.svelte";
import { addNotification } from "#components/Notifications/shared.js";
import { CheckCircled, CrossCircled, Image } from "radix-svelte-icons";
import ChevronDown from "radix-svelte-icons/src/lib/icons/ChevronDown.svelte";
import { Event } from "#lib/client/prisma.js";
import { api } from "astro-typesafe-api/client";
import Cookies from "js-cookie";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import NotificationWrapper from "./Notifications/NotificationWrapper.svelte";
export let ausweis: VerbrauchsausweisWohnenClient;
export let aufnahme: AufnahmeClient;
export let objekt: ObjektClient;
export let bilder: BildClient[]
export let events: Event[]
export let calculations: Awaited<
ReturnType<typeof endEnergieVerbrauchVerbrauchsausweis_2016>
>;
async function ausweisAusstellen(uid: string) {
try {
await api.admin.ausstellen.GET.fetch({
id_ausweis: uid
}, {
headers: {
"Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
})
} catch(e) {
addNotification({
message: "Das hat nicht geklappt.",
subtext: e as string,
timeout: 3000,
type: "error",
})
}
}
const ausweisArt = getAusweisartFromId(ausweis.id)
let verbrauchWWGesamt_1 = "";
let verbrauchWWGesamt_2 = "";
var Ausweisbild,
DatenBlattBild,
warmWasser,
anteilWarmwasser,
solarsystemWarmwasser;
let zurueckGestellt: any;
let symbolPruefung: any;
let StatusIcon: any;
let tooltip3Z1: any;
let tooltip3Z2: any;
let tooltip4Z1: any;
let tooltip4Z2: any;
let tooltip5Z1: any;
let tooltip5Z2: any;
let tooltip5Z3: any;
let tooltip6Z1: any;
let tooltip6Z2: any;
let tooltip7Z1: any;
let tooltip7Z2: any;
let tooltip8Z1: any;
let tooltip8Z2: any;
let tooltip9Z1: any;
let tooltip9Z2: any;
let tooltip10Z1: any;
let tooltip10Z2: any;
let tooltip11Z1: any;
let tooltip11Z2: any;
let tooltip12Z1: any;
let tooltip12Z2: any;
let tooltip13Z1: any;
let tooltip13Z2: any;
let tooltip14Z1: any;
let tooltip14Z2: any;
let tooltip15Z1: any;
let tooltip15Z2: any;
let tooltip16Z1: any;
let tooltip16Z2: any;
let table3Z1: any;
let table3Z2: any;
let table4Z1: any;
let table4Z2: any;
let table5Z1: any;
let table5Z2: any;
let table6Z1: any;
let table6Z2: any;
let table7Z1: any;
let table7Z2: any;
let table8Z1: any;
let table8Z2: any;
let table9Z1: any;
let table9Z2: any;
let table10Z1: any;
let table10Z2: any;
let table11Z1: any;
let table11Z2: any;
let table12Z1: any;
let table12Z2: any;
let table13Z1: any;
let table13Z2: any;
let table14Z1: any;
let table14Z2: any;
let table15Z1: any;
let table15Z2: any;
let table16Z1: any;
let table16Z2: any;
let Abgeschlossen: any;
if (ausweis.ausgestellt) {
Ausweisbild = "/images/dashboard/ausweishaken.jpg";
DatenBlattBild = "/images/dashboard/datenblatthaken.jpg";
StatusIcon = "/images/dashboard/erledigt.svg";
Abgeschlossen = 0;
} else if (ausweis.bestellt) {
Ausweisbild = "/images/dashboard/ausweis.jpg";
DatenBlattBild = "/images/dashboard/datenblatt.jpg";
StatusIcon = "/images/dashboard/bestellt.svg";
Abgeschlossen = 1;
} else {
Ausweisbild = "/images/dashboard/ausweiskreuz.jpg";
DatenBlattBild = "/images/dashboard/datenblattkreuz.jpg";
StatusIcon = "/images/dashboard/gespeichert.svg";
Abgeschlossen = 2;
}
if (ausweis.boxpruefung) {
symbolPruefung = "/images/dashboard/kreishaken.png";
} else {
symbolPruefung = "/images/dashboard/kreiskreuz.png";
}
if (ausweis.zurueckgestellt) {
zurueckGestellt =
"<img src='/images/dashboard/zurueckGestellt.svg' alt='Status' width=\"25\" height=\"25\"></img>";
} else {
zurueckGestellt = "";
}
if (ausweis.warmwasser_enthalten) {
warmWasser = "Warmwasser enthalten";
} else {
warmWasser = "Warmwasser nicht enthalten";
}
if (ausweis.warmwasser_anteil_bekannt) {
anteilWarmwasser = "Anteil bekannt";
} else {
anteilWarmwasser = "Anteil unbekannt";
}
if (
ausweis.warmwasser_enthalten &&
ausweis.warmwasser_anteil_bekannt
) {
if (aufnahme.solarsystem_warmwasser) {
// Wenn Warmwasser enthalten und Anteil bekannt und Solarsystem
verbrauchWWGesamt_1 = `${calculations?.energieVerbrauchGesamt_1} kWh x ${(ausweis.anteil_warmwasser_1 || 0) / 100} x 0.6`;
verbrauchWWGesamt_2 = `${calculations?.energieVerbrauchGesamt_2} kWh x ${(ausweis.anteil_warmwasser_2 || 0) / 100} x 0.6`;
solarsystemWarmwasser = "Solarsystem Warmwasser";
} else {
// Wenn Warmwasser enthalten und Anteil bekannt und **kein** Solarsystem
verbrauchWWGesamt_1 = `${calculations?.energieVerbrauchGesamt_1} kWh x ${(ausweis.anteil_warmwasser_1 || 0) / 100} x 0.6`
verbrauchWWGesamt_2 = `${calculations?.energieVerbrauchGesamt_2} kWh x ${(ausweis.anteil_warmwasser_2 || 0) / 100} x 0.6`
solarsystemWarmwasser = "kein Solarsystem Warmwasser";
}
} else {
if (aufnahme.solarsystem_warmwasser) {
// Wenn Warmwasser Anteil unbekannt und Solarsystem
verbrauchWWGesamt_1 =
calculations?.energetischeNutzflaeche +
" m² x 12 kWh/m² x 3 Jahre";
solarsystemWarmwasser = "Solarsystem Warmwasser";
} else {
// Wenn Warmwasser Anteil unbekannt und **kein** Solarsystem
verbrauchWWGesamt_1 =
calculations?.energetischeNutzflaeche +
" m² x 20 kWh/m² x 3 Jahre";
solarsystemWarmwasser = "kein Solarsystem Warmwasser";
}
}
tooltip3Z1 = "Wohnfläche in m²";
tooltip3Z2 =
ausweis.faktorKeller +
" x " +
aufnahme.flaeche +
" m² Energetische Nutzfläche (Keller " +
aufnahme.keller +
" ) in m²";
table3Z1 = aufnahme.flaeche;
table3Z2 = calculations?.energetischeNutzflaeche;
tooltip4Z1 =
"(" +
ausweis.verbrauch_1 +
" " +
ausweis.einheit_1 +
" + " +
ausweis.verbrauch_2 +
" " +
ausweis.einheit_1 +
" + " +
ausweis.verbrauch_3 +
" " +
ausweis.einheit_1 +
") x " +
calculations?.brennstoff_1.umrechnungsfaktor +
" kWh/" +
ausweis.einheit_1 +
" >> Verbrauch 1 " +
ausweis.brennstoff_1 +
" in kWh";
tooltip4Z2 =
"(" +
ausweis.verbrauch_4 +
" " +
ausweis.einheit_2 +
" + " +
ausweis.verbrauch_5 +
" " +
ausweis.einheit_2 +
" + " +
ausweis.verbrauch_6 +
" " +
ausweis.einheit_2 +
") x " +
calculations?.brennstoff_2.umrechnungsfaktor +
" kWh/" +
ausweis.einheit_2 +
" >> Verbrauch 2 " +
ausweis.brennstoff_2 +
" in kWh";
table4Z1 = calculations?.energieVerbrauchGesamt_1;
table4Z2 = calculations?.energieVerbrauchGesamt_2;
tooltip5Z1 =
warmWasser + ", " + anteilWarmwasser + ", " + solarsystemWarmwasser;
tooltip5Z2 = verbrauchWWGesamt_1;
tooltip5Z3 = verbrauchWWGesamt_2;
table5Z1 = calculations?.energieVerbrauchWarmwasser_1;
table5Z2 = calculations?.energieVerbrauchWarmwasser_2;
tooltip6Z1 =
"(" +
calculations?.klimafaktoren[0].klimafaktor +
" + " +
calculations?.klimafaktoren[1].klimafaktor +
" + " +
calculations?.klimafaktoren[2].klimafaktor +
") / 3 >> durchschnittlicher Klimafaktor";
tooltip6Z2 = "";
table6Z1 = calculations?.durchschnittsKlimafaktor;
table6Z2 = "";
tooltip7Z1 =
calculations?.energieVerbrauchHeizung_1 +
" kWh x " +
calculations?.durchschnittsKlimafaktor +
" >> Klimabereinigter Heizverbrauch 1 in kWh";
tooltip7Z2 =
calculations?.energieVerbrauchHeizung_2 +
" kWh x " +
calculations?.durchschnittsKlimafaktor +
" >> Klimabereinigter Heizverbrauch 2 in kWh";
table7Z1 = calculations?.energieVerbrauchHeizungBereinigt_1;
table7Z2 = calculations?.energieVerbrauchHeizungBereinigt_2;
tooltip8Z1 =
calculations?.energetischeNutzflaeche +
" m² x 6 kWh/m² x 3 Jahre >> Kühlungszuschlag in kWh";
tooltip8Z2 = "";
table8Z1 = calculations?.kuehlungsZuschlag;
table8Z2 = "";
tooltip9Z1 =
"-0.0028 x " +
calculations?.durchschnittsEnergieVerbrauchHeizungBereingt +
" + 0.9147 >> Heizungsfaktor";
tooltip9Z2 =
"(" +
calculations?.energieVerbrauchHeizungBereinigt_1 +
" + " +
calculations?.energieVerbrauchHeizungBereinigt_2 +
") / (3 * " +
calculations?.energetischeNutzflaeche +
") >> Durchschnittsverbrauch Heizung in kWh";
table9Z1 =
calculations?.faktorDurchschnittsEnergieVerbrauchHeizungBereinigt;
table9Z2 = calculations?.durchschnittsEnergieVerbrauchHeizungBereingt;
tooltip10Z1 =
calculations[
"faktorDurchschnittsEnergieVerbrauchHeizungBereinigt"
] +
" x " +
calculations?.leerstand +
" x (" +
calculations.energieVerbrauchHeizungBereinigt_1 +
" + " +
calculations.energieVerbrauchHeizungBereinigt_2 +
") >> Leerstandszuschlag Heizung in kWh";
tooltip10Z2 =
calculations?.leerstand +
" x (" +
calculations?.energieVerbrauchWarmwasser_1 +
" + " +
calculations?.energieVerbrauchWarmwasser_2 +
") >> Leerstandszuschlag Warmwasser in kWh";
table10Z1 = calculations?.leerstandsZuschlagHeizung;
table10Z2 = calculations?.leerstandsZuschlagWarmwasser;
tooltip11Z2 =
"(" +
calculations?.energieVerbrauchHeizungBereinigt_2 +
" + " +
calculations?.energieVerbrauchWarmwasser_2 +
") / (3 Jahre x " +
calculations?.energetischeNutzflaeche +
") Endenergieverbrauch 2 in kWh/m²a";
table11Z1 = calculations?.endEnergieVerbrauch_1;
table11Z2 = calculations?.endEnergieVerbrauch_2;
tooltip12Z1 =
"((" +
calculations?.energieVerbrauchHeizungBereinigt_1 +
" x " +
calculations?.primaerfaktor_1 +
") + (" +
calculations?.energieVerbrauchWarmwasser_1 +
" x " +
calculations?.primaerfaktorww +
")) / (3 Jahre x " +
calculations?.energetischeNutzflaeche +
") Primärenergieverbrauch 1 in kWh/m²a";
tooltip12Z2 =
"((" +
calculations?.energieVerbrauchHeizungBereinigt_2 +
" x " +
calculations?.primaerfaktor_1 +
") + (" +
calculations?.energieVerbrauchWarmwasser_2 +
" x " +
calculations?.primaerfaktorww_1 +
")) / (3 Jahre x " +
calculations?.energetischeNutzflaeche +
") Primärenergieverbrauch 2 in kWh/m²a";
table12Z1 = calculations?.primaerEnergieVerbrauch_1;
table12Z2 = calculations?.primaerEnergieVerbrauch_2;
tooltip13Z1 =
"(" +
calculations?.leerstandsZuschlagHeizung +
" + " +
calculations?.leerstandsZuschlagWarmwasser +
") / (3 Jahre x " +
calculations?.energetischeNutzflaeche +
") Endenergieverbrauch Leerstand in kWh/m²a";
tooltip13Z2 =
"(" +
calculations?.kuehlungsZuschlag +
") / (3 Jahre x " +
calculations?.energetischeNutzflaeche +
") Endenergieverbrauch Kühlung in kWh/m²a";
table13Z1 = calculations?.endEnergieVerbrauchLeerstandsZuschlag;
table13Z2 = calculations?.endEnergieVerbrauchKuehlungsZuschlag;
tooltip14Z1 =
calculations?.endEnergieVerbrauchLeerstandsZuschlag +
" x " +
calculations?.primaerfaktor +
" Primärenergieverbrauch Leerstand in kWh/m²a";
tooltip14Z2 =
calculations?.endEnergieVerbrauchKuehlungsZuschlag +
" x 1.8 Primärenergieverbrauch Kühlung in kWh/m²a";
table14Z1 = calculations?.primaerEnergieVerbrauchLeerstandsZuschlag;
table14Z2 = calculations?.primaerEnergieVerbrauchKuehlungsZuschlag;
tooltip15Z1 =
calculations?.endEnergieVerbrauch_1 +
" + " +
calculations?.endEnergieVerbrauch_2 +
" + " +
calculations?.endEnergieVerbrauchLeerstandsZuschlag +
" + " +
calculations?.endEnergieVerbrauchKuehlungsZuschlag +
" Endenergieverbrauch in kWh/m²a";
tooltip15Z2 =
"(" +
calculations?.endEnergieVerbrauch_1 +
" x " +
calculations?.co2Emissionen_1 +
") + (" +
calculations?.endEnergieVerbrauch_2 +
" x " +
calculations?.co2Emissionen_2 +
") + (" +
calculations?.endEnergieVerbrauchLeerstandsZuschlag +
" x " +
calculations?.co2Emissionen_1 +
") + (" +
calculations?.endEnergieVerbrauchKuehlungsZuschlag +
" x " +
calculations?.co2Emissionen_1 +
") CO2-Emissionen in kg/m²a";
table15Z1 = calculations?.endEnergieVerbrauchGesamt;
table15Z2 = calculations?.co2EmissionenGesamt;
tooltip16Z1 =
calculations?.primaerEnergieVerbrauch_1 +
" + " +
calculations?.primaerEnergieVerbrauch_2 +
" + " +
calculations?.primaerEnergieVerbrauchLeerstandsZuschlag +
" x " +
calculations?.primaerEnergieVerbrauchKuehlungsZuschlag +
" Primärenergieverbrauch in kWh/m²a";
tooltip16Z2 = "Effizienzklasse";
table16Z1 = calculations?.primaerEnergieVerbrauchGesamt;
table16Z2 = aufnahme.energieeffizienzklasse;
let imagePreview = "";
// let imageJson = JSON.parse(ausweis.images);
// let imagePreview = "";
// if (typeof imageJson === "object") {
// imagePreview =
// imageJson.daemmung.toString() +
// "," +
// imageJson.general.toString() +
// "," +
// imageJson.fenster.toString() +
// "," +
// imageJson.heizung.toString();
// }
async function stornieren(ausweis: VerbrauchsausweisWohnenClient) {
try {
const response = await api.admin.stornieren.PUT.fetch({
uid_ausweis: ausweis.id
}, {
headers: {
"Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
})
addNotification({
message: "Ausweis wurde storniert",
type: "success",
dismissable: true,
timeout: 3000,
})
ausweis.storniert = true;
ausweis = ausweis;
} catch(e) {
addNotification({
message: "Ausweis konnte nicht storniert werden.",
subtext: e as string,
type: "error",
dismissable: true,
timeout: 3000,
})
}
}
let bilderModal: HTMLDialogElement;
let infoVisible = false;
async function registriernummerAnfordern(uid: string) {
try {
const result = await api.admin.registriernummer.GET.fetch({
uid
}, {
headers: {
"Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
})
} catch(e) {
addNotification({
message: "Registriernummer anfordern fehlgeschlagen.",
subtext: e as string,
type: "error",
dismissable: true,
timeout: 3000,
})
}
}
</script>
<div class="border rounded-lg bg-base-200">
<table class="">
<tbody>
<tr>
<td><button on:click={() => infoVisible = !infoVisible}><ChevronDown size={22} class="transition-all {infoVisible ? "" : "rotate-180"}"></ChevronDown></button></td>
<td class="w-6 px-2"
>
{#if ausweis.ausgestellt}
<div class="tooltip" data-tip="Ausweis wurde ausgestellt">
<div class="rounded-full w-6 h-6 bg-success"></div>
</div>
{:else if ausweis.bestellt}
<div class="tooltip" data-tip="Ausweis wurde bestellt">
<div class="rounded-full w-6 h-6 bg-warning"></div>
</div>
{:else}
<div class="tooltip" data-tip="Ausweis ist in Bearbeitung">
<div class="rounded-full w-6 h-6 bg-error"></div>
</div>
{/if}
</td
>
<td width="150px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{aufnahme.adresse} {aufnahme.plz} {aufnahme.ort}</span>
<br>
<span>{aufnahme.gebaeudetyp}, Einheiten: {aufnahme.einheiten}</span>
</div>
<span>{ausweisArt} - {aufnahme.id}</span>
<span>{moment(aufnahme.erstellungsdatum).format("DD.MM.YYYY")}</span>
</AusweisPruefenTooltip></td
>
<td width="35px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>Baujahr Gebäude / Baujahr Heizung</span>
</div>
<span>{aufnahme.baujahr_gebaeude.join(", ")}</span>
<span>{aufnahme.baujahr_heizung.join(", ")}</span>
</AusweisPruefenTooltip>
<div class="tooltip" data-tip="">
</div></td
>
<td width="45px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>Wohnfläche in m²</span>
<br>
<span>{ausweis.faktorKeller} x {aufnahme.flaeche}m² Energetische Nutzfläche (Keller {aufnahme.keller}) in m²</span>
</div>
<span>{aufnahme.flaeche}</span>
<span><strong>{calculations?.energetischeNutzflaeche}</strong></span>
</AusweisPruefenTooltip>
</td
>
<td width="90px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip4Z1}</span>
<br>
<span>{tooltip4Z2}</span>
</div>
<span>{table4Z1}</span>
<span>{table4Z2}</span>
</AusweisPruefenTooltip></td
>
<td width="70px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip5Z1}</span>
<br>
<span>{tooltip5Z2}</span>
<br>
<span>{tooltip5Z3}</span>
</div>
<span>{table5Z1}</span>
<span>{table5Z2}</span>
</AusweisPruefenTooltip>
</td
>
<td width="50px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip6Z1}</span>
<br>
<span>{tooltip6Z2}</span>
</div>
<span><strong>{table6Z1}</strong></span>
<span><strong>{table6Z2}</strong></span>
</AusweisPruefenTooltip></td
>
<td width="90px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip7Z1}</span>
<br>
<span>{tooltip7Z2}</span>
</div>
<span>{table7Z1}</span>
<span>{table7Z2}</span>
</AusweisPruefenTooltip></td
>
<td width="60px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip8Z1}</span>
<br>
<span>{tooltip8Z2}</span>
</div>
<span>{table8Z1}</span>
<span>{table8Z2}</span>
</AusweisPruefenTooltip></td
>
<td width="50px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip9Z1}</span>
<br>
<span>{tooltip9Z2}</span>
</div>
<span>{table9Z1}</span>
<span><strong>{table9Z2}</strong></span>
</AusweisPruefenTooltip></td
>
<td width="100px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip10Z1}</span>
<br>
<span>{tooltip10Z2}</span>
</div>
<span>{table10Z1}</span>
<span>{table10Z2}</span>
</AusweisPruefenTooltip></td
>
<td width="110px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>({calculations?.energieVerbrauchHeizungBereinigt_1} + {calculations?.energieVerbrauchWarmwasser_1}) / (3 Jahre x {calculations?.energetischeNutzflaeche}) Endenergieverbrauch 1 in kWh/m²a</span>
<br>
<span>{tooltip11Z2}</span>
</div>
<span>{table11Z1}</span>
<span>{table11Z2}</span>
</AusweisPruefenTooltip></td
>
<td width="50px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip12Z1}</span>
<br>
<span>{tooltip12Z2}</span>
</div>
<span>{table12Z1}</span>
<span>{table12Z2}</span>
</AusweisPruefenTooltip>
</td
>
<td width="60px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip13Z1}</span>
<br>
<span>{tooltip13Z2}</span>
</div>
<span>{table13Z1}</span>
<span>{table13Z2}</span>
</AusweisPruefenTooltip>
</td
>
<td width="45px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip14Z1}</span>
<br>
<span>{tooltip14Z2}</span>
</div>
<span>{table14Z1}</span>
<span>{table14Z2}</span>
</AusweisPruefenTooltip>
</td
>
<td width="45px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip15Z1}</span>
<br>
<span>{tooltip15Z2}</span>
</div>
<span><strong>{table15Z1}</strong></span>
<span><strong>{table15Z2}</strong></span>
</AusweisPruefenTooltip>
</td
>
<td width="50px"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{tooltip16Z1}</span>
<br>
<span>{tooltip16Z2}</span>
</div>
<span><strong>{table16Z1}</strong></span>
<span><strong>{table16Z2}</strong></span>
</AusweisPruefenTooltip>
</td
>
<td title="Gebäudebilder anzeigen"
><!-- Open the modal using ID.showModal() method -->
<button class="btn btn-square" on:click={() => bilderModal.showModal()}><Image size={22}></Image></button>
<dialog bind:this={bilderModal} class="modal p-4 rounded-lg">
<div class="modal-box flex flex-row gap-4 items-center justify-center">
{#if bilder.length === 0}
<div class="flex flex-col gap-4 items-center justify-center">
<p>Für diesen Ausweis sind noch keine Bilder vorhanden.</p>
<button class="button" tabindex="0">Erinnerung Verschicken</button>
</div>
{:else}
{#each bilder as image}
<div>
<h2 class="text-lg mb-4 font-bold">{image.kategorie}</h2>
<img src="/bilder/{image.id}.jpg">
</div>
{/each}
{/if}
</div>
<form method="dialog" class="modal-backdrop">
<button class="button">Close</button>
</form>
</dialog></td
>
<td class="w-[30px]"
>
<AusweisPruefenTooltip>
<div slot="tooltip">
<span>{aufnahme.prueftext}</span>
</div>
{#if ausweis.boxpruefung}
<CheckCircled size={22}></CheckCircled>
{:else}
<CrossCircled size={22}></CrossCircled>
{/if}
</AusweisPruefenTooltip></td
>
<td title="Ausweis anzeigen" class="w-[50px]"
><a
class="energieausweis-img"
href="/pdf/ansichtsausweis?uid={ausweis.id}"
target="_blank"
><img
src="/images/dashboard/ausweis.jpg"
alt="Energieausweis"
class="w-full h-8"
/></a
></td
>
<td title="Datenblatt anzeigen" width="50px"
><a
class="energieausweis-img"
href="/pdf/datenblatt?uid={ausweis.id}"
target="_blank"
><img
src="/images/dashboard/datenblatt.jpg"
alt="Datenblatt"
/></a
></td
>
<td
title="Ausweis stornieren und Zahlung wenn erforderlich automatisch zurückbuchen"
class="w-4 p-1"
><button
class="btn btn-xs btn-ghost"
on:click={() => stornieren(ausweis)}>S</button
></td
>
<td title="Ausweis ausstellen" class="w-4 p-1"
><button
class="btn btn-xs btn-ghost"
on:click={() => ausweisAusstellen(aufnahme.uid)}>A</button
></td
>
<td
title="Ausweis ausstellen und per Post verschicken"
class="w-4 p-1"
><button
class="btn btn-xs btn-ghost"
on:click={() => ausweisAusstellenPost(aufnahme.uid)}>P</button
></td
>
<td
title="E-Mail an Kunden schicken mit Erläuterungen warum der Ausweis noch nicht ausgestellt werden kann."
class="w-4 p-1"
><button
class="btn btn-xs btn-ghost"
on:click={() => ausweisnichtAusstellen(aufnahme.uid)}>N</button
></td
>
<td
title="Bestellbestätigung nochmal schicken (Zahlung nicht erfolgreich)"
class="w-4 p-1"
><button
class="btn btn-xs btn-ghost"
on:click={() => bestellBestaetigung(aufnahme.uid)}>B</button
></td
>
<td
title="E-Mail an Kunden schicken mit Erinnerung die Bestellung abzuschließen."
class="w-4 p-1"
><button
class="btn btn-xs btn-ghost"
on:click={() => erinnern(aufnahme.uid)}
>E</button
></td
>
<td
title="Zum Formular mit allen Eingabedaten."
class="w-4 p-1"
><a
class="btn btn-xs btn-ghost"
target="_blank"
href="/energieausweis-erstellen/gespeichert?id={aufnahme.uid}">F</a
></td
>
{#if aufnahme.kontrolldatei}
<td title="XML-Datei an das DiBT verschicken." class="w-4 p-1"><button class="btn btn-xs btn-ghost" on:click={() => {
xmlAbschicken(aufnahme.uid)
}}>X</button></td>
{/if}
{#if !ausweis.registriernummer}
<td title="Registriernummer vom DiBT anfordern." class="w-4 p-1"><button class="btn btn-xs btn-ghost" on:click={() => {
registriernummerAnfordern(ausweis.id)
}}>R</button></td>
{/if}
</tr>
</tbody>
</table>
<div class:hidden={!infoVisible} class:block={infoVisible} class="py-4 border-t">
<div class="grid grid-cols-[2fr_1fr] prose max-w-full">
<div class="border-r px-8">
<h3 class="mt-0">Wichtige Daten</h3>
<table>
<tbody>
<tr>
<td>Angewendete Berechnungsformel</td>
<td><strong>EnEV 2016</strong></td>
</tr>
<tr>
<td>Berechnungsergebnis</td>
<td>{calculations?.endEnergieVerbrauchGesamt}kWh/m2/A - Energieeffizienzklasse <strong>{calculations?.energieEffizienzKlasse}</strong></td>
</tr>
<tr>
<td>Informationen des Nutzers</td>
<td>{ausweis.boxpruefung}</td>
</tr>
<tr>
<td>UID</td>
<td><strong><pre>{ausweis.id}</pre></strong></td>
</tr>
</tbody>
</table>
</div>
<div class="px-8">
<h3 class="mt-0">Ereignisse</h3>
<ul class="timeline timeline-snap-icon max-md:timeline-compact timeline-vertical">
<li>
<div class="timeline-middle">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="h-5 w-5"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd" /></svg>
</div>
<div class="timeline-start md:text-end mb-10">
<time class="font-mono italic">{moment(ausweis.erstellungsdatum).format("DD.MM.YYYY - HH:mm")} Uhr</time>
<div class="text-lg font-black">Ausweis erstellt</div>
</div>
<hr/>
</li>
{#each events as event, i}
<li>
<hr />
<div class="timeline-middle">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="h-5 w-5"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd" /></svg>
</div>
<div class="mb-10" class:timeline-end={i % 2 == 0} class:timeline-start={i % 2 == 1}>
<time class="font-mono italic">{moment(event.date).format("DD.MM.YYYY - HH:mm")} Uhr</time>
<div class="text-lg font-black">{event.title}</div>
{event.description || ""}
</div>
<hr />
</li>
{/each}
{#if ausweis.erledigt}
<li>
<hr />
<div class="timeline-middle">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="h-5 w-5"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd" /></svg>
</div>
<div class="mb-10 timeline-end">
<time class="font-mono italic">{moment(ausweis.ausstellungsdatum).format("DD.MM.YYYY - HH:mm")} Uhr</time>
<div class="text-lg font-black">Ausweis ausgestellt</div>
{ausweis.registriernummer ? `Registriernummer: ${ausweis.registriernummer}` : ""}
</div>
<hr />
</li>
{/if}
</ul>
</div>
</div>
</div>
</div>
<NotificationWrapper />

View File

@@ -0,0 +1,68 @@
<script lang="ts">
import { getZodBaseType } from "#client/lib/helpers.js";
import { filterAusweise } from "#lib/filters.js";
import { ZodTypeAny } from "astro:schema";
import { Cross1 } from "radix-svelte-icons";
import z, { ZodBoolean, ZodNativeEnum, ZodNumber } from "zod"
export let filters: { name: keyof z.infer<typeof filterAusweise>, type: ZodTypeAny, value: any }[] = []
</script>
{#each filters as filter, i}
{@const type = getZodBaseType(filter.type)}
<div class="flex flex-row bg-white gap-4 px-2 py-2 rounded-lg">
{#if i === 0}
<span class="badge">where</span>
{:else}
<span class="badge">and</span>
{/if}
<select on:change={function(e) {
delete filters[filter.name]
filter.name = e.target.value;
filter.type = filterAusweise._def.shape()[filter.name]
filters = filters.filter(Boolean);
}}>
<option value={filter.name} selected>{filter.name}</option>
{#each Object.keys(filterAusweise._def.shape()) as n}
{#if !filters.find(filter => filter.name === n)}
<option value={n}>{n}</option>
{/if}
{/each}
</select>
<span class="badge">equals</span>
{#if type instanceof ZodNumber}
<input type="number" bind:value={filter.value}>
{:else if type instanceof ZodBoolean}
<select bind:value={filter.value}>
<option value={true}>true</option>
<option value={false}>false</option>
</select>
{:else if type instanceof ZodNativeEnum}
<select bind:value={filter.value}>
{#each Object.entries(type._def.values) as [key, value]}
<option {value}>{key}</option>
{/each}
</select>
{:else}
<input type="text" bind:value={filter.value}>
{/if}
<Cross1 size={24} class="cursor-pointer"></Cross1>
</div>
{/each}
<button on:click={() => {
const entry = Object.entries(filterAusweise._def.shape())[0]
filters.push({
name: entry[0],
type: entry[1],
value: null
})
filters = filters
}}>Filter Hinzufügen</button>
<style>
.badge {
@apply rounded-lg px-2 py-1 bg-gray-500 text-white;
}
</style>

View File

@@ -1,34 +1,29 @@
<script lang="ts">
import { AufnahmeKomplettClient, BedarfsausweisWohnenClient, BenutzerClient, getAusweisartFromId, RechnungClient, GEGEinpreisungClient, VerbrauchsausweisGewerbeClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
import { AufnahmeKomplettClient, BedarfsausweisWohnenClient, BenutzerClient, getAusweisartFromId, RechnungClient, VerbrauchsausweisGewerbeClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
import moment from "moment";
import { dialogs } from "svelte-dialogs";
import {
CrossCircled,
DotsVertical,
Download,
Pencil2,
QuestionMarkCircled,
} from "radix-svelte-icons";
import { endEnergieVerbrauchVerbrauchsausweis_2016 } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016.js";
import { api } from "astro-typesafe-api/client";
import Cookies from "js-cookie";
import { API_ACCESS_TOKEN_COOKIE_NAME, AusstellungsTyp } from "#lib/constants.js";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { Enums, Objekt } from "#lib/client/prisma.js";
import { endEnergieVerbrauchVerbrauchsausweisGewerbe_2016 } from "#lib/Berechnungen/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbe_2016.js";
import { addNotification, updateNotification } from "#components/Notifications/shared.js";
import { endEnergieVerbrauchVerbrauchsausweis_2016_Client } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016_Client.js";
import { endEnergieVerbrauchVerbrauchsausweisGewerbe_2016_Client } from "#lib/Berechnungen/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbe_2016_Client.js";
export let ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbeClient | BedarfsausweisWohnenClient;
export let aufnahme: AufnahmeKomplettClient;
export let rechnung: RechnungClient | null;
export let einpreisung: GEGEinpreisungClient | null;
export let rechnung: RechnungClient;
export let objekt: Objekt;
export let benutzer: BenutzerClient;
import { FileText } from "radix-svelte-icons";
import NotificationProvider from "#components/NotificationProvider/NotificationProvider.svelte";
import DashboardNotification from "./DashboardNotification.svelte";
import { notifications } from "#components/NotificationProvider/shared.js";
import { Bell } from "radix-svelte-icons";
import mime from "mime"
const progress = ausweis.ausgestellt ? 100 : ausweis.bestellt ? 66 : 33;
const ausweisart = getAusweisartFromId(ausweis.id);
@@ -148,8 +143,6 @@
}
}
async function ausstellen(post = false) {
const notification = addNotification({
message: "Ausweis wird ausgestellt.",
@@ -157,121 +150,42 @@
type: "info",
timeout: 0,
})
if (ausweisart === Enums.Ausweisart.BedarfsausweisWohnen) {
const results: {data: string, name: string, type: "Sonstiges" | "Ausweis"}[] = []
let i = 0
const dateien = [...(bedarfsausweisAdditionalInput.files || []), ...(bedarfsausweisFileInput.files || [])];
if (dateien.length === 0) {
addNotification({
message: "Bitte laden sie vor dem Ausstellen einen Ausweis hoch.",
timeout: 3000,
type: "error",
dismissable: true
})
return;
}
for (const datei of dateien) {
const reader = new FileReader();
reader.onload = async (ev) => {
const result = reader.result;
if (!result) {
addNotification({
message: `Die Datei ${datei.name} konnte nicht verarbeitet werden.`,
timeout: 3000,
type: "error",
dismissable: true
})
}
results.push({
data: result as string,
name: datei.name,
type: i == dateien.length - 1 ? "Ausweis" : "Sonstiges"
})
i++
if (i === dateien.length) {
try {
await api.admin["bedarfsausweis-ausstellen"].POST.fetch({
id_ausweis: ausweis.id,
post,
files: results
}, {
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
})
updateNotification(notification, {
message: "Ausweis ausgestellt.",
subtext: "Der Ausweis wurde erfolgreich ausgestellt.",
timeout: 3000,
type: "success",
})
} catch(e) {
updateNotification(notification, {
message: "Das hat nicht geklappt.",
subtext: e as string,
timeout: 3000,
type: "error",
})
}
}
try {
await api.admin.ausstellen.GET.fetch({
id_ausweis: ausweis.id,
post
}, {
headers: {
"Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
reader.readAsDataURL(datei)
}
} else {
try {
await api.admin.ausstellen.GET.fetch({
id_ausweis: ausweis.id,
post
}, {
headers: {
"Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
})
})
ausweis.ausgestellt = true;
ausweis.ausgestellt = true;
updateNotification(notification, {
message: "Ausweis ausgestellt.",
subtext: "Der Ausweis wurde erfolgreich ausgestellt.",
timeout: 3000,
type: "success",
})
} catch(e) {
updateNotification(notification, {
message: "Das hat nicht geklappt.",
subtext: e as string,
timeout: 3000,
type: "error",
})
}
updateNotification(notification, {
message: "Ausweis ausgestellt.",
subtext: "Der Ausweis wurde erfolgreich ausgestellt.",
timeout: 3000,
type: "success",
})
} catch(e) {
updateNotification(notification, {
message: "Das hat nicht geklappt.",
subtext: e as string,
timeout: 3000,
type: "error",
})
}
}
let bedarfsausweisFileInput: HTMLInputElement;
let bedarfsausweisAdditionalInput: HTMLInputElement;
let dropdownOpen = false;
function toggleDropdown() {
dropdownOpen = !dropdownOpen;
}
</script>
<div class="relative bg-base-200 border border-base-300 rounded-lg p-4 mx-2">
<div class="relative bg-base-200 border border-base-300 rounded-lg p-4 mr-4">
{#if ausweis.storniert}
<div
class="absolute top-0 left-0 w-full h-full bg-[rgba(0,0,0,0.4)] z-[5] rounded-lg select-none"
class="absolute top-0 left-0 w-full h-full bg-[rgba(0,0,0,0.7)] z-[5] rounded-lg select-none"
>
<h1
class="absolute -rotate-[25deg] text-xl md:text-xl tracking-wide uppercase text-red-500 border-4 border-red-500 rounded-lg top-[50%] translate-y-[-50%] left-[50%] translate-x-[-50%]"
class="absolute -rotate-[25deg] text-5xl md:text-7xl tracking-wide uppercase text-red-500 border-4 border-red-500 rounded-lg top-[50%] translate-y-[-50%] left-[50%] translate-x-[-50%]"
>
Storniert
</h1>
@@ -279,53 +193,31 @@
{/if}
<div class="card-body">
<div
class="mb-2 dropdown dropdown-bottom absolute top-4 right-4 bg-base-100"
class="flex justify-end mb-2 dropdown dropdown-bottom absolute top-4 right-4"
>
<button class="rounded-full p-2.5 hover:bg-base-100" on:click={toggleDropdown}>
<button class="rounded-full p-2.5 hover:bg-base-100">
<DotsVertical size={15} />
</button>
</div>
{#if dropdownOpen}
<ul
tabindex="-1"
class="z-[1] menu p-2 shadow bg-base-100 rounded-box w-64 gap-2 border"
class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-64 gap-2"
>
<!-- <div>
<button on:click={ausweisStornieren} class="flex items-center gap-2" disabled
><CrossCircled size={15} />Stornieren</button
<li>
<button on:click={ausweisStornieren}
><CrossCircled size={15} />Ausweis Stornieren</button
>
</div>
<div>
<button class="flex items-center gap-2" disabled
><Pencil2 size={15} /> Als Vorlage</button>
</div>
<div>
<button on:click={() => hilfeModal.showModal()} class="flex items-center gap-2" disabled
</li>
<li>
<button><Pencil2 size={15} /> Als Vorlage benutzen</button>
</li>
<li>
<button on:click={() => hilfeModal.showModal()}
><QuestionMarkCircled size={15} /> Hilfe Erhalten</button
>
</div> -->
{#if ausweis.bestellt && rechnung}
<div>
<a href="/dashboard/rechnung/aendern?rechnungid={rechnung.id}"><button> Adresse ändern</button
></a>
</div>
{/if}
</li>
</ul>
{/if}
</div>
<div class="flex flex-row flex-wrap items-center gap-2">
{#if ausweis.ausgestellt}
<span class="bg-green-600 px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Ausgestellt</span>
{:else if ausweis.bestellt}
<span class="bg-primary px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Bestellt</span>
{:else}
{#if ausweisart === Enums.Ausweisart.BedarfsausweisGewerbe || ausweisart === Enums.Ausweisart.GEGNachweisWohnen || ausweisart === Enums.Ausweisart.GEGNachweisGewerbe}
<span class="bg-red-600 px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Angefordert</span>
{:else}
<span class="bg-red-600 px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Gespeichert</span>
{/if}
{/if}
<div class="text-lg font-semibold">
{#if ausweisart == Enums.Ausweisart.VerbrauchsausweisWohnen}
Verbrauchsausweis Wohnen
@@ -340,35 +232,46 @@
{:else if ausweisart == Enums.Ausweisart.BedarfsausweisGewerbe}
Bedarfsausweis Gewerbe
{/if}
</div>
</div>
<div class="badge badge-accent font-semibold text-black text-m">
{#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL}
mit Beratung
{#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL}
(Beratung)
{:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL}
Offline
(Offline)
{/if}
</div>
{#if ausweis.ausgestellt}
<span class="bg-green-600 px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Ausgestellt</span>
{:else if ausweis.bestellt}
<span class="bg-primary px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Bestellt</span>
{:else}
{#if ausweisart === Enums.Ausweisart.BedarfsausweisGewerbe || ausweisart === Enums.Ausweisart.GEGNachweisWohnen || ausweisart === Enums.Ausweisart.GEGNachweisGewerbe}
<span class="bg-red-600 px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Gespeichert</span>
{:else}
<span class="bg-red-600 px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Angefordert</span>
{/if}
{#if (rechnung?.services ?? []).length > 0}
{#if rechnung}
<span class="text-sm italic">({rechnung.services})</span>
{/if}
{/if}
</div>
<div class="badge badge-accent font-semibold text-black text-m">{objekt.adresse}</div>
<div class="mb-4 flex flex-row items-center gap-4">
<div class="w-full border rounded-lg my-2">
<div class="bg-green-600 h-4 rounded-lg" class:bg-red-600={progress == 33} class:bg-primary={progress == 66} style="width: {progress}%;"></div>
</div>
<span class="text-sm font-semibold text-base-content"
>{progress}%</span
>
</div>
{#if ausweis.bestellt}
{#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL}
<p class="text-sm font-semibold">Sie haben Hilfe zu diesem Ausweis angefordert. Sie werden innerhalb der nächsten 48 Stunden über die hinterlegte Telefonnummer vom IB Cornelsen kontaktiert.</p>
{:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL}
<p class="text-sm font-semibold">Sie haben die offline Variant zu diesem Ausweis angefordert. Bitte übermitteln Sie uns die letzten drei Jahre der Energieabrechnungen Ihres Energieversorgers.</p>
{:else if !ausweis.ausgestellt}
<p class="text-sm font-semibold">Der Ausweis wurde von Ihnen freigegeben und befindet sich in Prüfung vom IB Cornelsen</p>
{/if}
{/if}
{#await calculations then calculations}
<div class="flex flex-col mb-4">
<div class="flex flex-row justify-between">
<span>Erstellungsdatum</span>
<span class="font-bold text-base-content"
>{moment(aufnahme.erstellungsdatum).format(
"DD.MM.YYYY"
)}</span
>
</div>
<div class="flex flex-col gap-2">
<div class="flex flex-row justify-between">
<span>Energieverbrauch</span>
<span class="font-bold text-base-content"
@@ -381,6 +284,14 @@
>{calculations?.co2EmissionenGesamt}Kg/A</span
>
</div>
<div class="flex flex-row justify-between">
<span>Erstellungsdatum</span>
<span class="font-bold text-base-content"
>{moment(aufnahme.erstellungsdatum).format(
"DD.MM.YYYY"
)}</span
>
</div>
<div class="flex flex-row justify-between">
<span>Baujahr</span>
<span
@@ -398,92 +309,17 @@
: "N/A"}</span
>
</div>
<div class="flex flex-row justify-between">
<span>ID</span>
<span class="font-bold text-base-content"
>{id}</span
>
</div>
</div>
{/await}
{#if benutzer.rolle === Enums.BenutzerRolle.ADMIN && ausweisart === Enums.Ausweisart.BedarfsausweisWohnen}
<span>Laden sie hier den Ausweis hoch</span>
<input type="file" bind:this={bedarfsausweisFileInput}>
<span>Laden sie hier zusätzliche Dokumente hoch</span>
<input type="file" bind:this={bedarfsausweisAdditionalInput} multiple>
{/if}
<div class="flex flex-row justify-start items-center mb-4">
<a
class="p-1 rounded-lg hover:bg-gray-200 mr-2 border-2 border-gray-300"
title="PDF Herunterladen"
target="_blank"
href="/pdf/ansichtsausweis?id={ausweis.id}"
>
{#if ausweis.ausgestellt}
<img src="../../images/dashboard/AusweisHaken.svg" width="65" alt="Energieausweis">
{:else}
<img src="../../images/dashboard/AusweisKreuz.svg" width="65" alt="Energieausweis">
{/if}
</a>
<a
class="p-1 rounded-lg hover:bg-gray-200 border-2 border-gray-300"
title="PDF Herunterladen"
target="_blank"
href="/pdf/datenblatt?id={ausweis.id}"
>
{#if ausweis.ausgestellt}
<img src="../../images/dashboard/DatenblattHaken.svg" width="65" alt="Energieausweis">
{:else}
<img src="../../images/dashboard/DatenblattKreuz.svg" width="65" alt="Energieausweis">
{/if}
</a>
<div class="w-1/2 ml-4 text-sm">
{#if ausweis.bestellt}
{#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL}
Sie haben Hilfe zu diesem Ausweis angefordert. Sie werden <span class="font-bold">innerhalb der nächsten 48 Stunden</span> über die hinterlegte Telefonnummer vom IB Cornelsen kontaktiert.
{:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL}
Sie haben die offline Variant zu diesem Ausweis angefordert. Bitte <span class="font-bold">übermitteln Sie uns die letzten drei Jahre der Energieabrechnungen</span> Ihres Energieversorgers.
{:else if !ausweis.ausgestellt}
Der Ausweis wurde von Ihnen freigegeben und befindet sich <span class="font-bold">in Prüfung durch IB Cornelsen</span>
{/if}
{:else if ausweis.ausgestellt}
Vorgang erledigt. Ausweis ist <span class="font-bold">geprüft und ausgestellt.</span>
{:else}
Der Ausweis wurde von Ihnen gespeichert <span class="font-bold">und muss noch bestellt werden.</span>
{/if}
</div>
</div>
<div class="text-sm mb-2">
<span class="font-bold">Rechnungsadresse</span><br>
{#if ausweisart == Enums.Ausweisart.GEGNachweisWohnen || ausweisart == Enums.Ausweisart.GEGNachweisGewerbe || ausweisart == Enums.Ausweisart.BedarfsausweisGewerbe}
{einpreisung?.empfaenger},
{#if einpreisung?.zusatzzeile !== null}
{einpreisung?.zusatzzeile},
{/if}
{einpreisung?.strasse}, {einpreisung?.plz} {einpreisung?.ort}
{:else}
{rechnung?.empfaenger},
{#if rechnung?.zusatzzeile !== null}
{rechnung?.zusatzzeile},
{/if}
{rechnung?.strasse}, {rechnung?.plz} {rechnung?.ort}
{/if}
</div>
<div class="text-sm mb-2">
<span class="font-bold">Versandadresse</span><br>
{#if ausweisart == Enums.Ausweisart.GEGNachweisWohnen || ausweisart == Enums.Ausweisart.GEGNachweisGewerbe || ausweisart == Enums.Ausweisart.BedarfsausweisGewerbe}
{einpreisung?.versand_empfaenger},
{#if einpreisung?.versand_zusatzzeile !== null}
{einpreisung?.versand_zusatzzeile},
{/if}
{einpreisung?.versand_strasse}, {einpreisung?.versand_plz} {einpreisung?.versand_ort}
{:else}
{rechnung?.versand_empfaenger},
{#if rechnung?.versand_zusatzzeile !== null}
{rechnung?.versand_zusatzzeile},
{/if}
{rechnung?.versand_strasse}, {rechnung?.versand_plz} {rechnung?.versand_ort}
{/if}
</div>
<div class="flex flex-row gap-2 justify-end items-center mt-4">
{#if !ausweis.storniert && !ausweis.ausgestellt}
<div class="flex flex-row justify-end items-center gap-4 mt-4">
{#if !ausweis.storniert && !ausweis.ausgestellt}
<!--
<a
class="button text-sm"
@@ -501,32 +337,32 @@
{#if ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen}
<a
class="button text-sm"
href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?id={ausweis.id}"
>Bearbeiten</a>
{:else if ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe}
<a
class="button text-sm"
href="/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/energieausweis-erstellen/verbrauchsausweis-gewerbe?id={ausweis.id}"
>Bearbeiten</a>
{:else if ausweisart === Enums.Ausweisart.BedarfsausweisWohnen}
<a
class="button text-sm"
href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude?id={ausweis.id}"
>Bearbeiten</a>
{:else if ausweisart === Enums.Ausweisart.GEGNachweisWohnen}
<a
class="button text-sm"
href="/angebot-anfragen/geg-nachweis-wohnen-anfragen?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/angebot-anfragen/geg-nachweis-wohnen-anfragen?id={ausweis.id}"
>Bearbeiten</a>
{:else if ausweisart === Enums.Ausweisart.GEGNachweisGewerbe}
<a
class="button text-sm"
href="/angebot-anfragen/geg-nachweis-gewerbe-anfragen?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/angebot-anfragen/geg-nachweis-gewerbe-anfragen?id={ausweis.id}"
>Bearbeiten</a>
{:else if ausweisart === Enums.Ausweisart.BedarfsausweisGewerbe}
<a
class="button text-sm"
href="/angebot-anfragen/bedarfsausweis-gewerbe-anfragen?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/angebot-anfragen/bedarfsausweis-gewerbe-anfragen?id={ausweis.id}"
>Bearbeiten</a>
{/if}
{/if}
@@ -535,255 +371,45 @@
{#if ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen}
<a
class="button text-sm"
href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?id={ausweis.id}"
>Formular</a>
{:else if ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe}
<a
class="button text-sm"
href="/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/energieausweis-erstellen/verbrauchsausweis-gewerbe?id={ausweis.id}"
>Formular</a>
{:else if ausweisart === Enums.Ausweisart.BedarfsausweisWohnen}
<a
class="button text-sm"
href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweis_id={ausweis.id}&typ={AusstellungsTyp.Speichern}"
href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude?id={ausweis.id}"
>Formular</a>
{/if}
{/if}
{#if benutzer.rolle === Enums.BenutzerRolle.ADMIN}
<button class="button text-sm" title="Ausstellen" on:click={() => ausstellen(false)}>A</button>
<button class="button text-sm" title="Ausstellen mit Postversand" on:click={() => ausstellen(true)}>P</button>
<button class="button text-sm" title="Stornieren" on:click={stornieren}>S</button>
<button class="button text-sm" title="Registriernummer anfordern" on:click={registriernummer}>R</button>
{/if}
</div>
</div>
</div>
<div class="relative bg-base-200 border border-base-300 rounded-lg p-4 mx-2">
<div class="card-body">
<div class="flex flex-row flex-wrap items-center gap-2">
<div class="text-lg font-semibold">{aufnahme.gebaeudetyp}
{#if (aufnahme.einheiten > 0 && aufnahme.einheiten !== null)}
mit {aufnahme.einheiten} Wohneinheiten
{/if}
</div>
<div class="text-sm">
<span class="font-bold">Gebäude (Bj {aufnahme.baujahr_gebaeude})</span> mit
{#if aufnahme.flaeche > 0 && aufnahme.flaeche !== null}
{aufnahme.flaeche} m² Wohnfläche
{/if}
{#if aufnahme.nutzflaeche === 0}
. Die energetische Nutzfläche wurde nach §82 GEG aus der Wohnfläche ermittelt.
{:else}
sowie {aufnahme.nutzflaeche} m² energetische Nutzfläche.
{/if}
Als Ausstellgrund wurde {ausweis.ausstellgrund} angegeben.
{aufnahme.gebaeudeteil === "Wohnen"
? "Die eingegebenen Daten beziehen sich auf den Wohnteil eines gemischt genutzten Gebäudes."
: "Die eingegebenen Daten beziehen sich auf das gesamte Gebäude."}
{aufnahme.saniert ? "Das Gebäude ist in saniertem Zustand." : "Das Gebäude ist in unsaniertem Zustand."}
</div>
{#if ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe}
<div class="text-sm">
<span class="font-bold">Gebäudestrom</span> der Jahre vom
{moment(ausweis.startdatum).format("MM.YYYY")} bis {moment(ausweis.startdatum).add("3", "years").format("MM.YYYY")} beträgt
{ausweis.strom_1} kWh, {ausweis.strom_2} kWh und {ausweis.strom_3} kWh.
Im Stromverbrauch enthalten sind
{ausweis.stromverbrauch_enthealt_heizung ? "Heizung, " : ""}
{ausweis.stromverbrauch_enthaelt_warmwasser ? "Warmwasser, " : ""}
{ausweis.stromverbrauch_enthaelt_lueftung ? "Lüftung, " : ""}
{ausweis.stromverbrauch_enthaelt_beleuchtung ? "Beleuchtung, " : ""}
{ausweis.stromverbrauch_enthaelt_kuehlung ? "Kühlung, " : ""}
{#if ausweis.stromverbrauch_sonstig !== null}
sowie {ausweis.stromverbrauch_enthaelt_sonstige}.
{/if}
</div>
{/if}
<div class="text-sm">
<span class="font-bold">Heizung (Bj {aufnahme.baujahr_heizung})</span> wird mit
{ausweis.brennstoff_1} betrieben. Die Verbräuche vom
{moment(ausweis.startdatum).format("MM.YYYY")} bis {moment(ausweis.startdatum).add("3", "years").format("MM.YYYY")} betragen
{ausweis.verbrauch_1} {ausweis.einheit_1}, {ausweis.verbrauch_2} {ausweis.einheit_1} und {ausweis.verbrauch_3} {ausweis.einheit_1}.
{#if ausweis.zusaetzliche_heizquelle} -
Eine weitere Heizung wird mit {ausweis.brennstoff_2} betrieben mit den Verbräuchen {ausweis.verbrauch_4} {ausweis.einheit_2}, {ausweis.verbrauch_5}
{ausweis.einheit_2} und {ausweis.verbrauch_6} {ausweis.einheit_2}.
{/if}
</div>
<div class="text-sm">
{#if ausweis.anteil_warmwasser_1 !== null && ausweis.anteil_warmwasser_1 > 0}
{#if aufnahme.solarsystem_warmwasser}
Da ein Solarsystem für Warmwasser vorhanden ist,
wurde ein Warmwasseranteil von {ausweis.anteil_warmwasser_1 * 0.6}% berücksichtigt.
{:else}
Es wurde ein Warmwasseranteil von {ausweis.anteil_warmwasser_1}% berücksichtigt.
{/if}
{:else}
{#if aufnahme.solarsystem_warmwasser}
Da ein Solarsystem für Warmwasser vorhanden ist, wurde ein reduzierter Warmwasserzuschlag von 12 kWh/m²a angesetzt.
{:else}
Es wurde ein Warmwasserzuschlag von 20 kWh/m²a angesetzt.
{/if}
{/if}
{#if ausweis.warmwasser_enthalten}
Der Anteil wird vom Gesamtverbrauch abgezogen, um den Heizwärmebedarf zu ermitteln und diesen mit dem
über drei Jahre gemittelten Klimafaktor zu multiplizieren.
{:else}
Der Anteil wird als Zuschlag zum Gesamtverbrauch addiert, und im Ausweis in einer separaten Zeile ausgewiesen.
{/if}
{#if !ausweis.alternative_heizung && !ausweis.alternative_warmwasser && !ausweis.alternative_lueftung && !ausweis.alternative_kuehlung}
Alternative Energieversorgung wird nicht verwendet
{:else}
Alternative Energieversorgung wird verwendet für {ausweis.alternative_heizung ? "Heizung, " : ""}{ausweis.alternative_warmwasser ? "Warmwasser, " : ""}{ausweis.alternative_lueftung ? "Lüftung, " : ""}{ausweis.alternative_kuehlung ? "Kühlung, " : ""}
{/if}.
Der Leerstand beträgt {aufnahme.leerstand}%. Das Gebäude verfügt über eine
{#if aufnahme.lueftung === Enums.Lueftungskonzept.Fensterlueftung}
Fensterlüftung
{:else if aufnahme.lueftung === Enums.Lueftungskonzept.Schachtlueftung}
Schachtlüftung
{:else if aufnahme.lueftung === Enums.Lueftungskonzept.LueftungsanlageMitWaermerueckgewinnung}
Lüftungsanlage mit Wärmerückgewinnung
{:else if aufnahme.lueftung === Enums.Lueftungskonzept.LueftungsanlageOhneWaermerueckgewinnung}
Lüftungsanlage ohne Wärmerückgewinnung
{/if}
{#if ausweis.kuehlung_enthalten && ausweis.kuehlung_entahlten !== null}
und wird thermisch gekühlt.
{:else if aufnahme.kuehlung === "1" && aufnahme.kuhlung !== null}
und wird gekühlt.
{:else}
und wird nicht gekühlt.
{/if}
</div>
<div class="text-sm">
<span class="font-bold">Heizung: </span>
{aufnahme.zentralheizung ? "Zentral/Etagenheizung, " : ""}
{aufnahme.einzelofen ? "Einzelofen, " : ""}
{aufnahme.waermepumpe ? "Wärmepumpe, " : ""}
{aufnahme.niedertemperatur_kessel ? "Niedertemperaturkessel, " : ""}
{aufnahme.standard_kessel ? "Standardkessel, " : ""}
{aufnahme.durchlauf_erhitzer ? "Durchlauferhitzer, " : ""}
{aufnahme.solarsystem_warmwasser ? "Solarsystem für Warmwasser, " : ""}
{aufnahme.brennwert_kessel ? "Brennwertkessel, " : ""}
{aufnahme.standard_kessel ? "Standardkessel, " : ""}
{aufnahme.warmwasser_rohre_gedaemmt ? "Warmwasserrohre gedämmt, " : ""}
{aufnahme.heizungsrohre_gedaemmt ? "Heizungsrohre gedämmt, " : ""}
{aufnahme.photovoltaik ? "Photovoltaik, " : ""}
{aufnahme.raum_temperatur_regler ? "Raumtemperaturregler, " : ""}
{aufnahme.zirkulation ? "Zirkulation, " : ""}
</div>
<div class="text-sm">
<span class="font-bold">Fenster: </span>
{aufnahme.isolier_verglasung ? "Fenster Isolierglas, " : ""}
{aufnahme.dreifach_verglasung ? "Dreifachverglasung, " : ""}
{aufnahme.doppel_verglasung ? "Doppelverglasung, " : ""}
{aufnahme.einfach_verglasung ? "Einfachverglasung, " : ""}
{aufnahme.fenster_dicht ? "Fenster dicht, " : ""}
{aufnahme.fenster_teilweise_undicht ? "Fenster teilweise undicht, " : ""}
{aufnahme.tueren_undicht ? "Türen undicht, " : ""}
{aufnahme.tueren_dicht ? "Türen dicht, " : ""}
{aufnahme.rolllaeden_kaesten_gedaemmt ? "Rollladenkästen gedämmt" : ""}
</div>
<div class="text-sm">
<span class="font-bold">Dämmung: </span>
{aufnahme.dachgeschoss_gedaemmt ? "Dachgeschoss gedämmt, " : ""}
{aufnahme.aussenwand_gedaemmt ? "Außenwand gedämmt, " : ""}
{aufnahme.keller_decke_gedaemmt ? "Kellerdecke gedämmt, " : ""}
{aufnahme.keller_wand_gedaemmt ? "Kellerwand gedämmt, " : ""}
{aufnahme.oberste_geschossdecke_gedaemmt ? "oberste Geschossdecke gedämmt, " : ""}
{aufnahme.oberste_geschossdecke_min_12cm_gedaemmt ? "oberste Geschossdecke min. 12cm gedämmt, " : ""}
{aufnahme.dachgeschoss_min_12cm_gedaemmt ? "Dachgeschoss min. 12cm gedämmt, " : ""}
{aufnahme.aussenwand_min_12cm_gedaemmt ? "Außenwand min. 12cm gedämmt" : ""}
</div>
<div class="text-xs space-y-1 p-2">
<span class="font-semibold">Hiermit bestätige ich {benutzer.vorname} {benutzer.name} als Besteller:</span><br>
{#if ausweis.pruefpunkt_heizungsalter}
<div>Das Heizungsalter ist jünger als 3 Jahre. Es betrifft einen Heizungstausch ohne energetische Verbesserung.</div>
{/if}
{#if ausweis.pruefpunkt_verbrauch_niedrig}
<div>Ich habe die Verbrauchsangaben kontrolliert. Der niedrige Energiekennwert ist korrekt.</div>
{/if}
{#if ausweis.pruefpunkt_verbrauch_hoch}
<div>Ich habe die Verbrauchsangaben kontrolliert. Der hohe Energiekennwert ist korrekt.</div>
{/if}
{#if ausweis.pruefpunkt_verbrauch_null}
<div>Die eingegebenen Heizverbräuche sind korrekt und alle 3 Felder wurden vollständig eingegeben.</div>
{/if}
{#if ausweis.pruefpunkt_verbrauch_abweichung}
<div>Die eingegebenen Heizverbräuche sind korrekt und die Abweichung lässt sich begründen.</div>
{/if}
{#if ausweis.pruefpunkt_wohnflaeche_einheiten}
<div>Die Angabe der Wohnfläche ist korrekt und bezieht sich auf das gesamte Gebäude.</div>
{/if}
{#if ausweis.pruefpunkt_strom_null}
<div>Die eingegebenen Stromverbräuche sind korrekt. Alle 3 Felder wurden vollständig eingegeben.</div>
{/if}
{#if ausweis.pruefpunkt_strom_abweichung}
<div>Die eingegebenen Stromverbräuche sind korrekt und die Abweichung lässt sich begründen.</div>
{/if}
{#if ausweis.pruefpunkt_heizungsanlage}
<div>Das Baujahr der Heizungsanlage ist kleiner als das Baujahr des Gebäudes und begründet.</div>
{/if}
{#if ausweis.pruefpunkt_anteil_warmwasser}
<div>Ich habe den Warmwasseranteil nochmal überprüft. Dieser ist korrekt und begründet.</div>
{/if}
{#if ausweis.pruefpunkt_wohnflaeche}
<div>Ich habe die Wohnfläche nochmal überprüft und bestätige die Richtigkeit. Es handelt sich lediglich um die Wohnfläche innerhalb des Gebäudes.</div>
{/if}
<div>Ich habe die AGB und DSGVO im <a href="/impressum#agb" target="_blank" rel="noopener noreferrer">Impressum</a> gelesen und akzeptiert. Ich bestätige die Richtigkeit der Eingabe.</div>
</div>
</div>
</div>
</div>
<div class="relative bg-base-200 border border-base-300 rounded-lg p-4 mx-2">
<div class="card-body">
<div class="flex flex-col flex-wrap items-left gap-2">
<h3 class="font-semibold text-lg">Bilder</h3>
<div class="grid grid-cols-[1fr] md:grid-cols-[1fr,1fr,1fr] lg:grid-cols-[1fr,1fr,1fr] justify-start items-center gap-2">
{#each aufnahme.bilder as bild, i (i)}
<img src="/bilder/{bild.id}.jpg" alt={bild.kategorie} loading="lazy" class="max-h-[10vh] h-full w-full object-contain">
{/each}
</div>
<hr>
<h3 class="font-semibold text-lg">Unterlagen</h3>
<div class="text-sm">
{#if aufnahme.unterlagen.length > 0}
{#each aufnahme.unterlagen as unterlage}
<a href="/unterlagen/{unterlage.id}.{mime.getExtension(unterlage.mime)}" target="_blank" class="text-black flex flex-row items-center gap-2 bg-base-200 p-2 rounded-lg"><FileText size={32}></FileText> {unterlage.name}</a>
{/each}
{/if}
</div>
</div>
<div class="dropdown dropdown-top items-end absolute bottom-4 right-4 z-50">
<div class="indicator">
{#if Object.keys($notifications).length > 0}
<span class="indicator-item badge badge-accent text-xs"
>{Object.keys($notifications).length}</span
>
{/if}
<button
tabindex="0"
class="hover:bg-gray-200 p-3 rounded-lg"
>
<Bell size={24} />
</button>
</div>
<ul
class="dropdown-content mb-2 border border-base-300 z-10 menu py-4 px-0 bg-base-200 rounded-box w-80"
<a
class="p-2 rounded-lg hover:bg-gray-200"
title="PDF Herunterladen"
target="_blank"
href="/pdf/ansichtsausweis?id={ausweis.id}"
>
<NotificationProvider component={DashboardNotification} />
</ul>
<img src="/images/ausweis.webp" width="32" alt="Energieausweis">
</a>
<a
class="p-2 rounded-lg hover:bg-gray-200"
title="PDF Herunterladen"
target="_blank"
href="/pdf/datenblatt?id={ausweis.id}"
>
<img src="/images/datenblatt.webp" width="32" alt="Datenblatt">
</a>
</div>
</div>
</div>
@@ -824,10 +450,3 @@
</div>
</div>
</dialog>
<style lang="postcss">
*{@apply font-sans
}
</style>

View File

@@ -1,23 +1,22 @@
<script lang="ts">
import {
Reader,
Bell,
Gear,
LockClosed,
CaretDown,
MagnifyingGlass,
} from "radix-svelte-icons";
import { Benutzer } from "#lib/server/prisma.js";
import NotificationProvider from "#components/NotificationProvider/NotificationProvider.svelte";
import DashboardNotification from "./DashboardNotification.svelte";
import { notifications } from "#components/NotificationProvider/shared.js";
import ThemeController from "#components/ThemeController.svelte";
import {
BenutzerClient,
ObjektKomplettClient,
} from "#components/Ausweis/types.js";
export let lightTheme: boolean;
export let benutzer: Benutzer;
export let besteller: Benutzer | null;
let id: string;
let dropdownOpen = false;
function toggleDropdown() {
dropdownOpen = !dropdownOpen;
}
export let benutzer: BenutzerClient;
</script>
<aside class="rounded-lg bg-white box px-6 py-5">
@@ -42,163 +41,38 @@
</div>
</div>
<div class="flex flex-col gap-2 mt-0 md:mt-8 px-0">
<!-- <a class="button-tab" href="/dashboard">
<a class="button-tab" href="/dashboard">
<Reader width={22} height={22} />
Ausweise
</a> -->
<div class="flex flex-row gap-2 mb-2">
<input type="text" bind:value={id} placeholder="ID">
<button class="button" on:click={() => {
window.location.href = `/dashboard/objekte/${id}`
}}><MagnifyingGlass size={24}></MagnifyingGlass></button>
</div>
<div class="relative mb-4">
<button class="button flex flex-row rounded-lg gap-2 bg-secondary text-white text-center" on:click={toggleDropdown}>
Energieausweis erstellen +
</button>
{#if dropdownOpen}
<div class="absolute top-15 left-0 mt-2 w-50 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 z-[9999]" on:click|stopPropagation on:keydown|stopPropagation on:keyup|stopPropagation>
<div class="py-1 w-full" role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
<a href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis<br>Wohnen Erstellen</a>
<a href="/energieausweis-erstellen/verbrauchsausweis-gewerbe" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis<br>Gewerbe Erstellen</a>
<a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Bedarfsausweis<br>Wohnen Erstellen</a>
</div>
</div>
{/if}
<!-- <a href="/dashboard/abrechnung" class="button ">Monatliche Abrechnung</a> -->
</div>
Vorgänge
</a>
<a class="button-tab" href="/dashboard">
<Reader width={22} height={22} />
Inbox
</a>
<hr class="border-gray-600" />
{#if besteller}
Besteller
<div class="flex flex-row mb-4">
<div class="item-center mr-4">
<img src="../../images/profile-placeholder.svg" alt="profile icon" width="40" height="40" />
</div>
<div>
<div>
{besteller.vorname} {besteller.name}
</div>
<div class="text-xs text-gray-500">
Eigentümer oder im Auftrag
</div>
<div class="text-xs text-gray-500">
<!-- Soll für den Aussteller sichtbar sein -->
Tel. 1: {besteller.telefon}<br>
<!-- Tel. 2: {rechnung.telefon} -->
</div>
</div>
</div>
<hr class="border-gray-600" />
{/if}
<!--
Mitwirkende
<div class="flex flex-row mb-1">
<div class="item-center mr-4">
<img src="../../images/profile-placeholder.svg" alt="profile icon" width="40" height="40" />
</div>
<div>
<div>
Ernie Energieberater
</div>
<div class="text-xs text-gray-500">
Energieberater
</div>
</div>
</div>
<div class="flex flex-row mb-1">
<div class="item-center mr-4">
<img src="../../images/profile-placeholder.svg" alt="profile icon" width="40" height="40" />
</div>
<div>
<div>
Peter Planer
</div>
<div class="text-xs text-gray-500">
Architekt
</div>
</div>
</div>
<div class="flex flex-row mb-1">
<div class="item-center mr-4">
<img src="../../images/profile-placeholder.svg" alt="profile icon" width="40" height="40" />
</div>
<div>
<div>
Hans Meier
</div>
<div class="text-xs text-gray-500">
Eigentümer
</div>
</div>
</div>
<hr class="border-gray-600" />
Experten in der Nähe
<div class="flex flex-row mb-1">
<div class="item-center mr-4">
<img src="../../images/profile-placeholder.svg" alt="profile icon" width="40" height="40" />
</div>
<div>
<div>
Thorsten Maas
</div>
<div class="text-xs text-gray-500">
Energieberater
</div>
</div>
</div>
<div class="flex flex-row mb-1">
<div class="item-center mr-4">
<img src="../../images/profile-placeholder.svg" alt="profile icon" width="40" height="40" />
</div>
<div>
<div>
Herbert Holm
</div>
<div class="text-xs text-gray-500">
Gutachter
</div>
</div>
</div>
<hr class="border-gray-600" />
<div class="flex justify-end mt-2 mb-2">
<button class="button flex flex-row rounded-lg gap-2 bg-secondary text-white text-center">
Einladen
</button>
</div>
-->
{#if benutzer.rolle === "ADMIN"}
<li>
<details class="[&_.caret]:open:rotate-180" open>
<summary
class="button-tab w-full outline-0 hover:outline-0 cursor-pointer"
>
<LockClosed size={22}/>
<LockClosed width={22} height={22} />
Admin <CaretDown
size={24}
class="caret ml-auto transition-transform"
></CaretDown></summary
>
<ul>
<li>
<a
class="button-tab"
href="/dashboard/admin/ausweise-pruefen"
>
Ausweise Prüfen
</a>
</li>
<li>
<a
class="button-tab"
@@ -212,8 +86,30 @@
</li>
{/if}
</div>
<div class="items-end bottom-4 right-4 z-50 mt-4">
<div class="flex flex-row justify-end items-end">
<div class="mt-10 flex flex-col gap-4 px-8">
<div class="flex flex-row justify-between items-center">
<ThemeController bind:lightTheme></ThemeController>
<div class="dropdown dropdown-top">
<div class="indicator">
{#if Object.keys($notifications).length > 0}
<span class="indicator-item badge badge-accent text-xs"
>{Object.keys($notifications).length}</span
>
{/if}
<button
tabindex="0"
class="hover:bg-gray-200 p-3 rounded-lg"
>
<Bell size={24} />
</button>
</div>
<ul
class="dropdown-content mb-2 border border-base-300 z-10 menu py-4 px-0 bg-base-200 rounded-box w-80"
>
<NotificationProvider component={DashboardNotification} />
</ul>
</div>
<a
href="/dashboard/einstellungen"
class="hover:bg-gray-200 p-3 rounded-lg"
@@ -222,6 +118,12 @@
</a>
</div>
</div>
<div class="divider px-8"></div>
<a
href="/dashboard/einstellungen"
class="hover:bg-gray-200 no-animation focus:shadow-none justify-start py-4 h-auto px-8 rounded-none w-full flex flex-row gap-4"
>
</a>
</aside>
<style>

View File

@@ -2,7 +2,6 @@
export let hidden: boolean = true;
export let closeable: boolean = true;
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
import { Cross1 } from 'radix-svelte-icons';
$: if (globalThis.window) {
if (hidden) {
@@ -13,11 +12,13 @@
}
</script>
<div class="fixed top-0 left-0 w-[100vw] h-[100vh] flex items-center justify-center bg-[rgba(0,0,0,0.8)] z-50" class:hidden={hidden}>
<div class="fixed top-0 left-0 w-[100vw] h-[100vh] flex items-center justify-center bg-[rgba(0,0,0,0.8)] z-50" class:hidden={hidden} on:click|self={() => {
hidden = closeable ? true : hidden;
}}>
{#if closeable}
<button class="absolute top-4 right-4 text-white bg-gray-50 bg-opacity-25 px-4 py-2 rounded-lg" type="button" on:click={() => {
<button class="absolute top-4 left-4 text-white" on:click={() => {
hidden = true;
}}><Cross1 size={20}></Cross1></button>
}}>Schließen</button>
{/if}
<slot></slot>
</div>

View File

@@ -1,179 +1,90 @@
<script>
import { PRICES } from "#lib/constants";
import { PRICES } from "#lib/constants";
export let bullets;
export let title;
export let ref = "";
import { Enums } from "#lib/client/prisma";
export let ref = "";
const bullets = [
[
"Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",
true,
true,
true,
],
[
"Originalausweis als&nbsp;PDF per&nbsp;<span class='text-nowrap'>E-Mail</span><br>Originalausweis per&nbsp;Post (zubuchbar)",
true,
true,
true,
],
[
"Bearbeitung innerhalb 24&nbsp;Stunden<br>Selbsteingabe",
true,
true,
false,
],
["Same&nbsp;day&nbsp;service (zubuchbar)", true, true, false],
["Fotoupload", true, true, true],
[
"automatische Vorprüfung<br>Live&nbsp;Vorschau direkt bei&nbsp;Eingabe<br>Live&nbsp;Vorschauausweis vorab<br>Vorschauausweis per&nbsp;E-Mail<br>dynamische&nbsp;Eingabehilfe",
true,
true,
false,
],
[
"Prüfanmerkungen per&nbsp;<span class='text-nowrap'>E-Mail</span>",
true,
true,
false,
],
["persönlicher&nbsp;Support", false, true, true],
[
"telefonische&nbsp;Beratung<br>persönlicher&nbsp;Energieberater",
false,
true,
true,
],
["Dokumentenupload (Pläne, Bauunterlagen)", false, false, true],
["Eingabe durch Dipl.&nbsp;Ing.", false, false, true],
];
</script>
bullets = [
["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true],
["Originalausweis als&nbsp;PDF per&nbsp;<span class='text-nowrap'>E-Mail</span><br>Originalausweis per&nbsp;Post (zubuchbar)",true, true, true],
["Bearbeitung innerhalb 24&nbsp;Stunden<br>Selbsteingabe",true, true, false],
["Same&nbsp;day&nbsp;service (zubuchbar)",true, true, false],
["Fotoupload",true, true, true],
["automatische Vorprüfung<br>Live&nbsp;Vorschau direkt bei&nbsp;Eingabe<br>Live&nbsp;Vorschauausweis vorab<br>Vorschauausweis per&nbsp;E-Mail<br>dynamische&nbsp;Eingabehilfe",true, true, false],
["Prüfanmerkungen per&nbsp;<span class='text-nowrap'>E-Mail</span>",true, true, false],
["persönlicher&nbsp;Support",false, true, true],
["telefonische&nbsp;Beratung<br>persönlicher&nbsp;Energieberater",false, true, true],
["Dokumentenupload (Pläne, Bauunterlagen)",false, false, true],
["Eingabe durch Dipl.&nbsp;Ing.",false, false, true],]
<h1>
Produktübersicht: <span class="text-secondary"
>Bedarfsausweis Wohngebäude</span
>
</h1>
<h3>Bedarfsausweis Leistungen und Preise in der Übersicht:</h3>
<hr />
<br />
</script>
<div id="ProduktUebersichtBedarfssausweisWohnen">
<div
class="w-full sm:w-[90%] sm:mx-auto grid grid-cols-[1fr_max-content_max-content_max-content] sm:grid-cols-[1fr_min-content_min-content_min-content]"
>
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center sm:text-[1.25rem]"
>
<div class="justify-self-start pl-2"><b>Leistung</b></div>
<div><b>online</b></div>
<div><b>premium</b></div>
<div><b>offline</b></div>
</div>
<h1>Produktübersicht: <span class="text-secondary">Bedarfsausweis Wohngebäude</span></h1>
<h3>Bedarfsausweis Leistungen und Preise in der Übersicht:</h3>
{#each bullets as [bullet, online, premium, offline]}
<div
class="bullet grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center"
>
<div class="justify-self-start pl-2">{@html bullet}</div>
<div class:check={online} class:check-no={!online}>
{online ? "✔" : ""}
</div>
<div class:check={premium} class:check-no={!premium}>
{premium ? "✔" : ""}
</div>
<div class:check={offline} class:check-no={!offline}>
{offline ? "✔" : ""}
</div>
</div>
{/each}
<hr>
<br>
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center sm:text-[1.25rem]"
>
<div class="price justify-self-start pl-2">Preis inkl. MwSt.</div>
<div class="price">
<b
>{PRICES.BedarfsausweisWohnen[
Enums.AusweisTyp.Standard
]}&nbsp;</b
>
</div>
<div class="price">
<b
>{PRICES.BedarfsausweisWohnen[
Enums.AusweisTyp.Beratung
]}&nbsp;</b
>
</div>
<div class="price">
<b
>{PRICES.BedarfsausweisWohnen[
Enums.AusweisTyp.Offline
]}&nbsp;</b
>
</div>
</div>
<div id="ProduktUebersichtBedarfssausweisWohnen">
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center"
>
<div class="justify-self-start pl-2"></div>
<a
href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweistyp={Enums
.AusweisTyp.Standard}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
<a
href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweistyp={Enums
.AusweisTyp.Beratung}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
<a
href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweistyp={Enums
.AusweisTyp.Offline}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
</div>
</div>
</div>
<div class="w-full sm:w-[90%] sm:mx-auto grid grid-cols-[1fr_max-content_max-content_max-content] sm:grid-cols-[1fr_min-content_min-content_min-content]">
<style lang="postcss">
.bestellbutton {
@apply px-[2px] sm:px-4 mx-[2px] sm:mx-2 py-2 bg-secondary ring-2 ring-secondary/25 rounded-none xs:rounded-md text-white text-nowrap font-bold
hover:bg-gradient-to-br from-secondary to-secondary-grad hover:shadow-lg transition-all hover:no-underline hover:ring-2 hover:ring-primary;
}
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center sm:text-[1.25rem]">
<div class="justify-self-start pl-2"><b>Leistung</b></div><div><b>online</b></div><div><b>premium</b></div><div><b>offline</b></div>
</div>
.zeile {
@apply text-[0.6rem] sm:text-[1rem] md:text-[1.5rem];
}
.bullet {
@apply text-[0.75rem] sm:text-[1rem] md:text-[1.25rem];
}
.bullet:nth-child(even) {
@apply bg-blue-100/40;
}
.bullet:nth-child(2) {
@apply !border-t-[6px];
}
.bullet:nth-child(12) {
@apply !border-b-[6px];
}
{#each bullets as [bullet,online,premium,offline]}
<div class="bullet grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center">
<div class="justify-self-start pl-2">{@html bullet}</div>
<div class:check={online} class:check-no={!online}>{online ? "✔" : ""}</div>
<div class:check={premium} class:check-no={!premium}>{premium ? "✔" : ""}</div>
<div class:check={offline} class:check-no={!offline}>{offline ? "✔" : ""}</div>
</div>
{/each}
.check {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-green-700;
}
.check-no {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-black;
}
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center sm:text-[1.25rem]">
<div class="price justify-self-start pl-2">Preis inkl. MwSt.</div>
<div class="price"><b>{PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Standard]}&nbsp;</b></div>
<div class="price"><b>{PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Beratung]}&nbsp;</b></div>
<div class="price"><b>{PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Offline]}&nbsp;</b></div>
</div>
.price {
@apply text-[1.25rem] sm:text-[2rem];
}
</style>
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center">
<div class="justify-self-start pl-2"></div>
<a href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweistyp={Enums.AusweisTyp.Standard}"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<a href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweistyp={Enums.AusweisTyp.Beratung}"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<a href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude?ausweistyp={Enums.AusweisTyp.Offline}"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
</div>
</div>
</div>
<style lang="postcss">
.bestellbutton{@apply px-[2px] sm:px-4 mx-[2px] sm:mx-2 py-2 bg-secondary ring-2 ring-secondary/25 rounded-none xs:rounded-md text-white text-nowrap font-bold
hover:bg-gradient-to-br from-secondary to-secondary-grad hover:shadow-lg transition-all hover:no-underline hover:ring-2 hover:ring-primary;}
.zeile{@apply text-[0.6rem] sm:text-[1rem] md:text-[1.5rem]}
.bullet{@apply text-[0.75rem] sm:text-[1rem] md:text-[1.25rem]}
.bullet:nth-child(even){@apply bg-blue-100/40}
.bullet:nth-child(2){@apply !border-t-[6px]}
.bullet:nth-child(12){@apply !border-b-[6px]}
.check {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-green-700;
}
.check-no {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-black;
}
.price{@apply text-[1.25rem] sm:text-[2rem]}
</style>

View File

@@ -1,179 +1,89 @@
<script>
import { PRICES } from "#lib/constants";
import { Enums } from "#lib/client/prisma";
export let ref = "";
import { PRICES } from "#lib/constants";
import { Enums } from "#lib/client/prisma";
export let ref = "";
const bullets = [
[
"Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",
true,
true,
true,
],
[
"Originalausweis als&nbsp;PDF per&nbsp;<span class='text-nowrap'>E-Mail</span><br>Originalausweis per&nbsp;Post (zubuchbar)",
true,
true,
true,
],
[
"Bearbeitung innerhalb 24&nbsp;Stunden<br>Selbsteingabe",
true,
true,
false,
],
["Same&nbsp;day&nbsp;service (zubuchbar)", true, true, false],
["Fotoupload", true, true, true],
[
"automatische Vorprüfung<br>Live&nbsp;Vorschau direkt bei&nbsp;Eingabe<br>Live&nbsp;Vorschauausweis vorab<br>Vorschauausweis per&nbsp;E-Mail<br>dynamische&nbsp;Eingabehilfe",
true,
true,
false,
],
[
"Prüfanmerkungen per&nbsp;<span class='text-nowrap'>E-Mail</span>",
true,
true,
false,
],
["persönlicher&nbsp;Support", false, true, true],
[
"telefonische&nbsp;Beratung<br>persönlicher&nbsp;Energieberater",
false,
true,
true,
],
["Dokumentenupload (Verbrauchsabrechnungen)", false, false, true],
["Eingabe durch Dipl.&nbsp;Ing.", false, false, true],
];
</script>
const bullets = [
["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true],
["Originalausweis als&nbsp;PDF per&nbsp;<span class='text-nowrap'>E-Mail</span><br>Originalausweis per&nbsp;Post (zubuchbar)",true, true, true],
["Bearbeitung innerhalb 24&nbsp;Stunden<br>Selbsteingabe",true, true, false],
["Same&nbsp;day&nbsp;service (zubuchbar)",true, true, false],
["Fotoupload",true, true, true],
["automatische Vorprüfung<br>Live&nbsp;Vorschau direkt bei&nbsp;Eingabe<br>Live&nbsp;Vorschauausweis vorab<br>Vorschauausweis per&nbsp;E-Mail<br>dynamische&nbsp;Eingabehilfe",true, true, false],
["Prüfanmerkungen per&nbsp;<span class='text-nowrap'>E-Mail</span>",true, true, false],
["persönlicher&nbsp;Support",false, true, true],
["telefonische&nbsp;Beratung<br>persönlicher&nbsp;Energieberater",false, true, true],
["Dokumentenupload (Verbrauchsabrechnungen)",false, false, true],
["Eingabe durch Dipl.&nbsp;Ing.",false, false, true],
]
<h1>
Produktübersicht: <span class="text-secondary"
>Verbrauchsausweis Gewerbegebäude</span
>
</h1>
<h3>Verbrauchsausweis Leistungen und Preise in der Übersicht:</h3>
<hr />
<br />
</script>
<div id="ProduktUebersichtVerbrauchsausweisGewerbe">
<div
class="w-full sm:w-[90%] sm:mx-auto grid grid-cols-[1fr_max-content_max-content_max-content] sm:grid-cols-[1fr_min-content_min-content_min-content]"
>
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center sm:text-[1.25rem]"
>
<div class="justify-self-start pl-2"><b>Leistung</b></div>
<div><b>online</b></div>
<div><b>premium</b></div>
<div><b>offline</b></div>
</div>
<h1>Produktübersicht: <span class="text-secondary">Verbrauchsausweis Gewerbegebäude</span></h1>
<h3>Verbrauchsausweis Leistungen und Preise in der Übersicht:</h3>
{#each bullets as [bullet, online, premium, offline]}
<div
class="bullet grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center"
>
<div class="justify-self-start pl-2">{@html bullet}</div>
<div class:check={online} class:check-no={!online}>
{online ? "✔" : ""}
</div>
<div class:check={premium} class:check-no={!premium}>
{premium ? "✔" : ""}
</div>
<div class:check={offline} class:check-no={!offline}>
{offline ? "✔" : ""}
</div>
</div>
{/each}
<hr>
<br>
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center sm:text-[1.25rem]"
>
<div class="price justify-self-start pl-2">Preis inkl. MwSt.</div>
<div class="price">
<b
>{PRICES.VerbrauchsausweisGewerbe[
Enums.AusweisTyp.Standard
]}&nbsp;</b
>
</div>
<div class="price">
<b
>{PRICES.VerbrauchsausweisGewerbe[
Enums.AusweisTyp.Beratung
]}&nbsp;</b
>
</div>
<div class="price">
<b
>{PRICES.VerbrauchsausweisGewerbe[
Enums.AusweisTyp.Offline
]}&nbsp;</b
>
</div>
</div>
<div id="ProduktUebersichtVerbrauchsausweisGewerbe">
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center"
>
<div class="justify-self-start pl-2"></div>
<a
href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweistyp={Enums
.AusweisTyp.Standard}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
<a
href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweistyp={Enums
.AusweisTyp.Beratung}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
<a
href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweistyp={Enums
.AusweisTyp.Offline}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
</div>
</div>
</div>
<div class="w-full sm:w-[90%] sm:mx-auto grid grid-cols-[1fr_max-content_max-content_max-content] sm:grid-cols-[1fr_min-content_min-content_min-content]">
<style lang="postcss">
.bestellbutton {
@apply px-[2px] sm:px-4 mx-[2px] sm:mx-2 py-2 bg-secondary ring-2 ring-secondary/25 rounded-none xs:rounded-md text-white text-nowrap font-bold
hover:bg-gradient-to-br from-secondary to-secondary-grad hover:shadow-lg transition-all hover:no-underline hover:ring-2 hover:ring-primary;
}
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center sm:text-[1.25rem]">
<div class="justify-self-start pl-2"><b>Leistung</b></div><div><b>online</b></div><div><b>premium</b></div><div><b>offline</b></div>
</div>
.zeile {
@apply text-[0.6rem] sm:text-[1rem] md:text-[1.5rem];
}
.bullet {
@apply text-[0.75rem] sm:text-[1rem] md:text-[1.25rem];
}
.bullet:nth-child(even) {
@apply bg-blue-100/40;
}
.bullet:nth-child(2) {
@apply !border-t-[6px];
}
.bullet:nth-child(12) {
@apply !border-b-[6px];
}
{#each bullets as [bullet,online,premium,offline]}
<div class="bullet grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center">
<div class="justify-self-start pl-2">{@html bullet}</div>
<div class:check={online} class:check-no={!online}>{online ? "✔" : ""}</div>
<div class:check={premium} class:check-no={!premium}>{premium ? "✔" : ""}</div>
<div class:check={offline} class:check-no={!offline}>{offline ? "✔" : ""}</div>
</div>
{/each}
.check {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-green-700;
}
.check-no {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-black;
}
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center sm:text-[1.25rem]">
<div class="price justify-self-start pl-2">Preis inkl. MwSt.</div>
<div class="price"><b>{PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Standard]}&nbsp;</b></div>
<div class="price"><b>{PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Beratung]}&nbsp;</b></div>
<div class="price"><b>{PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Offline]}&nbsp;</b></div>
</div>
.price {
@apply text-[1.25rem] sm:text-[2rem];
}
</style>
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center">
<div class="justify-self-start pl-2"></div>
<a href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweistyp={Enums.AusweisTyp.Standard}"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<a href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweistyp={Enums.AusweisTyp.Beratung}"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<a href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe?ausweistyp={Enums.AusweisTyp.Offline}"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
</div>
</div>
</div>
<style lang="postcss">
.bestellbutton{@apply px-[2px] sm:px-4 mx-[2px] sm:mx-2 py-2 bg-secondary ring-2 ring-secondary/25 rounded-none xs:rounded-md text-white text-nowrap font-bold
hover:bg-gradient-to-br from-secondary to-secondary-grad hover:shadow-lg transition-all hover:no-underline hover:ring-2 hover:ring-primary;}
.zeile{@apply text-[0.6rem] sm:text-[1rem] md:text-[1.5rem]}
.bullet{@apply text-[0.75rem] sm:text-[1rem] md:text-[1.25rem]}
.bullet:nth-child(even){@apply bg-blue-100/40}
.bullet:nth-child(2){@apply !border-t-[6px]}
.bullet:nth-child(12){@apply !border-b-[6px]}
.check {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-green-700;
}
.check-no {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-black;
}
.price{@apply text-[1.25rem] sm:text-[2rem]}
</style>

View File

@@ -1,179 +1,93 @@
<script lang="ts">
import { PRICES } from "#lib/constants.js";
import { Enums } from "#lib/client/prisma.js";
export let ref = "";
export let bullets;
export let title;
export let ref = "";
bullets = [
["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true],
["Originalausweis als&nbsp;PDF per&nbsp;<span class='text-nowrap'>E-Mail</span><br>Originalausweis per&nbsp;Post (zubuchbar)",true, true, true],
["Bearbeitung innerhalb 24&nbsp;Stunden<br>Selbsteingabe",true, true, false],
["Same&nbsp;day&nbsp;service (zubuchbar)",true, true, false],
["Fotoupload",true, true, true],
["automatische Vorprüfung<br>Live&nbsp;Vorschau direkt bei&nbsp;Eingabe<br>Live&nbsp;Vorschauausweis vorab<br>Vorschauausweis per&nbsp;E-Mail<br>dynamische&nbsp;Eingabehilfe",true, true, false],
["Prüfanmerkungen per&nbsp;<span class='text-nowrap'>E-Mail</span>",true, true, false],
["persönlicher&nbsp;Support",false, true, true],
["telefonische&nbsp;Beratung<br>persönlicher&nbsp;Energieberater",false, true, true],
["Dokumentenupload (Verbrauchsabrechnungen)",false, false, true],
["Eingabe durch Dipl.&nbsp;Ing.",false, false, true],
]
const bullets = [
[
"Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",
true,
true,
true,
],
[
"Originalausweis als&nbsp;PDF per&nbsp;<span class='text-nowrap'>E-Mail</span><br>Originalausweis per&nbsp;Post (zubuchbar)",
true,
true,
true,
],
[
"Bearbeitung innerhalb 24&nbsp;Stunden<br>Selbsteingabe",
true,
true,
false,
],
["Same&nbsp;day&nbsp;service (zubuchbar)", true, true, false],
["Fotoupload", true, true, true],
[
"automatische Vorprüfung<br>Live&nbsp;Vorschau direkt bei&nbsp;Eingabe<br>Live&nbsp;Vorschauausweis vorab<br>Vorschauausweis per&nbsp;E-Mail<br>dynamische&nbsp;Eingabehilfe",
true,
true,
false,
],
[
"Prüfanmerkungen per&nbsp;<span class='text-nowrap'>E-Mail</span>",
true,
true,
false,
],
["persönlicher&nbsp;Support", false, true, true],
[
"telefonische&nbsp;Beratung<br>persönlicher&nbsp;Energieberater",
false,
true,
true,
],
["Dokumentenupload (Verbrauchsabrechnungen)", false, false, true],
["Eingabe durch Dipl.&nbsp;Ing.", false, false, true],
];
</script>
<h1>
Produktübersicht: <span class="text-secondary"
>Verbrauchsausweis Wohngebäude</span
>
</h1>
<h1>Produktübersicht: <span class="text-secondary">Verbrauchsausweis Wohngebäude</span></h1>
<h3>Verbrauchsausweis Leistungen und Preise in der Übersicht:</h3>
<hr />
<br />
<hr>
<br>
<div id="ProduktUebersichtVerbrauchsausweisWohnen">
<div
class="w-full sm:w-[90%] sm:mx-auto grid grid-cols-[1fr_max-content_max-content_max-content] sm:grid-cols-[1fr_min-content_min-content_min-content]"
>
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center sm:text-[1.25rem]"
>
<div class="justify-self-start pl-2"><b>Leistung</b></div>
<div><b>online</b></div>
<div><b>premium</b></div>
<div><b>offline</b></div>
</div>
{#each bullets as [bullet, online, premium, offline]}
<div
class="bullet grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center"
>
<div class="justify-self-start pl-2">{@html bullet}</div>
<div class:check={online} class:check-no={!online}>
{online ? "✔" : ""}
</div>
<div class:check={premium} class:check-no={!premium}>
{premium ? "✔" : ""}
</div>
<div class:check={offline} class:check-no={!offline}>
{offline ? "✔" : ""}
</div>
</div>
{/each}
<div class="w-full sm:w-[90%] sm:mx-auto grid grid-cols-[1fr_max-content_max-content_max-content] sm:grid-cols-[1fr_min-content_min-content_min-content]">
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center sm:text-[1.25rem]">
<div class="justify-self-start pl-2"><b>Leistung</b></div><div><b>online</b></div><div><b>premium</b></div><div><b>offline</b></div>
</div>
{#each bullets as [bullet,online,premium,offline]}
<div class="bullet grid grid-cols-subgrid col-span-4 py-4 border-b-[1px] justify-items-center items-center">
<div class="justify-self-start pl-2">{@html bullet}</div>
<div class:check={online} class:check-no={!online}>{online ? "✔" : ""}</div>
<div class:check={premium} class:check-no={!premium}>{premium ? "✔" : ""}</div>
<div class:check={offline} class:check-no={!offline}>{offline ? "✔" : ""}</div>
</div>
{/each}
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center sm:text-[1.25rem]">
<div class="price justify-self-start pl-2">Preis inkl. MwSt.</div>
<div class="price"><b>{PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Standard]}&nbsp;</b></div>
<div class="price"><b>{PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Beratung]}&nbsp;</b></div>
<div class="price"><b>{PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Offline]}&nbsp;</b></div>
</div>
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center">
<div class="justify-self-start pl-2"></div>
<a href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweistyp={Enums.AusweisTyp.Standard}" ><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<a href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweistyp={Enums.AusweisTyp.Beratung}" ><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<a href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweistyp={Enums.AusweisTyp.Offline}" ><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
</div>
</div>
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center sm:text-[1.25rem]"
>
<div class="price justify-self-start pl-2">Preis inkl. MwSt.</div>
<div class="price">
<b
>{PRICES.VerbrauchsausweisWohnen[
Enums.AusweisTyp.Standard
]}&nbsp;</b
>
</div>
<div class="price">
<b
>{PRICES.VerbrauchsausweisWohnen[
Enums.AusweisTyp.Beratung
]}&nbsp;</b
>
</div>
<div class="price">
<b
>{PRICES.VerbrauchsausweisWohnen[
Enums.AusweisTyp.Offline
]}&nbsp;</b
>
</div>
</div>
<div
class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center"
>
<div class="justify-self-start pl-2"></div>
<a
href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweistyp={Enums
.AusweisTyp.Standard}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
<a
href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweistyp={Enums
.AusweisTyp.Beratung}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
<a
href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweistyp={Enums
.AusweisTyp.Offline}"
><button class="bestellbutton" type="button"
>sofort<br />bestellen</button
></a
>
</div>
</div>
</div>
<style lang="postcss">
.bestellbutton {
@apply px-[2px] sm:px-4 mx-[2px] sm:mx-2 py-2 bg-secondary ring-2 ring-secondary/25 rounded-none xs:rounded-md text-white text-nowrap font-bold
hover:bg-gradient-to-br from-secondary to-secondary-grad hover:shadow-lg transition-all hover:no-underline hover:ring-2 hover:ring-primary;
}
.zeile {
@apply text-[0.6rem] sm:text-[1rem] md:text-[1.5rem];
}
.bullet {
@apply text-[0.75rem] sm:text-[1rem] md:text-[1.25rem];
}
.bullet:nth-child(even) {
@apply bg-blue-100/40;
}
.bullet:nth-child(2) {
@apply !border-t-[6px];
}
.bullet:nth-child(12) {
@apply !border-b-[6px];
}
.bestellbutton{@apply px-[2px] sm:px-4 mx-[2px] sm:mx-2 py-2 bg-secondary ring-2 ring-secondary/25 rounded-none xs:rounded-md text-white text-nowrap font-bold
hover:bg-gradient-to-br from-secondary to-secondary-grad hover:shadow-lg transition-all hover:no-underline hover:ring-2 hover:ring-primary;}
.check {
.zeile{@apply text-[0.6rem] sm:text-[1rem] md:text-[1.5rem]}
.bullet{@apply text-[0.75rem] sm:text-[1rem] md:text-[1.25rem]}
.bullet:nth-child(even){@apply bg-blue-100/40}
.bullet:nth-child(2){@apply !border-t-[6px]}
.bullet:nth-child(12){@apply !border-b-[6px]}
.check {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-green-700;
}
.check-no {
@apply text-[1.25rem] sm:text-[1.5rem] font-bold text-black;
}
.price {
@apply text-[1.25rem] sm:text-[2rem];
}
.price{@apply text-[1.25rem] sm:text-[2rem]}
</style>

View File

@@ -1,184 +0,0 @@
---
export interface Props {
tab: number;
}
const { tab } = Astro.props;
const { params } = Astro;
const partner = params.partner;
const pathname = Astro.url.pathname;
const isVA = pathname.includes("verbrauchsausweis-wohngebaeude");
const isVAG = pathname.includes("verbrauchsausweis-gewerbe");
const isBA = pathname.includes("bedarfsausweis-wohngebaeude");
const isBAG = pathname.includes("bedarfsausweis-gewerbe-anfragen");
const isGGW = pathname.includes("geg-nachweis-wohnen-anfragen");
const isGGG = pathname.includes("geg-nachweis-gewerbe-anfragen");
const isWEA = pathname.includes("welcher-ausweis");
const isWelt = pathname.includes("immowelt");
const isNET = pathname.includes("immonet");
---
<header id="header" class="w-full bg-white h-[81px] sm:pl-8">
<div class="grid grid-cols-[min-content_1fr] items-center">
<div class="w-[150px] h-[80px]">
<div
class="w-full h-full grid grid-col-1 justify-items-center items-center"
>
<img
class={isNET
? "w-[149px]"
: isWelt
? "w-[109px]"
: "w-[109px]"}
src={`/images/partner/${partner}/${partner}.svg`}
alt={partner}
/>
</div>
</div>
<div>
<!-- Navigation als Liste (nur ab sm sichtbar) -->
<ul class="navlist hidden xl:flex">
<li><a href={`/${partner}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/`}><button class={tab === 0 ? "glow" : ""}>Verbrauchsausweis</button></a></li>
<li><a href={`/${partner}/energieausweis-erstellen/verbrauchsausweis-gewerbe/`}><button class={tab === 1 ? "glow" : ""}>Verbrauchsausweis Gewerbe</button></a></li>
<li><a href={`/${partner}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/`}><button class={tab === 2 ? "glow" : ""}>Bedarfsausweis</button></a></li>
<li><a href={`/${partner}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/`}><button class={tab === 3 ? "glow" : ""}>Bedarfsausweis Gewerbe</button></a></li>
<li><a href={`/${partner}/angebot-anfragen/geg-nachweis-wohnen-anfragen/`}><button class={tab === 4 ? "glow" : ""}>GEG Nachweis Wohngebäude</button></a></li>
<li><a href={`/${partner}/angebot-anfragen/geg-nachweis-gewerbe-anfragen/`}><button class={tab === 5 ? "glow" : ""}>GEG Nachweis Gewerbe</button></a></li>
<li><a href={`/${partner}/welcher-ausweis/${partner}`}><button class={tab === 6 ? "glow" : ""}>Welcher Ausweis</button></a></li>
</ul>
<!-- Navigation als Dropdown (nur bis sm sichtbar) -->
<select
class="xl:hidden border rounded p-2 w-[calc(100%-2rem)]"
onchange="if (this.value) window.location.href=this.value"
>
<option value="">Auswahl treffen…</option>
<option value={`/${partner}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/`} selected={tab === 0}>Verbrauchsausweis</option>
<option value={`/${partner}/energieausweis-erstellen/verbrauchsausweis-gewerbe/`} selected={tab === 1}>Verbrauchsausweis Gewerbe</option>
<option value={`/${partner}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/`} selected={tab === 2}>Bedarfsausweis</option>
<option value={`/${partner}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/`} selected={tab === 3}>Bedarfsausweis Gewerbe</option>
<option value={`/${partner}/angebot-anfragen/geg-nachweis-wohnen-anfragen/`} selected={tab === 4}>GEG Nachweis Wohngebäude</option>
<option value={`/${partner}/angebot-anfragen/geg-nachweis-gewerbe-anfragen/`} selected={tab === 5}>GEG Nachweis Gewerbe</option>
<option value={`/${partner}/welcher-ausweis/${partner}`} selected={tab === 6}>Welcher Ausweis</option>
</select>
</div>
</div>
</header>
<div
id="titel"
class="block w-full lg:h-[270px] bg-cover !px-8 md:px-32 !py-8 md:py-16"
style={`background-image: url('/images/partner/${partner}/hero-energieausweis.jpg');
background-repeat:no-repeat; background-position:right;`}
>
{
isVA ? (
<div>
Hier komfortabel und einfach online den{" "}
<b>Verbrauchsausweis Wohngebäude</b> bestellen
</div>
) : (
""
)
}
{
isVAG ? (
<div>
Hier komfortabel und einfach online den{" "}
<b>Verbrauchsausweis Gewerbe</b> bestellen
</div>
) : (
""
)
}
{
isBA ? (
<div>
Hier komfortabel und einfach online den{" "}
<b>Bedarfsausweis Wohngebäude</b> bestellen
</div>
) : (
""
)
}
{
isBAG ? (
<div>
Hier komfortabel und einfach online den{" "}
<b>Bedarfsausweis Gewerbe</b> anfragen
</div>
) : (
""
)
}
{
isGGW ? (
<div>
Hier komfortabel und einfach online den{" "}
<b>GEG Nachweis Wohngebäude</b> anfragen
</div>
) : (
""
)
}
{
isGGG ? (
<div>
Hier komfortabel und einfach online den{" "}
<b>GEG Nachweis Gewerbe</b> anfragen
</div>
) : (
""
)
}
{
isWEA ? (
<div>
Hier komfortabel und einfach online den richtigen Ausweis finden
</div>
) : (
""
)
}
</div>
<style lang="postcss">
@font-face {
font-family: "immo Sans";
src: url('/fonts/Immo-Sans/immoSans-Regular.eot');
src: url('/fonts/Immo-Sans/immoSans-Regular.eot?#iefix') format('embedded-opentype'),
url('/fonts/Immo-Sans/immoSans-Regular.woff2') format('woff2'),
url('/fonts/Immo-Sans/immoSans-Regular.woff') format('woff');
font-style: normal;
font-weight: 400;
}
#titel{
font-family: "immo Sans";
font-weight:400;
div{@apply w-fit bg-white/75 py-6 px-4 md:px-16 rounded-lg ring-2 ring-black/15 text-[1.45rem];box-shadow:8px 8px 16px rgba(0,0,0,0.5);}
}
.header-button {
@apply px-4 py-2 text-primary-content font-medium text-lg tracking-normal hover:bg-secondary h-full;
}
.navlist {
@apply flex flex-wrap flex-col sm:flex-row pl-[1.75rem] sm:pl-[1.75rem];
}
.navlist li {
@apply pr-0 sm:pr-[6px] pb-1 sm:pb-0;
}
.navlist li button{@apply text-[0.75rem] md:text-[1rem] text-[#646464] sm:p-2 text-left
hover:rounded-[1rem] hover:bg-[rgba(50,50,50,0.1)];
font-family: "immo Sans";
font-weight:400;}
.glow{@apply rounded-[1rem] bg-[rgba(50,50,50,0.1)];}
</style>

View File

@@ -0,0 +1,114 @@
---
import HeaderLogin from "#components/design/header/HeaderLogin.svelte";
const { tabHover1 } = Astro.props;
const { tabHover2 } = Astro.props;
const { tabHover3 } = Astro.props;
const { tabHover4 } = Astro.props;
const { tabHover5 } = Astro.props;
const { tabHover6 } = Astro.props;
const { tabHover7 } = Astro.props;
const { params, url } = Astro;
const partner = params.partner;
const url1 = new URL(Astro.request.url);
const urlPath = url1.pathname;
const isVA = urlPath.includes("verbrauchsausweis-wohngebaeude");
const isVAG = urlPath.includes("verbrauchsausweis-gewerbe");
const isBA = urlPath.includes("bedarfsausweis-wohngebaeude");
const isBAG = urlPath.includes("bedarfsausweis-gewerbe-anfragen");
const isGGW = urlPath.includes("geg-nachweis-wohnen-anfragen");
const isGGG = urlPath.includes("geg-nachweis-gewerbe-anfragen");
const isWEA = urlPath.includes("welcher-ausweis");
const isWelt = urlPath.includes("immowelt");
const isNET = urlPath.includes("immonet");
---
<header id="header" class="w-full bg-white h-[81px] sm:pl-8">
<div class="grid grid-cols-[min-content_1fr] items-center">
<div class="w-[150px] h-[80px]">
<div class="w-full h-full grid grid-col-1 justify-items-center items-center">
<img class={isNET ? "w-[149px]" : isWelt ? "w-[109px]" : "w-[109px]"} src={`/images/partner/${partner}/${partner}.svg`} alt={partner} />
</div>
</div>
<div>
<ul class="navlist">
<li><a href={`/${partner}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/`}><button class={tabHover1}>Verbrauchsausweis</button></a></li>
<li><a href={`/${partner}/energieausweis-erstellen/verbrauchsausweis-gewerbe/`}><button class={tabHover2}>Verbrauchsausweis Gewerbe</button></a></li>
<li><a href={`/${partner}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/`}><button class={tabHover3}>Bedarfsausweis</button></a></li>
<li><a href={`/${partner}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/`}><button class={tabHover4}>Bedarfsausweis Gewerbe</button></a></li>
<li><a href={`/${partner}/angebot-anfragen/geg-nachweis-wohnen-anfragen/`}><button class={tabHover5}>GEG Nachweis Wohngebäude</button></a></li>
<li><a href={`/${partner}/angebot-anfragen/geg-nachweis-gewerbe-anfragen/`}><button class={tabHover6}>GEG Nachweis Gewerbe</button></a></li>
<li><a href={`/${partner}/welcher-ausweis/${partner}`}><button class={tabHover7}>Welcher Ausweis</button></a></li>
</ul>
</div>
</div>
</header>
<div id="titel" class="block w-full 2xl:h-[270px] lg:h-[148px] bg-cover px-24 py-20"
style={`background-image: url('/images/partner/${partner}/hero-energieausweis.jpg');
background-repeat:no-repeat; background-position:right;`}>
{isVA ? <div>Hier komfortabel und einfach online den <b>Verbrauchsausweis Wohngebäude</b> bestellen</div> : ""}
{isVAG ? <div>Hier komfortabel und einfach online den <b>Verbrauchsausweis Gewerbe</b> bestellen</div> : ""}
{isBA ? <div>Hier komfortabel und einfach online den <b>Bedarfsausweis Wohngebäude</b> bestellen</div> : ""}
{isBAG ? <div>Hier komfortabel und einfach online den <b>Bedarfsausweis Gewerbe</b> anfragen</div> : ""}
{isGGW ? <div>Hier komfortabel und einfach online den <b>GEG Nachweis Wohngebäude</b> anfragen</div> : ""}
{isGGG ? <div>Hier komfortabel und einfach online den <b>GEG Nachweis Gewerbe</b> anfragen</div> : ""}
{isWEA ? <div>Hier komfortabel und einfach online den richtigen Ausweis finden</div> : ""}
</div>
<style lang="postcss">
@font-face {
font-family: "immo Sans";
src: url('/fonts/Immo-Sans/immoSans-Regular.eot');
src: url('/fonts/Immo-Sans/immoSans-Regular.eot?#iefix') format('embedded-opentype'),
url('/fonts/Immo-Sans/immoSans-Regular.woff2') format('woff2'),
url('/fonts/Immo-Sans/immoSans-Regular.woff') format('woff');
font-style: normal;
font-weight: 400;
}
#titel{
font-family: "immo Sans";
font-weight:400;
div{@apply w-fit bg-white/75 py-6 px-16 rounded-lg ring-2 ring-black/15 text-[1.45rem];box-shadow:8px 8px 16px rgba(0,0,0,0.5);}
}
.header-button {
@apply px-4 py-2 text-primary-content font-medium text-lg tracking-normal hover:bg-secondary h-full;
}
.navlist {
@apply flex flex-wrap flex-col sm:flex-row pl-[1.75rem] sm:pl-[1.75rem];
}
.navlist li {
@apply pr-0 sm:pr-[6px] pb-1 sm:pb-0;
}
.navlist li button{@apply text-[0.75rem] md:text-[1rem] text-[#646464] sm:p-2 text-left
hover:rounded-[1rem] hover:bg-[rgba(50,50,50,0.1)];
font-family: "immo Sans";
font-weight:400;}
.glow{@apply rounded-[1rem] bg-[rgba(50,50,50,0.1)];}
</style>

View File

@@ -0,0 +1,82 @@
---
import HeaderLogin from "#components/design/header/HeaderLogin.svelte";
---
<header id="header">
<div id="header-grid" class="grid relative bg-white items-center gap-x-4 pt-4 px-0
grid-cols-1
sm:grid-cols-1
md:grid-cols-1
lg:grid-cols-[1fr_minmax(450px,450px)] lg:gap-x-3 lg:px-4 lg:py-4
xl:grid-cols-[1fr_minmax(450px,450px)] xl:gap-x-4 xl:px-6 xl:py-4
2xl:grid-cols-[1fr_minmax(450px,450px)] 2xl:gap-x-5 2xl:px-6 2xl:py-4">
<div class="justify-self-center xs:justify-self-start">
<div class="grid grid-cols-1 px-2 gap-2 gap-y-1
xs:grid-cols-[max-content,1fr] xs:gap-x-2 xs:px-4
md:gap-y-4
lg:px-0 lg:gap-x-4">
<div class="self-start justify-self-start">
<a href="/">
<img id="header-logo" class="w-full
xs:max-w-[64px]
sm:max-w-[64px]
md:max-w-[64px] md:ml-6
lg:max-w-[64px] lg:ml-0
xl:max-w-[94px] xl:ml-0
"
src="/images/header/logo-IBC-big.svg" alt="IBCornelsen-Logo"/>
</a>
</div>
<div class="self-center justify-self-center md:justify-self-start xs:mt-[20px] md:mt-[18px]">
<div id="header-text-1"class="text-secondary justify-self-center
xs:[font-size:_clamp(15px,5vw,36px)] xs:justify-self-start xs:leading-[36px]
lg:[font-size:_clamp(15px,3vw,26px)]
lg:leading-[2rem]
xl:[font-size:_clamp(15px,3vw,36px)]
xl:leading-[4.5rem] pt-[0px]">
Energieausweis online erstellen</div>
<div id="header-text-2"class="text-primary justify-self-center
xs:[font-size:_clamp(15px,4vw,28px)] xs:justify-self-start xs:leading-[20px]
lg:[font-size:_clamp(15px,3vw,20px)]
lg:leading-[2rem]
xl:[font-size:_clamp(15px,3vw,24px)]
xl:leading-[0.5rem]">
Energieausweise nach aktuellem GEG</div>
</div>
</div>
</div>
<div class="w-full justify-self-center">
<HeaderLogin client:load />
</div>
</div>
</div>
<div class="col-start-1 col-span-3">
<div id="header-line" class="px-2 flex flex-row w-full justify-end items-center bg-primary
lg:h-[12px] xl:h-[12px]"></div>
</div>
</header>
<style>
.header-button {
@apply px-4 py-2 text-primary-content font-medium text-lg tracking-normal hover:bg-secondary h-full;
}
</style>

View File

@@ -1,22 +1,19 @@
---
import NavigationCard from "#components/design/sidebars/cards/NavigationCard.svelte";
import CardPriceInfo from "#components/design/sidebars/cards/CardPriceInfo.svelte";
import CardPriceiInfo from "#components/design/sidebars/cards/cardPriceiInfo.svelte";
import CardProduktSidebar from "#components/design/sidebars/cards/CardProduktSidebar.svelte";
import { PRICES } from "#lib/constants";
import { Enums } from "#lib/client/prisma";
---
<div class="">
<NavigationCard client:load />
<CardProduktSidebar
art="Verbrauchsausweis Gewerbe"
price={PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Standard]}
/>
<CardPriceInfo />
<CardProduktSidebar
art="Bedarfsausweis Wohnen"
price={PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Standard]}
/>
<div class="">
<NavigationCard client:load/>
<CardProduktSidebar art="Verbrauchsausweis Gewerbe" price={PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Standard]}></CardProduktSidebar>
<CardPriceiInfo />
<CardProduktSidebar art="Bedarfsausweis Wohnen" price={PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Standard]}></CardProduktSidebar>
</div>

View File

@@ -1,6 +1,6 @@
---
import CardContact from "#components/design/sidebars/cards/ContactCard.svelte";
import CardPriceInfo from "#components/design/sidebars/cards/CardPriceInfo.svelte";
import CardPriceiInfo from "#components/design/sidebars/cards/cardPriceiInfo.svelte";
import CardProduktSidebar from "#components/design/sidebars/cards/CardProduktSidebar.svelte";
import { PRICES } from "#lib/constants";
@@ -8,15 +8,16 @@ import { Enums } from "#lib/client/prisma";
---
<div class="hidden 2xl:block">
<CardContact />
<CardProduktSidebar
art="Verbrauchsausweis Wohnen"
price={PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Standard]}
/>
<CardPriceInfo />
<CardProduktSidebar
art="Bedarfsausweis Gewerbe"
price={PRICES.BedarfsausweisGewerbe[Enums.AusweisTyp.Standard]}
/>
<CardContact />
<CardProduktSidebar art="Verbrauchsausweis Wohnen" price={PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Standard]}></CardProduktSidebar>
<CardPriceiInfo />
<CardProduktSidebar art="Bedarfsausweis Gewerbe" price={PRICES.BedarfsausweisGewerbe[Enums.AusweisTyp.Standard]}></CardProduktSidebar>
</div>
</div>

View File

@@ -1,66 +0,0 @@
<script>
import { PRICES } from "#lib/constants";
import { Enums } from "#lib/client/prisma";
</script>
<div id="cardPriceinfo" class="box card hidden lg:block">
<h2>Was wird der Energieausweis kosten?</h2>
<div>Verbrauchsausweis Wohngebäude</div>
<div>
ab&nbsp;<span class="price"
>{PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Standard]}€</span
>&nbsp;inkl.&nbsp;MwSt.
</div>
<hr class="trenner" />
<div>Bedarfsausweis Wohngebäude</div>
<div>
ab&nbsp;<span class="price"
>{PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Standard]}€</span
>&nbsp;inkl.&nbsp;MwSt.
</div>
<hr class="trenner" />
<div>Verbrauchsausweis Gewerbe</div>
<div>
ab&nbsp;<span class="price"
>{PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Standard]}€</span
>&nbsp;inkl.&nbsp;MwSt.
</div>
<hr class="trenner" />
<div>Bedarfsausweis Gewerbe</div>
<div>
ab&nbsp;<span class="price"
>{PRICES.BedarfsausweisGewerbe[Enums.AusweisTyp.Standard]}€</span
>&nbsp;inkl.&nbsp;MwSt.
</div>
<hr class="trenner" />
<div>GEG-Nachweis Wohngebäude</div>
<div>
ab&nbsp;<span class="price"
>{PRICES.GEGNachweisWohnen[Enums.AusweisTyp.Standard]}€</span
>&nbsp;inkl.&nbsp;MwSt.
</div>
<hr class="trenner" />
<div>GEG-Nachweis Gewerbe</div>
<div>
ab&nbsp;<span class="price"
>{PRICES.GEGNachweisGewerbe[Enums.AusweisTyp.Standard]}€</span
>&nbsp;inkl.&nbsp;MwSt.
</div>
<hr class="mt-2" />
</div>
<style lang="postcss">
.trenner {
@apply my-2;
}
.price {
@apply font-bold;
}
</style>

View File

@@ -0,0 +1,465 @@
<script lang="ts">
let innerWidth: number;
function dropdown() {
if (innerWidth < 1024) {
const check_element = this.lastChild;
const rotate_list = document.querySelectorAll(".dd-symbol-clone");
const rotate_element = this.childNodes[0].children[0];
var first_check = check_element.classList.contains(
"show-dropdown-content"
);
const nodeList = document.querySelectorAll(".dropdown-content");
if (first_check == true) {
check_element.classList.remove("show-dropdown-content");
rotate_element.classList.toggle("rotate-symbol");
} else {
for (let i = 0; i < nodeList.length; i++) {
const element = nodeList[i];
element.classList.remove("show-dropdown-content");
}
for (let i = 0; i < rotate_list.length; i++) {
const element = rotate_list[i];
element.classList.remove("rotate-symbol");
}
check_element.classList.add("show-dropdown-content");
rotate_element.classList.add("rotate-symbol");
}
}
}
function hover() {
if (innerWidth > 1024) {
const check_element = this.firstChild.lastChild;
check_element.style.visibility = "visible";
}
}
function hoverout() {
if (innerWidth > 1024) {
const check_element = this.firstChild.lastChild;
check_element.style.visibility = "hidden";
}
}
function hamburger() {
const nodeList = document.querySelectorAll(".dropdown-content");
for (let i = 0; i < nodeList.length; i++) {
nodeList[i].classList.remove("show-dropdown-content");
}
var element = document.getElementById("cardNavigation");
element.classList.toggle("hidden");
const spans = this.children;
var first_check = spans[0].classList.contains("hamburger-swing-0");
if (first_check == true) {
for (let i = 0; i < spans.length; i++) {
spans[i].classList.remove("hamburger-swing-" + i);
}
const rotate_list = document.querySelectorAll(".dd-symbol");
for (let i = 0; i < rotate_list.length; i++) {
rotate_list[i].classList.remove("rotate-symbol");
}
} else {
for (let i = 0; i < spans.length; i++) {
spans[i].classList.add("hamburger-swing-" + i);
}
}
}
</script>
<svelte:window bind:innerWidth />
<div
class="hamburger_menu py-1 px-2 bg-secondary
xs:px-4
lg:hidden"
>
<div
id="hamburger"
on:click={hamburger}
on:keydown={hamburger}
class="cursor-pointer"
>
<span></span>
<span></span>
<span></span>
</div>
</div>
<nav
id="cardNavigation"
class="cardNavigation box hidden relative ring-0 md:ring-2 ring-primary/50 rounded-tr-none lg:block mb-0 lg:mb-5"
>
<div class="nav-element bg-secondary/5 py-1 pl-2 text-xs font-bold">
Jetzt bestellen
</div>
<div class="nav-element">
<a class="no-dropdown nav-element-child" href="/welcher-energieausweis/"
>Welcher Energieausweis?</a
>
</div>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class="nav-element dropdown lg:dropdown-right"
on:click={dropdown}
on:keydown={dropdown}
on:mouseover={hover}
on:mouseleave={hoverout}
>
{#if innerWidth > 1023}
<a href={undefined} class="nav-element-child"
>Energieausweis erstellen<span class="dd-symbol-clone"></span
><span class="dd-symbol"></span></a
>
{:else}
<a href={undefined} class="nav-element-child"
>Energieausweis erstellen<span class="dd-symbol-clone"></span
><span class="dd-symbol"></span></a
>
{/if}
<ul class="dropdown-content energieasusweis-erstellen">
{#if innerWidth < 1023}
<li>
<a href="/energieausweis-erstellen"
>Energieausweis erstellen</a
>
</li>
{/if}
<li>
<a
href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/"
>Verbrauchsausweis erstellen</a
>
</li>
<li>
<a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"
>Bedarfsausweis erstellen</a
>
</li>
<li>
<a href="/energieausweis-erstellen/verbrauchsausweis-gewerbe/"
>Verbrauchsausweis Gewerbe erstellen</a
>
</li>
</ul>
</div>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class="nav-element dropdown lg:dropdown-right"
on:click={dropdown}
on:keydown={dropdown}
on:mouseover={hover}
on:mouseleave={hoverout}
>
{#if innerWidth > 1023}
<a href={undefined} class="nav-element-child"
>Angebot anfragen<span class="dd-symbol-clone"></span><span
class="dd-symbol"></span
></a
>
{:else}
<a href={undefined} class="nav-element-child"
>Angebot anfragen<span class="dd-symbol-clone"></span><span
class="dd-symbol"></span
></a
>
{/if}
<ul class="dropdown-content angebot-anfragen">
{#if innerWidth < 1023}
<li>
<a href="/energieausweis-erstellen">Angebot anfragen</a>
</li>
{/if}
<li>
<a
href="/angebot-anfragen/bedarfsausweis-gewerbe-anfragen"
>Bedarfsausweis Gewerbe anfragen</a
>
</li>
<li>
<a href="/angebot-anfragen/geg-nachweis-wohnen-anfragen"
>GEG Nachweis Wohnen anfragen</a
>
</li>
<li>
<a href="/angebot-anfragen/geg-nachweis-gewerbe-anfragen"
>GEG Nachweis Gewerbe anfragen</a
>
</li>
</ul>
</div>
<div class="nav-element">
<a class="no-dropdown nav-element-child" href="/sanierungsfahrplan"
>Sanierungsfahrplan (iSFP)</a
>
</div>
<div class="nav-element bg-secondary/5 py-1 pl-2 text-xs font-bold">
Produkte & Preise
</div>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class="nav-element dropdown lg:dropdown-right"
on:click={dropdown}
on:keydown={dropdown}
on:mouseover={hover}
on:mouseleave={hoverout}
>
<a href="/verbrauchsausweis/" class="nav-element-child"
>Verbrauchsausweis<span class="dd-symbol-clone"></span><span
class="dd-symbol"></span
></a
>
<ul class="dropdown-content verbrauchsausweis">
{#if innerWidth < 1023}
<li><a href="index">Verbrauchsausweis</a></li>
{/if}
<li><a href="/verbrauchsausweis/verbrauchsausweis-wohngebaeude/">Verbrauchsausweis Wohngebäude</a></li>
<li><a href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/">Verbrauchsausweis online erstellen</a></li>
<li><a href="/verbrauchsausweis/haeufige-fragen-zum-verbrauchsausweis/">Häufige Fragen zum Verbrauchsausweis</a></li>
<li>
<a href="/verbrauchsausweis/statistiken-zum-verbrauchsausweis/">Statistiken zum Verbrauchsausweis Wohngebäude</a
>
</li>
<li><a href="/verbrauchsausweis/verbrauchsausweis-gewerbe/">Verbrauchsausweis Gewerbe</a></li>
<li>
<a href="/energieausweis-erstellen/verbrauchsausweis-gewerbe/">Verbrauchsausweis Gewerbe online erstellen</a>
</li>
<li>
<a href="/verbrauchsausweis/haeufige-fragen-zum-verbrauchsausweis-gewerbe/">Häufige Fragen zum Verbrauchsausweis Gewerbe</a>
</li>
<li>
<a href="/verbrauchsausweis/statistiken-zum-verbrauchsausweis-gewerbe/">Statistiken zum Verbrauchsausweis Gewerbe</a>
</li>
</ul>
</div>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class="nav-element dropdown lg:dropdown-right"
on:click={dropdown}
on:keydown={dropdown}
on:mouseover={hover}
on:mouseleave={hoverout}
>
<a href="/bedarfsausweis/" class="nav-element-child"
>Bedarfsausweis<span class="dd-symbol-clone"></span><span
class="dd-symbol"></span
></a
>
<ul class="dropdown-content bedarfsausweis">
{#if innerWidth < 1023}
<li><a href="/bedarfsausweis/">Bedarfsausweis</a></li>
{/if}
<li><a href="/bedarfsausweis/bedarfsausweis-wohngebaeude/">Bedarfsausweis Wohngebäude</a></li>
<li><a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude/">Bedarfsausweis online erstellen</a></li>
<li><a href="/bedarfsausweis/haeufige-fragen-zum-bedarfsausweis/">Häufige Fragen zum Bedarfsausweis</a></li>
<li>
<a href="/bedarfsausweis/statistiken-zum-bedarfsausweis/">Statistiken zum Bedarfsausweis Wohngebäude</a>
</li>
<li><a href="/bedarfsausweis/bedarfsausweis-gewerbe/">Bedarfsausweis Gewerbe</a></li>
<li><a href="/angebot-anfragen/bedarfsausweis-gewerbe-anfragen">Bedarfsausweis Gewerbe anfragen</a></li>
<li>
<a href="/bedarfsausweis/haeufige-fragen-zum-bedarfsausweis-gewerbe/">Häufige Fragen zum Bedarfsausweis Gewerbe</a>
</ul>
</div>
<div class="nav-element">
<a class="no-dropdown nav-element-child" href="/sanierungsfahrplan"
>Sanierungsfahrplan</a
>
</div>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class="nav-element dropdown lg:dropdown-right"
on:click={dropdown}
on:keydown={dropdown}
on:mouseover={hover}
on:mouseleave={hoverout}
>
<a href="/" class="nav-element-child"
>Energieausweis<span class="dd-symbol-clone"></span><span
class="dd-symbol"></span
></a
>
<ul class="dropdown-content energieausweis">
{#if innerWidth < 1023}
<li><a href="/energieausweis/">Energieausweis</a></li>
{/if}
<li><a href="/energieausweis/energieausweis-pflicht/">Energieausweis Pflicht</a></li>
<li><a href="/energieausweis/energieausweis-kosten/">Energieausweis Kosten</a></li>
<li><a href="/energieausweis/energieausweis-haus/">Energieausweis Haus</a></li>
</ul>
</div>
<!-- <div class="nav-element">
<a
class="no-dropdown nav-element-child"
href="/energieausweis-aussteller">Energieberater finden</a
>
</div> -->
<div class="nav-element bg-secondary/5 py-1 pl-2 text-xs font-bold">
FAQ & Hilfe
</div>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class="nav-element dropdown lg:dropdown-right"
on:click={dropdown}
on:keydown={dropdown}
on:mouseover={hover}
on:mouseleave={hoverout}
>
{#if innerWidth > 1023}
<a href="/bestellprozess-energieausweis" class="nav-element-child"
>Bestellprozess Energieausweis<span class="dd-symbol-clone"
></span
><span class="dd-symbol"></span></a
>
{:else}
<a href="/bestellprozess-energieausweis" class="nav-element-child"
>Bestellprozess Energieausweis<span class="dd-symbol-clone"
></span
><span class="dd-symbol"></span></a
>
{/if}
<ul class="dropdown-content bestellprozess-energieausweis">
{#if innerWidth < 1023}
<li>
<a href="/bestellprozess-energieausweis"
>Bestellprozess Energieausweis</a
>
</li>
{/if}
<li>
<a
href="/bestellprozess-energieausweis/merkblatt-verbrauchsausweis-wohnen/"
>Merkblatt Verbrauchsausweis Wohnen</a
>
</li>
<li>
<a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"
>Merkblatt Bedarfsausweis Wohnen</a
>
</li>
<li>
<a href="/energieausweis-erstellen/verbrauchsausweis-gewerbe/"
>Merkblatt Verbrauchsausweis Gewerbe</a
>
</li>
</ul>
</div>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class="nav-element dropdown lg:dropdown-right"
on:click={dropdown}
on:keydown={dropdown}
on:mouseover={hover}
on:mouseleave={hoverout}
>
<a href="/geg/" class="nav-element-child"
>Gebäudeenergiegesetz (GEG)<span class="dd-symbol-clone"></span><span
class="dd-symbol"></span
></a
>
<ul class="dropdown-content geg">
{#if innerWidth < 1023}
<li><a href="/geg/">Gebäudeenergiegesetz (GEG)</a></li>
{/if}
<li><a href="/geg/geg-2024-volltext/">GEG 2024 Volltext</a></li>
<li><a href="/geg/enev-zusammenfassung">EnEV Zusammenfassung-Archiv</a></li>
</ul>
</div>
<div class="nav-element">
<a class="no-dropdown nav-element-child" href="/faq/">FAQ</a>
</div>
<div class="nav-element">
<a class="no-dropdown nav-element-child" href="/glossar/">Glossar</a>
</div>
<!--<div class="nav-element">
<a class="no-dropdown nav-element-child lg:rounded-b-xl" href="/kundenbewertungen/"
>Kundenbewertungen</a
>
</div>
<div class="nav-element">
<a
class="no-dropdown nav-element-child lg:!rounded-b-lg xl:!rounded-b-xl"
href="/fuer-entwickler/">Für Entwickler</a
>
</div> -->
</nav>
<style lang="scss">
.dd-symbol::before {
content: "";
font-size: 0.95rem;
position: absolute;
top: 0px;
left: -7px;
animation-name: flim;
animation-duration: 2s;
animation-iteration-count: infinite;
}
.dd-symbol {
visibility: hidden;
}
.dd-symbol::after {
content: "";
font-size: 0.95rem;
position: absolute;
top: 0px;
right: -7px;
animation-name: flim;
animation-duration: 2s;
animation-delay: 1s;
animation-iteration-count: infinite;
}
@keyframes flim {
0% {
opacity: 0;
}
16.66% {
opacity: 0.25;
}
33.32% {
opacity: 0.5;
}
49.98% {
opacity: 0.75;
}
66.64% {
opacity: 0.5;
}
83.33% {
opacity: 0.25;
}
100% {
opacity: 0;
}
}
</style>

View File

@@ -0,0 +1,25 @@
<script lang="ts">
import { PRICES } from "#lib/constants.js";
import { Enums } from "#lib/client/prisma";
</script>
<div id ="cardBAGpromo"
class=" box card">
<div class="grid">
<h2>Bedarfssausweis Gewerbe</h2>
<hr class="mb-4">
<img class="w-[70%] justify-self-center !min-w-[100px] mb-[1rem]" src="/images/right-sidebar/UMBE_gewerbegebaeude.svg" alt="Gewerbe Bedarfsausweis"/>
<p class="promo tracking-tighter text-[2rem] text-gray-700 pl-6">ab<span class="promo pl-[0.2rem]">{PRICES.BedarfsausweisGewerbe[Enums.AusweisTyp.Standard]}</span></p>
<a href="./angebot-anfragen/bedarfsausweis-gewerbe-anfragen id="link-BA-promo"
class=" w-[90%] justify-self-center text-center text-white font-[700] bg-secondary rounded-md px-3 py-1 mt-2 no-underline text-[1rem]
hover:bg-primary
" >jetzt Bedarfssausweis anfragen</a>
</div>
</div>
<style lang="scss">
</style>

View File

@@ -0,0 +1,25 @@
<script lang="ts">
import { PRICES } from "#lib/constants.js";
import { Enums } from "#lib/client/prisma";
</script>
<div id ="cardBApromo"
class=" box card">
<div class="grid">
<h2>Bedarfssausweis Wohngebäude</h2>
<hr class="mb-4">
<img class="w-[70%] justify-self-center !min-w-[100px] mb-[1rem]" src="/images/right-sidebar/UMBE_wohngebaeude.svg" alt="Wohnhaus Bedarfsausweis"/>
<p class="promo tracking-tighter text-[2rem] text-gray-700 pl-6">ab<span class="promo pl-[0.2rem]">{PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Standard]}</span></p>
<a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude/" id="link-BA-promo"
class=" w-[90%] justify-self-center text-center text-white font-[700] bg-secondary rounded-md px-3 py-1 mt-2 no-underline text-[1rem]
hover:bg-primary
" >jetzt Bedarfssausweis erstellen</a>
</div>
</div>
<style lang="scss">
</style>

View File

@@ -0,0 +1,43 @@
<script>
import { PRICES } from "#lib/constants";
import { Enums } from "#lib/client/prisma";
</script>
<div id ="cardPriceinfo" class="box card hidden lg:block">
<h2>Was wird der Energieausweis kosten?</h2>
<div>Verbrauchsausweis Wohngebäude</div>
<div>ab&nbsp;<span class="price">{PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Standard]}€</span>&nbsp;inkl.&nbsp;MwSt.</div>
<hr class="trenner">
<div>Bedarfsausweis Wohngebäude</div>
<div>ab&nbsp;<span class="price">{PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Standard]}€</span>&nbsp;inkl.&nbsp;MwSt.</div>
<hr class="trenner">
<div>Verbrauchsausweis Gewerbe</div>
<div>ab&nbsp;<span class="price">{PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Standard]}€</span>&nbsp;inkl.&nbsp;MwSt.</div>
<hr class="trenner">
<div>Bedarfsausweis Gewerbe</div>
<div>ab&nbsp;<span class="price">{PRICES.BedarfsausweisGewerbe[Enums.AusweisTyp.Standard]}€</span>&nbsp;inkl.&nbsp;MwSt.</div>
<hr class="trenner">
<div>GEG-Nachweis Wohngebäude</div>
<div>ab&nbsp;<span class="price">{PRICES.GEGNachweisWohnen[Enums.AusweisTyp.Standard]}€</span>&nbsp;inkl.&nbsp;MwSt.</div>
<hr class="trenner">
<div>GEG-Nachweis Gewerbe</div>
<div>ab&nbsp;<span class="price">{PRICES.GEGNachweisGewerbe[Enums.AusweisTyp.Standard]}€</span>&nbsp;inkl.&nbsp;MwSt.</div>
<hr class="mt-2">
</div>
<style lang="postcss">
.trenner{@apply my-2}
.price{@apply font-bold}
</style>

View File

@@ -0,0 +1,26 @@
<script lang="ts">
import { PRICES } from "#lib/constants.js";
import { Enums } from "#lib/client/prisma";
</script>
<div id ="cardVAGpromo"
class=" box card">
<div class="grid">
<h2>Verbrauchsausweis Gewerbe</h2>
<hr class="mb-4">
<img class="w-[70%] justify-self-center !min-w-[100px]" src="/images/right-sidebar/UMBE_gewerbegebaeude.svg" alt="Gewerbe Verbrauchsausweis"/>
<p class="promo tracking-tighter text-[2rem] text-gray-700 pl-6">ab<span class="promo pl-2">{PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Standard]}</span></p>
<a href="./energieausweis-erstellen/verbrauchsausweis-gewerbe/" id="link-VA-promo"
class=" w-[90%] justify-self-center text-center text-white font-[700] bg-gradient-to-br from-secondary to-secondary-grad rounded-md px-3 py-1 mt-2 no-underline text-[1rem]
hover:bg-primary
" >Verbrauchsausweis sofort&nbsp;erstellen</a>
</div>
</div>
<style lang="scss">
</style>

View File

@@ -0,0 +1,34 @@
<script lang="ts">
import { PRICES } from "#lib/constants.js";
import { Enums } from "#lib/client/prisma";
</script>
<div id="card-VA-promo" class="box card">
<div class="grid">
<h2>Verbrauchsausweis Wohngebäude</h2>
<hr class="mb-4" />
<img
class="w-[70%] justify-self-center !min-w-[100px] mb-[1rem]"
src="/images/right-sidebar/UMBE_wohngebaeude.svg"
alt="Wohnhaus Verbrauchsausweis"
/>
<p class="promo tracking-tighter text-[2rem] text-gray-700 pl-6">
ab<span class="promo pl-2">{PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Standard]}</span
>
</p>
<a
href="./energieausweis-erstellen/verbrauchsausweis-wohngebaeude/"
id="link-VA-promo"
class=" w-[90%] justify-self-center text-center text-white font-[700] bg-secondary rounded-md px-3 py-1 mt-2 no-underline text-[1rem]
hover:bg-primary
">jetzt Verbrauchsausweis erstellen</a
>
</div>
</div>
<style lang="scss">
</style>

View File

@@ -177,10 +177,7 @@ $: standardXL =
<WidgetCardTemplate
name="Verbrauchsausweis Wohngebäude"
price = {PRICES.VerbrauchsausweisWohnen[standardXL ? Enums.AusweisTyp.standardXL : Enums.AusweisTyp.Standard]}
price1 = {PRICES.VerbrauchsausweisWohnen[standardXL ? Enums.AusweisTyp.BeratungXL : Enums.AusweisTyp.Beratung]}
price2 = {PRICES.VerbrauchsausweisWohnen[standardXL ? Enums.AusweisTyp.OfflineXL : Enums.AusweisTyp.Offline]}
price={PRICES.VerbrauchsausweisWohnen[Enums.AusweisTyp.Standard] + (standardXL ? 10 : 0)}
src={'https://online-energieausweis.org/images/partner/'+partner+'/wohngebaeude.svg'}
alt="Wohnhaus Verbrauchsausweis"
variant="einfach"
@@ -193,12 +190,9 @@ $: standardXL =
["Ungenau durch individuelles Heizverhalten.", false],
["Wird nicht immer bei den Banken akzeptiert.", false]
]}
href_buy1={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/${standardXL ? '?ausweistyp=standardXL' : ''}`}
href_buy2={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/${standardXL ? '?ausweistyp=BeratungXL' : '?ausweistyp=Beratung'}`}
href_buy3={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/${standardXL ? '?ausweistyp=OfflineXL' : '?ausweistyp=Offline'}`}
></WidgetCardTemplate>
href_buy={"https://online-energieausweis.org/"+partner+"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/"}{standardXL ? '?ausweistyp=standardXL' : ''}
href_overview={"https://online-energieausweis.org/"+partner+"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/produkt-uebersicht/"}{standardXL ? '?ausweistyp=standardXL' : ''}
></WidgetCardTemplate>
{/if}
@@ -206,9 +200,7 @@ $: standardXL =
<WidgetCardTemplate
name="Bedarfsausweis Wohngebäude"
price = {PRICES.BedarfsausweisWohnen[standardXL ? Enums.AusweisTyp.standardXL : Enums.AusweisTyp.Standard]}
price1 = {PRICES.BedarfsausweisWohnen[standardXL ? Enums.AusweisTyp.BeratungXL : Enums.AusweisTyp.Beratung]}
price2 = {PRICES.BedarfsausweisWohnen[standardXL ? Enums.AusweisTyp.OfflineXL : Enums.AusweisTyp.Offline]}
price={PRICES.BedarfsausweisWohnen[Enums.AusweisTyp.Standard] + (standardXL ? 25 : 0)}
src={'https://online-energieausweis.org/images/partner/'+partner+'/wohngebaeude.svg'}
alt="Wohnhaus Bedarfsausweis"
variant="fundiert"
@@ -221,11 +213,8 @@ $: standardXL =
["Kann als Grundlage für den ISFP dienen.", true],
["Objektivere Berechnungsmethode nach DIN 18599.", true],
]}
href_buy1={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/${standardXL ? '?ausweistyp=standardXL' : ''}`}
href_buy2={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/${standardXL ? '?ausweistyp=BeratungXL' : '?ausweistyp=Beratung'}`}
href_buy3={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/${standardXL ? '?ausweistyp=OfflineXL' : '?ausweistyp=Offline'}`}
href_buy={"https://online-energieausweis.org/"+partner+"/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"}{standardXL ? '?ausweistyp=standardXL' : ''}
href_overview={"https://online-energieausweis.org/"+partner+"/energieausweis-erstellen/bedarfsausweis-wohngebaeude/produkt-uebersicht"}{standardXL ? '?ausweistyp=standardXL' : ''}
></WidgetCardTemplate>
{/if}
@@ -234,9 +223,7 @@ $: standardXL =
<WidgetCardTemplate
name="Verbrauchsausweis Gewerbegebäude"
price = {PRICES.VerbrauchsausweisGewerbe[standardXL ? Enums.AusweisTyp.standardXL : Enums.AusweisTyp.Standard]}
price1 = {PRICES.VerbrauchsausweisGewerbe[standardXL ? Enums.AusweisTyp.BeratungXL : Enums.AusweisTyp.Beratung]}
price2 = {PRICES.VerbrauchsausweisGewerbe[standardXL ? Enums.AusweisTyp.OfflineXL : Enums.AusweisTyp.Offline]}
price={PRICES.VerbrauchsausweisGewerbe[Enums.AusweisTyp.Standard] + (standardXL ? 15 : 0)}
src={'https://online-energieausweis.org/images/partner/'+partner+'/gewerbegebaeude.svg'}
alt="Gewerbe Verbrauchsausweis"
variant="einfach"
@@ -250,10 +237,8 @@ $: standardXL =
["Wird nicht immer bei den Banken akzeptiert.", false],
["Ungenau durch individuelles Heizverhalten", false],
]}
href_buy1={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/verbrauchsausweis-gewerbe/${standardXL ? '?ausweistyp=standardXL' : ''}`}
href_buy2={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/verbrauchsausweis-gewerbe/${standardXL ? '?ausweistyp=BeratungXL' : '?ausweistyp=Beratung'}`}
href_buy3={`https://online-energieausweis.org/${partner}/energieausweis-erstellen/verbrauchsausweis-gewerbe/${standardXL ? '?ausweistyp=OfflineXL' : '?ausweistyp=Offline'}`}
href_buy={"https://online-energieausweis.org/"+partner+"/energieausweis-erstellen/verbrauchsausweis-gewerbe/"}{standardXL ? '?ausweistyp=standardXL' : ''}
href_overview={"https://online-energieausweis.org/"+partner+"/energieausweis-erstellen/verbrauchsausweis-gewerbe/produkt-uebersicht/"}{standardXL ? '?ausweistyp=standardXL' : ''}
></WidgetCardTemplate>
{/if}
@@ -262,9 +247,7 @@ $: standardXL =
<WidgetCardTemplate
name="Bedarfsausweis Gewerbegebäude"
price = {PRICES.BedarfsausweisGewerbe[standardXL ? Enums.AusweisTyp.standardXL : Enums.AusweisTyp.Standard]}
price1 = {PRICES.BedarfsausweisGewerbe[standardXL ? Enums.AusweisTyp.BeratungXL : Enums.AusweisTyp.Beratung]}
price2 = {PRICES.BedarfsausweisGewerbe[standardXL ? Enums.AusweisTyp.OfflineXL : Enums.AusweisTyp.Offline]}
price={PRICES.BedarfsausweisGewerbe[Enums.AusweisTyp.Standard]}
src={'https://online-energieausweis.org/images/partner/'+partner+'/gewerbegebaeude.svg'}
alt="Gewerbe Bedarfsausweis"
variant="fundiert"
@@ -278,10 +261,8 @@ $: standardXL =
["Objektiveres, besser vergleichbares Ergebnis.", true],
["Zulässig bei Leerstand oder fehlenden Verbräuchen", true],
]}
href_buy1={`https://online-energieausweis.org/${partner}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/${standardXL ? '?ausweistyp=standardXL' : ''}`}
href_buy2={`https://online-energieausweis.org/${partner}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/${standardXL ? '?ausweistyp=BeratungXL' : '?ausweistyp=Beratung'}`}
href_buy={"https://online-energieausweis.org/"+partner+"/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/"}
href_overview={"https://online-energieausweis.org/"+partner+"/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/produkt-uebersicht/"}
></WidgetCardTemplate>
{/if}
@@ -290,9 +271,7 @@ $: standardXL =
<WidgetCardTemplate
name="GEG-Nachweis Wohngebäude"
price = {PRICES.GEGNachweisWohnen[standardXL ? Enums.AusweisTyp.standardXL : Enums.AusweisTyp.Standard]}
price1 = {PRICES.GEGNachweisWohnen[standardXL ? Enums.AusweisTyp.BeratungXL : Enums.AusweisTyp.Beratung]}
price2 = {PRICES.GEGNachweisWohnen[standardXL ? Enums.AusweisTyp.OfflineXL : Enums.AusweisTyp.Offline]}
price={PRICES.GEGNachweisWohnen[Enums.AusweisTyp.Standard]}
src={'https://online-energieausweis.org/images/partner/'+partner+'/wohngebaeude.svg'}
alt="GEG-Nachweis-Wohnen"
variant="Bauvorlage"
@@ -306,10 +285,8 @@ $: standardXL =
["Berechnung und Bilanzierung nach aktueller DIN 18599.", true],
["Zonierung und Erstellung eines 3D Gebäudemodells.", true],
]}
href_buy1={`https://online-energieausweis.org/${partner}/angebot-anfragen/geg-nachweis-wohnen-anfragen/${standardXL ? '?ausweistyp=standardXL' : ''}`}
href_buy2={`https://online-energieausweis.org/${partner}/angebot-anfragen/geg-nachweis-wohnen-anfragen/${standardXL ? '?ausweistyp=BeratungXL' : '?ausweistyp=Beratung'}`}
href_buy={"https://online-energieausweis.org/"+partner+"/angebot-anfragen/geg-nachweis-wohnen-anfragen/"}
href_overview={"https://online-energieausweis.org/"+partner+"/angebot-anfragen/geg-nachweis-wohnen-anfragen/produkt-uebersicht/"}
></WidgetCardTemplate>
@@ -319,9 +296,7 @@ $: standardXL =
<WidgetCardTemplate
name="GEG-Nachweis Gewerbegebäude"
price = {PRICES.GEGNachweisGewerbe[standardXL ? Enums.AusweisTyp.standardXL : Enums.AusweisTyp.Standard]}
price1 = {PRICES.GEGNachweisGewerbe[standardXL ? Enums.AusweisTyp.BeratungXL : Enums.AusweisTyp.Beratung]}
price2 = {PRICES.GEGNachweisGewerbe[standardXL ? Enums.AusweisTyp.OfflineXL : Enums.AusweisTyp.Offline]}
price={PRICES.GEGNachweisGewerbe[Enums.AusweisTyp.Standard]}
src={'https://online-energieausweis.org/images/partner/'+partner+'/gewerbegebaeude.svg'}
alt="GEG-Nachweis-Gewerbe"
variant="Bauvorlage"
@@ -335,10 +310,8 @@ $: standardXL =
["Berechnung und Bilanzierung nach aktueller DIN 18599.", true],
["Mehrzonenmodell inkl. Erstellung eines 3D Gebäudemodells.", true],
]}
href_buy1={`https://online-energieausweis.org/${partner}/angebot-anfragen/geg-nachweis-gewerbe-anfragen/${standardXL ? '?ausweistyp=standardXL' : ''}`}
href_buy2={`https://online-energieausweis.org/${partner}/angebot-anfragen/geg-nachweis-gewerbe-anfragen/${standardXL ? '?ausweistyp=BeratungXL' : '?ausweistyp=Beratung'}`}
href_buy={"https://online-energieausweis.org/"+partner+"/angebot-anfragen/geg-nachweis-gewerbe-anfragen/"}
href_overview={"https://online-energieausweis.org/"+partner+"/angebot-anfragen/geg-nachweis-gewerbe-anfragen/produkt-uebersicht/"}
></WidgetCardTemplate>
{/if}

View File

@@ -1,148 +1,115 @@
<script lang="ts">
import { fade } from "svelte/transition";
export let price: number;
export let price1: number;
export let price2: number;
export let name: string;
export let variant: string;
export let services: [string, boolean][];
export let href_buy1: string;
export let href_buy2: string;
export let href_buy3: string = "";
export let href_buy: string;
export let href_overview: string;
export let src: string;
export let alt: string;
export let empfehlung: string;
export let cta: string;
</script>
<div class="produktbox" transition:fade={{ duration: 0 }}>
{#if empfehlung === "ja"}
<div class="empfehlung" aria-label="Empfohlenes Produkt">
Empfehlung
</div>
{/if}
<h2 class="titel sm:mb-2">{name}</h2>
<div
class="produktbox"
transition:fade={{ duration: 0 }}
>
<div class="sumCent">
<div class="variante">{variant}</div>
<img class="image" {src} {alt} />
<div class="">
<p class="price">
ab {price}
</p>
</div>
{#if empfehlung === "ja"}
<div class="empfehlung" aria-label="Empfohlenes Produkt">Empfehlung</div>
{/if}
<h2 class="titel sm:mb-2">{name}</h2>
</div>
<hr class="col-span-2 w-full md:w-[50%] md:m-auto bg-[#ffcc00] h-[2px]" />
<div class="sumCent">
<div class="variante">{variant}</div>
<img
class="image"
{src}
{alt}
/>
<div class="">
<p class="price">
ab {price}
</p>
</div>
</div>
<div class="sumCent buttoncols">
<a
href={href_buy}
class="buttoncol"
aria-label="Jetzt {name} kaufen"
target="_blank"
>{cta}
</a>
<a
href={href_overview}
class="buttoncol"
aria-label="{name} Produkt-Übersicht"
target="_blank"
>Produkt-Übersicht</a
>
</div>
<div class="sumRows forServices">
{#each services as [service, check]}
<div class="services">
<span>{@html service}</span>
<span class={check ? "check" : "check-no"}>{check ? "✔" : "✘"}</span>
</div>
{/each}
<div class="sumRows forServices">
{#each services as [service, check]}
<div class="services">
<span>{@html service}</span>
<span class={check ? "check" : "check-no"}
>{check ? "✔" : "✘"}</span
>
</div>
{/each}
</div>
<hr class="col-span-2 w-full md:w-[50%] md:m-auto bg-[#ffcc00] h-[2px]" />
<div class="sumCent buttoncols"
class:md:grid-cols-3={href_buy3}
class:md:grid-cols-2={!href_buy3}>
<a
href={href_buy1}
class="buttoncol"
aria-label="Jetzt {name} kaufen"
target="_blank"
>mach selbst (<span class="inside-price">{price}</span>&nbsp;€)
</a>
<a
href={href_buy2}
class="buttoncol"
aria-label="{name} Produkt-Übersicht"
target="_blank"
>wir helfen (<span class="inside-price">{price1}</span>&nbsp;€)
</a>
{#if href_buy3}
<a
href={href_buy3}
class="buttoncol"
aria-label="{name} Produkt-Übersicht"
target="_blank"
>wir machen (<span class="inside-price">{price2}</span>&nbsp;€)
</a>
{/if}
</div>
</div>
<style lang="postcss">
.produktbox {
@apply grid grid-cols-subgrid col-span-2 grid-rows-subgrid row-span-3 md:row-span-12 bg-black/5 rounded-lg
.produktbox{@apply grid grid-cols-subgrid col-span-2 grid-rows-subgrid row-span-3 md:row-span-12 bg-black/5 rounded-lg
px-2 py-2 mt-5;
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
box-shadow:2px 2px 8px rgba(0,0,0,0.25);
.sumCent {
@apply justify-self-center col-span-2;
}
.sumRows {
@apply hidden sm:grid grid-rows-subgrid row-span-5 items-center;
}
.forServices {
@apply grid-rows-subgrid row-span-5 items-center col-span-2 justify-center px-6;
}
.sumCent{@apply justify-self-center col-span-2}
.sumRows{@apply hidden sm:grid grid-rows-subgrid row-span-5 items-center}
.forServices{@apply grid-rows-subgrid row-span-5 items-center col-span-2 justify-center px-6}
.image {
@apply w-[75%] mx-auto
md:w-[75%] md:pl-0;
}
.image{@apply w-[75%] mx-auto
md:w-[75%] md:pl-0}
.buttoncols {
@apply grid grid-cols-1 gap-x-4 w-full my-4
md:grid-cols-3 md:w-[auto];
}
.buttoncols{@apply grid grid-cols-1 gap-x-4 w-full mb-4
md:grid-cols-2 md:w-[auto]}
.buttoncol {
@apply mt-2 md:mt-0 text-center text-black bg-[#ffcc00] rounded-md px-3 py-1 no-underline
hover:bg-[#222222] hover:text-white;
}
.inside-price {
@apply font-bold;
}
.buttoncol{@apply mt-2 md:mt-0 text-center text-black bg-[#ffcc00] rounded-md px-3 py-1 no-underline
hover:bg-[#222222] hover:text-white}
.price {
@apply tracking-tighter text-[2rem] text-[#222222] pl-12 m-0 -mt-7 text-nowrap text-left;
font-family: "Antique Olive Compact bold";
}
.price{@apply tracking-tighter text-[2rem] text-[#222222] pl-12 m-0 -mt-7 text-nowrap text-left;
font-family: "Antique Olive Compact bold";}
.titel {
@apply col-span-2 text-center [font-size:_clamp(20px,2.5vw,28px)];
}
.empfehlung {
@apply -mt-4 absolute justify-self-end rounded-md bg-red-700 text-white w-fit h-fit px-2 py-1 rotate-1 text-[0.65rem] ring-4 ring-white mr-6;
}
.variante {
@apply w-fit italic col-span-2 -mt-2 -mb-4 text-[1rem] text-[#222222] justify-self-start ring-2 ring-[#ffcc00] rounded-md pl-[4px] pr-[6px] py-[0px];
}
.services {
@apply hidden text-start py-1 md:grid grid-rows-subgrid row-span-1 items-center md:grid-cols-[1fr_50px];
}
.services:not(:last-child) {
@apply border-b-[1px] border-gray-200;
}
.check {
@apply justify-self-end self-center font-bold text-green-700;
}
.check-no {
@apply justify-self-end self-center font-bold text-red-700;
}
.titel {@apply col-span-2 text-center [font-size:_clamp(20px,2.5vw,28px)]}
.empfehlung{@apply -mt-4 absolute justify-self-end rounded-md bg-red-700 text-white w-fit h-fit px-2 py-1 rotate-1 text-[0.65rem] ring-4 ring-white mr-6}
.variante {
@apply w-fit italic col-span-2 -mt-2 -mb-4 text-[1rem] text-[#222222] justify-self-start ring-2 ring-[#ffcc00] rounded-md pl-[4px] pr-[6px] py-[0px];
}
.services {
@apply hidden text-start py-1 md:grid grid-rows-subgrid row-span-1 items-center md:grid-cols-[1fr_50px]
}
.services:not(:last-child) {
@apply border-b-[1px] border-gray-200;
}
.check {
@apply justify-self-end self-center font-bold text-green-700;
}
.check-no {
@apply justify-self-end self-center font-bold text-red-700;
}
}
</style>

View File

@@ -26,7 +26,7 @@ describe("Verbrauchsausweis für Wohngebäude bearbeiten", async () => {
}).then((ausweis: VerbrauchsausweisWohnen & { benutzer: Benutzer, aufnahme: Aufnahme & { objekt: Objekt }, rechnung: Rechnung | null }) => {
cy.login("user@ib-cornelsen.de", "passwort");
cy.visit(`/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?ausweis_id=${ausweis.id}`);
cy.visit(`/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?id=${ausweis.id}`);
cy.wait(2000);

View File

@@ -38,19 +38,19 @@ export const BedarfsausweisWohnenSchema = z.object({
volumen: z.number().nullish(),
dicht: z.boolean().nullish(),
fenster_flaeche_1: z.number().nullish(),
fenster_art_1: z.string().nullish(),
fenster_art_1: z.number().nullish(),
fenster_flaeche_2: z.number().nullish(),
fenster_art_2: z.string().nullish(),
fenster_art_2: z.number().nullish(),
dachfenster_flaeche: z.number().nullish(),
dachfenster_art: z.string().nullish(),
dachfenster_art: z.number().nullish(),
haustuer_flaeche: z.number().nullish(),
haustuer_art: z.string().nullish(),
haustuer_art: z.number().nullish(),
dach_bauart: z.string().nullish(),
decke_bauart: z.string().nullish(),
dach_daemmung: z.string().nullish(),
decke_daemmung: z.string().nullish(),
aussenwand_daemmung: z.string().nullish(),
boden_daemmung: z.string().nullish(),
dach_daemmung: z.number().nullish(),
decke_daemmung: z.number().nullish(),
aussenwand_daemmung: z.number().nullish(),
boden_daemmung: z.number().nullish(),
aussenwand_bauart: z.string().nullish(),
boden_bauart: z.string().nullish(),
warmwasser_verteilung: z.string().nullish(),

View File

@@ -18,19 +18,19 @@ const { title } = Astro.props;
---
<script>
// import { H } from "highlight.run";
import { H } from "highlight.run";
// if (import.meta.env.PROD) {
// H.init("1jdkoe52", {
// serviceName: "online-energieausweis",
// backendUrl: "https://highlight-backend.online-energieausweis.org/public",
// tracingOrigins: true,
// networkRecording: {
// enabled: true,
// recordHeadersAndBody: true
// }
// });
// }
if (import.meta.env.PROD) {
H.init("1jdkoe52", {
serviceName: "online-energieausweis",
backendUrl: "https://highlight-backend.online-energieausweis.org/public",
tracingOrigins: true,
networkRecording: {
enabled: true,
recordHeadersAndBody: true
}
});
}
window.addEventListener("scroll", () => {
const skala = document.getElementById("skala");
@@ -102,13 +102,6 @@ const { title } = Astro.props;
<html lang="de">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-59QKHH8');</script>
<!-- End Google Tag Manager -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
@@ -154,11 +147,6 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-59QKHH8"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<Header {user} />
<main

View File

@@ -0,0 +1,156 @@
---
import "../style/global.css";
import "../style/formular.css";
import "../../svelte-dialogs.config"
import Header from "#components/design/header/AusweisHeaderImmowelt.astro";
import Footer from "#components/design/footer/Footer.astro";
import { NotificationWrapper } from "@ibcornelsen/ui";
export interface Props {
title: string;
}
const { title } = Astro.props;
---
<script>
window.addEventListener("scroll", (event) => {
let scroll = window.scrollY;
console.log(scroll);
if(scroll>=400){
document.getElementById('skala')?.classList.add('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
document.getElementById('skala')?.classList.remove('w-full');
document.getElementById('skala').style.borderBottom = "3px solid #e6e6e6";
document.getElementById('performance-box').style.maxWidth = "688.5px";
document.getElementById('progress-box').style.maxWidth = "688.5px";
document.getElementById('formInput-1')?.classList.add('2xl:mt-[370px]');
}else{
document.getElementById('skala')?.classList.remove('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
document.getElementById('skala')?.classList.add('w-full');
document.getElementById('skala').style.borderBottom = "none";
document.getElementById('formInput-1')?.classList.remove('2xl:mt-[370px]');
}
});
</script>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
<meta
name="description"
content="✅ Jetzt Ihren Energieausweis online erstellen. Erhalten Sie Ihren online Energieausweis rechtssicher und nach aktueller GEG (vormals EnEV) vom Diplom Ingenieur geprüft."
/>
<link rel="canonical" href="https://online-energieausweis.org/" />
<meta property="og:locale" content="de_DE" />
<meta property="og:type" content="website" />
<meta
property="og:title"
content="Energieausweis online erstellen - Online Energieausweis"
/>
<meta
property="og:description"
content="✅ Jetzt Ihren Energieausweis online erstellen. Erhalten Sie Ihren online Energieausweis rechtssicher und nach aktueller GEG (vormals EnEV) vom Diplom Ingenieur geprüft."
/>
<meta property="og:url" content="https://online-energieausweis.org/" />
<meta property="og:site_name" content="Energieausweis online erstellen" />
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:description"
content="✅ Jetzt Ihren Energieausweis online erstellen. Erhalten Sie Ihren online Energieausweis rechtssicher und nach aktueller GEG (vormals EnEV) vom Diplom Ingenieur geprüft."
/>
<meta
name="twitter:title"
content="Energieausweis online erstellen - Online Energieausweis"
/>
<meta
name="twitter:image"
content="https://online-energieausweis.org/images/energieausweis-online-erstellen.jpg"
/>
<title>
{title || 'Energieausweis online erstellen - Online Energieausweis'}
</title>
</head>
<body>
<Header />
<main
class="w-full p-0 grid
xs:grid-cols-[minmax(1fr)] xs:gap-1 xs:p-0
sm:grid-cols-[minmax(1fr)] sm:gap-1 sm:p-0
md:grid-cols-[minmax(1fr)] md:gap-2 md:p-0
lg:grid-cols-[minmax(1fr)] lg:gap-3 lg:p-4
xl:grid-cols-[minmax(1fr)] xl:gap-4 xl:p-6
2xl:grid-cols-[minmax(1fr)] 2xl:gap-5 2xl:p-6
">
<article class="box rounded-tl-none p-2 lg:p-12">
<slot />
</article>
</main>
<Footer />
<NotificationWrapper client:load />
</body>
</html>
<style is:global lang="postcss">
body {
min-height: 100vh;
width:100%;
}
article {
p, h1, h2, h3, h4, h5, h6 {
@apply text-base-content;
}
}
.headline {
@apply text-lg;
}
.radio-inline {
@apply flex flex-row gap-2;
}
.checkbox-inline {
@apply flex flex-row gap-2;
}
</style>

View File

@@ -0,0 +1,156 @@
---
import "../style/global.css";
import "../style/formular.css";
import "../../svelte-dialogs.config"
import Header from "#components/design/header/AusweisHeaderImmowelt2.astro";
import Footer from "#components/design/footer/Footer.astro";
import { NotificationWrapper } from "@ibcornelsen/ui";
export interface Props {
title: string;
}
const { title } = Astro.props;
---
<script>
window.addEventListener("scroll", (event) => {
let scroll = window.scrollY;
console.log(scroll);
if(scroll>=400){
document.getElementById('skala')?.classList.add('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
document.getElementById('skala')?.classList.remove('w-full');
document.getElementById('skala').style.borderBottom = "3px solid #e6e6e6";
document.getElementById('performance-box').style.maxWidth = "688.5px";
document.getElementById('progress-box').style.maxWidth = "688.5px";
document.getElementById('formInput-1')?.classList.add('2xl:mt-[370px]');
}else{
document.getElementById('skala')?.classList.remove('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
document.getElementById('skala')?.classList.add('w-full');
document.getElementById('skala').style.borderBottom = "none";
document.getElementById('formInput-1')?.classList.remove('2xl:mt-[370px]');
}
});
</script>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
<meta
name="description"
content="✅ Jetzt Ihren Energieausweis online erstellen. Erhalten Sie Ihren online Energieausweis rechtssicher und nach aktueller GEG (vormals EnEV) vom Diplom Ingenieur geprüft."
/>
<link rel="canonical" href="https://online-energieausweis.org/" />
<meta property="og:locale" content="de_DE" />
<meta property="og:type" content="website" />
<meta
property="og:title"
content="Energieausweis online erstellen - Online Energieausweis"
/>
<meta
property="og:description"
content="✅ Jetzt Ihren Energieausweis online erstellen. Erhalten Sie Ihren online Energieausweis rechtssicher und nach aktueller GEG (vormals EnEV) vom Diplom Ingenieur geprüft."
/>
<meta property="og:url" content="https://online-energieausweis.org/" />
<meta property="og:site_name" content="Energieausweis online erstellen" />
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:description"
content="✅ Jetzt Ihren Energieausweis online erstellen. Erhalten Sie Ihren online Energieausweis rechtssicher und nach aktueller GEG (vormals EnEV) vom Diplom Ingenieur geprüft."
/>
<meta
name="twitter:title"
content="Energieausweis online erstellen - Online Energieausweis"
/>
<meta
name="twitter:image"
content="https://online-energieausweis.org/images/energieausweis-online-erstellen.jpg"
/>
<title>
{title || 'Energieausweis online erstellen - Online Energieausweis'}
</title>
</head>
<body>
<Header />
<main
class="w-full p-0 grid
xs:grid-cols-[minmax(1fr)] xs:gap-1 xs:p-0
sm:grid-cols-[minmax(1fr)] sm:gap-1 sm:p-0
md:grid-cols-[minmax(1fr)] md:gap-2 md:p-0
lg:grid-cols-[minmax(1fr)] lg:gap-3 lg:p-4
xl:grid-cols-[minmax(1fr)] xl:gap-4 xl:p-6
2xl:grid-cols-[minmax(1fr)] 2xl:gap-5 2xl:p-6
">
<article class="box rounded-tl-none p-2 lg:p-12">
<slot />
</article>
</main>
<Footer />
<NotificationWrapper client:load />
</body>
</html>
<style is:global lang="postcss">
body {
min-height: 100vh;
width:100%;
}
article {
p, h1, h2, h3, h4, h5, h6 {
@apply text-base-content;
}
}
.headline {
@apply text-lg;
}
.radio-inline {
@apply flex flex-row gap-2;
}
.checkbox-inline {
@apply flex flex-row gap-2;
}
</style>

View File

@@ -2,16 +2,31 @@
import "../style/global.css";
import "../style/formular.css";
import "../../svelte-dialogs.config"
import AusweisHeaderPartner from "#components/design/header/AusweisHeaderPartner.astro";
import Header from "#components/design/header/AusweisHeader_partner.astro";
import Footer from "#components/design/footer/Footer.astro";
import SidebarLeft from "#components/design/sidebars/SidebarLeft.astro";
import { NotificationWrapper } from "@ibcornelsen/ui";
export interface Props {
title: string;
tab: number;
tabHover1: string;
tabHover2: string;
tabHover3: string;
tabHover4: string;
tabHover5: string;
tabHover6: string;
tabHover7: string;
}
const { title, tab } = Astro.props;
const { title } = Astro.props;
const { tabHover1 } = Astro.props;
const { tabHover2 } = Astro.props;
const { tabHover3 } = Astro.props;
const { tabHover4 } = Astro.props;
const { tabHover5 } = Astro.props;
const { tabHover6 } = Astro.props;
const { tabHover7 } = Astro.props;
---
<script>
@@ -85,14 +100,6 @@ window.addEventListener("scroll", () => {
<!DOCTYPE html>
<html lang="de">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-59QKHH8');</script>
<!-- End Google Tag Manager -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
@@ -135,12 +142,8 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-59QKHH8"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<AusweisHeaderPartner {tab}/>
<Header {tabHover1} {tabHover2} {tabHover3} {tabHover4} {tabHover5} {tabHover6} {tabHover7}/>
<main class="w-full p-0 grid grid-cols-1 rounded-none">
@@ -148,6 +151,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<article class="p-0 lg:px-20 lg:py-12">
<slot />
<div style="height: 450px;"></div>
</article>
</main>

View File

@@ -18,33 +18,25 @@ const { title } = Astro.props;
---
<script>
// import { H } from "highlight.run";
import { H } from "highlight.run";
// if (import.meta.env.PROD) {
// H.init("1jdkoe52", {
// serviceName: "online-energieausweis",
// backendUrl: "https://highlight-backend.online-energieausweis.org/public",
// tracingOrigins: true,
// networkRecording: {
// enabled: true,
// recordHeadersAndBody: true
// }
// })
// }
if (import.meta.env.PROD) {
H.init("1jdkoe52", {
serviceName: "online-energieausweis",
backendUrl: "https://highlight-backend.online-energieausweis.org/public",
tracingOrigins: true,
networkRecording: {
enabled: true,
recordHeadersAndBody: true
}
})
}
</script>
<!DOCTYPE html>
<html lang="de">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-59QKHH8');</script>
<!-- End Google Tag Manager -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
@@ -87,10 +79,6 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-59QKHH8"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<Header {user} />

View File

@@ -35,19 +35,19 @@ const schema = JSON.stringify({
---
<script>
// import { H } from "highlight.run";
import { H } from "highlight.run";
// if (import.meta.env.PROD) {
// H.init("1jdkoe52", {
// serviceName: "online-energieausweis",
// backendUrl: "https://highlight-backend.online-energieausweis.org/public",
// tracingOrigins: true,
// networkRecording: {
// enabled: true,
// recordHeadersAndBody: true
// }
// })
// }
if (import.meta.env.PROD) {
H.init("1jdkoe52", {
serviceName: "online-energieausweis",
backendUrl: "https://highlight-backend.online-energieausweis.org/public",
tracingOrigins: true,
networkRecording: {
enabled: true,
recordHeadersAndBody: true
}
})
}
</script>
<!DOCTYPE html>

View File

@@ -3,15 +3,14 @@
import "../style/global.css";
import "../../svelte-dialogs.config.js";
import DashboardSidebar from "../components/Dashboard/DashboardSidebar.svelte";
import { Benutzer } from "#lib/server/prisma";
import { BenutzerClient } from "#components/Ausweis/types";
export interface Props {
title: string;
user: Benutzer;
besteller: Benutzer | null;
user: BenutzerClient;
}
const { title, user, besteller } = Astro.props;
const { title, user } = Astro.props;
if (!user) {
Astro.redirect("/auth/login", 302);
@@ -45,29 +44,21 @@ const schema = JSON.stringify({
let lightTheme = Astro.cookies.get("theme")?.value === "light";
---
<script >
// import { H } from "highlight.run";
<script>
import { H } from "highlight.run";
// const user = JSON.parse(document.body.dataset.user);
// if (import.meta.env.PROD) {
// H.init("1jdkoe52", {
// serviceName: "online-energieausweis",
// backendUrl:
// "https://highlight-backend.online-energieausweis.org/public",
// tracingOrigins: true,
// networkRecording: {
// enabled: true,
// recordHeadersAndBody: true,
// }
// });
// if (user) {
// H.identify(user.email, {
// id: user.id
// })
// }
// }
if (import.meta.env.PROD) {
H.init("1jdkoe52", {
serviceName: "online-energieausweis",
backendUrl:
"https://highlight-backend.online-energieausweis.org/public",
tracingOrigins: true,
networkRecording: {
enabled: true,
recordHeadersAndBody: true,
},
});
}
</script>
<html lang="de">
@@ -117,7 +108,7 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
</title>
</head>
<body data-user={JSON.stringify({ id: user.id, email: user.email })}>
<body>
<main
class="p-0 grid max-w-[1920px]
xs:grid-cols-[minmax(1fr,1fr)] xs:gap-1 xs:p-0
@@ -130,7 +121,6 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
<DashboardSidebar
lightTheme={lightTheme}
benutzer={user}
besteller={besteller}
client:load
/>

View File

@@ -19,19 +19,19 @@ const { title } = Astro.props;
---
<script>
// import { H } from "highlight.run";
import { H } from "highlight.run";
// if (import.meta.env.PROD) {
// H.init("1jdkoe52", {
// serviceName: "online-energieausweis",
// backendUrl: "https://highlight-backend.online-energieausweis.org/public",
// tracingOrigins: true,
// networkRecording: {
// enabled: true,
// recordHeadersAndBody: true
// }
// })
// }
if (import.meta.env.PROD) {
H.init("1jdkoe52", {
serviceName: "online-energieausweis",
backendUrl: "https://highlight-backend.online-energieausweis.org/public",
tracingOrigins: true,
networkRecording: {
enabled: true,
recordHeadersAndBody: true
}
})
}
/*
window.addEventListener("scroll", (event) => {
@@ -98,15 +98,6 @@ window.addEventListener("scroll", (event) => {
<!DOCTYPE html>
<html lang="de">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-59QKHH8');</script>
<!-- End Google Tag Manager -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
@@ -120,10 +111,6 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-59QKHH8"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<Header {user} />

42
src/lib/AusweisData.ts Normal file
View File

@@ -0,0 +1,42 @@
import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
import { z } from "zod";
import { verbrauchsausweisWohnenPDFValidator } from "./validators/verbrauchsausweis-wohnen-pdf-validator";
export function convertAusweisData(
inputs: Partial<VerbrauchsausweisWohnenClient>
): Record<string, string> {
// Wir wollen alle Werte zu einem Flachen Objekt umwandeln, sodass wir dass später benutzen können.
// Dazu kommen noch einige wichtige Eigenschaften die man im PDF brauchen könnte.
let pdfInputs: z.infer<typeof verbrauchsausweisWohnenPDFValidator> = {
...inputs,
pdf: {
"brennstoff": [inputs.aufnahme?.brennstoff_1, inputs.aufnahme?.brennstoff_2].filter(x => x).join(", ")
}
}
let result = recursiveFlatten(inputs, "");
// Außerdem müssen wir alle Werte zu strings umwandeln.
for (const key in result) {
result[key] = String(result[key]);
}
return result;
}
function recursiveFlatten(obj: any, parentKey = ""): Record<string, string> {
const result: Record<string, string> = {};
for (const key in obj) {
const value = obj[key];
const newKey = parentKey ? `${parentKey}.${key}` : key;
if (typeof value === "object") {
Object.assign(result, recursiveFlatten(value, newKey));
} else {
result[newKey] = value;
}
}
return result;
}

View File

@@ -108,7 +108,7 @@ export async function endEnergieVerbrauchVerbrauchsausweisGewerbe_2016(ausweis:
}
let kuehlungsZuschlag_1: number = 0, kuehlungsZuschlag_2: number = 0; let kuehlungsZuschlag = 0;
if (aufnahme.kuehlung === "1" && aufnahme.kuehlung !== null && (ausweis.stromverbrauch_enthaelt_kuehlung === false || ausweis.stromverbrauch_enthaelt_kuehlung === null)) {
if (aufnahme.kuehlung === "1" && aufnahme.kuehlung !== null && ausweis.stromverbrauch_enthaelt_kuehlung === false) {
kuehlungsZuschlag = 6 * nutzflaeche * 3;
}

View File

@@ -60,7 +60,7 @@ export async function endEnergieVerbrauchVerbrauchsausweis_2016(
// Leerstand wird in Prozent angegeben, muss hier aber in eine Zahl zwischen 0 und 1 umgerechnet werden.
let leerstand = (aufnahme.leerstand || 0) / 100;
if (ausweis.warmwasser_enthalten && ausweis.warmwasser_anteil_bekannt && ausweis.anteil_warmwasser_1 !== 0) {
if (ausweis.warmwasser_enthalten && ausweis.warmwasser_anteil_bekannt) {
if (aufnahme.solarsystem_warmwasser) {
// Wenn Warmwasser enthalten und Anteil bekannt und Solarsystem
energieVerbrauchWarmwasser_1 =

View File

@@ -113,12 +113,3 @@ export const SERVICES: Record<
export const BASE_URI = process.env.NODE_ENV == "production" ? "https://online-energieausweis.org" : "http://localhost:3000";
export const LEX_OFFICE_API_KEY = process.env.NODE_ENV == "production" ? "iwQLCU_ZAq6bVV7hmR8RO8MiC8Q" : "iwQLCU_ZAq6bVV7hmR8RO8MiC8Q"
export enum AusstellungsTyp {
// Objekt wird behalten, Aufnahme und Ausweis werden neu angelegt.
Neuausstellung = "Neuausstellung",
// Alles wird behalten, Ausweis, Aufnahme und Objekt werden gespeichert, dafür müssen alle drei bereits existieren.
Speichern = "Speichern",
// Objekt und Aufnahme werden behalten, Ausweis wird neu angelegt.
Alternativdokument = "Alternativdokument",
}

View File

@@ -6,7 +6,7 @@ import * as crypto from "crypto";
* @param prefix Ein Optionales Präfix, welches vor die ID geschrieben wird, damit diese identifizierbar bleibt.
* @returns Die generierte ID
*/
export function generateIDWithPrefix(length: number, prefix: string = ""): string {
export function generatePrefixedId(length: number, prefix: string = ""): string {
// Generating entropy is faster than complex math operations, so we use the simplest way
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"
const characterCount = characters.length;

View File

@@ -1,9 +1,9 @@
import { IDWithPrefix } from "#components/Ausweis/types.js";
import { UUidWithPrefix } from "#components/Ausweis/types.js";
import { Enums } from "#lib/client/prisma";
import { z } from "zod";
export const filterAusweise = z.object({
uid: IDWithPrefix.optional(),
uid: UUidWithPrefix.optional(),
ausgestellt: z.boolean().optional(),
ausstellgrund: z.nativeEnum(Enums.Ausstellgrund).optional(),
bestellt: z.boolean().optional(),

View File

@@ -1,834 +0,0 @@
import { AufnahmeClient, BenutzerClient, BildClient, ObjektClient, VerbrauchsausweisGewerbeClient } from "#components/Ausweis/types.js";
import { getEmpfehlungen } from "#lib/XML/getEmpfehlungen.js";
import { Enums } from "#lib/server/prisma.js";
import * as fs from "fs"
import moment from "moment";
import { PDFDocument, PDFFont, PDFImage, PDFPage, StandardFonts } from "pdf-lib";
import { addText } from "./utils/text.js";
import { addAnsichtsausweisLabel, addDatumGEG, addRegistriernummer } from "./utils/helpers.js";
import { getS3File } from "#lib/s3.js";
import { endEnergieVerbrauchVerbrauchsausweisGewerbe_2016_Server } from "#lib/Berechnungen/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbe_2016_Server.js";
export async function pdfAushangVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewerbeClient, aufnahme: AufnahmeClient, objekt: ObjektClient, bilder: BildClient[], user: BenutzerClient, vorschau = true) {
const VerbrauchsausweisWohnenGEG2024PDF = fs.readFileSync(new URL("../../../public/pdf/templates/GEG24_AushangNWG_Energieverbrauchsausweis.pdf", import.meta.url), "base64");
const pdf = await PDFDocument.load(VerbrauchsausweisWohnenGEG2024PDF)
const pages = pdf.getPages()
// const template = VerbrauchsausweisWohnen2016Template as Template;
const berechnungen = await endEnergieVerbrauchVerbrauchsausweisGewerbe_2016_Server(ausweis, aufnahme, objekt);
const empfehlungen = getEmpfehlungen(ausweis, aufnahme, objekt)
const height = pages[0].getHeight()
const font = await pdf.embedFont(StandardFonts.Helvetica)
const bold = await pdf.embedFont(StandardFonts.HelveticaBold)
const form = pdf.getForm()
form.updateFieldAppearances(font)
pages[0].drawText(`${ausweis.registriernummer || ""}`, {
x: 393,
y: height - 112.5,
size: 10
})
pages[0].drawText(aufnahme.gebaeudetyp || "", {
x: 211,
y: height - 164,
size: 10
})
pages[0].drawText(objekt.adresse || "", {
x: 211,
y: height - 186,
size: 10
})
pages[0].drawText(aufnahme.gebaeudeteil || "", {
x: 211,
y: height - 201,
size: 10
})
pages[0].drawText(aufnahme.baujahr_gebaeude?.toString() || "", {
x: 211,
y: height - 220,
size: 10
})
// pages[0].drawText(aufnahme.baujahr_heizung?.toString() || "", {
// x: 211,
// y: height - 250,
// size: 10
// })
pages[0].drawText(aufnahme.nutzflaeche?.toString() || "", {
x: 211,
y: height - 237,
size: 10
})
pages[0].drawText(`${ausweis.brennstoff_1}, ${ausweis.brennstoff_2 || ""}`, {
x: 211,
y: height - 250,
size: 10
})
const erneuerbareEnergienVerwendung = []
if (ausweis.alternative_heizung) {
erneuerbareEnergienVerwendung.push("Heizung")
}
if (ausweis.alternative_kuehlung) {
erneuerbareEnergienVerwendung.push("Kühlung")
}
if (ausweis.alternative_lueftung) {
erneuerbareEnergienVerwendung.push("Lüftung")
}
if (ausweis.alternative_warmwasser) {
erneuerbareEnergienVerwendung.push("Warmwasser")
}
pages[0].drawText(erneuerbareEnergienVerwendung.join(", "), {
x: 430,
y: height - 326,
size: 8
})
if (ausweis.warmwasser_enthalten) {
pages[0].drawText(`${ausweis.brennstoff_1}, ${ausweis.brennstoff_2 || ""}`, {
x: 211,
y: height - 265,
size: 10
})
}
if (aufnahme.lueftung === Enums.Lueftungskonzept.Fensterlueftung) {
pages[0].drawText("x", {
x: 215,
y: height - 280,
size: 10,
font: bold
})
} else if (aufnahme.lueftung === Enums.Lueftungskonzept.Schachtlueftung) {
pages[0].drawText("x", {
x: 215,
y: height - 290,
size: 10,
font: bold
})
} else if (aufnahme.lueftung === Enums.Lueftungskonzept.LueftungsanlageMitWaermerueckgewinnung) {
pages[0].drawText("x", {
x: 380,
y: height - 280,
size: 10,
font: bold
})
} else if (aufnahme.lueftung === Enums.Lueftungskonzept.LueftungsanlageOhneWaermerueckgewinnung) {
pages[0].drawText("x", {
x: 380,
y: height - 290,
size: 10,
font: bold
})
}
// // Kühlung
if (aufnahme.kuehlung === "1" && aufnahme.kuehlung !== null) {
pages[0].drawText("x", {
x: 381,
y: height - 303,
size: 10,
font: bold
})
}
if (ausweis.kuehlung_enthalten === true && ausweis.kuehlung_enthalten !== null) {
pages[0].drawText("x", {
x: 381,
y: height - 313,
size: 10,
font: bold
})
}
// if (ausweis.ausstellgrund === Enums.Ausstellgrund.Neubau) {
// pages[0].drawText("x", {
// x: 214,
// y: height - 414,
// size: 10,
// font: bold
// })
// } else if (ausweis.ausstellgrund === Enums.Ausstellgrund.Vermietung || ausweis.ausstellgrund === Enums.Ausstellgrund.Verkauf) {
// pages[0].drawText("x", {
// x: 214,
// y: height - 425,
// size: 10,
// font: bold
// })
// } else if (ausweis.ausstellgrund === Enums.Ausstellgrund.Modernisierung) {
// pages[0].drawText("x", {
// x: 345.5,
// y: height - 414,
// size: 10,
// font: bold
// })
// } else if (ausweis.ausstellgrund === Enums.Ausstellgrund.Sonstiges) {
// pages[0].drawText("x", {
// x: 464,
// y: height - 425,
// size: 10,
// font: bold
// })
// }
// Aushangpflicht
// addCheckMark(pages[0], 463, height - 406)
const bild = bilder && bilder.find(image => image.kategorie === Enums.BilderKategorie.Gebaeude);
if (bild) {
const file = await getS3File("ibc-images", `${bild.id}.jpg`);
if (file) {
let image: PDFImage;
image = await pdf.embedJpg(file)
pages[0].drawImage(image, {
x: 462,
y: height - 240,
width: 108,
height: 90
})
}
}
// // Checkmark Verbrauchsausweis.
// pages[0].drawText("x", {
// x: 41,
// y: height - 558,
// size: 10,
// font: bold
// })
// // Datenerhebung durch Eigentümer
// pages[0].drawText("x", {
// x: 296.5,
// y: height - 587.5,
// size: 10,
// font: bold
// })
// Ausstellungsdatum
pages[0].drawText(moment().format("DD.MM.YYYY"), {
font,
size: 10,
x: 508,
y: height - 790
})
// Gültig bis
pages[0].drawText(moment().add(10, "years").format("DD.MM.YYYY"), {
font: bold,
size: 10,
x: 90,
y: height - 113
})
// Stempel und Unterschrift
if (ausweis.ausgestellt || !vorschau) {
const stempel = await pdf.embedPng(fs.readFileSync(new URL("../../../public/pdf/images/stempel-unterschrift.png", import.meta.url), "base64"));
const stempelHeight = 65
pages[0].drawImage(stempel, {
x: 450,
y: height - 790,
height: stempelHeight,
width: stempel.width / (stempel.height / stempelHeight)
})
}
// Aussteller
const aussteller = await pdf.embedPng(fs.readFileSync(new URL("../../../public/pdf/images/aussteller.png", import.meta.url), "base64"));
pages[0].drawImage(aussteller, {
x: 40,
y: height - 795,
width: 130,
height: 65
})
// // /* -------------------------------- Seite 2 -------------------------------- */
// // const co2Emissionen = fillFormField("co2emissionen", berechnungen?.co2EmissionenGesamt.toString(), 8, TextAlignment.Center)
const addEnergieverbrauchSkalaPfeile = async (page: PDFPage) => {
const pfeilNachUnten = await pdf.embedPng(fs.readFileSync(new URL("../../../public/images/pfeil-nach-unten.png", import.meta.url), "base64"))
const pfeilNachOben = await pdf.embedPng(fs.readFileSync(new URL("../../../public/images/pfeil-nach-oben.png", import.meta.url), "base64"))
// Wir müssen den berechneten Wert zwischen 0 und 1000 als Wert zwischen 0 und 1 festlegen
const endenergieverbrauchTranslationPercentage = Math.min((berechnungen?.vergleichsWertWaerme * 2), Math.max(0, berechnungen?.endEnergieVerbrauchGesamt || 0)) / (berechnungen?.vergleichsWertWaerme * 2)
const stromVerbrauchTranslationPercentage = Math.min((berechnungen?.vergleichsWertStrom * 2), Math.max(0, berechnungen?.endEnergieVerbrauchStrom || 0)) / (berechnungen?.vergleichsWertStrom * 2)
const vergleichsWertWaermeTranslationPercentage = Math.min((berechnungen?.vergleichsWertWaerme * 2), Math.max(0, berechnungen?.vergleichsWertWaerme || 0)) / (berechnungen?.vergleichsWertWaerme * 2)
const vergleichsWertStromTranslationPercentage = Math.min((berechnungen?.vergleichsWertStrom * 2), Math.max(0, berechnungen?.vergleichsWertStrom || 0)) / (berechnungen?.vergleichsWertStrom * 2)
const minTranslation = 78
const maxTranslation = 512
const endenergieverbrauchTranslationX = minTranslation + (maxTranslation - minTranslation) * endenergieverbrauchTranslationPercentage;
const stromVerbrauchTranslationX = minTranslation + (maxTranslation - minTranslation) * stromVerbrauchTranslationPercentage;
const vergleichsWertWaermeTranslationX = minTranslation + (maxTranslation - minTranslation) * vergleichsWertWaermeTranslationPercentage;
const vergleichsWertStromTranslationX = minTranslation + (maxTranslation - minTranslation) * vergleichsWertStromTranslationPercentage;
const pfeilWidth = 20
const margin = 5;
const adjustY = -210;
const adjustY2 = -198;
page.drawImage(pfeilNachUnten, {
x: endenergieverbrauchTranslationX,
y: height - 210 + adjustY,
width: pfeilWidth,
height: 30
})
page.drawImage(pfeilNachOben, {
x: vergleichsWertWaermeTranslationX,
y: height - 293 + adjustY,
width: pfeilWidth,
height: 30
})
page.drawText("0", {
x: 85,
y: height - 241 + adjustY,
size: 13,
font: bold
})
const vergleichswertWaermeText2 = `${Math.round(berechnungen?.vergleichsWertWaerme).toString()}`
page.drawText(vergleichswertWaermeText2, {
x: 295,
y: height - 241 + adjustY,
size: 13,
font: bold
})
const maxVergleichswertWaermeText = `> ${Math.round(berechnungen?.vergleichsWertWaerme * 2).toString()}`;
page.drawText(maxVergleichswertWaermeText, {
x: vergleichsWertWaermeTranslationX * 2 - 78,
y: height - 241 + adjustY,
size: 13,
font: bold
})
page.drawText("0", {
x: 85,
y: height - 385 + adjustY2,
size: 13,
font: bold
})
const vergleichswertStromText2 = `${Math.round(berechnungen?.vergleichsWertStrom).toString()}`
page.drawText(vergleichswertStromText2, {
x: 295,
y: height - 385 + adjustY2,
size: 13,
font: bold
})
const maxVergleichswertStromText = `> ${Math.round(berechnungen?.vergleichsWertStrom * 2).toString()}`;
page.drawText(maxVergleichswertStromText, {
x: vergleichsWertStromTranslationX * 2 - 78,
y: height - 385 + adjustY2,
size: 13,
font: bold
})
const endEnergieVerbrauchGesamtText = `${Math.round(berechnungen?.endEnergieVerbrauchGesamt ?? 0).toString()}kWh/(m²a)`;
if (endenergieverbrauchTranslationPercentage > 0.5) {
page.drawText("Endenergieverbrauch Wärme", {
x: endenergieverbrauchTranslationX - margin - font.widthOfTextAtSize("Endenergieverbrauch Wärme", 10),
y: height - 191 + adjustY,
size: 10
})
page.drawText(endEnergieVerbrauchGesamtText, {
x: endenergieverbrauchTranslationX - margin - bold.widthOfTextAtSize(endEnergieVerbrauchGesamtText, 10),
y: height - 205 + adjustY,
size: 10,
font: bold
})
} else {
page.drawText("Endenergieverbrauch Wärme", {
x: endenergieverbrauchTranslationX + pfeilWidth + margin,
y: height - 191 + adjustY,
size: 10
})
page.drawText(endEnergieVerbrauchGesamtText, {
x: endenergieverbrauchTranslationX + pfeilWidth + margin,
y: height - 205 + adjustY,
size: 10,
font: bold
})
}
const vergleichswertWaermeText = `${Math.round(berechnungen?.vergleichsWertWaerme).toString()}kWh/(m²a)`
if (vergleichsWertWaermeTranslationPercentage > 0.5) {
page.drawText("Vergleichswert Wärme", {
x: vergleichsWertWaermeTranslationX - margin - font.widthOfTextAtSize("Vergleichswert Wärme", 10),
y: height - 275 + adjustY,
size: 10
})
page.drawText(vergleichswertWaermeText, {
x: vergleichsWertWaermeTranslationX - margin - bold.widthOfTextAtSize(vergleichswertWaermeText, 10),
y: height - 289 + adjustY,
size: 10,
font: bold
})
} else {
page.drawText("Vergleichswert Wärme", {
x: vergleichsWertWaermeTranslationX + pfeilWidth + margin,
y: height - 275 + adjustY,
size: 10
})
page.drawText(vergleichswertWaermeText, {
x: vergleichsWertWaermeTranslationX + pfeilWidth + margin,
y: height - 289 + adjustY,
size: 10,
font: bold
})
}
page.drawImage(pfeilNachUnten, {
x: stromVerbrauchTranslationX,
y: height - 354 + adjustY2,
width: pfeilWidth,
height: 30
})
page.drawImage(pfeilNachOben, {
x: vergleichsWertStromTranslationX,
y: height - 437 + adjustY2,
width: pfeilWidth,
height: 30
})
const stromVerbrauchGesamtText = `${Math.round(berechnungen?.endEnergieVerbrauchStrom ?? 0).toString()}kWh/(m²a)`;
if (stromVerbrauchTranslationPercentage > 0.5) {
page.drawText("Endenergieverbrauch Strom", {
x: stromVerbrauchTranslationX - margin - font.widthOfTextAtSize("Endenergieverbrauch Strom", 10),
y: height - 335 + adjustY2,
size: 10
})
page.drawText(stromVerbrauchGesamtText, {
x: stromVerbrauchTranslationX - margin - bold.widthOfTextAtSize(stromVerbrauchGesamtText, 10),
y: height - 349 + adjustY2,
size: 10,
font: bold
})
} else {
page.drawText("Endenergieverbrauch Strom", {
x: stromVerbrauchTranslationX + pfeilWidth + margin,
y: height - 335 + adjustY2,
size: 10
})
page.drawText(stromVerbrauchGesamtText, {
x: stromVerbrauchTranslationX + pfeilWidth + margin,
y: height - 349 + adjustY2,
size: 10,
font: bold
})
}
const vergleichswertStromText = `${Math.round(berechnungen?.vergleichsWertStrom).toString()}kWh/(m²a)`
if (vergleichsWertWaermeTranslationPercentage > 0.5) {
page.drawText("Vergleichswert Strom", {
x: vergleichsWertStromTranslationX - margin - font.widthOfTextAtSize("Vergleichswert Strom", 10),
y: height - 420 + adjustY2,
size: 10
})
page.drawText(vergleichswertStromText, {
x: vergleichsWertStromTranslationX - margin - bold.widthOfTextAtSize(vergleichswertStromText, 10),
y: height - 434 + adjustY2,
size: 10,
font: bold
})
} else {
page.drawText("Vergleichswert Strom", {
x: vergleichsWertStromTranslationX + pfeilWidth + margin,
y: height - 420 + adjustY2,
size: 10
})
page.drawText(vergleichswertStromText, {
x: vergleichsWertStromTranslationX + pfeilWidth + margin,
y: height - 434 + adjustY2,
size: 10,
font: bold
})
}
}
addEnergieverbrauchSkalaPfeile(pages[0])
if (ausweis.warmwasser_enthalten) {
pages[0].drawText("x", {
x: 42,
y: height - 504,
size: 10,
font: bold
})
}
if (ausweis.kuehlung_enthalten) {
pages[0].drawText("x", {
x: 42,
y: height - 516,
size: 10,
font: bold
})
}
if (ausweis.stromverbrauch_enthaelt_heizung) {
pages[0].drawText("x", {
x: 42,
y: height - 660,
size: 10,
font: bold
})
}
if (ausweis.stromverbrauch_enthaelt_warmwasser) {
pages[0].drawText("x", {
x: 132,
y: height - 660,
size: 10,
font: bold
})
}
if (ausweis.stromverbrauch_enthaelt_lueftung) {
pages[0].drawText("x", {
x: 219,
y: height - 660,
size: 10,
font: bold
})
}
if (ausweis.stromverbrauch_enthaelt_beleuchtung) {
pages[0].drawText("x", {
x: 282,
y: height - 660,
size: 10,
font: bold
})
}
if (ausweis.stromverbrauch_enthaelt_kuehlung) {
pages[0].drawText("x", {
x: 423,
y: height - 660,
size: 10,
font: bold
})
}
if (ausweis.stromverbrauch_enthaelt_sonstige) {
pages[0].drawText("x", {
x: 493,
y: height - 660,
size: 10,
font: bold
})
}
addText(pages[0], berechnungen?.primaerEnergieVerbrauchGesamt.toString() || "", 475, height - 685, 10, font)
addText(pages[0], berechnungen?.co2EmissionenGesamt.toString() || "", 475, height - 705, 10, font)
// // const primaerenergiebedarfIst = fillFormField("primaerenergiebedarf_ist", berechnungen?.primaerEnergieVerbrauchGesamt.toString())
/* -------------------------------- Seite 3 -------------------------------- */
// Verbräuche
// const addVerbrauchGenerator = () => {
// let i = 0;
// let yOffset = 14.6;
// const initialHeight = 297
// const initialXOffset = 36;
// return (zeitraum_von?: string, zeitraum_bis?: string, energietraeger?: string, primaerfaktor?: string, energieverbrauch?: string, anteil_warmwasser?: string, anteil_kaelte?: number, anteil_heizung?: string, klimafaktor?: string, strom?: number) => {
// pages[2].drawText(zeitraum_von || "", {
// x: initialXOffset,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(zeitraum_bis || "", {
// x: initialXOffset + 47,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(energietraeger || "", {
// x: initialXOffset + 94,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(primaerfaktor || "", {
// x: initialXOffset + 232,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(energieverbrauch || "", {
// x: initialXOffset + 275,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(anteil_warmwasser || "", {
// x: initialXOffset + 325,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(anteil_kaelte?.toString() || "", {
// x: initialXOffset + 378,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[0].drawText(anteil_heizung || "", {
// x: initialXOffset + 430,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(klimafaktor || "", {
// x: initialXOffset + 464,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[2].drawText(strom?.toString() || "", {
// x: initialXOffset + 504,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// i++;
// }
// }
// const addVerbrauch = addVerbrauchGenerator();
// // Primäre Heizquelle
// addVerbrauch(
// moment(ausweis.startdatum).format("MM.YYYY"),
// moment(ausweis.startdatum).add(3, "years").format("MM.YYYY"),
// ausweis.brennstoff_1 || "",
// berechnungen?.brennstoff_1.primaerenergiefaktor.toString(),
// Math.round(berechnungen?.energieVerbrauchGesamt_1 || 0).toString(),
// Math.round(berechnungen?.energieVerbrauchWarmwasser_1 || 0).toString(),
// berechnungen?.kuehlungsZuschlag_1,
// Math.round(berechnungen?.energieVerbrauchHeizung_1 || 0).toString(),
// berechnungen?.durchschnittsKlimafaktor.toString(),
// berechnungen?.energieVerbrauchStrom
// );
// if (ausweis.zusaetzliche_heizquelle) {
// addVerbrauch(
// moment(ausweis.startdatum).format("MM.YYYY"),
// moment(ausweis.startdatum).add(3, "years").format("MM.YYYY"),
// ausweis.brennstoff_2 || "",
// berechnungen?.brennstoff_2.primaerenergiefaktor.toString(),
// Math.round(berechnungen?.energieVerbrauchGesamt_2 || 0).toString(),
// Math.round(berechnungen?.energieVerbrauchWarmwasser_2 || 0).toString(),
// berechnungen?.kuehlungsZuschlag_2,
// Math.round(berechnungen?.energieVerbrauchHeizung_2 || 0).toString(),
// berechnungen?.durchschnittsKlimafaktor.toString(),
// 0
// );
// }
// if (aufnahme.leerstand && aufnahme.leerstand > 0) {
// /**
// * Leerstandszuschlag
// * @link https://www.bundesanzeiger.de/pub/publication/MRYM4nI84Sdlr0EIvvW?2
// */
// if (ausweis.warmwasser_enthalten && ausweis.warmwasser_anteil_bekannt) {
// addVerbrauch(
// moment(ausweis.startdatum).format("MM.YYYY"),
// moment(ausweis.startdatum).add(3, "years").format("MM.YYYY"),
// "Leerstandszuschlag",
// berechnungen?.brennstoff_1.primaerenergiefaktor.toString(),
// Math.round((berechnungen?.leerstandsZuschlagHeizung || 0) + (berechnungen?.leerstandsZuschlagWarmwasser || 0) + (berechnungen?.leerstandsZuschlagKuehlung || 0)).toString(),
// Math.round((berechnungen?.leerstandsZuschlagWarmwasser || 0)).toString(),
// Math.round((berechnungen?.leerstandsZuschlagKuehlung || 0)),
// Math.round((berechnungen?.leerstandsZuschlagHeizung || 0)).toString(),
// berechnungen?.durchschnittsKlimafaktor.toString(),
// Math.round((berechnungen?.leerstandsZuschlagStrom || 0))
// );
// } else {
// addVerbrauch(
// moment(ausweis.startdatum).format("MM.YYYY"),
// moment(ausweis.startdatum).add(3, "years").format("MM.YYYY"),
// "Leerstandszuschlag",
// berechnungen?.brennstoff_1.primaerenergiefaktor.toString(),
// Math.round((berechnungen?.leerstandsZuschlagHeizung || 0) + (berechnungen?.leerstandsZuschlagWarmwasser || 0) + (berechnungen?.leerstandsZuschlagKuehlung || 0)).toString(),
// Math.round((berechnungen?.leerstandsZuschlagWarmwasser || 0)).toString(),
// Math.round((berechnungen?.leerstandsZuschlagKuehlung || 0)),
// Math.round((berechnungen?.leerstandsZuschlagHeizung || 0)).toString(),
// berechnungen?.durchschnittsKlimafaktor.toString(),
// Math.round((berechnungen?.leerstandsZuschlagStrom || 0))
// );
// }
// }
// if (aufnahme.kuehlung === "1" && (ausweis.stromverbrauch_enthaelt_kuehlung === false || ausweis.stromverbrauch_enthaelt_kuehlung === null)) {
// /**
// * Kühlungszuschlag - Pauschale Erhöhung um 6kWh/m²
// * Primärenergiefaktor Strom
// * @link https://www.bundesanzeiger.de/pub/publication/MRYM4nI84Sdlr0EIvvW?2
// */
// addVerbrauch(
// moment(ausweis.startdatum).format("MM.YYYY"),
// moment(ausweis.startdatum).add(3, "years").format("MM.YYYY"),
// "Kühlungszuschlag",
// "1.8",
// "",
// "",
// 0,
// "",
// "",
// Math.round(berechnungen?.kuehlungsZuschlag || 0)
// );
// }
/* -------------------------------- Seite 4 -------------------------------- */
// const splitToSize = (text: string, size: number, font: PDFFont, fontSize: number) => {
// const lines = []
// let currentLine = ""
// for (const char of text) {
// if (font.widthOfTextAtSize(currentLine + char, fontSize) <= size) {
// currentLine += char;
// } else {
// lines.push(currentLine)
// currentLine = char;
// }
// }
// lines.push(currentLine)
// return lines.join("\n")
// }
// const addEmpfehlungenGenerator = () => {
// let i = 0;
// let yOffset = 43;
// const initialHeight = 562
// const initialXOffset = 36;
// return (bauteil?: string, beschreibung?: string, alsEinzelmassnahme?: boolean, amortisationszeit?: string, kosten?: string) => {
// pages[3].drawText((i + 1).toString(), {
// x: initialXOffset,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[3].drawText(splitToSize(bauteil || "", 70, font, 8), {
// x: initialXOffset + 25,
// y: initialHeight - (i * yOffset),
// size: 8,
// font,
// lineHeight: 10
// })
// pages[3].drawText(splitToSize(beschreibung || "", 230, font, 8), {
// x: initialXOffset + 98,
// y: initialHeight - (i * yOffset),
// size: 8,
// font,
// lineHeight: 10
// })
// pages[3].drawText(amortisationszeit || "", {
// x: initialXOffset + 403,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// pages[3].drawText(kosten || "", {
// x: initialXOffset + 451,
// y: initialHeight - (i * yOffset),
// size: 8,
// font
// })
// i++;
// }
// }
// const addEmpfehlung = addEmpfehlungenGenerator()
// for (const empfehlung of empfehlungen) {
// addEmpfehlung(empfehlung.anlagenteil, empfehlung.description, true, empfehlung.amortisationszeit, empfehlung.kosten)
// }
for (let i = 0; i < pages.length; i++) {
const page = pages[i];
if (vorschau) {
addAnsichtsausweisLabel(page, font)
}
addDatumGEG(page, font)
// if (i !== pages.length - 1) {
// addRegistriernummer(page, font, ausweis.registriernummer || "")
// }
}
// pdf.getForm().flatten()
return pdf.save();
}

View File

@@ -199,25 +199,16 @@ export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewe
if (bild) {
const file = await getS3File("ibc-images", `${bild.id}.jpg`);
if (file) {
let image: PDFImage;
image = await pdf.embedJpg(file);
const originalWidth = image.width;
const originalHeight = image.height;
// Calculate the scaling factor to fit within the maximum dimensions while maintaining proportions
const scaleFactor = Math.min(111 / originalWidth, 138 / originalHeight);
const scaledWidth = originalWidth * scaleFactor;
const scaledHeight = originalHeight * scaleFactor;
image = await pdf.embedJpg(file)
pages[0].drawImage(image, {
x: 460.5,
y: (height - 289 - scaledHeight) + 138, // Adjust y to align the image properly
width: scaledWidth,
height: scaledHeight
});
y: height - 289,
width: 111,
height: 138
})
}
}
@@ -369,25 +360,25 @@ export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewe
if (endenergieverbrauchTranslationPercentage > 0.5) {
page.drawText("Endenergieverbrauch Wärme", {
x: endenergieverbrauchTranslationX - margin - font.widthOfTextAtSize("Endenergieverbrauch Wärme", 10) - (pfeilWidth / 2),
x: endenergieverbrauchTranslationX - margin - font.widthOfTextAtSize("Endenergieverbrauch Wärme", 10),
y: height - 191,
size: 10
})
page.drawText(endEnergieVerbrauchGesamtText, {
x: endenergieverbrauchTranslationX - margin - bold.widthOfTextAtSize(endEnergieVerbrauchGesamtText, 10) - (pfeilWidth / 2),
x: endenergieverbrauchTranslationX - margin - bold.widthOfTextAtSize(endEnergieVerbrauchGesamtText, 10),
y: height - 205,
size: 10,
font: bold
})
} else {
page.drawText("Endenergieverbrauch Wärme", {
x: endenergieverbrauchTranslationX + pfeilWidth + margin + (pfeilWidth / 2),
x: endenergieverbrauchTranslationX + pfeilWidth + margin,
y: height - 191,
size: 10
})
page.drawText(endEnergieVerbrauchGesamtText, {
x: endenergieverbrauchTranslationX + pfeilWidth + margin + (pfeilWidth / 2),
x: endenergieverbrauchTranslationX + pfeilWidth + margin,
y: height - 205,
size: 10,
font: bold
@@ -398,13 +389,13 @@ export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewe
if (vergleichsWertWaermeTranslationPercentage > 0.5) {
page.drawText("Vergleichswert Wärme", {
x: vergleichsWertWaermeTranslationX - margin - font.widthOfTextAtSize("Vergleichswert Wärme", 10) - (pfeilWidth / 2),
x: vergleichsWertWaermeTranslationX - margin - font.widthOfTextAtSize("Vergleichswert Wärme", 10),
y: height - 275,
size: 10
})
page.drawText(vergleichswertWaermeText, {
x: vergleichsWertWaermeTranslationX - margin - bold.widthOfTextAtSize(vergleichswertWaermeText, 10) - (pfeilWidth / 2),
x: vergleichsWertWaermeTranslationX - margin - bold.widthOfTextAtSize(vergleichswertWaermeText, 10),
y: height - 289,
size: 10,
font: bold
@@ -441,25 +432,25 @@ export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewe
if (stromVerbrauchTranslationPercentage > 0.5) {
page.drawText("Endenergieverbrauch Strom", {
x: stromVerbrauchTranslationX - margin - font.widthOfTextAtSize("Endenergieverbrauch Strom", 10) - (pfeilWidth / 2),
x: stromVerbrauchTranslationX - margin - font.widthOfTextAtSize("Endenergieverbrauch Strom", 10),
y: height - 335,
size: 10
})
page.drawText(stromVerbrauchGesamtText, {
x: stromVerbrauchTranslationX - margin - bold.widthOfTextAtSize(stromVerbrauchGesamtText, 10) - (pfeilWidth / 2),
x: stromVerbrauchTranslationX - margin - bold.widthOfTextAtSize(stromVerbrauchGesamtText, 10),
y: height - 349,
size: 10,
font: bold
})
} else {
page.drawText("Endenergieverbrauch Strom", {
x: stromVerbrauchTranslationX + pfeilWidth + margin + (pfeilWidth / 2),
x: stromVerbrauchTranslationX + pfeilWidth + margin,
y: height - 335,
size: 10
})
page.drawText(stromVerbrauchGesamtText, {
x: stromVerbrauchTranslationX + pfeilWidth + margin + (pfeilWidth / 2),
x: stromVerbrauchTranslationX + pfeilWidth + margin,
y: height - 349,
size: 10,
font: bold
@@ -484,12 +475,12 @@ export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewe
})
} else {
page.drawText("Vergleichswert Strom", {
x: vergleichsWertStromTranslationX + pfeilWidth + margin + (pfeilWidth / 2),
x: vergleichsWertStromTranslationX + pfeilWidth + margin,
y: height - 420,
size: 10
})
page.drawText(vergleichswertStromText, {
x: vergleichsWertStromTranslationX + pfeilWidth + margin + (pfeilWidth / 2),
x: vergleichsWertStromTranslationX + pfeilWidth + margin,
y: height - 434,
size: 10,
font: bold

View File

@@ -59,23 +59,13 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
if (file) {
let image: PDFImage;
image = await pdf.embedJpg(file);
const originalWidth = image.width;
const originalHeight = image.height;
// Calculate the scaling factor to fit within the maximum dimensions while maintaining proportions
const scaleFactor = Math.min(111 / originalWidth, 138 / originalHeight);
const scaledWidth = originalWidth * scaleFactor;
const scaledHeight = originalHeight * scaleFactor;
image = await pdf.embedJpg(file)
pages[0].drawImage(image, {
x: 460.5,
y: (height - 289 - scaledHeight) + 138, // Adjust y to align the image properly
width: scaledWidth,
height: scaledHeight
});
y: height - 289,
width: 111,
height: 138
})
}
}
@@ -212,9 +202,9 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
}
// Kühlung
if (aufnahme.kuehlung === "1" && aufnahme.kuehlung !== null) {
if (aufnahme.kuehlung === "1") {
pages[0].drawText("x", {
x: 356,
x: 213,
y: height - 383.5,
size: 10,
font: bold
@@ -343,7 +333,7 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
}
page.drawImage(pfeilNachUnten, {
x: endenergieverbrauchTranslationX - (pfeilWidth / 2),
x: endenergieverbrauchTranslationX,
y: height - 212,
width: pfeilWidth,
height: 30
@@ -380,7 +370,7 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
}
page.drawImage(pfeilNachOben, {
x: primaerenergieverbrauchTranslationX - (pfeilWidth / 2),
x: primaerenergieverbrauchTranslationX,
y: height - 297,
width: pfeilWidth,
height: 30
@@ -505,7 +495,7 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
const addVerbrauch = addVerbrauchGenerator();
if (ausweis.warmwasser_enthalten !== true) {
if (!ausweis.warmwasser_enthalten) {
// Mit Warmwasserzuschlag
addVerbrauch(
moment(ausweis.startdatum).format("MM.YYYY"),
@@ -544,7 +534,7 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
);
}
if (!ausweis.warmwasser_enthalten && ausweis.anteil_warmwasser_1 === 0) {
if (!ausweis.warmwasser_enthalten) {
/**
* Dezentrale Warmwasserversorgung - Pauschale Erhöhung um 20kWh/m²
* @link https://www.bundesanzeiger.de/pub/publication/MRYM4nI84Sdlr0EIvvW?2

View File

@@ -1,27 +1,9 @@
import {
AufnahmeClient,
BedarfsausweisWohnenClient,
BenutzerClient,
BildClient,
getAusweisartFromId,
ObjektClient,
RechnungClient,
VerbrauchsausweisGewerbeClient,
VerbrauchsausweisWohnenClient,
} from "#components/Ausweis/types.js";
import { AufnahmeClient, BedarfsausweisWohnenClient, BenutzerClient, BildClient, getAusweisartFromId, ObjektClient, VerbrauchsausweisGewerbeClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
import { pdfDatenblattVerbrauchsausweisGewerbe } from "#lib/pdf/pdfDatenblattVerbrauchsausweisGewerbe.js";
import { pdfDatenblattVerbrauchsausweisWohnen } from "#lib/pdf/pdfDatenblattVerbrauchsausweisWohnen.js";
import { pdfVerbrauchsausweisGewerbe } from "#lib/pdf/pdfVerbrauchsausweisGewerbe.js";
import { pdfVerbrauchsausweisWohnen } from "#lib/pdf/pdfVerbrauchsausweisWohnen.js";
import { pdfAushangVerbrauchsausweisGewerbe } from "#lib/pdf/pdfAushangVerbrauchsausweisGewerbe.js";
import {
BedarfsausweisWohnen,
Enums,
prisma,
Rechnung,
VerbrauchsausweisGewerbe,
VerbrauchsausweisWohnen,
} from "#lib/server/prisma.js";
import { Enums, prisma, Rechnung } from "#lib/server/prisma.js";
/**
* Gibt den richtigen Prisma Adapter für die Ausweisart basierend auf der UID zurück, oder null bei einer falschen UID.
@@ -31,17 +13,17 @@ export function getPrismaAusweisAdapter(id: string) {
const ausweisart = getAusweisartFromId(id);
if (ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen) {
return prisma.verbrauchsausweisWohnen;
return prisma.verbrauchsausweisWohnen
} else if (ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe) {
return prisma.verbrauchsausweisGewerbe;
return prisma.verbrauchsausweisGewerbe
} else if (ausweisart === Enums.Ausweisart.BedarfsausweisWohnen) {
return prisma.bedarfsausweisWohnen;
return prisma.bedarfsausweisWohnen
} else if (ausweisart === Enums.Ausweisart.GEGNachweisWohnen) {
return prisma.gEGNachweisWohnen;
return prisma.gEGNachweisWohnen
} else if (ausweisart === Enums.Ausweisart.GEGNachweisGewerbe) {
return prisma.gEGNachweisGewerbe;
return prisma.gEGNachweisGewerbe
} else if (ausweisart === Enums.Ausweisart.BedarfsausweisGewerbe) {
return prisma.bedarfsausweisGewerbe;
return prisma.bedarfsausweisGewerbe
}
}
@@ -49,161 +31,34 @@ export function getPrismaAusweisAdapter(id: string) {
* Gibt den richtigen Ansichtsausweis basierend auf der Ausweisart zurück.
* @param ausweis
*/
export async function getAnsichtsausweis(
ausweis:
| VerbrauchsausweisWohnenClient
| VerbrauchsausweisGewerbeClient
| BedarfsausweisWohnenClient,
aufnahme: AufnahmeClient,
objekt: ObjektClient,
bilder: BildClient[],
user: BenutzerClient,
vorschau: boolean = true,
ausweisart = getAusweisartFromId(ausweis.id)
) {
export async function getAnsichtsausweis(ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbeClient | BedarfsausweisWohnenClient, aufnahme: AufnahmeClient, objekt: ObjektClient, bilder: BildClient[], user: BenutzerClient, vorschau: boolean = true, ausweisart = getAusweisartFromId(ausweis.id)) {
if (!ausweisart) {
return null;
return null
}
if (ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen) {
return await pdfVerbrauchsausweisWohnen(
ausweis as VerbrauchsausweisWohnenClient,
aufnahme,
objekt,
bilder,
user,
vorschau
);
return await pdfVerbrauchsausweisWohnen(ausweis as VerbrauchsausweisWohnenClient, aufnahme, objekt, bilder, user, vorschau)
} else if (ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe) {
return await pdfVerbrauchsausweisGewerbe(
ausweis as VerbrauchsausweisGewerbeClient,
aufnahme,
objekt,
bilder,
user,
vorschau
);
return await pdfVerbrauchsausweisGewerbe(ausweis as VerbrauchsausweisGewerbeClient, aufnahme, objekt, bilder, user, vorschau)
}
return null;
return null
}
/**
* Gibt das richtige Datenblatt basierend auf der Ausweisart zurück.
* @param ausweis
*/
export async function getDatenblatt(
ausweis:
| VerbrauchsausweisWohnenClient
| VerbrauchsausweisGewerbeClient
| BedarfsausweisWohnenClient,
aufnahme: AufnahmeClient,
objekt: ObjektClient,
bilder: BildClient[],
user: BenutzerClient,
rechnung: Rechnung,
ausweisart = getAusweisartFromId(ausweis.id)
) {
export async function getDatenblatt(ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbeClient | BedarfsausweisWohnenClient, aufnahme: AufnahmeClient, objekt: ObjektClient, bilder: BildClient[], user: BenutzerClient, rechnung: Rechnung, ausweisart = getAusweisartFromId(ausweis.id)) {
if (!ausweisart) {
return null;
return null
}
if (ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen) {
return await pdfDatenblattVerbrauchsausweisWohnen(
ausweis as VerbrauchsausweisWohnenClient,
aufnahme,
objekt,
rechnung,
bilder
);
return await pdfDatenblattVerbrauchsausweisWohnen(ausweis as VerbrauchsausweisWohnenClient, aufnahme, objekt, rechnung, bilder)
} else if (ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe) {
return await pdfDatenblattVerbrauchsausweisGewerbe(
ausweis as VerbrauchsausweisGewerbeClient,
aufnahme,
objekt,
rechnung,
bilder
);
return await pdfDatenblattVerbrauchsausweisGewerbe(ausweis as VerbrauchsausweisGewerbeClient, aufnahme, objekt, rechnung, bilder)
}
return null;
}
/**
* Gibt den richtigen Aushang basierend auf der Ausweisart zurück.
* @param ausweis
*/
export async function getAushang(
ausweis:
| VerbrauchsausweisWohnenClient
| VerbrauchsausweisGewerbeClient
| BedarfsausweisWohnenClient,
aufnahme: AufnahmeClient,
objekt: ObjektClient,
bilder: BildClient[],
user: BenutzerClient,
vorschau: boolean = true,
rechnung: Rechnung,
ausweisart = getAusweisartFromId(ausweis.id)
) {
if (!ausweisart || !rechnung.services.includes(Enums.Service.Aushang)) {
return null;
}
if (ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe) {
return await pdfAushangVerbrauchsausweisGewerbe(
ausweis as VerbrauchsausweisGewerbeClient,
aufnahme,
objekt,
bilder,
user,
vorschau
);
}
return null;
}
/**
* Extrahiert die Ausweisfelder aus einem Objekt, das mehrere Ausweisarten enthält, und fasst sie in einem gemeinsamen Feld `ausweis` zusammen.
* @param row Ein Objekt, das die Ausweisfelder enthält.
* @returns Ein neues Objekt, das die Ausweisfelder extrahiert und in einem gemeinsamen Feld `ausweis` zusammenfasst.
*/
export function extrahiereAusweisAusFeldMitMehrerenAusweisen<T>(
row: T & {
bedarfsausweis_wohnen?: BedarfsausweisWohnen;
verbrauchsausweis_wohnen?: VerbrauchsausweisWohnen;
verbrauchsausweis_gewerbe?: VerbrauchsausweisGewerbe;
}
) {
const {
bedarfsausweis_wohnen,
verbrauchsausweis_wohnen,
verbrauchsausweis_gewerbe,
...rest
} = row;
return {
...rest,
ausweis: {
...(bedarfsausweis_wohnen ??
verbrauchsausweis_wohnen ??
verbrauchsausweis_gewerbe),
ausweisart: bedarfsausweis_wohnen
? Enums.Ausweisart.BedarfsausweisWohnen
: verbrauchsausweis_wohnen
? Enums.Ausweisart.VerbrauchsausweisWohnen
: Enums.Ausweisart.VerbrauchsausweisGewerbe,
},
} as {
ausweis: (
| BedarfsausweisWohnen
| VerbrauchsausweisWohnen
| VerbrauchsausweisGewerbe
) & { ausweisart: Enums.Ausweisart };
} & Omit<
T,
| "bedarfsausweis_wohnen"
| "verbrauchsausweis_wohnen"
| "verbrauchsausweis_gewerbe"
>;
return null
}

View File

@@ -152,3 +152,33 @@ export async function getRechnung(rechnung_id: string) {
}
})
}
import Surreal from "surrealdb"
// Define the database configuration interface
interface DbConfig {
url: string;
namespace: string;
database: string;
}
// Define the default database configuration
const DEFAULT_CONFIG: DbConfig = {
url: "http://127.0.0.1:8000/rpc",
namespace: "main",
database: "main",
};
export async function db(config: DbConfig = DEFAULT_CONFIG): Promise<Surreal> {
const db = new Surreal();
try {
await db.connect(config.url);
await db.use({ namespace: config.namespace, database: config.database });
return db;
} catch (err) {
console.error("Failed to connect to SurrealDB:", err instanceof Error ? err.message : String(err));
await db.close();
throw err;
}
}

View File

@@ -188,7 +188,7 @@ export async function createInvoice(
data["lineItems"].push(
createLineItem(
`Bedarfsausweis Online (ID ${ausweis.id})`,
PRICES.BedarfsausweisWohnen.Standard,
PRICES.VerbrauchsausweisWohnen.Standard,
19
)
);
@@ -196,7 +196,7 @@ export async function createInvoice(
data["lineItems"].push(
createLineItem(
`Bedarfsausweis Online (Vorprüfung negativ) (ID ${ausweis.id})`,
PRICES.BedarfsausweisWohnen.Beratung,
PRICES.VerbrauchsausweisWohnen.Beratung,
19
)
);
@@ -204,7 +204,7 @@ export async function createInvoice(
data["lineItems"].push(
createLineItem(
`Bedarfsausweis Offline (ID ${ausweis.id})`,
PRICES.BedarfsausweisWohnen.Offline,
PRICES.VerbrauchsausweisWohnen.Offline,
19
)
);
@@ -281,24 +281,6 @@ export async function createInvoice(
};
}
export async function getLexOfficeVoucherNumber(rechnung: Rechnung) {
const request = await fetch(
`https://api.lexoffice.io/v1/invoices/${rechnung.lex_office_id}`,
{
method: "GET",
headers: {
Accept: `application/json`,
Authorization: `Bearer ${LEX_OFFICE_API_KEY}`,
"Content-Type": "application/json",
},
}
);
const response = await request.json();
return response["voucherNumber"]
}
/**

View File

@@ -1,36 +0,0 @@
import { BASE_URI } from "#lib/constants.js";
import { transport } from "#lib/mail.js";
import { Benutzer } from "../prisma.js";
export async function sendAusweisGespeichertMail(user: Benutzer, ausweis_id: string) {
await transport.sendMail({
from: `"IBCornelsen" <info@online-energieausweis.org>`,
to: user.email,
subject: `Ihr Ausweis wurde gespeichert - IBCornelsen - (ID: ${ausweis_id})`,
html: `<p>Sehr geehrte*r ${user.vorname} ${user.name},</p>
<p>Ihr Energieausweis wurde erfolgreich in Ihrem Konto gespeichert. Sie können ihn jederzeit in Ihrem Kundenbereich abrufen.<br><br>
Ihre Vorgänge und Ausweise können Sie in Ihrem Kundenkonto einsehen und bearbeiten:<br><br>
<a href="${BASE_URI}/dashboard">zum Kundenkonto</a><br></p>
<p>
Mit freundlichen Grüßen,
<br>
Dipl.-Ing. Jens Cornelsen
<br>
<br>
<strong>IB Cornelsen</strong>
<br>
Katendeich 5A
<br>
21035 Hamburg
<br>
www.online-energieausweis.org
<br>
<br>
fon 040 · 209339850
<br>
fax 040 · 209339859
</p>`
})
}

View File

@@ -1,27 +1,9 @@
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { checkAuthorizationHeader, checkAuthorizationHeaderNoThrow } from "#lib/middleware/authorization.js";
import { AstroGlobal } from "astro";
import { Enums } from "#lib/client/prisma.js";
import { prisma } from "#lib/server/prisma.js";
export function getCurrentUser(Astro: AstroGlobal) {
const accessToken = Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value;
return checkAuthorizationHeaderNoThrow(`Bearer ${accessToken}`)
}
export async function getOtherUser(Astro: AstroGlobal, userId : string) {
const accessToken = Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value;
let currentUser = await checkAuthorizationHeaderNoThrow(`Bearer ${accessToken}`)
if (currentUser?.rolle == Enums.BenutzerRolle.ADMIN) {
const user = await prisma.benutzer.findUnique({
where: {
id: userId
}
})
return user;
}
return null;
}

255
src/lib/validators/index.ts Normal file
View File

@@ -0,0 +1,255 @@
import {
VerbrauchsausweisWohnenSchema,
AufnahmeSchema,
ObjektSchema,
BildSchema,
RechnungSchema,
EventSchema,
BenutzerSchema,
GebaeudePlaeneSchema,
AnteilshaberSchema,
BedarfsausweisWohnenSchema,
VerbrauchsausweisGewerbeSchema
} from "#lib/client/prisma";
import { z } from "zod";
export const RechnungValidator = RechnungSchema.omit({
aufnahme_id: true,
id: true,
benutzer_id: true
})
export const GebaeudePlaeneValidator = GebaeudePlaeneSchema.omit({
id: true,
objekt_id: true
})
export const AnteilshaberValidator = AnteilshaberSchema.omit({
benutzer_id: true,
id: true,
objekt_id: true
})
export const BildValidator = BildSchema.omit({
id: true,
objekt_id: true
})
export const AufnahmeValidator = AufnahmeSchema.omit({
id: true,
benutzer_id: true,
objekt_id: true,
}).merge(
z.object({
verbrauchsausweis_wohnen: VerbrauchsausweisWohnenSchema.omit({
id: true,
benutzer_id: true,
aufnahme_id: true,
}).nullable(),
bedarfsausweis_wohnen: VerbrauchsausweisWohnenSchema.omit({
id: true,
benutzer_id: true,
aufnahme_id: true,
}).nullable(),
verbrauchsausweis_gewerbe: VerbrauchsausweisWohnenSchema.omit({
id: true,
benutzer_id: true,
aufnahme_id: true,
}).nullable(),
rechnungen: z.array(
RechnungValidator
),
events: z.array(
EventSchema.omit({
benutzer_id: true,
id: true,
}).merge(
z.object({
benutzer: BenutzerSchema.pick({ uid: true }),
})
)
),
})
);
export const ObjektValidator = ObjektSchema.omit({
benutzer_id: true,
id: true
}).merge(z.object({
aufnahme: z.array(
AufnahmeValidator
).nullable().optional(),
bilder: z.array(
BildValidator
).nullable().optional(),
gebaeude_plaene: z.array(
GebaeudePlaeneValidator
).nullable().optional(),
Anteilshaber: z.array(
AnteilshaberValidator
).nullable().optional()
}))
/**
* Runtime überprüfung für den Verbrauchsausweis Wohnen
* Dieser Typ beinhaltet alle Daten bis auf die IDs aller Verlinkungen.
*/
export const VerbrauchsausweisWohnenValidator =
VerbrauchsausweisWohnenSchema.merge(
z.object({
benutzer: BenutzerSchema.omit({
id: true,
passwort: true
}),
aufnahme: AufnahmeSchema.omit({
benutzer_id: true,
objekt_id: true,
id: true,
}).merge(
z.object({
objekt: ObjektSchema.omit({
benutzer_id: true,
id: true,
}).merge(
z.object({
bilder: z.array(
BildSchema.omit({
id: true,
objekt_id: true,
})
)
})
),
rechnungen: RechnungSchema.omit({
aufnahme_id: true,
benutzer_id: true,
id: true,
}).array(),
events: z.array(
EventSchema.omit({
aufnahme_id: true,
id: true,
benutzer_id: true
}).merge(z.object({
benutzer: BenutzerSchema.pick({
uid: true
})
}))
)
})
)
})
).omit({
benutzer_id: true,
id: true,
aufnahme_id: true,
});
export const VerbrauchsausweisWohnenBerechnungValidator2024 = z.object({
endEnergieVerbrauchGesamt: z.number(),
primaerEnergieVerbrauchGesamt: z.number(),
energieEffizienzKlasse: z.string(),
co2EmissionenGesamt: z.number()
})
/**
* Runtime überprüfung für den Verbrauchsausweis Wohnen
* Dieser Typ beinhaltet alle Daten bis auf die IDs aller Verlinkungen.
*/
export const BedarfsausweisWohnenValidator =
BedarfsausweisWohnenSchema.merge(
z.object({
aufnahme: AufnahmeSchema.omit({
benutzer_id: true,
objekt_id: true,
id: true,
}).merge(
z.object({
objekt: ObjektSchema.omit({
benutzer_id: true,
id: true,
}).merge(
z.object({
bilder: z.array(
BildSchema.omit({
id: true,
objekt_id: true,
})
)
})
),
rechnungen: RechnungSchema.omit({
aufnahme_id: true,
benutzer_id: true,
id: true,
}).array(),
events: z.array(
EventSchema.omit({
aufnahme_id: true,
id: true,
benutzer_id: true
}).merge(z.object({
benutzer: BenutzerSchema.pick({
uid: true
})
}))
)
})
)
})
).omit({
benutzer_id: true,
id: true,
aufnahme_id: true,
});
/**
* Runtime überprüfung für den Verbrauchsausweis Wohnen
* Dieser Typ beinhaltet alle Daten bis auf die IDs aller Verlinkungen.
*/
export const VerbrauchsausweisGewerbeValidator =
VerbrauchsausweisGewerbeSchema.merge(
z.object({
aufnahme: AufnahmeSchema.omit({
benutzer_id: true,
objekt_id: true,
id: true,
}).merge(
z.object({
objekt: ObjektSchema.omit({
benutzer_id: true,
id: true,
}).merge(
z.object({
bilder: z.array(
BildSchema.omit({
id: true,
objekt_id: true,
})
)
})
),
rechnungen: RechnungSchema.omit({
aufnahme_id: true,
benutzer_id: true,
id: true,
}).array(),
events: z.array(
EventSchema.omit({
aufnahme_id: true,
id: true,
benutzer_id: true
}).merge(z.object({
benutzer: BenutzerSchema.pick({
uid: true
})
}))
)
})
)
})
).omit({
benutzer_id: true,
id: true,
aufnahme_id: true,
});

View File

@@ -57,8 +57,7 @@
"bedarfsausweis-wohnen.ausweis"
);
if (localStorageAusweis) {
ausweis = JSON.parse(localStorageAusweis)
ausweis.ausweistyp = ausweistyp;
ausweis = JSON.parse(localStorageAusweis);
}
const localStorageAufnahme = localStorage.getItem(
@@ -148,7 +147,6 @@
{ausweisart}
{partner_code}
showWeiter={false}
{ausweistyp}
{form}
{skala}
></ButtonWeiterHilfe>
@@ -169,7 +167,7 @@
><GebaeudeDaten bind:aufnahme bind:objekt {ausweisart} /></Bereich
>
<!-- C - Berechnungshilfe und Tabelle der Hüllflächen, U-Werte und Gebäudevolumen
<!-- C - Berechnungshilfe und Tabelle der Hüllflächen, U-Werte und Gebäudevolumen -->
<!-- <Bereich
bereich="C"
@@ -177,13 +175,13 @@
><GebaeudeVolumen bind:ausweis /></Bereich
> -->
<!-- D - Eingabe der Fensterflächen und Konstruktion von Dach, Wänden und Boden
<!-- D - Eingabe der Fensterflächen und Konstruktion von Dach, Wänden und Boden -->
<!-- <Bereich
bereich="D"
title="Eingabe der Fensterflächen und Konstruktion von Dach, Wänden und Boden"
><Fensterflaechen bind:ausweis /></Bereich
> -->
> -->
<!-- E - Angabe zu Lüftung und Kühlung -->
@@ -284,7 +282,6 @@
{ausweisart}
{partner_code}
showWeiter={true}
{ausweistyp}
{form}
{skala}
></ButtonWeiterHilfe>

View File

@@ -1,23 +1,18 @@
<script lang="ts">
import { BenutzerClient } from "#components/Ausweis/types.js";
import { AufnahmeKomplettClient, BenutzerClient } from "#components/Ausweis/types.js";
import AusweisPruefenNotification from "#components/AusweisPruefenNotification.svelte";
import Carousel from "#components/Carousel.svelte";
import DashboardAusweis from "#components/Dashboard/DashboardAusweis.svelte";
import DashboardNachweis from "#components/Dashboard/DashboardNachweis.svelte";
import NotificationWrapper from "#components/Notifications/NotificationWrapper.svelte";
import { Aufnahme, BedarfsausweisWohnen, Bild, Objekt, Rechnung, Unterlage, VerbrauchsausweisGewerbe, VerbrauchsausweisWohnen } from "#lib/client/prisma.js";
import { AusstellungsTyp } from "#lib/constants.js";
import { CaretRight, Plus } from "radix-svelte-icons";
import CaretLeft from "radix-svelte-icons/src/lib/icons/CaretLeft.svelte";
import { Objekt } from "#lib/client/prisma.js";
import mime from "mime"
import { ChevronLeft, ChevronRight, FileText } from "radix-svelte-icons";
export let ausweis: (VerbrauchsausweisWohnen | VerbrauchsausweisGewerbe | BedarfsausweisWohnen) & {
rechnung: Rechnung,
aufnahme: Aufnahme & {
bilder: Bild[],
unterlagen: Unterlage[],
objekt: Objekt
}
};
export let user: BenutzerClient;
export let aufnahme: AufnahmeKomplettClient;
export let objekt: Objekt;
export let benutzer: BenutzerClient;
export let page: number;
export let totalPageCount: number;
let dropdownOpen = false;
@@ -27,64 +22,50 @@
}
</script>
<div class="justify-between items-center flex flex-row">
<div class="text-2xl rounded-lg gap-2 bg-grey-200 text-center">
ID: {ausweis.id}
</div>
<div class="text-2xl">{ausweis.aufnahme.objekt.adresse}, {ausweis.aufnahme.objekt.plz} {ausweis.aufnahme.objekt.ort}</div>
<!-- Funkioniert noch nicht. Man kann den neuen Ausweis nicht abspeichern. -->
<div class="relative">
<button class="button flex flex-row rounded-lg gap-2 bg-secondary text-white text-center items-center" on:click={toggleDropdown}>
Neuausstellung zu {ausweis.aufnahme.objekt.adresse} <Plus size={20}></Plus>
</button>
{#if dropdownOpen}
<div class="absolute top-15 left-0 mt-2 w-50 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 z-[9999]" on:click|stopPropagation on:keydown|stopPropagation on:keyup|stopPropagation>
<div class="py-1 w-full" role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
<a href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?aufnahme_id={ausweis.aufnahme.id}&ausweis_id={ausweis.id}&typ={AusstellungsTyp.Neuausstellung}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis<br>Wohnen Erstellen</a>
<a href="/energieausweis-erstellen/verbrauchsausweis-gewerbe?aufnahme_id={ausweis.aufnahme.id}&ausweis_id={ausweis.id}&typ={AusstellungsTyp.Neuausstellung}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis<br>Gewerbe Erstellen</a>
<a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeud e?aufnahme_id={ausweis.aufnahme.id}&ausweis_id={ausweis.id}&typ={AusstellungsTyp.Neuausstellung}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Bedarfsausweis<br>Wohnen Erstellen</a>
</div>
</div>
{/if}
</div>
</div>
<h1>{objekt.adresse}, {objekt.plz} {objekt.ort}</h1>
<hr>
<div class="grid grid-cols-1 md:grid-cols-1 lg:grid-cols-1 gap-2">
<div class="flex items-center justify-between mx-80">
{#if page > 1}
<a class="p-2 rounded-lg hover:bg-gray-200 cursor-pointer" href="/dashboard/objekte?p={page - 1}">
<CaretLeft size={34}></CaretLeft>
</a>
{:else}
<div></div>
{/if}
<div class="text-lg">Ausweis {page} / {totalPageCount}</div>
{#if totalPageCount > page}
<a class="p-2 rounded-lg hover:bg-gray-200 cursor-pointer" href="/dashboard/objekte?p={page + 1}">
<CaretRight size={34}></CaretRight>
</a>
{:else}
<div></div>
<div class="relative mb-6">
<button class="button flex flex-row rounded-lg gap-2 bg-secondary text-white text-center" on:click={toggleDropdown}>
Ausweis erstellen +
</button>
{#if dropdownOpen}
<div class="absolut mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5" on:click|stopPropagation on:keydown|stopPropagation on:keyup|stopPropagation>
<div class="py-1" role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
<a href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude?aufnahme={aufnahme.id}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis Wohnen Erstellen</a>
<a href="/energieausweis-erstellen/verbrauchsausweis-gewerbe?aufnahme={aufnahme.id}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis Gewerbe Erstellen</a>
<a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude?aufnahme={aufnahme.id}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Bedarfsausweis Erstellen</a>
</div>
</div>
{/if}
</div>
</div>
<div class="my-4 grid grid-cols-1 md:grid-cols-1 lg:grid-cols-1 gap-2">
<div class="mb-4 grid grid-cols-[1fr] md:grid-cols-[6fr,15fr,6fr] lg:grid-cols-[6fr,15fr,6fr] min-h-[550px]">
<DashboardAusweis {benutzer} {ausweis} aufnahme={ausweis.aufnahme} objekt={ausweis.aufnahme.objekt} rechnung={ausweis.rechnung}></DashboardAusweis>
<div class="relative bg-gray-100 rounded-md flex justify-center items-center">
{#if aufnahme.bilder.length > 0}
<Carousel perPage={3}>
{#each aufnahme.bilder as bild, i (i)}
<img src="/bilder/{bild.id}.jpg" alt={bild.kategorie} class="max-h-[25vh] h-full w-full object-contain">
{/each}
<span slot="left-control" class="p-2.5 bg-opacity-50 bg-white block rounded-full"><ChevronLeft size={24}></ChevronLeft></span>
<span slot="right-control" class="p-2.5 bg-opacity-50 bg-white block rounded-full"><ChevronRight size={24}></ChevronRight></span>
</Carousel>
{/if}
</div>
{#if aufnahme.unterlagen.length > 0}
<h3 class="font-semibold">Unterlagen</h3>
<div class="grid grid-flow-col gap-4">
{#each aufnahme.unterlagen as unterlage}
<a href="/unterlagen/{unterlage.id}.{mime.getExtension(unterlage.mime)}" target="_blank" class="text-black flex flex-row items-center gap-2 bg-base-200 p-2 rounded-lg"><FileText size={32}></FileText> {unterlage.name}</a>
{/each}
</div>
{/if}
<div class="fixed bottom-8 right-8 flex flex-col gap-4">
<NotificationWrapper></NotificationWrapper>
</div>
<style>
/* TODO: Das kann auch als Tailwind Klasse gemacht werden */
.button {
padding: 0.5rem 1rem;
font-size: 1rem;
@@ -92,3 +73,28 @@
cursor: pointer;
}
</style>
<div class="my-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
{#each aufnahme.verbrauchsausweise_wohnen as ausweis}
<DashboardAusweis {benutzer} {ausweis} {aufnahme} {objekt} rechnung={ausweis.rechnung}></DashboardAusweis>
{/each}
{#each aufnahme.bedarfsausweise_wohnen as ausweis}
<DashboardAusweis {benutzer} {ausweis} {aufnahme} {objekt} rechnung={ausweis.rechnung}></DashboardAusweis>
{/each}
{#each aufnahme.verbrauchsausweise_gewerbe as ausweis}
<DashboardAusweis {benutzer} {ausweis} {aufnahme} {objekt} rechnung={ausweis.rechnung}></DashboardAusweis>
{/each}
{#each aufnahme.geg_nachweise_wohnen as nachweis}
<DashboardAusweis {benutzer} ausweis={nachweis} {aufnahme} {objekt} rechnung={nachweis.rechnung}></DashboardAusweis>
{/each}
{#each aufnahme.geg_nachweise_gewerbe as nachweis}
<DashboardAusweis {benutzer} ausweis={nachweis} {aufnahme} {objekt} rechnung={nachweis.rechnung}></DashboardAusweis>
{/each}
{#each aufnahme.bedarfsausweise_gewerbe as nachweis}
<DashboardAusweis {benutzer} ausweis={nachweis} {aufnahme} {objekt} rechnung={nachweis.rechnung}></DashboardAusweis>
{/each}
</div>
<div class="fixed bottom-8 right-8 flex flex-col gap-4">
<NotificationWrapper></NotificationWrapper>
</div>

View File

@@ -0,0 +1,126 @@
<script lang="ts">
import AusweisPruefenBox from "#components/AusweisPruefenBox.svelte";
import NotificationProvider from "#components/NotificationProvider/NotificationProvider.svelte";
import { endEnergieVerbrauchVerbrauchsausweis_2016 } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016.js";
import AusweisPruefenNotification from "#components/AusweisPruefenNotification.svelte";
import DashboardAusweisSkeleton from "#components/Dashboard/DashboardAusweisSkeleton.svelte"
import { Event } from "#lib/client/prisma";
import Pagination from "#components/Pagination.svelte";
import { api } from "astro-typesafe-api/client";
import Cookies from "js-cookie"
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js"
import AusweisePruefenFilter from "#components/Dashboard/AusweisePruefenFilter.svelte";
import { z, ZodTypeAny } from "zod";
import { filterAusweise } from "#lib/filters.js";
export let page: number;
export let totalPages: number;
let filters: { name: keyof z.infer<typeof filterAusweise>, type: ZodTypeAny, value: any }[] = []
</script>
<div class="flex flex-col mb-4">
<AusweisePruefenFilter bind:filters={filters}></AusweisePruefenFilter>
</div>
<div class="gap-4 flex flex-col">
{#await api.ausweise.GET.fetch({
limit: 10,
skip: (page - 1) * 10,
filters: filters.reduce((acc, filter) => {
acc[filter.name] = filter.value
return acc
}, {})
}, {
headers: {
Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
})}
<DashboardAusweisSkeleton></DashboardAusweisSkeleton>
{:then ausweise}
{#each ausweise as { ausweis, objekt, aufnahme, bilder, events }}
{#await endEnergieVerbrauchVerbrauchsausweis_2016(ausweis, aufnahme, objekt)}
<div class="rounded-lg border w-full h-20 p-2.5 gap-4 flex flex-row items-center">
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-8 h-8 rounded-full"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="w-1/12 h-full flex flex-col gap-2">
<div class="skeleton w-full h-4"></div>
<div class="skeleton w-full h-4"></div>
</div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
<div class="skeleton w-4 h-4"></div>
</div>
{:then calculations}
<AusweisPruefenBox {ausweis} {aufnahme} {objekt} {bilder} {events} {calculations}></AusweisPruefenBox>
{/await}
{/each}
{/await}
</div>
<Pagination pages={totalPages} current={page} prev="/dashboard/admin/ausweise-pruefen/{page - 1}" next="/dashboard/admin/ausweise-pruefen/{page + 1}"></Pagination>
<div class="fixed bottom-8 right-8 flex flex-col gap-4">
<NotificationProvider component={AusweisPruefenNotification}></NotificationProvider>
</div>

View File

@@ -71,6 +71,36 @@
<Person size={22} />
Profil
</Tab>
<Tab>
<Reader width={22} height={22} />
Ausweise
</Tab>
<Tab>
<EnvelopeClosed width={22} height={22} />
Kontakt
</Tab>
<li>
<details>
<summary class="tab w-full outline-0 hover:outline-0">
<Cube width={22} height={22} />
Services</summary
>
<ul>
<li>
<Tab>
<EnvelopeClosed width={22} height={22} />
Kontakt
</Tab>
</li>
<li>
<Tab>
<EnvelopeClosed width={22} height={22} />
Kontakt
</Tab>
</li>
</ul>
</details>
</li>
</TabList>
<div
class="border border-base-300 w-full h-full rounded-lg bg-base-200 p-8"

View File

@@ -15,7 +15,6 @@
import Pagination from "#components/Pagination.svelte";
import { Enums, Objekt } from "#lib/client/prisma.js";
export let user: BenutzerClient;
export let objekte: ObjektKomplettClient[];
export let page: number;
@@ -112,7 +111,7 @@
{/each}
</div>
<Pagination pages={totalPages} current={page} prev="/dashboard/objekte?p={page - 1}" next="/dashboard/objekte?p={page + 1}"></Pagination>
<Pagination pages={totalPages} current={page} prev="/dashboard/objekte/{page - 1}" next="/dashboard/objekte/{page + 1}"></Pagination>
<Overlay bind:hidden={objektOverlayHidden}>

View File

@@ -6,10 +6,11 @@
export let onLogin: (response: Awaited<ReturnType<typeof loginClient>>) => any;
export let email: string = "";
export let password: string = "";
export let route: "login" | "signup" = "login"
const navigate = (target: string) => {
route = target as typeof route;
let route: "login" | "signup" = "login"
const navigate = (target: typeof route) => {
route = target
}
const loginData = {

View File

@@ -0,0 +1,384 @@
<script lang="ts">
import ZipSearch from "../components/PlzSuche.svelte";
import Label from "../components/Label.svelte";
import type {
Bezahlmethoden,
} from "#lib/client/prisma";
import { Enums } from "#lib/client/prisma";
import PaymentOption from "#components/PaymentOption.svelte";
import CheckoutItem from "#components/CheckoutItem.svelte";
import { BenutzerClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
import { PRICES } from "#lib/constants.js";
import { RechnungClient } from "#components/Ausweis/types.js";
import { api } from "astro-typesafe-api/client";
export let user: BenutzerClient;
export let ausweis:
| VerbrauchsausweisWohnenClient;
// TODO: überarbeiten und zu inferProcedureOutput machen
let rechnung: Partial<RechnungClient> = {
email: user.email,
empfaenger: user.vorname + " " + user.name,
strasse: user.adresse,
plz: user.plz,
ort: user.ort,
versand_empfaenger: user.vorname + " " + user.name,
versand_strasse: user.adresse,
versand_plz: user.plz,
versand_ort: user.ort,
telefon: user.telefon,
};
let services = [
{
name: "Qualitätsdruck per Post (zusätzlich zur PDF Version) für 9€ inkl. MwSt.",
id: Enums.Service.Qualitaetsdruck,
price: 9,
selected: false,
},
{
name: "Aushang (für öffentliche Gebäude gesetzlich vorgeschrieben) für 10€ inkl. MwSt.",
id: Enums.Service.Aushang,
price: 10,
selected: false,
},
{
name: "Same Day Service (Bestellung Werktags vor 12:00 Uhr - Ausstellung bis 18:00 Uhr am gleichen Tag) für 29€ inkl. MwSt.",
id: Enums.Service.SameDay,
price: 29,
selected: false,
},
{
name: "Telefonische Energieeffizienzberatung für 75€ inkl. MwSt.",
id: Enums.Service.Telefonberatung,
price: 75,
selected: false,
},
];
export let aktiveBezahlmethode: Bezahlmethoden =
Enums.Bezahlmethoden.paypal;
async function createPayment(e: SubmitEvent) {
e.preventDefault();
// TODO
const response = await api.rechnung.PUT.fetch({
...rechnung,
ausweisart: Enums.Ausweisart.VerbrauchsausweisWohnen,
ausweis_uid: ausweis.uid,
bezahlmethode: aktiveBezahlmethode,
services: services
.filter((service) => service.selected)
.map((service) => service.id),
});
if (aktiveBezahlmethode === Enums.Bezahlmethoden.rechnung) {
window.location.href = `/payment/success?r=${response.uid}&a=${ausweis.uid}`
} else {
window.location.href = response.checkout_url as string;
}
}
const priceTotal = services.reduce((acc, service) => {
if (service.selected) {
return acc + service.price;
}
return acc;
}, 0) + PRICES[Enums.Ausweisart.VerbrauchsausweisWohnen][0];
</script>
<form class="grid grid-cols-[2fr_1fr] gap-4 h-full" on:submit={createPayment}>
<div>
<h3 class="font-semibold">Ansprechpartner</h3>
<div class="rounded-lg border p-4 border-base-300 bg-base-100">
<div class="grid grid-cols-3 gap-4">
<!-- Anrede -->
<div>
<Label>Anrede *</Label>
<div>
<select name="anrede" bind:value={user.anrede}>
<option>bitte auswählen</option>
<option value="Herr">Herr</option>
<option value="Frau">Frau</option>
</select>
</div>
</div>
<!-- Vorname -->
<div>
<Label>Vorname *</Label>
<input
name="vorname"
type="text"
bind:value={user.vorname}
required
/>
</div>
<!-- Nachname -->
<div>
<Label>Nachname *</Label>
<input
name="name"
type="text"
bind:value={user.name}
required
/>
</div>
</div>
<div class="grid grid-cols-2 gap-4">
<!-- Telefon -->
<div>
<Label>Telefon</Label>
<input
name="telefon"
bind:value={user.telefon}
type="text"
/>
</div>
<!-- Email -->
<div>
<Label>E-Mail *</Label>
<input
name="email"
type="email"
bind:value={user.email}
required
/>
</div>
</div>
</div>
<h3 class="mt-8 font-semibold">Rechnungsadresse</h3>
<div class="rounded-lg border p-4 border-base-300 bg-base-100">
<div class="grid grid-cols-2 gap-4">
<div>
<Label>Empfänger *</Label>
<input
name="rechnung_empfaenger"
type="text"
bind:value={rechnung.empfaenger}
required
data-rule-maxlength="100"
data-msg-maxlength="max. 100 Zeichen"
/>
</div>
<!-- Zusatzzeile -->
<div>
<Label>Zusatzzeile</Label>
<input
name="rechnung_zusatzzeile"
bind:value={rechnung.zusatzzeile}
type="text"
data-rule-maxlength="80"
data-msg-maxlength="max. 80 Zeichen"
/>
</div>
</div>
<div class="grid grid-cols-3 gap-4">
<!-- Strasse -->
<div>
<Label>Straße, Hausnummer *</Label>
<input
name="rechnung_strasse"
bind:value={rechnung.strasse}
type="text"
required
data-rule-maxlength="40"
data-msg-maxlength="max. 40 Zeichen"
/>
</div>
<!-- PLZ -->
<ZipSearch
name="rechnung_plz"
bind:zip={rechnung.plz}
bind:city={rechnung.ort}
/>
<!-- Ort -->
<div>
<Label>Ort *</Label>
<input
name="rechnung_ort"
readonly
type="text"
required
value={rechnung.ort}
/>
</div>
</div>
<div class="grid grid-cols-2 gap-4">
<!-- Telefon -->
<div>
<Label>Telefon</Label>
<input
name="rechnung_telefon"
bind:value={rechnung.telefon}
type="text"
/>
</div>
<!-- Email -->
<div>
<Label>E-Mail</Label>
<input
name="rechnung_email"
bind:value={rechnung.email}
type="email"
/>
</div>
</div>
</div>
<h3 class="mt-8 font-semibold">Versandadresse</h3>
<div class="rounded-lg border p-4 border-base-300 bg-base-100">
<div class="flex flex-row gap-2 items-center">
<input
class="w-[15px] h-[15px]"
type="checkbox"
name="abweichende_versand_adresse"
bind:checked={rechnung.abweichende_versand_adresse}
/>
<Label>Abweichende Versandadresse</Label>
</div>
<div class="grid grid-cols-2 gap-4">
<!-- Empfänger -->
<div>
<Label>Empfänger *</Label>
<input
name="versand_empfaenger"
type="text"
readonly={!rechnung.abweichende_versand_adresse}
bind:value={rechnung.versand_empfaenger}
required
data-rule-maxlength="100"
data-msg-maxlength="max. 100 Zeichen"
/>
</div>
<!-- Zusatzzeile -->
<div>
<Label>Zusatzzeile</Label>
<input
name="versand_zusatzzeile"
type="text"
readonly={!rechnung.abweichende_versand_adresse}
bind:value={rechnung.versand_zusatzzeile}
data-rule-maxlength="80"
data-msg-maxlength="max. 80 Zeichen"
/>
</div>
</div>
<div class="grid grid-cols-3 gap-4">
<!-- Strasse -->
<div>
<Label>Straße, Hausnummer *</Label>
<input
name="versand_strasse"
type="text"
readonly={!rechnung.abweichende_versand_adresse}
bind:value={rechnung.versand_strasse}
required
data-rule-maxlength="40"
data-msg-maxlength="max. 40 Zeichen"
/>
</div>
<!-- PLZ -->
<ZipSearch
name="versand_plz"
readonly={!rechnung.abweichende_versand_adresse}
bind:zip={rechnung.versand_plz}
bind:city={rechnung.versand_ort}
/>
<!-- Ort -->
<div>
<Label>Ort *</Label>
<input
name="versand_ort"
type="text"
readonly
required
bind:value={rechnung.versand_ort}
/>
</div>
</div>
</div>
<h3 class="mt-8 font-semibold">Bezahlmethode</h3>
<div
class="rounded-lg border p-4 border-base-300 bg-base-100 flex flex-row gap-4 justify-between"
>
<PaymentOption
bezahlmethode={Enums.Bezahlmethoden.paypal}
bind:aktiveBezahlmethode
name={"PayPal"}
icon={"/images/paypal.png"}
></PaymentOption>
<PaymentOption
bezahlmethode={Enums.Bezahlmethoden.sofort}
bind:aktiveBezahlmethode
name={"Sofort"}
icon={"/images/sofort.png"}
></PaymentOption>
<PaymentOption
bezahlmethode={Enums.Bezahlmethoden.giropay}
bind:aktiveBezahlmethode
name={"Giropay"}
icon={"/images/giropay.png"}
></PaymentOption>
<PaymentOption
bezahlmethode={Enums.Bezahlmethoden.creditcard}
bind:aktiveBezahlmethode
name={"Kreditkarte"}
icon={"/images/mastercard.png"}
></PaymentOption>
<PaymentOption
bezahlmethode={Enums.Bezahlmethoden.rechnung}
bind:aktiveBezahlmethode
name={"Rechnung"}
icon={"/images/rechnung.png"}
></PaymentOption>
</div>
</div>
<div>
<h3 class="font-semibold">Zusammenfassung</h3>
<div class="rounded-lg border p-4 border-base-300 bg-base-100">
<CheckoutItem
image={"https://www.gih.de/wp-content/uploads/2015/11/EnergieausweisW-E.jpg"}
name={"Energieausweis"}
description={"Verbrauchsausweis Wohnen"}
price={45}
quantity={1}
removable={false}
maxQuantity={1}
/>
<div class="mt-auto">
<hr />
<div class="flex flex-row items-center justify-between">
<span class="opacity-75 text-sm">Netto</span>
<span class="font-semibold text-sm">{Math.round(priceTotal * 0.81 * 100) / 100}</span>
</div>
<div class="flex flex-row items-center justify-between">
<span class="opacity-75 text-sm">19% MwSt</span>
<span class="font-semibold text-sm">{Math.round(priceTotal * 0.19 * 100) / 100}}€</span>
</div>
<hr />
<div class="flex flex-row items-center justify-between">
<span class="opacity-75 text-sm">Gesamt</span>
<span class="font-semibold text-sm">{Math.round(priceTotal)}</span>
</div>
<p class="mt-8">Mit dem Klick auf "Bestellung Bestätigen" akzeptieren sie unsere <a href="/agb">AGB</a> und <a href="/impressum">Datenschutzbestimmungen</a>. Sie werden zu ihrem ausgewählten Bezahlprovider weitergeleitet, nach Bezahlung werden sie automatisch zu unserem Portal zurückgeleitet.</p>
<button class="btn btn-secondary w-full mt-4"
>Bestellung Bestätigen</button
>
</div>
</div>
</div>
</form>

View File

@@ -32,12 +32,8 @@
import { getMaximumDevitationInPercent } from "#client/lib/helpers.js";
import { endEnergieVerbrauchVerbrauchsausweis_2016_Client } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016_Client.js";
import { endEnergieVerbrauchVerbrauchsausweisGewerbe_2016_Client } from "#lib/Berechnungen/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbe_2016_Client.js";
import { benutzerSpeichern } from "#client/lib/speichern.js";
import { benutzerLesen } from "#client/lib/lesen.js";
import { exclude } from "#lib/exclude.js";
export let user: Partial<BenutzerClient>;
export let impersonatedUser: Partial<BenutzerClient> | null = null;
export let ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbe | BedarfsausweisWohnen;
export let aufnahme: AufnahmeClient;
export let objekt: ObjektClient;
@@ -46,8 +42,9 @@
export let rechnung: RechnungClient | null = null;
export let ausweisart: Enums.Ausweisart;
export let aktiveBezahlmethode: Bezahlmethoden = Enums.Bezahlmethoden.paypal;
export let partner_code: string;
export let nurRechnungsadresseUpdate: Boolean | null = false;
let email: string, vorname: string, name: string, empfaenger: string, strasse: string, plz: string, ort: string, zusatzzeile: string, telefon: string;
@@ -62,22 +59,9 @@
ort = rechnung?.ort || localStorage.getItem("kundendaten.ort") || user.ort || "";
zusatzzeile = rechnung?.zusatzzeile || localStorage.getItem("kundendaten.zusatzzeile") || ""
telefon = rechnung?.telefon || localStorage.getItem("kundendaten.telefon") || user.telefon || "";
} else if (impersonatedUser) {
vorname = impersonatedUser.vorname || "";
name = impersonatedUser.name || "";
telefon = impersonatedUser.telefon || "";
email = impersonatedUser.email || "";
if (rechnung){
empfaenger = rechnung?.empfaenger || "";
strasse = rechnung?.strasse || "";
plz = rechnung?.plz || "";
ort = rechnung?.ort || "";
zusatzzeile = rechnung?.zusatzzeile || "";
email = rechnung?.email || "";
}
}
let abweichende_versand_adresse = rechnung?.abweichende_versand_adresse ?? JSON.parse(localStorage.getItem("kundendaten.abweichende_versand_adresse") || "false")
let abweichende_versand_adresse = JSON.parse(localStorage.getItem("kundendaten.abweichende_versand_adresse") || "false")
let versand_email: string | undefined,
versand_zusatzzeile: string | undefined,
@@ -85,13 +69,16 @@
versand_strasse: string | undefined,
versand_plz: string | undefined,
versand_ort: string | undefined;
versand_email = "";//Todo Datenbankfeld fehlt noch
versand_zusatzzeile = rechnung?.versand_zusatzzeile ?? zusatzzeile;
versand_empfaenger = rechnung?.versand_empfaenger ?? empfaenger;
versand_strasse = rechnung?.versand_strasse ?? strasse;
versand_plz = rechnung?.versand_plz ?? plz;
versand_ort = rechnung?.versand_ort ?? ort;
$: {
if (!abweichende_versand_adresse) {
versand_email = email
versand_zusatzzeile = zusatzzeile
versand_empfaenger = empfaenger
versand_strasse = strasse
versand_plz = plz
versand_ort = ort
}
}
$: {
// Wir speichern jede Änderung an den Kundendaten im localStorage ab.
@@ -117,25 +104,25 @@
name: "Qualitätsdruck per Post (zusätzlich zur PDF Version)",
id: Enums.Service.Qualitaetsdruck,
price: 9,
selected: rechnung ? rechnung.services.indexOf(Enums.Service.Qualitaetsdruck) >= 0 : false,
selected: false,
},
{
name: "Aushang (für öffentliche Gebäude gesetzlich vorgeschrieben)",
id: Enums.Service.Aushang,
price: 10,
selected: rechnung ? rechnung.services.indexOf(Enums.Service.Aushang) >= 0 : false,
selected: false,
},
{
name: "Same Day Service - Bestellung Werktags vor <b>12:00&nbsp;Uhr</b><br>Ausstellung bis <b>18:00&nbsp;Uhr</b> am gleichen Tag",
id: Enums.Service.SameDay,
price: 29,
selected: rechnung ? rechnung.services.indexOf(Enums.Service.SameDay) >= 0 : false,
selected: false,
},
{
name: "Telefonische Energie-Effizienzberatung",
id: Enums.Service.Telefonberatung,
price: 75,
selected: rechnung ? rechnung.services.indexOf(Enums.Service.Telefonberatung) >= 0 : false,
selected: false,
},
];
@@ -212,12 +199,6 @@
}
try {
const merged_versand_empfaenger = versand_empfaenger || empfaenger;
const merged_versand_strasse = versand_strasse || strasse;
const merged_versand_plz = versand_plz || plz;
const merged_versand_ort = versand_ort || ort;
const merged_versand_zusatzzeile = versand_zusatzzeile || zusatzzeile;
const { id } = await api.rechnung.anfordern.PUT.fetch(
{
email: email,
@@ -225,11 +206,10 @@
strasse: strasse,
plz: plz,
ort: ort,
versand_empfaenger: merged_versand_empfaenger,
versand_strasse: merged_versand_strasse,
versand_plz: merged_versand_plz,
versand_ort: merged_versand_ort,
versand_zusatzzeile: merged_versand_zusatzzeile,
versand_empfaenger: versand_empfaenger,
versand_strasse: versand_strasse,
versand_plz: versand_plz,
versand_ort: versand_ort,
telefon: telefon,
nachweis_id: result.nachweis_id
},
@@ -253,7 +233,7 @@
}
}
async function speichern(authuser = null) {
async function speichern() {
loginAction = speichern;
if (!await validateAccessTokenClient()) {
loginOverlayHidden = false;
@@ -269,62 +249,6 @@
} else {
result = await ausweisSpeichern(ausweis, objekt, aufnahme, bilder, unterlagen, ausweisart)
}
if (authuser) {
user = await benutzerLesen(authuser.id);
}
let resultUser: Awaited<ReturnType<typeof benutzerSpeichern>> | Awaited<ReturnType<typeof benutzerSpeichern>> | null = null;
const { passwort, ...baseUser } = impersonatedUser ?? user;
const benutzerObjekt = {
...baseUser,
name,
vorname,
telefon
};
resultUser = await benutzerSpeichern(benutzerObjekt);
let id: string, checkout_url: string | undefined;
if (rechnung) {
const merged_versand_empfaenger = versand_empfaenger || empfaenger;
const merged_versand_strasse = versand_strasse || strasse;
const merged_versand_plz = versand_plz || plz;
const merged_versand_ort = versand_ort || ort;
const merged_versand_zusatzzeile = versand_zusatzzeile || zusatzzeile;
const result = await api.rechnung._id.PATCH.fetch({
bezahlmethode: aktiveBezahlmethode,
abweichende_versand_adresse: abweichende_versand_adresse,
empfaenger,
strasse,
plz,
ort,
telefon,
email,
zusatzzeile,
versand_empfaenger: merged_versand_empfaenger,
versand_strasse: merged_versand_strasse,
versand_plz: merged_versand_plz,
versand_ort: merged_versand_ort,
versand_zusatzzeile: merged_versand_zusatzzeile
}, {
params: {
id: rechnung.id
},
headers: {
Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`,
},
});
id = result.id;
checkout_url = result.checkout_url;
}
} catch(e) {
addNotification({
dismissable: true,
@@ -341,11 +265,11 @@
);
localStorage.clear();
window.location.href = `/dashboard/objekte/${ausweis.id}`
window.location.href = `/speichern-erfolgreich?id=${ausweis.id}`
}
}
async function bestellen(authuser = null) {
async function bestellen() {
if (!form.checkValidity()) {
addNotification({
dismissable: true,
@@ -388,22 +312,6 @@
}
}
if (authuser) {
user = await benutzerLesen(authuser.id);
}
let resultUser: Awaited<ReturnType<typeof benutzerSpeichern>> | Awaited<ReturnType<typeof benutzerSpeichern>> | null = null;
const { passwort, ...baseUser } = impersonatedUser ?? user;
const benutzerObjekt = {
...baseUser,
name,
vorname,
telefon
};
resultUser = await benutzerSpeichern(benutzerObjekt);
if (rechnung && rechnung.status === "paid") {
window.location.href = "/dashboard"
return;
@@ -412,12 +320,6 @@
try {
let id: string, checkout_url: string | undefined;
const merged_versand_empfaenger = versand_empfaenger || empfaenger;
const merged_versand_strasse = versand_strasse || strasse;
const merged_versand_plz = versand_plz || plz;
const merged_versand_ort = versand_ort || ort;
const merged_versand_zusatzzeile = versand_zusatzzeile || zusatzzeile;
if (rechnung) {
const result = await api.rechnung._id.PATCH.fetch({
bezahlmethode: aktiveBezahlmethode,
@@ -426,13 +328,12 @@
strasse: strasse,
plz: plz,
ort: ort,
versand_empfaenger: versand_empfaenger,
versand_strasse: versand_strasse,
versand_plz: versand_plz,
versand_ort: versand_ort,
telefon: telefon,
zusatzzeile: zusatzzeile,
versand_empfaenger: merged_versand_empfaenger,
versand_strasse: merged_versand_strasse,
versand_plz: merged_versand_plz,
versand_ort: merged_versand_ort,
versand_zusatzzeile: merged_versand_zusatzzeile
versand_zusatzzeile: versand_zusatzzeile
}, {
params: {
id: rechnung.id
@@ -457,16 +358,13 @@
strasse: strasse,
plz: plz,
ort: ort,
zusatzzeile: zusatzzeile,
versand_empfaenger: merged_versand_empfaenger,
versand_strasse: merged_versand_strasse,
versand_plz: merged_versand_plz,
versand_ort: merged_versand_ort,
versand_zusatzzeile: merged_versand_zusatzzeile,
versand_empfaenger: versand_empfaenger,
versand_strasse: versand_strasse,
versand_plz: versand_plz,
versand_ort: versand_ort,
telefon: telefon,
ausweis_id: ausweis.id,
partner_code,
abweichende_versand_adresse: abweichende_versand_adresse
partner_code
},
{
headers: {
@@ -506,7 +404,6 @@
let form: HTMLFormElement;
</script>
{#if !nurRechnungsadresseUpdate}
<div
id="skala"
class="bg-white grid grid-cols-1 gap-x-8 gap-y-4 px-0 sm:p-4
@@ -537,7 +434,7 @@
<Progressbar active={1} {ausweisart} ausweistyp={ausweis.ausweistyp} anliegen={"Energieausweis erstellen"} />
{/if}
</div>
{/if}
<form id="formInput-2" bind:this={form}>
<div id="formular-box" class="formular-boxen ring-0">
@@ -805,6 +702,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
<input
name="versand_ort"
type="text"
readonly
required
bind:value={versand_ort}
/>
@@ -841,7 +739,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
</div>
<!-- E-mail -->
<!-- Versand Email wird derzeit nicht verwendet
<div class="input-standard order-12 md:order-12 xl:order-12">
<InputLabel title="E-mail *"></InputLabel>
@@ -858,7 +756,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
</HelpLabel>
</div>
</div>
-->
<!-- Telefon
<div class="input-standard order-[13] md:order-[13] xl:order-[13]">
@@ -882,7 +780,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
</Bereich
>
{#if !gegAnfrage && !nurRechnungsadresseUpdate}
{#if !gegAnfrage}
<Bereich bereich="3" title="Bezahlmethode">
<div
id="bezahlung"
@@ -993,7 +891,7 @@ grid-cols-3 sm:grid-cols-5 justify-around justify-items-center items-center"
{/if}
<!-- Falls wir es mit einem Ausweis zu tun haben und der Nutzer keine Hilfe bestellt hat dann zeigen wir eine Box mit sachen an die vielleicht unklar sind. -->
{#if (ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen || ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe || ausweisart === Enums.Ausweisart.BedarfsausweisWohnen) && (ausweis.ausweistyp === Enums.AusweisTyp.Standard || ausweis.ausweistyp === Enums.AusweisTyp.standardXL) && (!nurRechnungsadresseUpdate)}
{#if (ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen || ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe || ausweisart === Enums.Ausweisart.BedarfsausweisWohnen) && (ausweis.ausweistyp === Enums.AusweisTyp.Standard || ausweis.ausweistyp === Enums.AusweisTyp.standardXL)}
<div class="grid grid-cols-1 sm:grid-cols-1 gap-x-6 my-6">
<div class="pruefpunkte bereich-box bg-white">
<h3>Bitte untenstehende Punkte bestätigen. Bitte gehen Sie gegebenenfalls zurück zum Formular und überprüfen bzw. korrigieren Ihre Eingaben.</h3>
@@ -1156,7 +1054,7 @@ grid-cols-3 sm:grid-cols-5 justify-around justify-items-center items-center"
{/if}
<!-- Für alle -->
<div class="pruefpunkt">
<input type="checkbox" required/>
<input type="checkbox"/>
<div class="text-left">
Ich habe die AGB und DSGVO im <a href="/impressum#agb" target="_blank" rel="noopener noreferrer">Impressum</a> gelesen und akzeptiert.
</div>
@@ -1174,40 +1072,38 @@ sm:grid-cols-[min-content_min-content_min-content] sm:justify-self-end sm:mt-8"
<button class="order-2 button" type="button" on:click={() => speichern()}>Speichern</button>
<button class="order-2 button" type="button" on:click={speichern}>Speichern</button>
{#if !nurRechnungsadresseUpdate}
{#if rechnung && rechnung.status === "paid"}
<!-- Von einer GEG Anfrage sollte man sowieso nicht noch mal auf die Kundendaten Seite gelangen, also brauchen wir das hier nicht. -->
{#if rechnung && rechnung.status === "paid"}
<!-- Von einer GEG Anfrage sollte man sowieso nicht noch mal auf die Kundendaten Seite gelangen, also brauchen wir das hier nicht. -->
<button
class="order-1 sm:order-2 button cursor-pointer"
data-cy="bestellen"
type="button"
on:click={bestellen}>Absenden</button
>
{:else}
{#if gegAnfrage}
<button
class="order-1 sm:order-2 button cursor-pointer"
type="button"
data-cy="bestellen"
on:click={anfordern}>Angebot anfordern</button
>
{:else}
<button
class="order-1 sm:order-2 button cursor-pointer"
data-cy="bestellen"
type="button"
on:click={() => bestellen()}>Absenden</button
on:click={bestellen}>Kostenpflichtig bestellen</button
>
{:else}
{#if gegAnfrage}
<button
class="order-1 sm:order-2 button cursor-pointer"
type="button"
data-cy="bestellen"
on:click={anfordern}>Angebot anfordern</button
>
{:else}
<button
class="order-1 sm:order-2 button cursor-pointer"
data-cy="bestellen"
type="button"
on:click={() => bestellen()}>Kostenpflichtig bestellen</button
>
{/if}
{/if}
{/if}
{#if user.rolle === Enums.BenutzerRolle.ADMIN}
<button class="button text-sm" on:click={() => {
localStorage.clear()
window.location.href = "/dashboard/objekte?p=1"
window.location.href = "/dashboard/objekte/1"
}}>Zurück zum Dashboard</button>
{/if}
</div>
@@ -1215,7 +1111,7 @@ sm:grid-cols-[min-content_min-content_min-content] sm:justify-self-end sm:mt-8"
<Overlay bind:hidden={loginOverlayHidden}>
<div class="bg-white w-full max-w-screen-sm py-8">
<EmbeddedAuthFlowModule onLogin={loginAction} email={email} route="signup"></EmbeddedAuthFlowModule>
<EmbeddedAuthFlowModule onLogin={loginAction} email={email}></EmbeddedAuthFlowModule>
</div>
</Overlay>

View File

@@ -13,10 +13,6 @@
export let redirect: string | null = null;
function handleInput(event) {
email = event.target.value.toLowerCase();
}
async function login(e: SubmitEvent) {
e.preventDefault()
if (passwort.length < 8) {
@@ -87,7 +83,6 @@
name="email"
class="input input-bordered text-base text-base-content font-medium"
bind:value={email}
on:input={handleInput}
required
/>
</div>

View File

@@ -47,7 +47,7 @@
export let ausweistyp: Enums.AusweisTyp;
export let aufnahme: AufnahmeClient;
export let bilder: BildClient[];
export let ausweis_id: string | null;
export let id: string | null;
export let partner_code: string;
export let loadFromDatabase: boolean = false;
@@ -63,7 +63,6 @@
const localStorageAusweis = localStorage.getItem("verbrauchsausweis-gewerbe.ausweis");
if (localStorageAusweis) {
ausweis = JSON.parse(localStorageAusweis)
ausweis.ausweistyp = ausweistyp;
}
const localStorageAufnahme = localStorage.getItem("verbrauchsausweis-gewerbe.aufnahme");
@@ -129,7 +128,6 @@
bind:blockLocalStorageSync
ausweisart={Enums.Ausweisart.VerbrauchsausweisGewerbe}
showWeiter={false}
{ausweistyp}
{form}
{partner_code}
{skala}
@@ -247,7 +245,6 @@
bind:blockLocalStorageSync
ausweisart={Enums.Ausweisart.VerbrauchsausweisGewerbe}
showWeiter={true}
{ausweistyp}
{form}
{partner_code}
{skala}

View File

@@ -55,7 +55,7 @@
export let user: BenutzerClient | null;
export let bilder: BildClient[];
export let ausweistyp: Enums.AusweisTyp;
export let ausweis_id: string | null;
export let id: string | null;
export let partner_code: string;
export let loadFromDatabase: boolean = false;
@@ -91,13 +91,11 @@
let speichernOverlayHidden = true;
$: {
if (!blockLocalStorageSync) {
localStorage.setItem("verbrauchsausweis-wohnen.ausweis", JSON.stringify(ausweis))
localStorage.setItem("verbrauchsausweis-wohnen.aufnahme", JSON.stringify(aufnahme))
localStorage.setItem("verbrauchsausweis-wohnen.objekt", JSON.stringify(objekt))
localStorage.setItem("verbrauchsausweis-wohnen.bilder", JSON.stringify(bilder))
localStorage.setItem("verbrauchsausweis-wohnen.updated_at", moment().toString())
}
}
$: {
@@ -115,7 +113,6 @@
const ausweisart = Enums.Ausweisart.VerbrauchsausweisWohnen
const anliegen = "Energieausweis erstellen";
let blockLocalStorageSync: boolean = false;
let form: HTMLFormElement;
let skala: HTMLDivElement;
@@ -161,10 +158,8 @@ let skala: HTMLDivElement;
bind:user
bind:objekt
bind:aufnahme
bind:blockLocalStorageSync
ausweisart={Enums.Ausweisart.VerbrauchsausweisWohnen}
showWeiter={false}
{ausweistyp}
{partner_code}
{form}
{skala}
@@ -273,7 +268,6 @@ let skala: HTMLDivElement;
bind:user
bind:objekt
bind:aufnahme
bind:blockLocalStorageSync
{form}
ausweisart={Enums.Ausweisart.VerbrauchsausweisWohnen}
{ausweistyp}

View File

@@ -1,5 +1,7 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDatenPartner.astro";
import AusweisLayout from "#layouts/AusweisLayoutDaten_partner.astro";
import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte";
import { AufnahmeClient, BildClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
import { Aufnahme, BedarfsausweisGewerbe, Bild, Enums, Objekt, Unterlage, VerbrauchsausweisWohnen } from "#lib/server/prisma";
import { getAufnahme, getBedarfsausweisGewerbe, getBilder, getObjekt, getUnterlagen, getVerbrauchsausweisWohnen } from "#lib/server/db";
import { getCurrentUser } from "#lib/server/user";
@@ -7,7 +9,7 @@ import BedarfsausweisGewerbeModule from "#modules/angebot-anfragen/Bedarfsauswei
const id = Astro.url.searchParams.get("id");
const aufnahme_id = Astro.url.searchParams.get("aufnahme")
let nachweistyp = Astro.url.searchParams.get("ausweistyp") as Enums.AusweisTyp || Enums.AusweisTyp.Standard;
let nachweistyp = Astro.url.searchParams.get("nachweistyp") as Enums.AusweisTyp || Enums.AusweisTyp.Standard;
let nachweis: BedarfsausweisGewerbe = {} as BedarfsausweisGewerbe;
let aufnahme: Aufnahme = {} as Aufnahme;

View File

@@ -1,5 +1,5 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDatenPartner.astro";
import AusweisLayout from "#layouts/AusweisLayoutDaten_partner.astro";
import ProduktUebersichtBedarfsausweisGewerbe from "#components/design/content/ProduktUebersichtBedarfsausweisGewerbe.svelte";
---

View File

@@ -1,5 +1,5 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDatenPartner.astro";
import AusweisLayout from "#layouts/AusweisLayoutDaten_partner.astro";
import { Aufnahme, Bild, Enums, GEGNachweisGewerbe, GEGNachweisWohnen, Objekt, Unterlage } from "#lib/server/prisma";
import { getAufnahme, getObjekt, getBilder, getGEGNachweisWohnen, getUnterlagen, getGEGNachweisGewerbe } from "#lib/server/db";
import { getCurrentUser } from "#lib/server/user";
@@ -7,7 +7,7 @@ import GEGNachweisGewerbeModule from "#modules/angebot-anfragen/GEGNachweisGewer
const id = Astro.url.searchParams.get("id");
const aufnahme_id = Astro.url.searchParams.get("aufnahme")
let nachweistyp = Astro.url.searchParams.get("ausweistyp") as Enums.AusweisTyp || Enums.AusweisTyp.Standard;
let nachweistyp = Astro.url.searchParams.get("nachweistyp") as Enums.AusweisTyp || Enums.AusweisTyp.Standard;
let nachweis: GEGNachweisGewerbe = {} as GEGNachweisGewerbe;
let aufnahme: Aufnahme = {} as Aufnahme;

View File

@@ -1,5 +1,5 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDatenPartner.astro";
import AusweisLayout from "#layouts/AusweisLayoutDaten_partner.astro";
import ProduktUebersichtGEGNachweisGewerbe from "#components/design/content/ProduktUebersichtGEGNachweisGewerbe.svelte";
---

View File

@@ -1,5 +1,5 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDatenPartner.astro";
import AusweisLayout from "#layouts/AusweisLayoutDaten_partner.astro";
import GEGNachweisWohnenModule from "#modules/angebot-anfragen/GEGNachweisWohnenModule.svelte";
import { Aufnahme, Bild, Enums, GEGNachweisWohnen, Objekt, Unterlage } from "#lib/server/prisma";
import { getAufnahme, getObjekt, getBilder, getGEGNachweisWohnen, getUnterlagen } from "#lib/server/db";

View File

@@ -1,5 +1,5 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDatenPartner.astro";
import AusweisLayout from "#layouts/AusweisLayoutDaten_partner.astro";
import ProduktUebersichtGEGNachweisWohnen from "#components/design/content/ProduktUebersichtGEGNachweisWohnen.svelte";
---

View File

@@ -1,265 +0,0 @@
---
import AusweisLayoutDatenPartner from "#layouts/AusweisLayoutDatenPartner.astro";
import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte";
import {
Aufnahme,
BedarfsausweisWohnen,
Bild,
Enums,
Objekt,
prisma,
VerbrauchsausweisGewerbe,
VerbrauchsausweisWohnen,
} from "#lib/server/prisma";
import {
getAufnahme,
getBedarfsausweisWohnen,
getBilder,
getObjekt,
getVerbrauchsausweisGewerbe,
getVerbrauchsausweisWohnen,
} from "#lib/server/db";
import { getCurrentUser } from "#lib/server/user";
import { AusstellungsTyp } from "#lib/constants";
import VerbrauchsausweisGewerbeModule from "#modules/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbeModule.svelte";
import BedarfsausweisWohnenModule from "#modules/BedarfsausweisWohnen/BedarfsausweisWohnenModule.svelte";
import { getPrismaAusweisAdapter } from "#lib/server/ausweis";
const ausweisart = Astro.params.ausweisart as string;
const partner_code = Astro.params.partner as string;
if (
ausweisart !== "verbrauchsausweis-wohngebaeude" &&
ausweisart !== "verbrauchsausweis-gewerbe" &&
ausweisart !== "bedarfsausweis-wohngebaeude"
) {
return Astro.redirect("/404");
}
const user = await getCurrentUser(Astro);
const ausweis_id = Astro.url.searchParams.get("ausweis_id");
const typ = Astro.url.searchParams.get("typ") as AusstellungsTyp;
let ausweistyp =
(Astro.url.searchParams.get("ausweistyp") as Enums.AusweisTyp) ||
Enums.AusweisTyp.Standard;
let ausweis:
| VerbrauchsausweisWohnen
| VerbrauchsausweisGewerbe
| BedarfsausweisWohnen
| null = {} as VerbrauchsausweisWohnen | VerbrauchsausweisGewerbe | BedarfsausweisWohnen;
let aufnahme: Aufnahme | null = {} as Aufnahme;
let objekt: Objekt | null = {} as Objekt;
let bilder: Bild[] = [];
let loadFromDatabase = false;
if (typ === AusstellungsTyp.Neuausstellung) {
if (!user) {
return Astro.redirect(`/auth/login?redirect=${Astro.url.toString()}`);
}
if (!ausweis_id) {
return Astro.redirect("/400");
}
const adapter = getPrismaAusweisAdapter(ausweis_id)
ausweis = await adapter?.findUnique({
where: {
id: ausweis_id
}
})
aufnahme = await prisma.aufnahme.findUnique({
where: {
id: ausweis?.aufnahme_id,
},
});
objekt = await prisma.objekt.findUnique({
where: {
id: aufnahme?.objekt_id,
},
});
if (
!ausweis ||
!aufnahme ||
!objekt ||
((ausweis.benutzer_id !== user.id ||
aufnahme.benutzer_id !== user.id ||
objekt.benutzer_id !== user.id) && user.rolle !== Enums.BenutzerRolle.ADMIN)
) {
return Astro.redirect("/405");
}
ausweis.id = null;
aufnahme.id = null;
delete aufnahme.erstellungsdatum;
ausweis.created_at = new Date()
ausweis.updated_at = new Date();
ausweis.alte_ausweis_id = null;
ausweis.ausgestellt = false;
ausweis.bestellt = false;
ausweis.kontrolldatei_angefragt = false;
ausweis.energieeffizienzklasse = null;
ausweis.ausstellungsdatum = null;
ausweis.ausweistyp = Enums.AusweisTyp.Standard;
ausweis.zurueckgestellt = false;
ausweis.storniert = false;
ausweis.rechnung_id = null;
ausweis.registriernummer = null;
// Die Daten sollen nicht aus dem localStorage genommen werden sonst kann es vorkommen, dass die ID noch besteht und der Vorgang nicht neu angelegt wird.
loadFromDatabase = true;
} else if (typ === AusstellungsTyp.Speichern) {
if (!user) {
return Astro.redirect(`/auth/login?redirect=${Astro.url.toString()}`);
}
if (!ausweis_id) {
return Astro.redirect("/400");
}
if (ausweisart === "verbrauchsausweis-wohngebaeude") {
ausweis = await getVerbrauchsausweisWohnen(ausweis_id);
} else if (ausweisart === "verbrauchsausweis-gewerbe") {
ausweis = await getVerbrauchsausweisGewerbe(ausweis_id);
} else {
ausweis = await getBedarfsausweisWohnen(ausweis_id);
}
ausweistyp = ausweis.ausweistyp;
aufnahme = (await getAufnahme(ausweis.aufnahme_id)) as Aufnahme;
objekt = (await getObjekt(aufnahme.objekt_id)) as Objekt;
if (
!ausweis ||
!aufnahme ||
!objekt ||
((ausweis.benutzer_id !== user.id ||
aufnahme.benutzer_id !== user.id ||
objekt.benutzer_id !== user.id) && user.rolle !== Enums.BenutzerRolle.ADMIN)
) {
return Astro.redirect("/405");
}
bilder = await getBilder(aufnahme.id);
loadFromDatabase = true;
} else if (typ === AusstellungsTyp.Alternativdokument) {
if (!user) {
return Astro.redirect(`/auth/login?redirect=${Astro.url.toString()}`);
}
if (!ausweis_id) {
return Astro.redirect("/400");
}
const adapter = getPrismaAusweisAdapter(ausweis_id)
ausweis = await adapter?.findUnique({
where: {
id: ausweis_id
}
})
aufnahme = await prisma.aufnahme.findUnique({
where: {
id: ausweis?.aufnahme_id,
},
});
objekt = await prisma.objekt.findUnique({
where: {
id: aufnahme?.objekt_id,
},
});
if (
!ausweis ||
!aufnahme ||
!objekt ||
((ausweis.benutzer_id !== user.id ||
aufnahme.benutzer_id !== user.id ||
objekt.benutzer_id !== user.id) && user.rolle !== Enums.BenutzerRolle.ADMIN)
) {
return Astro.redirect("/405");
}
ausweis.id = null;
delete aufnahme.erstellungsdatum;
ausweis.created_at = new Date()
ausweis.updated_at = new Date();
ausweis.alte_ausweis_id = null;
ausweis.ausgestellt = false;
ausweis.bestellt = false;
ausweis.kontrolldatei_angefragt = false;
ausweis.energieeffizienzklasse = null;
ausweis.ausstellungsdatum = null;
ausweis.ausweistyp = Enums.AusweisTyp.Standard;
ausweis.zurueckgestellt = false;
ausweis.storniert = false;
ausweis.rechnung_id = null;
ausweis.registriernummer = null;
// Die Daten sollen nicht aus dem localStorage genommen werden sonst kann es vorkommen, dass die ID noch besteht und der Vorgang nicht neu angelegt wird.
loadFromDatabase = true;
}
---
<AusweisLayoutDatenPartner title="Verbrauchsausweis erstellen" tab={
ausweisart === "verbrauchsausweis-wohngebaeude" ? 0 :
ausweisart === "verbrauchsausweis-gewerbe" ? 1 :
ausweisart === "bedarfsausweis-wohngebaeude" ? 2 : 0
}>
{
ausweisart === "verbrauchsausweis-wohngebaeude" && (
<VerbrauchsausweisWohnenModule
client:only
{ausweis}
{objekt}
{aufnahme}
{bilder}
{ausweis_id}
{ausweistyp}
{user}
{loadFromDatabase}
{partner_code}
/>
)
}
{
ausweisart === "verbrauchsausweis-gewerbe" && (
<VerbrauchsausweisGewerbeModule
client:only
{ausweis}
{objekt}
{aufnahme}
{bilder}
{ausweistyp}
{user}
{ausweis_id}
{loadFromDatabase}
{partner_code}
/>
)
}
{
ausweisart === "bedarfsausweis-wohngebaeude" && (
<BedarfsausweisWohnenModule
client:only
{ausweis}
{objekt}
{aufnahme}
{bilder}
{ausweistyp}
{ausweis_id}
{user}
{loadFromDatabase}
{partner_code}
/>
)
}
</AusweisLayoutDatenPartner>

View File

@@ -1,24 +0,0 @@
---
import Layout from "#layouts/Layout.astro";
import ProduktUebersichtBedarfsausweisWohnen from "#components/design/content/ProduktUebersichtBedarfsausweisWohnen.svelte";
import ProduktUebersichtVerbrauchsausweisGewerbe from "#components/design/content/ProduktUebersichtVerbrauchsausweisGewerbe.svelte";
import ProduktUebersichtVerbrauchsausweisWohnen from "#components/design/content/ProduktUebersichtVerbrauchsausweisWohnen.svelte";
const ausweisart = Astro.params.ausweisart;
const partner = Astro.params.partner;
if (ausweisart !== "verbrauchsausweis-wohngebaeude" && ausweisart !== "verbrauchsausweis-gewerbe" && ausweisart !== "bedarfsausweis-wohngebaeude") {
return Astro.redirect("/404")
}
let title: string = "";
if (ausweisart === "verbrauchsausweis-wohngebaeude") title = "Verbrauchsausweis Wohngebäude Produktübersicht";
if (ausweisart === "verbrauchsausweis-gewerbe") title = "Verbrauchsausweis Gewerbe Produktübersicht";
if (ausweisart === "bedarfsausweis-wohngebaeude") title = "Bedarfsausweis Wohngebäude Produktübersicht";
---
<Layout {title}>
{ausweisart === "verbrauchsausweis-wohngebaeude" && <ProduktUebersichtVerbrauchsausweisWohnen ref={`/${partner}`} />}
{ausweisart === "verbrauchsausweis-gewerbe" && <ProduktUebersichtVerbrauchsausweisGewerbe ref={`/${partner}`} />}
{ausweisart === "bedarfsausweis-wohngebaeude" && <ProduktUebersichtBedarfsausweisWohnen ref={`/${partner}`} />}
</Layout>

Some files were not shown because too many files have changed in this diff Show More