Merge origin/main into origin/dev-moritz
@@ -31,21 +31,15 @@
|
||||
"@trpc/client": "^10.45.2",
|
||||
"@trpc/server": "^10.45.2",
|
||||
"astro": "^4.16.10",
|
||||
"astro-i18next": "1.0.0-beta.21",
|
||||
"body-scroll-lock": "^4.0.0-beta.0",
|
||||
"buffer": "^6.0.3",
|
||||
"bun": "^1.1.34",
|
||||
"caniuse-lite": "^1.0.30001684",
|
||||
"csvtojson": "^2.0.10",
|
||||
"express": "^4.21.1",
|
||||
"flag-icons": "^6.15.0",
|
||||
"fontkit": "^2.0.4",
|
||||
"i18next": "^23.16.5",
|
||||
"i18next-fs-backend": "^2.3.2",
|
||||
"i18next-http-backend": "^2.6.2",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-interpolate": "^1.3.1",
|
||||
"katex": "^0.16.11",
|
||||
"moment": "^2.30.1",
|
||||
"moment-timezone": "^0.5.46",
|
||||
"pdf-lib": "^1.17.1",
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="17.968029mm"
|
||||
height="4.0999832mm"
|
||||
viewBox="0 0 17.968029 4.0999832"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath8889">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89001 H 0 Z"
|
||||
transform="translate(-52.157501,-438.8346)"
|
||||
id="path8889" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-95.779167,-146.57917)">
|
||||
<path
|
||||
id="path8888"
|
||||
d="m 0,0 c -3.131,0 -5.669,-2.538 -5.669,-5.669 v -0.284 c 0,-3.1309996 2.538,-5.669 5.669,-5.669 h 39.595001 c 3.131001,0 5.668999,2.5380004 5.668999,5.669 v 0.284 C 45.264,-2.538 42.726002,0 39.595001,0 Z"
|
||||
style="fill:#00a759 icc-color(sRGB-IEC61966-2, 0.1, 0, 0.65400696, 0.34899902);fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,97.779064,146.57917)"
|
||||
clip-path="url(#clipPath8889)"
|
||||
inkscape:export-filename="farbeEnergieEffizienzEins.svg"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="17.968029mm"
|
||||
height="4.0999832mm"
|
||||
viewBox="0 0 17.968029 4.0999832"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath8891">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89001 H 0 Z"
|
||||
transform="translate(-52.157501,-413.6851)"
|
||||
id="path8891" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-95.779167,-146.57917)">
|
||||
<path
|
||||
id="path8890"
|
||||
d="m 0,0 c -3.131,0 -5.669,-2.538 -5.669,-5.669 v -0.284 c 0,-3.1309996 2.538,-5.669 5.669,-5.669 h 39.595001 c 3.131001,0 5.668999,2.5380004 5.668999,5.669 v 0.284 C 45.264,-2.538 42.726002,0 39.595001,0 Z"
|
||||
style="fill:#56be06 icc-color(sRGB-IEC61966-2, 0.1, 0.33898926, 0.74499512, 0.02198792);fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,97.779064,146.57917)"
|
||||
clip-path="url(#clipPath8891)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 225 KiB |
116
public/images/sanierungsfahrplan/hausIconBoden.svg
Normal file
|
After Width: | Height: | Size: 11 KiB |
192
public/images/sanierungsfahrplan/hausIconDach.svg
Normal file
@@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="43.906368mm"
|
||||
height="40.431263mm"
|
||||
viewBox="0 0 43.906368 40.431263"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath303">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-347.06768,-528.92032)"
|
||||
id="path303" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath327">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-245.92411,-641.02861)"
|
||||
id="path327" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath329">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-245.92411,-538.55882)"
|
||||
id="path329" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath331">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="matrix(1,0,0,-1,-281.05118,546.99352)"
|
||||
id="path331" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath333">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-309.12661,-578.22562)"
|
||||
id="path333" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath335">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-318.96878,-606.63521)"
|
||||
id="path335" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath337">
|
||||
<path
|
||||
d="m 291.175,627.734 -24.053,-16.893 c -1.274,-0.896 -1.665,-2.774 -0.869,-4.206 v 0 c 0.796,-1.432 2.474,-1.873 3.748,-0.977 v 0 l 22.614,15.878 22.613,-15.878 c 0.452,-0.314 0.949,-0.462 1.44,-0.462 v 0 c 0.901,0 1.79,0.513 2.301,1.439 v 0 c 0.797,1.432 0.411,3.31 -0.863,4.206 v 0 l -24.053,16.893 c -0.44,0.309 -0.939,0.464 -1.438,0.464 v 0 c -0.499,0 -0.998,-0.155 -1.44,-0.464"
|
||||
transform="translate(-318.54181,-606.97522)"
|
||||
id="path337" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath339">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-318.96878,-606.63521)"
|
||||
id="path339" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath341">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-319.11031,-606.49692)"
|
||||
id="path341" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath343">
|
||||
<path
|
||||
d="m 291.287,627.647 -24.079,-16.934 c -1.275,-0.897 -1.668,-2.781 -0.87,-4.217 v 0 c 0.797,-1.435 2.477,-1.877 3.752,-0.979 v 0 l 22.639,15.919 22.636,-15.919 c 0.452,-0.314 0.951,-0.463 1.441,-0.463 v 0 c 0.903,0 1.792,0.515 2.304,1.442 v 0 c 0.798,1.436 0.412,3.32 -0.863,4.217 v 0 l -24.078,16.934 c -0.442,0.311 -0.941,0.466 -1.441,0.466 v 0 c -0.5,0 -0.999,-0.155 -1.441,-0.466"
|
||||
transform="translate(-318.65671,-606.86042)"
|
||||
id="path343" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath345">
|
||||
<path
|
||||
d="M 0,0 H 595.276 V 841.89 H 0 Z"
|
||||
transform="translate(-319.11031,-606.49692)"
|
||||
id="path345" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-82.814577,-121.44375)">
|
||||
<path
|
||||
id="path302"
|
||||
d="m 0,0 h -102.451 c 0,0 -17.008,0 -17.008,17.008 v 91.653"
|
||||
style="fill:none;stroke:#d3d2d2;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,125.839,160.99306)"
|
||||
clip-path="url(#clipPath303)" />
|
||||
<path
|
||||
id="path326"
|
||||
d="m 0,0 c 0,0 -9.582,0 -9.582,-9.583 v -65.648 h 113.179 v 65.648 c 0,0 0,9.583 -9.583,9.583 z"
|
||||
style="fill:#b11c0cff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,90.157792,121.44375)"
|
||||
clip-path="url(#clipPath327)" />
|
||||
<path
|
||||
id="path328"
|
||||
d="M 0,0 C 0,0 -9.582,0 -9.582,9.583 V 21.539 H 103.597 V 9.583 c 0,0 0,-9.583 -9.583,-9.583 z"
|
||||
style="fill:#d3d2d2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,90.157792,157.59281)"
|
||||
clip-path="url(#clipPath329)" />
|
||||
<g
|
||||
id="g329"
|
||||
transform="matrix(0.26458333,0,0,0.26458333,-642.47419,50.584309)">
|
||||
<path
|
||||
id="path330"
|
||||
d="m 0.6909875,-5.8711094 h 1.6523438 c 0.4511718,0 0.8583984,0.058594 1.21875,0.1757813 0.3574218,0.1113281 0.6679687,0.2871093 0.9257812,0.5273437 0.2578125,0.234375 0.4570313,0.5361328 0.5976563,0.9023438 0.140625,0.3691406 0.2109375,0.8027343 0.2109375,1.3007812 0,0.5097656 -0.070312,0.9492188 -0.2109375,1.3242188 C 4.9448938,-1.2715 4.7486047,-0.9668125 4.4995813,-0.72657813 4.2476281,-0.48341406 3.9488,-0.29884375 3.5972375,-0.17579688 3.245675,-0.05860938 2.8530969,-1.5625e-5 2.4253625,-1.5625e-5 h -1.734375 z m 1.5820313,4.8046875 c 0.2490234,0 0.4746093,-0.029297 0.6796875,-0.09375 0.2021484,-0.070312 0.375,-0.1787109 0.515625,-0.328125 0.1464843,-0.1464844 0.2607421,-0.3398437 0.3398437,-0.5742187 0.084961,-0.2402344 0.1289063,-0.5419922 0.1289063,-0.9023438 0,-0.3427734 -0.043945,-0.6328125 -0.1289063,-0.8671875 -0.079102,-0.2402344 -0.1933594,-0.4335937 -0.3398437,-0.5742187 -0.140625,-0.140625 -0.3134766,-0.2373047 -0.515625,-0.2929688 -0.2050782,-0.061523 -0.4306641,-0.09375 -0.6796875,-0.09375 H 2.0152063 v 3.7265625 z m 3.8642578,-0.1757812 c 0,-0.46875 0.1933593,-0.8320313 0.5859375,-1.0898438 0.3984375,-0.2636719 1.0371093,-0.4453125 1.921875,-0.5390625 -0.00879,-0.1933594 -0.067383,-0.3515625 -0.1757813,-0.46875 -0.1113281,-0.1171875 -0.2871094,-0.1757812 -0.5273437,-0.1757812 -0.1875,0 -0.3808594,0.035156 -0.5742188,0.1054687 -0.1875,0.070312 -0.3925781,0.1699219 -0.609375,0.2929688 l -0.46875,-0.8671875 c 0.2871094,-0.1699219 0.5888672,-0.3105469 0.9023438,-0.421875 0.3193359,-0.1083985 0.65625,-0.1640625 1.0078125,-0.1640625 0.5771484,0 1.0136718,0.1640625 1.3125,0.4921875 0.3046875,0.328125 0.4570312,0.8378906 0.4570312,1.5234375 V -1.5625e-5 h -1.078125 l -0.09375,-0.457031255 h -0.035156 c -0.1875,0.1640625 -0.3925782,0.30175782 -0.609375,0.41015625 -0.2109377,0.09960938 -0.442383,0.15234375 -0.6914065,0.15234375 -0.2050781,0 -0.3867187,-0.03515625 -0.5507812,-0.105468745 C 6.7466516,-0.06153906 6.6060266,-0.15528906 6.4888391,-0.28126563 6.3775109,-0.4043125 6.29255,-0.5449375 6.2310266,-0.70314063 6.1665734,-0.86720313 6.1372766,-1.0459141 6.1372766,-1.2422031 Z m 1.265625,-0.09375 c 0,0.140625 0.041016,0.2460937 0.1289062,0.3164062 0.09375,0.0703125 0.2167969,0.10546877 0.375,0.10546877 0.1552735,0 0.2871094,-0.0292969 0.3984375,-0.09375 0.1083985,-0.070312 0.2226563,-0.1669922 0.3398438,-0.2929688 v -0.7734375 c -0.46875,0.064453 -0.7939453,0.1582031 -0.9726563,0.28125 -0.1816406,0.1259766 -0.2695312,0.2783203 -0.2695312,0.4570313 z m 3.4453124,-0.890625 c 0,-0.375 0.06152,-0.7060547 0.1875,-0.9960938 0.123047,-0.2958984 0.292969,-0.5419922 0.503906,-0.7382812 0.210938,-0.1933594 0.457032,-0.3427735 0.738282,-0.4453125 0.287109,-0.1083985 0.585937,-0.1640625 0.890625,-0.1640625 0.272461,0 0.518554,0.046875 0.738281,0.140625 0.225586,0.09375 0.413086,0.2197265 0.5625,0.375 l -0.597656,0.8203125 c -0.210938,-0.178711 -0.418946,-0.2695313 -0.621094,-0.2695313 -0.328125,0 -0.585938,0.1171875 -0.773438,0.3515625 -0.18164,0.2285156 -0.269531,0.5361328 -0.269531,0.9257813 0,0.383789 0.09375,0.6914062 0.28125,0.9257812 0.1875,0.2285156 0.424805,0.33984377 0.714844,0.33984377 0.164062,0 0.307617,-0.0292969 0.433594,-0.09375 0.131836,-0.070312 0.251953,-0.1464844 0.363281,-0.234375 l 0.539062,0.8437494 c -0.219726,0.1875 -0.46289,0.328125 -0.726562,0.421875 -0.266602,0.08496094 -0.521485,0.12890625 -0.761719,0.12890625 -0.313476,0 -0.603516,-0.05273437 -0.867187,-0.15234375 -0.266602,-0.1083984 -0.500977,-0.26074215 -0.703125,-0.45703122 -0.196289,-0.19335937 -0.351563,-0.43652343 -0.46875,-0.72656198 -0.111329,-0.2958984 -0.164063,-0.6269531 -0.164063,-0.9960937 z m 4.461914,-4.078125 h 1.324219 v 1.546875 l -0.07031,0.796875 c 0.169922,-0.1464844 0.366211,-0.2841797 0.585938,-0.4101563 0.225586,-0.1318359 0.492187,-0.1992187 0.796875,-0.1992187 0.483398,0 0.834961,0.1611328 1.054687,0.4804687 0.216797,0.3134766 0.328125,0.75 0.328125,1.3125 V -1.5625e-5 H 18.005441 V -2.6015781 c 0,-0.319336 -0.04395,-0.5390625 -0.128907,-0.65625 -0.08789,-0.1230469 -0.228515,-0.1875 -0.421875,-0.1875 -0.164062,0 -0.310546,0.041016 -0.433593,0.1171875 -0.117188,0.070312 -0.246094,0.1757812 -0.386719,0.3164062 V -1.5625e-5 h -1.324219 z m 5.121094,2.765625 0.527344,-0.9375 -0.972657,-0.4335938 0.210938,-0.65625 1.042969,0.2226563 0.117187,-1.0664063 h 0.691406 l 0.117188,1.078125 1.03125,-0.234375 0.222656,0.65625 -0.972656,0.4335938 0.527344,0.9375 -0.550782,0.3984375 -0.714843,-0.796875 -0.726563,0.796875 z m 0,0"
|
||||
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
aria-label="Dach*"
|
||||
transform="matrix(1.3333333,0,0,1.3333333,2815.8389,393.19533)"
|
||||
clip-path="url(#clipPath331)" />
|
||||
</g>
|
||||
<path
|
||||
id="path332"
|
||||
d="m 0,0 c 1.502,0 2.717,1.377 2.717,3.068 v 18.968 c 0,1.056 -0.484,2.042 -1.275,2.597 l -16.194,11.384 c -0.883,0.621 -1.998,0.621 -2.882,0 L -33.821,24.633 c -0.796,-0.561 -1.281,-1.541 -1.281,-2.597 V 3.068 C -35.102,1.369 -33.881,0 -32.38,0 Z"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,112.45423,143.59925)"
|
||||
clip-path="url(#clipPath333)" />
|
||||
<path
|
||||
id="path334"
|
||||
d="m 0,0 c -0.511,-0.926 -1.399,-1.44 -2.301,-1.44 -0.491,0 -0.988,0.149 -1.44,0.462 L -26.354,14.901 -48.968,-0.978 c -1.274,-0.895 -2.952,-0.454 -3.748,0.978 -0.796,1.432 -0.404,3.31 0.869,4.206 l 24.053,16.892 c 0.883,0.619 1.997,0.619 2.879,0 L -0.862,4.206 C 0.411,3.31 0.796,1.432 0,0"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,115.92633,133.57698)"
|
||||
clip-path="url(#clipPath335)" />
|
||||
<path
|
||||
id="path336"
|
||||
d="m 0,0 c -0.519,-0.942 -1.421,-1.465 -2.337,-1.465 -0.499,0 -1.004,0.152 -1.462,0.47 L -26.766,15.16 -49.734,-0.995 c -1.294,-0.911 -2.998,-0.462 -3.807,0.995 -0.809,1.457 -0.411,3.368 0.883,4.279 l 24.429,17.186 c 0.897,0.629 2.028,0.629 2.924,0 L -0.876,4.279 C 0.417,3.368 0.809,1.457 0,0"
|
||||
style="fill:#ed1c24;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,115.7757,133.45703)"
|
||||
clip-path="url(#clipPath337)" />
|
||||
<path
|
||||
id="path338"
|
||||
d="m 0,0 c -0.511,-0.926 -1.399,-1.44 -2.301,-1.44 -0.491,0 -0.988,0.149 -1.44,0.462 L -26.354,14.901 -48.968,-0.978 c -1.274,-0.895 -2.952,-0.454 -3.748,0.978 -0.796,1.432 -0.404,3.31 0.869,4.206 l 24.053,16.892 c 0.883,0.619 1.997,0.619 2.879,0 L -0.862,4.206 C 0.411,3.31 0.796,1.432 0,0"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4.86;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,115.92633,133.57698)"
|
||||
clip-path="url(#clipPath339)" />
|
||||
<path
|
||||
id="path340"
|
||||
d="m 0,0 c -0.512,-0.928 -1.401,-1.443 -2.304,-1.443 -0.491,0 -0.989,0.149 -1.441,0.463 L -26.382,14.938 -49.02,-0.98 c -1.275,-0.898 -2.955,-0.455 -3.752,0.98 -0.798,1.435 -0.405,3.319 0.87,4.216 l 24.079,16.935 c 0.883,0.62 1.999,0.62 2.881,0 L -0.863,4.216 C 0.411,3.319 0.797,1.435 0,0"
|
||||
style="fill:#fab20b;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,115.97626,133.62576)"
|
||||
clip-path="url(#clipPath341)" />
|
||||
<path
|
||||
id="path342"
|
||||
d="m 0,0 c -0.519,-0.942 -1.421,-1.465 -2.337,-1.465 -0.499,0 -1.004,0.152 -1.462,0.47 L -26.766,15.16 -49.734,-0.995 c -1.294,-0.911 -2.998,-0.462 -3.807,0.995 -0.809,1.457 -0.411,3.368 0.883,4.279 l 24.429,17.186 c 0.897,0.629 2.028,0.629 2.924,0 L -0.876,4.279 C 0.417,3.368 0.809,1.457 0,0"
|
||||
style="fill:#b01419;fill-opacity:1;fill-rule:nonzero;stroke:#b01419;stroke-width:3.24;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,115.81624,133.49753)"
|
||||
clip-path="url(#clipPath343)" />
|
||||
<path
|
||||
id="path344"
|
||||
d="m 0,0 c -0.512,-0.928 -1.401,-1.443 -2.304,-1.443 -0.491,0 -0.989,0.149 -1.441,0.463 L -26.382,14.938 -49.02,-0.98 c -1.275,-0.898 -2.955,-0.455 -3.752,0.98 -0.798,1.435 -0.405,3.319 0.87,4.216 l 24.079,16.935 c 0.883,0.62 1.999,0.62 2.881,0 L -0.863,4.216 C 0.411,3.319 0.797,1.435 0,0"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:0.81;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(0.35277776,0,0,-0.35277776,115.97626,133.62576)"
|
||||
clip-path="url(#clipPath345)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 14 KiB |
164
public/images/sanierungsfahrplan/hausIconFenster.svg
Normal file
|
After Width: | Height: | Size: 13 KiB |
70
public/images/sanierungsfahrplan/hausIconHaus.svg
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
130
public/images/sanierungsfahrplan/hausIconHeizung.svg
Normal file
|
After Width: | Height: | Size: 11 KiB |
220
public/images/sanierungsfahrplan/hausIconLueftung.svg
Normal file
|
After Width: | Height: | Size: 17 KiB |
124
public/images/sanierungsfahrplan/hausIconWaende.svg
Normal file
|
After Width: | Height: | Size: 12 KiB |
162
public/images/sanierungsfahrplan/hausIconWarmwasser.svg
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 24 KiB |
98
public/images/sanierungsfahrplan/skalaEnergieEffizienz.svg
Normal file
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 26 KiB |
@@ -1,19 +0,0 @@
|
||||
<script lang="ts">
|
||||
import katex from "katex";
|
||||
export let math: string;
|
||||
export let displayMode: boolean = false;
|
||||
|
||||
const options = {
|
||||
displayMode: displayMode,
|
||||
throwOnError: false
|
||||
}
|
||||
|
||||
let katexString: any;
|
||||
$: katexString = katex.renderToString(math, options)
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
|
||||
</svelte:head>
|
||||
|
||||
{@html katexString}
|
||||
@@ -1,17 +1,114 @@
|
||||
<script lang="ts">
|
||||
import { BedarfsausweisWohnenClient, GebaeudeAufnahmeClient } from "#components/Ausweis/types.js";
|
||||
import { BedarfsausweisWohnenClient, GebaeudeAufnahmeClient } from "#components/Ausweis/types.js";
|
||||
import { funktionMonatlicherBelastungsgrad } from "#lib/Berechnungen/BedarfsausweisWohnen/funktionMonatlicherBelastungsgrad.js";
|
||||
import { funktionBilanzInnentemperatur } from "#lib/Berechnungen/BedarfsausweisWohnen/funktionBilanzInnentemperatur.js";
|
||||
import { funktionAusnutzungsgrad } from "#lib/Berechnungen/BedarfsausweisWohnen/funktionAusnutzungsgrad.js";
|
||||
|
||||
export let ausweis: BedarfsausweisWohnenClient;
|
||||
export let gebaeude_aufnahme: GebaeudeAufnahmeClient;
|
||||
export let ausweis: BedarfsausweisWohnenClient;
|
||||
export let gebaeude_aufnahme: GebaeudeAufnahmeClient;
|
||||
|
||||
let heizlast = 25;
|
||||
let zeitkonstante = 110;
|
||||
|
||||
let belastungsgrade = {
|
||||
Januar: 0,
|
||||
Februar: 0,
|
||||
März: 0,
|
||||
April: 0,
|
||||
Mai: 0,
|
||||
Juni: 0,
|
||||
Juli: 0,
|
||||
August: 0,
|
||||
September: 0,
|
||||
Oktober: 0,
|
||||
November: 0,
|
||||
Dezember: 0
|
||||
};
|
||||
|
||||
let bilanzinnentemperaturen = {
|
||||
Januar: 0,
|
||||
Februar: 0,
|
||||
März: 0,
|
||||
April: 0,
|
||||
Mai: 0,
|
||||
Juni: 0,
|
||||
Juli: 0,
|
||||
August: 0,
|
||||
September: 0,
|
||||
Oktober: 0,
|
||||
November: 0,
|
||||
Dezember: 0
|
||||
};
|
||||
|
||||
let ausnutzungsgradJanuar = 0;
|
||||
let ausnutzungsgradFebruar = 0;
|
||||
let ausnutzungsgradMärz = 0;
|
||||
let ausnutzungsgradApril = 0;
|
||||
let ausnutzungsgradMai = 0;
|
||||
let ausnutzungsgradJuni = 0;
|
||||
let ausnutzungsgradJuli = 0;
|
||||
let ausnutzungsgradAugust = 0;
|
||||
let ausnutzungsgradSeptember = 0;
|
||||
let ausnutzungsgradOktober = 0;
|
||||
let ausnutzungsgradNovember = 0;
|
||||
let ausnutzungsgradDezember = 0;
|
||||
|
||||
// Beispielwerte - müssen noch errechnet werden
|
||||
|
||||
let waermequellensenkenverhaeltnisJanuar = 0.3;
|
||||
let waermequellensenkenverhaeltnisFebruar = 0.5;
|
||||
let waermequellensenkenverhaeltnisMärz = 0.7;
|
||||
let waermequellensenkenverhaeltnisApril = 0.9;
|
||||
let waermequellensenkenverhaeltnisMai = 1.1;
|
||||
let waermequellensenkenverhaeltnisJuni = 1.3;
|
||||
let waermequellensenkenverhaeltnisJuli = 1.5;
|
||||
let waermequellensenkenverhaeltnisAugust = 1.7;
|
||||
let waermequellensenkenverhaeltnisSeptember = 1.3;
|
||||
let waermequellensenkenverhaeltnisOktober = 1.1;
|
||||
let waermequellensenkenverhaeltnisNovember = 0.9;
|
||||
let waermequellensenkenverhaeltnisDezember = 0.6;
|
||||
|
||||
import { BerechnungMonatlicherBelastungsgradT9 } from "#lib/Berechnungen/BedarfsausweisWohnen/BerechnungMonatlicherBelastungsgradT9.js";
|
||||
|
||||
let interpolatedValues: { month: string, interpolatedValue: number }[] = [];
|
||||
|
||||
$: {
|
||||
const result = BerechnungMonatlicherBelastungsgradT9();
|
||||
interpolatedValues = result;
|
||||
}
|
||||
belastungsgrade.Januar = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "Januar");
|
||||
belastungsgrade.Februar = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "Februar");
|
||||
belastungsgrade.März = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "März");
|
||||
belastungsgrade.April = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "April");
|
||||
belastungsgrade.Mai = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "Mai");
|
||||
belastungsgrade.Juni = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "Juni");
|
||||
belastungsgrade.Juli = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "Juli");
|
||||
belastungsgrade.August = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "August");
|
||||
belastungsgrade.September = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "September");
|
||||
belastungsgrade.Oktober = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "Oktober");
|
||||
belastungsgrade.November = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "November");
|
||||
belastungsgrade.Dezember = funktionMonatlicherBelastungsgrad(heizlast, zeitkonstante, "Dezember");
|
||||
|
||||
bilanzinnentemperaturen.Januar = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "Januar");
|
||||
bilanzinnentemperaturen.Februar = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "Februar");
|
||||
bilanzinnentemperaturen.März = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "März");
|
||||
bilanzinnentemperaturen.April = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "April");
|
||||
bilanzinnentemperaturen.Mai = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "Mai");
|
||||
bilanzinnentemperaturen.Juni = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "Juni");
|
||||
bilanzinnentemperaturen.Juli = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "Juli");
|
||||
bilanzinnentemperaturen.August = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "August");
|
||||
bilanzinnentemperaturen.September = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "September");
|
||||
bilanzinnentemperaturen.Oktober = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "Oktober");
|
||||
bilanzinnentemperaturen.November = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "November");
|
||||
bilanzinnentemperaturen.Dezember = funktionBilanzInnentemperatur(heizlast, zeitkonstante, "Dezember");
|
||||
|
||||
ausnutzungsgradJanuar = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisJanuar, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradFebruar = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisFebruar, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradMärz = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisMärz, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradApril = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisApril, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradMai = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisMai, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradJuni = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisJuni, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradJuli = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisJuli, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradAugust = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisAugust, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradSeptember = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisSeptember, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradOktober = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisOktober, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradNovember = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisNovember, zeitkonstante, "alleMonate");
|
||||
ausnutzungsgradDezember = funktionAusnutzungsgrad(waermequellensenkenverhaeltnisDezember, zeitkonstante, "alleMonate");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -63,15 +160,14 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">31</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{interpolatedValues[1]?.month}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.Januar*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">1,0</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
{interpolatedValues[1]?.interpolatedValue}
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.Januar*1000)/1000}
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisJanuar}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradJanuar*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -79,15 +175,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">28</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.Februar*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">1,9</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.Februar*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisFebruar}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradFebruar*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -95,15 +191,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">31</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.März*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">4,7</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.März*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisMärz}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradMärz*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -111,15 +207,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">30</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.April*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">9,2</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.April*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisApril}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradApril*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -127,15 +223,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">31</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.Mai*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">14,1</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.Mai*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisMai}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradMai*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -143,15 +239,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">30</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.Juni*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">16,7</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.Juni*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisJuni}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradJuni*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -159,15 +255,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">31</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.Juli*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">19,0</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.Juli*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisJuli}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradJuli*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -175,15 +271,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">31</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.August*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">18,6</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.August*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisAugust}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradAugust*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -191,15 +287,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">30</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.September*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">14,3</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.September*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisSeptember}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradSeptember*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -207,15 +303,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">31</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.Oktober*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">9,4</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.Oktober*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisOktober}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradOktober*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -223,15 +319,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">30</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.November*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">4,1</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.November*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisNovember}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradNovember*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
@@ -239,15 +335,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">31</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(bilanzinnentemperaturen.Dezember*1000)/1000}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-gray-100">0,9</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(belastungsgrade.Dezember*1000)/1000}
|
||||
|
||||
</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-yellow-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1">{waermequellensenkenverhaeltnisDezember}</td>
|
||||
<td class="border border-gray-300 px-2 py-1 bg-blue-100">{Math.round(ausnutzungsgradDezember*1000)/1000}</td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
<td class="border-2 border-gray-600 px-2 py-1"></td>
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
export let ausweis: BedarfsausweisWohnenClient;
|
||||
export let gebaeude_aufnahme: GebaeudeAufnahmeClient;
|
||||
|
||||
import { berechnungTrinkwarmwasserWaermebedarf } from "#lib/Berechnungen/BedarfsausweisWohnen/BerechnungTrinkwarmwasser.js";
|
||||
import { berechnungNutzenergiebedarfTrinkwarmwasser } from "#lib/Berechnungen/BedarfsausweisWohnen/BerechnungNutzenergiebedarfTrinkwarmwasser.js";
|
||||
|
||||
let trinkwasserWaermebedarf = 0, flaechenBezogenerWaermebedarf = 0, bezugsflaeche = 0
|
||||
|
||||
$: {
|
||||
const result = berechnungTrinkwarmwasserWaermebedarf(ausweis, gebaeude_aufnahme)
|
||||
const result = berechnungNutzenergiebedarfTrinkwarmwasser(ausweis, gebaeude_aufnahme)
|
||||
trinkwasserWaermebedarf = result.trinkwasserWaermebedarf
|
||||
flaechenBezogenerWaermebedarf = result.flaechenBezogenerWaermebedarf
|
||||
bezugsflaeche = result.bezugsflaeche
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<div class="bauteilBox">
|
||||
<div class="farbBox">
|
||||
<div class="labelBox">Farbklasse</div>
|
||||
<div class="farbe"><div class="farbBalkenEins"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenZwei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenDrei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenVier"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenFuenf"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenAcht"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenNeun"></div></div>
|
||||
</div>
|
||||
<div class="inhaltsBox">
|
||||
<div class="labelBox">U-Wert [W/(m²K)] / Beschreibung</div>
|
||||
<div class="textZeileEins">≤ 0,12 / Sparrendach geneigt und stark hinterlüftet mit 20cm PUR/PIR-Hartschaum Aufsparrendämmung (hocheffiziente Dämmung mit WLG 0,024)</div>
|
||||
<div class="textZeileZwei">≤ 0,14 / Sparrendach geneigt und stark hinterlüftet mit 18cm PUR/PIR-Hartschaum Aufsparrendämmung (hocheffiziente Dämmung mit WLG 0,024)</div>
|
||||
<div class="textZeileDrei">≤ 0,24 / Sparrendach geneigt und hinterlüftet mit 18cm mineralischer Zwischensparren- <br>dämmung und 5 cm Untersparrendämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileVier">≤ 0,30 / Sparrendach geneigt und hinterlüftet mit 18cm mineralischer Zwischensparren- <br>dämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileFuenf">≤ 0,50 / Sparrendach geneigt und hinterlüftet mit 12cm mineralischer Zwischensparren- <br>dämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileAcht">≤ 0,80 / Sparrendach geneigt und hinterlüftet mit 5cm mineralischer Zwischensparren- <br>dämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileNeun">> 0,80 / Sparrendach geneigt und hinterlüftet ungedämmt oder weniger als 5cm Zwischensparrendämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.bauteilBox {
|
||||
@apply grid gap-2 items-stretch p-4 mt-8;
|
||||
grid-template-columns: 1fr 5fr; /* 1/6 for farbBox and 5/6 for inhaltsBox */
|
||||
}
|
||||
|
||||
.farbe {
|
||||
@apply flex justify-center items-center;
|
||||
}
|
||||
|
||||
.labelBox {
|
||||
@apply flex justify-start items-center text-lg font-bold;
|
||||
}
|
||||
|
||||
.farbBalkenEins {
|
||||
@apply flex w-full bg-effizienzFarbe-1 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenZwei {
|
||||
@apply flex w-full bg-effizienzFarbe-2 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenDrei {
|
||||
@apply flex w-full bg-effizienzFarbe-3 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenVier {
|
||||
@apply flex w-full bg-effizienzFarbe-4 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenFuenf {
|
||||
@apply flex w-full bg-effizienzFarbe-5 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenAcht {
|
||||
@apply flex w-full bg-effizienzFarbe-8 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenNeun {
|
||||
@apply flex w-full bg-effizienzFarbe-9 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.inhaltsBox {
|
||||
@apply grid grid-rows-8 gap-3 ml-3 pb-3;
|
||||
}
|
||||
|
||||
.farbBox {
|
||||
@apply grid grid-rows-8 gap-3 pb-3;
|
||||
}
|
||||
|
||||
.textZeileEins {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-1;
|
||||
}
|
||||
|
||||
.textZeileZwei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-2;
|
||||
}
|
||||
|
||||
.textZeileDrei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-3;
|
||||
}
|
||||
|
||||
.textZeileVier {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-4;
|
||||
}
|
||||
|
||||
.textZeileFuenf {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-5;
|
||||
}
|
||||
|
||||
.textZeileAcht {
|
||||
@apply flex justify-start items-center bg-white p-1 border-2 border-effizienzFarbe-8;
|
||||
}
|
||||
|
||||
.textZeileNeun {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-9;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,103 @@
|
||||
<div class="bauteilBox">
|
||||
<div class="farbBox">
|
||||
<div class="labelBox">Farbklasse</div>
|
||||
<div class="farbe"><div class="farbBalkenEins"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenZwei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenDrei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenVier"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenFuenf"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenAcht"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenNeun"></div></div>
|
||||
</div>
|
||||
<div class="inhaltsBox">
|
||||
<div class="labelBox">U-Wert [W/(m²K)] / Beschreibung</div>
|
||||
<div class="textZeileEins">≤ 0,12 / Sparrendach geneigt und stark hinterlüftet mit 20cm PUR/PIR-Hartschaum Aufsparrendämmung (hocheffiziente Dämmung mit WLG 0,024)</div>
|
||||
<div class="textZeileZwei">≤ 0,14 / Sparrendach geneigt und stark hinterlüftet mit 18cm PUR/PIR-Hartschaum Aufsparrendämmung (hocheffiziente Dämmung mit WLG 0,024)</div>
|
||||
<div class="textZeileDrei">≤ 0,24 / Sparrendach geneigt und hinterlüftet mit 18cm mineralischer Zwischensparren- <br>dämmung und 5 cm Untersparrendämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileVier">≤ 0,30 / Sparrendach geneigt und hinterlüftet mit 18cm mineralischer Zwischensparren- <br>dämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileFuenf">≤ 0,50 / Sparrendach geneigt und hinterlüftet mit 12cm mineralischer Zwischensparren- <br>dämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileAcht">≤ 0,80 / Sparrendach geneigt und hinterlüftet mit 5cm mineralischer Zwischensparren- <br>dämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
<div class="textZeileNeun">> 0,80 / Sparrendach geneigt und hinterlüftet ungedämmt oder weniger als 5cm Zwischensparrendämmung (Standarddämmung mit WLG 0,04)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.bauteilBox {
|
||||
@apply grid gap-2 items-stretch p-4 mt-8;
|
||||
grid-template-columns: 1fr 5fr; /* 1/6 for farbBox and 5/6 for inhaltsBox */
|
||||
}
|
||||
|
||||
.farbe {
|
||||
@apply flex justify-center items-center;
|
||||
}
|
||||
|
||||
.labelBox {
|
||||
@apply flex justify-start items-center text-lg font-bold;
|
||||
}
|
||||
|
||||
.farbBalkenEins {
|
||||
@apply flex w-full bg-effizienzFarbe-1 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenZwei {
|
||||
@apply flex w-full bg-effizienzFarbe-2 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenDrei {
|
||||
@apply flex w-full bg-effizienzFarbe-3 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenVier {
|
||||
@apply flex w-full bg-effizienzFarbe-4 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenFuenf {
|
||||
@apply flex w-full bg-effizienzFarbe-5 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenAcht {
|
||||
@apply flex w-full bg-effizienzFarbe-8 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenNeun {
|
||||
@apply flex w-full bg-effizienzFarbe-9 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.inhaltsBox {
|
||||
@apply grid grid-rows-8 gap-3 ml-3 pb-3;
|
||||
}
|
||||
|
||||
.farbBox {
|
||||
@apply grid grid-rows-8 gap-3 pb-3;
|
||||
}
|
||||
|
||||
.textZeileEins {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-1;
|
||||
}
|
||||
|
||||
.textZeileZwei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-2;
|
||||
}
|
||||
|
||||
.textZeileDrei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-3;
|
||||
}
|
||||
|
||||
.textZeileVier {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-4;
|
||||
}
|
||||
|
||||
.textZeileFuenf {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-5;
|
||||
}
|
||||
|
||||
.textZeileAcht {
|
||||
@apply flex justify-start items-center bg-white p-1 border-2 border-effizienzFarbe-8;
|
||||
}
|
||||
|
||||
.textZeileNeun {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-9;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,123 @@
|
||||
<div class="bauteilBox">
|
||||
<div class="farbBox">
|
||||
<div class="labelBox">Farbklasse</div>
|
||||
<div class="farbe"><div class="farbBalkenEins"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenZwei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenDrei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenVier"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenFuenf"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenSechs"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenSieben"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenAcht"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenNeun"></div></div>
|
||||
</div>
|
||||
<div class="inhaltsBox">
|
||||
<div class="labelBox">Effizienzzahl / Beschreibung</div>
|
||||
<div class="textZeileEins">< 0,4 / Hohe Effizienz / überwiegend erneuerbare Energieträger</div>
|
||||
<div class="textZeileZwei">< 0,7 / Hohe Effizienz / erneuerbare und fossile Energieträger</div>
|
||||
<div class="textZeileDrei">< 1,0 / Moderne Wärmeerzeuger mit fossilen Energieträgern und zusätzlich erneuerbaren Energien</div>
|
||||
<div class="textZeileVier">< 1,1 / Moderne Wärmeerzeuger mit fossilen Energieträgern</div>
|
||||
<div class="textZeileFuenf">< 1,2 / Wärmeerzeuger mit fossilen Energieträgern</div>
|
||||
<div class="textZeileSechs">< 1,3 / Mindestanforderung an neue Heizkessel</div>
|
||||
<div class="textZeileSieben">< 1,5 / Nicht mehr zeitgemäße Technik</div>
|
||||
<div class="textZeileAcht">< 1,6 / Ineffiziente Wärmeerzeuger</div>
|
||||
<div class="textZeileNeun">> 1,6 / Ineffiziente Wärmeerzeuger mit sehr hohen Verlusten</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.bauteilBox {
|
||||
@apply grid gap-2 items-stretch p-4 mt-8;
|
||||
grid-template-columns: 1fr 5fr; /* 1/6 for farbBox and 5/6 for inhaltsBox */
|
||||
}
|
||||
|
||||
.farbe {
|
||||
@apply flex justify-center items-center;
|
||||
}
|
||||
|
||||
.labelBox {
|
||||
@apply flex justify-start items-center text-lg font-bold;
|
||||
}
|
||||
|
||||
.farbBalkenEins {
|
||||
@apply flex w-full bg-effizienzFarbe-1 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenZwei {
|
||||
@apply flex w-full bg-effizienzFarbe-2 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenDrei {
|
||||
@apply flex w-full bg-effizienzFarbe-3 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenVier {
|
||||
@apply flex w-full bg-effizienzFarbe-4 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenFuenf {
|
||||
@apply flex w-full bg-effizienzFarbe-5 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenSechs {
|
||||
@apply flex w-full bg-effizienzFarbe-6 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenSieben {
|
||||
@apply flex w-full bg-effizienzFarbe-7 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenAcht {
|
||||
@apply flex w-full bg-effizienzFarbe-8 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenNeun {
|
||||
@apply flex w-full bg-effizienzFarbe-9 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.inhaltsBox {
|
||||
@apply grid grid-rows-10 gap-3 ml-3 pb-3;
|
||||
}
|
||||
|
||||
.farbBox {
|
||||
@apply grid grid-rows-10 gap-3 pb-3;
|
||||
}
|
||||
|
||||
.textZeileEins {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-1;
|
||||
}
|
||||
|
||||
.textZeileZwei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-2;
|
||||
}
|
||||
|
||||
.textZeileDrei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-3;
|
||||
}
|
||||
|
||||
.textZeileVier {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-4;
|
||||
}
|
||||
|
||||
.textZeileFuenf {
|
||||
@apply flex justify-start items-center bg-white p-1 border-2 border-effizienzFarbe-5;
|
||||
}
|
||||
|
||||
.textZeileSechs {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-6;
|
||||
}
|
||||
|
||||
.textZeileSieben {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-7;
|
||||
}
|
||||
|
||||
.textZeileAcht {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-8;
|
||||
}
|
||||
|
||||
.textZeileNeun {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-9;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,151 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import SanierungsFahrplanDachTemplate from './SanierungsFahrplanDachTemplate.svelte';
|
||||
import SanierungsFahrplanWandTemplate from './SanierungsFahrplanWandTemplate.svelte';
|
||||
import SanierungsFahrplanHeizungTemplate from './SanierungsFahrplanHeizungTemplate.svelte';
|
||||
|
||||
let showPopup = false;
|
||||
let popupContent = null;
|
||||
|
||||
function openPopup(content) {
|
||||
popupContent = content;
|
||||
showPopup = true;
|
||||
}
|
||||
|
||||
function closePopup() {
|
||||
showPopup = false;
|
||||
popupContent = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="beam">
|
||||
<img class="skalaBeam" src="/images/sanierungsfahrplan/skalaEnergieEffizienz.svg" alt="Skala Energieeffizienz"/>
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<!-- Wände -->
|
||||
<div class="card">
|
||||
<button class="hausIcon-button" on:click={() => openPopup(SanierungsFahrplanWandTemplate)}>
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconWaende.svg" alt="Hausiconwände"/>
|
||||
</button>
|
||||
<div class="card-subtitle">*inklusive Kellerwänden</div>
|
||||
</div>
|
||||
<!-- Dach -->
|
||||
<div class="card" id="card">
|
||||
<button class="hausIcon-button" on:click={() => openPopup(SanierungsFahrplanDachTemplate)}>
|
||||
<img
|
||||
class="hausIcon cursor-pointer"
|
||||
src="/images/sanierungsfahrplan/hausIconDach.svg"
|
||||
alt="Hausicondach"/>
|
||||
</button>
|
||||
<div class="card-subtitle">oberer Gebäudeabschluss</div>
|
||||
</div>
|
||||
<!-- Lüftung -->
|
||||
<div class="card">
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconLueftung.svg" alt="Hausiconlüftung"/>
|
||||
<div class="card-subtitle"></div>
|
||||
</div>
|
||||
<!-- Fenster -->
|
||||
<div class="card">
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconFenster.svg" alt="Hausiconfenster"/>
|
||||
<div class="card-subtitle">inklusive Dachfenster</div>
|
||||
</div>
|
||||
<!-- Ihr Haus heute -->
|
||||
<div class="card">
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconHaus.svg" alt="Hausicon"/>
|
||||
<div class="card-subtitle"></div>
|
||||
</div>
|
||||
<!-- Warmwasser -->
|
||||
<div class="card">
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconWarmwasser.svg" alt="Hausiconwarmwasser"/>
|
||||
<div class="card-subtitle"></div>
|
||||
</div>
|
||||
<!-- Boden -->
|
||||
<div class="card">
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconBoden.svg" alt="Hausiconboden"/>
|
||||
<div class="card-subtitle">unterer Gebäudeabschluss</div>
|
||||
</div>
|
||||
<!-- Heizung -->
|
||||
<div class="card">
|
||||
<button class="hausIcon-button" on:click={() => openPopup(SanierungsFahrplanHeizungTemplate)}>
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconHeizung.svg" alt="Hausiconheizung"/>
|
||||
</button>
|
||||
<div class="card-subtitle"></div>
|
||||
</div>
|
||||
<!-- Warmwasserverteilung -->
|
||||
<div class="card">
|
||||
<img class="hausIcon" src="/images/sanierungsfahrplan/hausIconWarmwasserVerteilung.svg" alt="Hausiconwarmwasserverteilung"/>
|
||||
<div class="card-subtitle">inkl. Speicherung und Übergabe</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if showPopup}
|
||||
<div class="popup-overlay">
|
||||
<div class="popup-content" on:keydown|stopPropagation on:keyup|stopPropagation on:keypress|stopPropagation>
|
||||
<button class="close-button" on:click={closePopup}>X</button>
|
||||
{#if popupContent === SanierungsFahrplanDachTemplate}
|
||||
<div class="popup-title">Dach</div>
|
||||
<SanierungsFahrplanDachTemplate {closePopup} />
|
||||
{/if}
|
||||
{#if popupContent === SanierungsFahrplanWandTemplate}
|
||||
<div class="popup-title">Wände</div>
|
||||
<SanierungsFahrplanWandTemplate {closePopup} />
|
||||
{/if}
|
||||
{#if popupContent === SanierungsFahrplanHeizungTemplate}
|
||||
<div class="popup-title">Heizung</div>
|
||||
<SanierungsFahrplanHeizungTemplate {closePopup} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.beam {
|
||||
@apply items-center justify-center p-12 m-6;
|
||||
}
|
||||
|
||||
.skalaBeam {
|
||||
@apply w-full;}
|
||||
|
||||
|
||||
.wrapper {
|
||||
@apply grid grid-cols-3 gap-12 items-center justify-center px-10 m-6 py-10;
|
||||
}
|
||||
|
||||
.card {
|
||||
@apply bg-white flex flex-col items-center
|
||||
justify-center text-center;
|
||||
}
|
||||
|
||||
.card-subtitle {
|
||||
@apply w-full text-sm text-gray-600 h-5;
|
||||
}
|
||||
|
||||
.hausIcon {
|
||||
@apply w-full;}
|
||||
|
||||
|
||||
.popup-overlay {
|
||||
@apply fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
@apply w-1/2 bg-white p-4 rounded-lg shadow-lg relative;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
@apply absolute top-3 right-3 bg-secondary text-white rounded-full p-2 cursor-pointer;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
@apply absolute top-6 left-8 text-3xl font-bold;
|
||||
}
|
||||
|
||||
.hausIcon-button {
|
||||
@apply w-full bg-transparent border-none p-0 m-0 cursor-pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,103 @@
|
||||
<div class="bauteilBox">
|
||||
<div class="farbBox">
|
||||
<div class="labelBox">Farbklasse</div>
|
||||
<div class="farbe"><div class="farbBalkenEins"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenZwei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenDrei"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenVier"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenFuenf"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenAcht"></div></div>
|
||||
<div class="farbe"><div class="farbBalkenNeun"></div></div>
|
||||
</div>
|
||||
<div class="inhaltsBox">
|
||||
<div class="labelBox">U-Wert [W/(m²K)] / Beschreibung</div>
|
||||
<div class="textZeileEins">≤ 0,15 / Gasbeton-Blockstein 30 cm mit 16 cm PUR/PIR-Hartschaum (hocheffiziente Dämmung mit WLG 0,028)</div>
|
||||
<div class="textZeileZwei">≤ 0,20 / Gasbeton-Blockstein 30 cm mit 14 cm mineralischer Außendämung (WLG 0,035)</div>
|
||||
<div class="textZeileDrei">≤ 0,24 / Gasbeton-Blockstein 30 cm mit 12 cm mineralischer Außendämung (WLG 0,04)</div>
|
||||
<div class="textZeileVier">≤ 0,35 / Gasbeton-Blockstein 30 cm mit 10 cm mineralischer Außendämung (WLG 0,04)</div>
|
||||
<div class="textZeileFuenf">≤ 0,50 / Gasbeton-Blockstein 30 cm mit 5 cm mineralischer Innendämung (WLG 0,04)</div>
|
||||
<div class="textZeileAcht">≤ 0,80 / Gasbeton-Blockstein 30 cm, Dämmputz</div>
|
||||
<div class="textZeileNeun">> 0,80 / Gasbeton-Blockstein 30 cm</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.bauteilBox {
|
||||
@apply grid gap-2 items-stretch p-4 mt-8;
|
||||
grid-template-columns: 1fr 5fr; /* 1/6 for farbBox and 5/6 for inhaltsBox */
|
||||
}
|
||||
|
||||
.farbe {
|
||||
@apply flex justify-center items-center;
|
||||
}
|
||||
|
||||
.labelBox {
|
||||
@apply flex justify-start items-center text-lg font-bold;
|
||||
}
|
||||
|
||||
.farbBalkenEins {
|
||||
@apply flex w-full bg-effizienzFarbe-1 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenZwei {
|
||||
@apply flex w-full bg-effizienzFarbe-2 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenDrei {
|
||||
@apply flex w-full bg-effizienzFarbe-3 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenVier {
|
||||
@apply flex w-full bg-effizienzFarbe-4 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenFuenf {
|
||||
@apply flex w-full bg-effizienzFarbe-5 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenAcht {
|
||||
@apply flex w-full bg-effizienzFarbe-8 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.farbBalkenNeun {
|
||||
@apply flex w-full bg-effizienzFarbe-9 rounded-3xl h-6;
|
||||
}
|
||||
|
||||
.inhaltsBox {
|
||||
@apply grid grid-rows-8 gap-3 ml-3 pb-3;
|
||||
}
|
||||
|
||||
.farbBox {
|
||||
@apply grid grid-rows-8 gap-3 pb-3;
|
||||
}
|
||||
|
||||
.textZeileEins {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-1;
|
||||
}
|
||||
|
||||
.textZeileZwei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-2;
|
||||
}
|
||||
|
||||
.textZeileDrei {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-3;
|
||||
}
|
||||
|
||||
.textZeileVier {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-4;
|
||||
}
|
||||
|
||||
.textZeileFuenf {
|
||||
@apply flex justify-start items-center bg-white p-1 border-2 border-effizienzFarbe-5;
|
||||
}
|
||||
|
||||
.textZeileAcht {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-8;
|
||||
}
|
||||
|
||||
.textZeileNeun {
|
||||
@apply flex justify-start items-center bg-white p-1 border-effizienzFarbe-9;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -136,7 +136,7 @@ if(innerWidth>1024){
|
||||
</div>
|
||||
|
||||
<div class="nav-element">
|
||||
<a class="no-dropdown nav-element-child" href="/sanierungsfahrplan-anfragen">Sanierungsfahrplan (iSFP)</a>
|
||||
<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>
|
||||
|
||||
@@ -39,9 +39,13 @@
|
||||
allowedReason.includes(anlass) &&
|
||||
allowedTypes.includes(gebaeudetyp) && (leerStand === "bis 30") && (heizungsAlter === ">= 3");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="OEA_widget">
|
||||
<input id="recode" type="hidden" value="widgetvorlage" />
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
import i18next from "i18next";
|
||||
|
||||
import { NotificationWrapper } from "@ibcornelsen/ui";
|
||||
|
||||
@@ -36,7 +35,7 @@ const schema = JSON.stringify({
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang={i18next.language}>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
import i18next from "i18next";
|
||||
|
||||
import "#style/global.css";
|
||||
import "../../svelte-dialogs.config"
|
||||
@@ -42,7 +41,7 @@ const lightTheme = Astro.cookies.get("theme")?.value === "light";
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang={i18next.language}>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
import i18next from "i18next";
|
||||
|
||||
import "#style/global.css";
|
||||
import "../../svelte-dialogs.config"
|
||||
@@ -54,7 +53,7 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang={i18next.language}>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
|
||||
@@ -10,7 +10,7 @@ import { linearInterpolation } from "js-interpolate"
|
||||
* @param {BedarfsausweisWohnenClient} ausweis
|
||||
* @param {GebaeudeAufnahmeClient} gebaeude_aufnahme
|
||||
*/
|
||||
export function berechnungNutzenergiebedarfTrinkwasser(ausweis: BedarfsausweisWohnenClient, gebaeude_aufnahme: GebaeudeAufnahmeClient) {
|
||||
export function berechnungNutzenergiebedarfTrinkwarmwasser(ausweis: BedarfsausweisWohnenClient, gebaeude_aufnahme: GebaeudeAufnahmeClient) {
|
||||
// A_NGF
|
||||
const bezugsflaeche = gebaeude_aufnahme.nutzflaeche ?? 0;
|
||||
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
|
||||
import { BedarfsausweisWohnenClient, GebaeudeAufnahmeClient } from "#components/Ausweis/types.js";
|
||||
import { berechnungNutzenergiebedarfTrinkwasser } from "./BerechnungNutzenergiebedarfTrinkwarmwasser.js";
|
||||
import { FixedLengthArray } from "./types.js";
|
||||
|
||||
export function berechnungWaermequellenAusAnlagentechnikTrinkwasser(ausweis: VerbrauchsausweisWohnenClient) {
|
||||
|
||||
export function berechnungWaermequellenAusAnlagentechnikTrinkwasser(ausweis: BedarfsausweisWohnenClient, gebaeude_aufnahme: GebaeudeAufnahmeClient) {
|
||||
const trinkwasserWaermebedarf = berechnungNutzenergiebedarfTrinkwasser(ausweis, gebaeude_aufnahme);
|
||||
|
||||
const result = new Array(12).fill(0) as unknown as FixedLengthArray<number, 12>
|
||||
|
||||
for (let i = 0; i < 12; i++) {
|
||||
const tageImMonat = new Date(0, i, 0).getDate();
|
||||
|
||||
const monatlicheTrinkwasserWaermebedarf = trinkwasserWaermebedarf.trinkwasserWaermebedarf / 365 * tageImMonat;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
// Funktion zur Berechnung des Ausnutzungsgrades aus Tabelle 18
|
||||
|
||||
import { nevillePolynomialInterpolation } from "js-interpolate";
|
||||
|
||||
let waermequellensenkenverhaeltnis = 3.4; // Beispielwert - muss noch errechnet werden
|
||||
|
||||
const dataset = {
|
||||
alleMonate: {
|
||||
30: [ 0.999,0.992,0.978,0.956,0.927,0.893,0.856,0.818,0.78,0.742,0.706,0.671,0.638,0.608,0.579,0.553,0.528,0.505
|
||||
,0.483,0.463,0.445,0.428,0.411,0.396,0.382,0.369,0.357,0.345,0.334,0.324,0.314,0.305,0.296,0.288,0.28,0.273,0.266,
|
||||
0.259,0.253,0.246,0.22,0.198,0.181,0.166,0.153,0.142,0.133,0.125,0.117,0.111,0.105,0.1],
|
||||
40: [ 1.0,0.997,0.99,0.975,0.954,0.926,0.892,0.855,0.817,0.778,0.739,0.702,0.667,0.634,0.603,0.574,0.547,0.522
|
||||
,0.498,0.477,0.457,0.438,0.421,0.405,0.39,0.376,0.363,0.351,0.339,0.329,0.318,0.309,0.3,0.291,0.283,0.276,0.268,
|
||||
0.261,0.255,0.249,0.221,0.199,0.181,0.166,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
50: [ 1.0,0.999,0.995,0.986,0.97,0.948,0.918,0.883,0.845,0.805,0.765,0.726,0.688,0.652,0.619,0.588,0.559,0.533
|
||||
,0.508,0.485,0.464,0.445,0.427,0.41,0.394,0.38,0.366,0.354,0.342,0.331,0.321,0.311,0.301,0.293,0.285,0.277,0.269,
|
||||
0.262,0.256,0.249,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
60: [ 1.0,1.0,0.998,0.992,0.981,0.963,0.937,0.904,0.867,0.826,0.785,0.743,0.704,0.666,0.631,0.598,0.568,0.54
|
||||
,0.514,0.491,0.469,0.449,0.43,0.413,0.397,0.382,0.368,0.355,0.343,0.332,0.322,0.312,0.302,0.293,0.285,0.277,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
70: [ 1.0,1.0,0.999,0.996,0.988,0.973,0.951,0.921,0.884,0.843,0.8,0.757,0.716,0.676,0.639,0.605,0.574,0.545
|
||||
,0.518,0.494,0.472,0.451,0.432,0.414,0.398,0.383,0.369,0.356,0.344,0.333,0.322,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
80: [1.0,1.0,0.999,0.998,0.992,0.981,0.962,0.934,0.898,0.857,0.813,0.769,0.725,0.684,0.646,0.61,0.578,0.548
|
||||
,0.521,0.496,0.473,0.452,0.433,0.415,0.399,0.384,0.37,0.357,0.344,0.333,0.322,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
90: [ 1.0,1.0,1.0,0.999,0.995,0.986,0.97,0.944,0.91,0.869,0.824,0.778,0.733,0.69,0.651,0.614,0.581,0.55
|
||||
,0.523,0.497,0.474,0.453,0.434,0.416,0.4,0.384,0.37,0.357,0.345,0.333,0.322,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
100: [ 1.0,1.0,1.0,0.999,0.997,0.99,0.976,0.953,0.92,0.879,0.833,0.786,0.739,0.695,0.654,0.617,0.583,0.552
|
||||
,0.524,0.498,0.475,0.454,0.434,0.416,0.4,0.384,0.37,0.357,0.345,0.333,0.323,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
110: [ 1.0,1.0,1.0,0.999,0.998,0.993,0.981,0.96,0.928,0.887,0.841,0.792,0.744,0.699,0.657,0.619,0.584,0.553
|
||||
,0.525,0.499,0.475,0.454,0.435,0.417,0.4,0.384,0.37,0.357,0.345,0.333,0.323,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
120: [ 1.0,1.0,1.0,1.0,0.999,0.995,0.985,0.966,0.935,0.895,0.847,0.798,0.748,0.702,0.659,0.621,0.586,0.554
|
||||
,0.525,0.5,0.476,0.454,0.435,0.417,0.4,0.385,0.37,0.357,0.345,0.333,0.323,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
130: [ 1.0,1.0,1.0,1.0,0.999,0.996,0.988,0.971,0.942,0.901,0.853,0.802,0.752,0.704,0.661,0.622,0.587,0.554
|
||||
,0.526,0.5,0.476,0.454,0.435,0.417,0.4,0.385,0.37,0.357,0.345,0.333,0.323,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
140: [ 1.0,1.0,1.0,1.0,0.999,0.997,0.991,0.975,0.947,0.907,0.858,0.806,0.755,0.706,0.662,0.623,0.587,0.555
|
||||
,0.526,0.5,0.476,0.454,0.435,0.417,0.4,0.385,0.37,0.357,0.345,0.333,0.323,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
150: [ 1.0,1.0,1.0,1.0,0.999,0.998,0.992,0.979,0.952,0.912,0.863,0.809,0.757,0.708,0.663,0.623,0.588,0.555
|
||||
,0.526,0.5,0.476,0.454,0.435,0.417,0.4,0.385,0.37,0.357,0.345,0.333,0.323,0.312,0.303,0.294,0.286,0.278,0.27,
|
||||
0.263,0.256,0.25,0.222,0.2,0.182,0.167,0.154,0.143,0.133,0.125,0.118,0.111,0.105,0.1],
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
const waermeQuellenSenkenVerhaeltnis = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,
|
||||
1.9,2,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10];
|
||||
|
||||
export function funktionAusnutzungsgrad(waermequellensenkenverhaeltnis: number, zeitkonstane: number, monat: keyof typeof dataset) {
|
||||
const data = dataset[monat]
|
||||
|
||||
const interpolations: number[] = []
|
||||
|
||||
for (const key in data) {
|
||||
const values = data[key as unknown as keyof typeof data]
|
||||
|
||||
const interpolate = nevillePolynomialInterpolation(
|
||||
values.map((value, i) => ({ x: waermeQuellenSenkenVerhaeltnis[i], y: value })),
|
||||
values.length
|
||||
)
|
||||
|
||||
interpolations.push(interpolate(waermequellensenkenverhaeltnis))
|
||||
}
|
||||
|
||||
const interpolate = nevillePolynomialInterpolation(
|
||||
interpolations.map((interpolation, i) => {
|
||||
return {
|
||||
x: Object.keys(data)[i],
|
||||
y: interpolation
|
||||
}
|
||||
}),
|
||||
interpolations.length
|
||||
)
|
||||
|
||||
return interpolate(zeitkonstane)
|
||||
}
|
||||
|
||||
console.log(funktionAusnutzungsgrad(waermequellensenkenverhaeltnis, 30, "alleMonate"))
|
||||
@@ -0,0 +1,180 @@
|
||||
// Funktion zur Berechnung der Bilanzinnentemperatur aus Tabelle 8 EFH oder Tabelle 10 MFH
|
||||
|
||||
import { nevillePolynomialInterpolation } from "js-interpolate";
|
||||
import { any } from "node_modules/cypress/types/bluebird/index.js";
|
||||
|
||||
let wohneinheiten = 3;
|
||||
|
||||
const datasetEinfamilienHaus = {
|
||||
Januar: {
|
||||
50: [18.83, 18.71, 18.61, 18.38, 18.16, 18.05, 17.99, 17.97, 17.95],
|
||||
90: [18.99, 18.87, 18.77, 18.54, 18.31, 18.20, 18.15, 18.12, 18.11],
|
||||
130: [19.14, 19.02, 18.92, 18.68, 18.45, 18.34, 18.29, 18.26, 18.25],
|
||||
},
|
||||
Februar: {
|
||||
50: [18.88, 18.76, 18.67, 18.44, 18.23, 18.13, 18.08, 18.05, 18.04],
|
||||
90: [19.04, 18.93, 18.83, 18.60, 18.39, 18.29, 18.23, 18.21, 18.20],
|
||||
130: [19.18, 19.07, 18.97, 18.74, 18.53, 18.42, 18.37, 18.34, 18.33],
|
||||
},
|
||||
März: {
|
||||
50: [19.05, 18.95, 18.87, 18.68, 18.50, 18.42, 18.37, 18.35, 18.34],
|
||||
90: [19.19, 19.09, 19.01, 18.82, 18.64, 18.55, 18.51, 18.49, 18.48],
|
||||
130: [19.31, 19.21, 19.13, 18.94, 18.75, 18.67, 18.62, 18.60, 18.59],
|
||||
},
|
||||
April: {
|
||||
50: [19.33, 19.26, 19.20, 19.07, 18.94, 18.88, 18.85, 18.84, 18.83],
|
||||
90: [19.43, 19.36, 19.30, 19.17, 19.04, 18.98, 18.95, 18.93, 18.92],
|
||||
130: [19.51, 19.44, 19.38, 19.25, 19.12, 19.06, 19.03, 19.01, 19.00],
|
||||
},
|
||||
Mai: {
|
||||
50: [19.63, 19.60, 19.56, 19.49, 19.42, 19.39, 19.37, 19.36, 19.36],
|
||||
90: [19.69, 19.65, 19.62, 19.55, 19.48, 19.44, 19.42, 19.42, 19.41],
|
||||
130: [19.73, 19.70, 19.66, 19.59, 19.52, 19.49, 19.47, 19.46, 19.46],
|
||||
},
|
||||
Juni: {
|
||||
50: [19.80, 19.77, 19.76, 19.72, 19.68, 19.66, 19.65, 19.64, 19.64],
|
||||
90: [19.83, 19.80, 19.79, 19.75, 19.71, 19.69, 19.68, 19.67, 19.67],
|
||||
130: [19.85, 19.83, 19.81, 19.77, 19.73, 19.71, 19.70, 19.70, 19.70],
|
||||
},
|
||||
Juli: {
|
||||
50: [19.94, 19.93, 19.93, 19.91, 19.90, 19.90, 19.89, 19.89, 19.89],
|
||||
90: [19.95, 19.94, 19.94, 19.92, 19.91, 19.91, 19.90, 19.90, 19.90],
|
||||
130: [19.95, 19.95, 19.94, 19.93, 19.92, 19.91, 19.91, 19.91, 19.91],
|
||||
},
|
||||
August: {
|
||||
50: [19.91, 19.90, 19.90, 19.88, 19.86, 19.86, 19.85, 19.85, 19.85],
|
||||
90: [19.93, 19.92, 19.91, 19.89, 19.88, 19.87, 19.86, 19.86, 19.86],
|
||||
130: [19.94, 19.93, 19.92, 19.90, 19.89, 19.88, 19.87, 19.87, 19.87],
|
||||
},
|
||||
September: {
|
||||
50: [19.65, 19.61, 19.58, 19.51, 19.44, 19.41, 19.39, 19.39, 19.38],
|
||||
90: [19.70, 19.66, 19.63, 19.56, 19.49, 19.46, 19.44, 19.44, 19.43],
|
||||
130: [19.74, 19.71, 19.68, 19.60, 19.54, 19.50, 19.49, 19.48, 19.47],
|
||||
},
|
||||
Oktober: {
|
||||
50: [19.35, 19.28, 19.23, 19.10, 18.97, 18.91, 18.88, 18.87, 18.86],
|
||||
90: [19.44, 19.38, 19.32, 19.19, 19.07, 19.01, 18.98, 18.96, 18.95],
|
||||
130: [19.53, 19.46, 19.40, 19.27, 19.15, 19.08, 19.05, 19.04, 19.03],
|
||||
},
|
||||
November: {
|
||||
50: [19.01, 18.91, 18.83, 18.63, 18.45, 18.35, 18.31, 18.29, 18.28],
|
||||
90: [19.16, 19.06, 18.97, 18.77, 18.59, 18.49, 18.45, 18.43, 18.42],
|
||||
130: [19.28, 19.18, 19.09, 18.90, 18.71, 18.61, 18.57, 18.55, 18.53],
|
||||
},
|
||||
Dezember: {
|
||||
50: [18.83, 18.71, 18.61, 18.38, 18.15, 18.04, 17.99, 17.96, 17.95],
|
||||
90: [18.99, 18.87, 18.76, 18.53, 18.30, 18.19, 18.14, 18.11, 18.10],
|
||||
130: [19.14, 19.02, 18.91, 18.67, 18.45, 18.33, 18.28, 18.25, 18.24],
|
||||
},
|
||||
};
|
||||
|
||||
const datasetMehrfamilienHaus = {
|
||||
Januar: {
|
||||
50: [19.41, 19.37, 19.33, 19.24, 19.16, 19.12, 19.10, 19.09, 19.08],
|
||||
90: [19.50, 19.45, 19.41, 19.33, 19.24, 19.20, 19.18, 19.17, 19.17],
|
||||
130: [19.57, 19.53, 19.49, 19.40, 19.32, 19.28, 19.26, 19.25, 19.24],
|
||||
},
|
||||
Februar: {
|
||||
50: [19.44, 19.40, 19.36, 19.28, 19.20, 19.16, 19.14, 19.13, 19.13],
|
||||
90: [19.52, 19.48, 19.44, 19.36, 19.28, 19.24, 19.22, 19.21, 19.21],
|
||||
130: [19.59, 19.55, 19.51, 19.43, 19.35, 19.31, 19.29, 19.28, 19.28],
|
||||
},
|
||||
März: {
|
||||
50: [19.53, 19.49, 19.46, 19.39, 19.32, 19.29, 19.27, 19.27, 19.26],
|
||||
90: [19.60, 19.56, 19.53, 19.46, 19.39, 19.36, 19.34, 19.33, 19.33],
|
||||
130: [19.66, 19.62, 19.59, 19.52, 19.45, 19.42, 19.40, 19.39, 19.39],
|
||||
},
|
||||
April: {
|
||||
50: [19.66, 19.64, 19.62, 19.57, 19.52, 19.50, 19.49, 19.48, 19.48],
|
||||
90: [19.71, 19.69, 19.67, 19.62, 19.57, 19.55, 19.54, 19.53, 19.53],
|
||||
130: [19.76, 19.73, 19.71, 19.66, 19.61, 19.59, 19.58, 19.57, 19.57],
|
||||
},
|
||||
Mai: {
|
||||
50: [19.82, 19.80, 19.79, 19.76, 19.74, 19.73, 19.72, 19.72, 19.72],
|
||||
90: [19.84, 19.83, 19.82, 19.79, 19.77, 19.75, 19.75, 19.74, 19.74],
|
||||
130: [19.87, 19.85, 19.84, 19.81, 19.79, 19.78, 19.77, 19.77, 19.76],
|
||||
},
|
||||
Juni: {
|
||||
50: [19.90, 19.89, 19.88, 19.87, 19.85, 19.85, 19.84, 19.84, 19.84],
|
||||
90: [19.91, 19.91, 19.90, 19.88, 19.87, 19.86, 19.86, 19.86, 19.86],
|
||||
130: [19.93, 19.92, 19.91, 19.90, 19.88, 19.87, 19.87, 19.87, 19.87],
|
||||
},
|
||||
Juli: {
|
||||
50: [19.97, 19.97, 19.96, 19.96, 19.96, 19.95, 19.95, 19.95, 19.95],
|
||||
90: [19.97, 19.97, 19.97, 19.96, 19.96, 19.96, 19.96, 19.96, 19.96],
|
||||
130: [19.98, 19.98, 19.97, 19.97, 19.96, 19.96, 19.96, 19.96, 19.96],
|
||||
},
|
||||
August: {
|
||||
50: [19.96, 19.95, 19.95, 19.94, 19.94, 19.93, 19.93, 19.93, 19.93],
|
||||
90: [19.96, 19.96, 19.96, 19.95, 19.94, 19.94, 19.94, 19.94, 19.94],
|
||||
130: [19.97, 19.97, 19.96, 19.96, 19.95, 19.95, 19.95, 19.94, 19.94],
|
||||
},
|
||||
September: {
|
||||
50: [19.82, 19.81, 19.80, 19.77, 19.75, 19.74, 19.73, 19.73, 19.73],
|
||||
90: [19.85, 19.84, 19.82, 19.80, 19.77, 19.76, 19.76, 19.75, 19.75],
|
||||
130: [19.87, 19.86, 19.85, 19.82, 19.80, 19.78, 19.78, 19.77, 19.77],
|
||||
},
|
||||
Oktober: {
|
||||
50: [19.67, 19.65, 19.63, 19.58, 19.53, 19.51, 19.50, 19.50, 19.49],
|
||||
90: [19.72, 19.70, 19.68, 19.63, 19.58, 19.56, 19.55, 19.54, 19.54],
|
||||
130: [19.76, 19.74, 19.72, 19.67, 19.62, 19.60, 19.59, 19.58, 19.58],
|
||||
},
|
||||
November: {
|
||||
50: [19.51, 19.47, 19.44, 19.36, 19.30, 19.26, 19.25, 19.24, 19.23],
|
||||
90: [19.58, 19.54, 19.51, 19.44, 19.37, 19.33, 19.32, 19.31, 19.30],
|
||||
130: [19.64, 19.60, 19.57, 19.50, 19.43, 19.39, 19.38, 19.37, 19.37],
|
||||
},
|
||||
Dezember: {
|
||||
50: [19.41, 19.36, 19.32, 19.24, 19.15, 19.11, 19.09, 19.08, 19.08],
|
||||
90: [19.49, 19.45, 19.41, 19.32, 19.24, 19.20, 19.18, 19.17, 19.16],
|
||||
130: [19.57, 19.52, 19.49, 19.40, 19.31, 19.27, 19.25, 19.24, 19.24],
|
||||
},
|
||||
};
|
||||
|
||||
function getDataset(wohneinheiten: number) {
|
||||
if (wohneinheiten < 3) {
|
||||
return datasetEinfamilienHaus;
|
||||
} else {
|
||||
return datasetMehrfamilienHaus;
|
||||
}
|
||||
}
|
||||
|
||||
const dataset = getDataset(wohneinheiten);
|
||||
|
||||
// Für "Ohne Teilbeheizung" habe ich hier einfach 0 eingesetzt:
|
||||
const HeizLast = [0, 5, 10, 25, 50, 75, 100, 125, 150];
|
||||
|
||||
// Um über die beiden Tabellen zu interpolieren können wir einfach zuerst über
|
||||
// jede einzeln interpolieren und dann zwischen den Tabellen interpolieren.
|
||||
// Falls wir also den Wert an Stelle Heizlast: 120, Zeitkonstante 100, Monat:
|
||||
// Januar haben wollen:
|
||||
export function funktionBilanzInnentemperatur(heizlast: number, zeitkonstane: number, monat: keyof typeof dataset) {
|
||||
const data = dataset[monat]
|
||||
|
||||
const interpolations: number[] = []
|
||||
|
||||
for (const key in data) {
|
||||
const values = data[key as unknown as keyof typeof data]
|
||||
|
||||
const interpolate = nevillePolynomialInterpolation(
|
||||
values.map((value, i) => ({ x: HeizLast[i], y: value })),
|
||||
values.length
|
||||
)
|
||||
|
||||
interpolations.push(interpolate(heizlast))
|
||||
}
|
||||
|
||||
const interpolate = nevillePolynomialInterpolation(
|
||||
interpolations.map((interpolation, i) => {
|
||||
return {
|
||||
x: Object.keys(data)[i],
|
||||
y: interpolation
|
||||
}
|
||||
}),
|
||||
interpolations.length
|
||||
)
|
||||
|
||||
return interpolate(zeitkonstane)
|
||||
}
|
||||
|
||||
console.log(funktionBilanzInnentemperatur(120, 100, "Januar"))
|
||||
@@ -1,9 +1,10 @@
|
||||
// Funktion zur Berechnung des monatlichen Belastungsgrades aus Tabelle 9 EFH (Januar, Zeitkonstante 90)
|
||||
// Funktion zur Berechnung des monatlichen Belastungsgrades aus Tabelle 9 EFH und Tabelle 11 MFH
|
||||
|
||||
import { nevillePolynomialInterpolation } from "js-interpolate";
|
||||
// Funktion zur Berechnung des monatlichen Belastungsgrades aus Tabelle 9 EFH (Zeitkonstante 90,130)
|
||||
|
||||
const dataset = {
|
||||
let wohneinheiten = 3;
|
||||
|
||||
const datasetEinfamilienHausMittlereBelastung = {
|
||||
Januar: {
|
||||
50: [ 0.557, 0.554, 0.55, 0.543, 0.536, 0.533, 0.531, 0.53, 0.53 ],
|
||||
90: [ 0.562, 0.559, 0.555, 0.548, 0.541, 0.538, 0.536, 0.535, 0.535 ],
|
||||
@@ -66,6 +67,79 @@ const dataset = {
|
||||
},
|
||||
}
|
||||
|
||||
const datasetMehrfamilienHausMittlereBelastung = {
|
||||
Januar: {
|
||||
50: [0.575, 0.574, 0.573, 0.570, 0.567, 0.566, 0.566, 0.565, 0.565],
|
||||
90: [0.578, 0.577, 0.575, 0.573, 0.570, 0.569, 0.568, 0.568, 0.568],
|
||||
130: [0.580, 0.579, 0.578, 0.575, 0.572, 0.571, 0.571, 0.570, 0.570],
|
||||
},
|
||||
Februar: {
|
||||
50: [0.548, 0.547, 0.546, 0.543, 0.541, 0.539, 0.539, 0.538, 0.538],
|
||||
90: [0.551, 0.549, 0.548, 0.546, 0.543, 0.542, 0.541, 0.541, 0.541],
|
||||
130: [0.553, 0.552, 0.550, 0.548, 0.545, 0.544, 0.543, 0.543, 0.543],
|
||||
},
|
||||
März: {
|
||||
50: [0.463, 0.462, 0.461, 0.459, 0.457, 0.456, 0.455, 0.455, 0.455],
|
||||
90: [0.465, 0.464, 0.463, 0.461, 0.459, 0.458, 0.458, 0.457, 0.457],
|
||||
130: [0.467, 0.466, 0.465, 0.463, 0.461, 0.460, 0.459, 0.459, 0.459],
|
||||
},
|
||||
April: {
|
||||
50: [0.327, 0.326, 0.326, 0.324, 0.323, 0.322, 0.321, 0.321, 0.321],
|
||||
90: [0.329, 0.328, 0.327, 0.326, 0.324, 0.323, 0.323, 0.323, 0.323],
|
||||
130: [0.330, 0.329, 0.328, 0.327, 0.325, 0.325, 0.324, 0.324, 0.324],
|
||||
},
|
||||
Mai: {
|
||||
50: [0.179, 0.178, 0.178, 0.177, 0.176, 0.176, 0.176, 0.176, 0.175],
|
||||
90: [0.179, 0.179, 0.179, 0.178, 0.177, 0.177, 0.176, 0.176, 0.176],
|
||||
130: [0.180, 0.180, 0.179, 0.179, 0.178, 0.177, 0.177, 0.177, 0.177],
|
||||
},
|
||||
Juni: {
|
||||
50: [0.100, 0.100, 0.099, 0.099, 0.099, 0.098, 0.098, 0.098, 0.098],
|
||||
90: [0.100, 0.100, 0.100, 0.099, 0.099, 0.099, 0.099, 0.099, 0.099],
|
||||
130: [0.101, 0.101, 0.100, 0.100, 0.099, 0.099, 0.099, 0.099, 0.099],
|
||||
},
|
||||
Juli: {
|
||||
50: [0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030],
|
||||
90: [0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030],
|
||||
130: [0.031, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030],
|
||||
},
|
||||
August: {
|
||||
50: [0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042],
|
||||
90: [0.043, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042],
|
||||
130: [0.043, 0.043, 0.043, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042],
|
||||
},
|
||||
September: {
|
||||
50: [0.173, 0.172, 0.172, 0.171, 0.170, 0.170, 0.170, 0.170, 0.170],
|
||||
90: [0.173, 0.173, 0.173, 0.172, 0.171, 0.171, 0.170, 0.170, 0.170],
|
||||
130: [0.174, 0.174, 0.173, 0.173, 0.172, 0.171, 0.171, 0.171, 0.171],
|
||||
},
|
||||
Oktober: {
|
||||
50: [0.318, 0.317, 0.317, 0.315, 0.314, 0.313, 0.313, 0.312, 0.312],
|
||||
90: [0.319, 0.319, 0.318, 0.317, 0.315, 0.314, 0.314, 0.314, 0.314],
|
||||
130: [0.321, 0.320, 0.319, 0.318, 0.316, 0.316, 0.315, 0.315, 0.315],
|
||||
},
|
||||
November: {
|
||||
50: [0.481, 0.480, 0.479, 0.477, 0.475, 0.474, 0.473, 0.473, 0.473],
|
||||
90: [0.484, 0.483, 0.482, 0.479, 0.477, 0.476, 0.476, 0.475, 0.475],
|
||||
130: [0.486, 0.485, 0.484, 0.481, 0.479, 0.478, 0.477, 0.477, 0.477],
|
||||
},
|
||||
Dezember: {
|
||||
50: [0.578, 0.577, 0.576, 0.573, 0.570, 0.569, 0.569, 0.568, 0.568],
|
||||
90: [0.581, 0.580, 0.578, 0.576, 0.573, 0.572, 0.571, 0.571, 0.571],
|
||||
130: [0.583, 0.582, 0.581, 0.578, 0.575, 0.574, 0.574, 0.573, 0.573],
|
||||
},
|
||||
};
|
||||
|
||||
function getDatasetBelastung(wohneinheiten: number) {
|
||||
if (wohneinheiten < 3) {
|
||||
return datasetEinfamilienHausMittlereBelastung;
|
||||
} else {
|
||||
return datasetMehrfamilienHausMittlereBelastung;
|
||||
}
|
||||
}
|
||||
|
||||
const dataset = getDatasetBelastung(wohneinheiten);
|
||||
|
||||
// Für "Ohne Teilbeheizung" habe ich hier einfach 0 eingesetzt:
|
||||
const HeizLast = [0, 5, 10, 25, 50, 75, 100, 125, 150];
|
||||
|
||||
@@ -73,7 +147,7 @@ const HeizLast = [0, 5, 10, 25, 50, 75, 100, 125, 150];
|
||||
// jede einzeln interpolieren und dann zwischen den Tabellen interpolieren.
|
||||
// Falls wir also den Wert an Stelle Heizlast: 120, Zeitkonstante 100, Monat:
|
||||
// Januar haben wollen:
|
||||
function crossInterpolate(heizlast: number, zeitkonstane: number, monat: keyof typeof dataset) {
|
||||
export function funktionMonatlicherBelastungsgrad(heizlast: number, zeitkonstane: number, monat: keyof typeof dataset) {
|
||||
const data = dataset[monat]
|
||||
|
||||
const interpolations: number[] = []
|
||||
@@ -100,6 +174,4 @@ function crossInterpolate(heizlast: number, zeitkonstane: number, monat: keyof t
|
||||
)
|
||||
|
||||
return interpolate(zeitkonstane)
|
||||
}
|
||||
|
||||
console.log(crossInterpolate(120, 100, "Januar"));
|
||||
}
|
||||
481
src/lib/helpers/txml.ts
Normal file
@@ -0,0 +1,481 @@
|
||||
// ==ClosureCompiler==
|
||||
// @output_file_name default.js
|
||||
// @compilation_level SIMPLE_OPTIMIZATIONS
|
||||
// ==/ClosureCompiler==
|
||||
// module.exports = {
|
||||
// parse: parse,
|
||||
// simplify: simplify,
|
||||
// simplifyLostLess: simplifyLostLess,
|
||||
// filter: filter,
|
||||
// stringify: stringify,
|
||||
// toContentString: toContentString,
|
||||
// getElementById: getElementById,
|
||||
// getElementsByClassName: getElementsByClassName,
|
||||
// transformStream: transformStream,
|
||||
// };
|
||||
|
||||
/**
|
||||
* @author: Tobias Nickel
|
||||
* @created: 06.04.2015
|
||||
* I needed a small xmlparser chat can be used in a worker.
|
||||
*/
|
||||
|
||||
interface Node {
|
||||
tagName: string;
|
||||
attributes: Record<string, string>;
|
||||
children: (Node | string)[];
|
||||
}
|
||||
|
||||
interface ParseOptions {
|
||||
attrName?: string;
|
||||
attrValue?: string;
|
||||
parseNode: any;
|
||||
pos?: number;
|
||||
noChildNodes?: string[];
|
||||
setPos?: boolean;
|
||||
keepComments?: boolean;
|
||||
keepWhitespace?: boolean;
|
||||
simplify?: boolean;
|
||||
filter?: (a: Node, b: Node) => boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* parseXML / html into a DOM Object. with no validation and some failur tolerance
|
||||
* @param {string} source your XML to parse
|
||||
* @param {ParseOptions} [options] all other options:
|
||||
* @return {(Node | string)[]}
|
||||
*/
|
||||
export function parse(source: string, options: ParseOptions = {}): (Node | string)[] {
|
||||
var pos = options.pos || 0;
|
||||
var keepComments = !!options.keepComments;
|
||||
var keepWhitespace = !!options.keepWhitespace
|
||||
|
||||
var openBracket = "<";
|
||||
var openBracketCC = "<".charCodeAt(0);
|
||||
var closeBracket = ">";
|
||||
var closeBracketCC = ">".charCodeAt(0);
|
||||
var minusCC = "-".charCodeAt(0);
|
||||
var slashCC = "/".charCodeAt(0);
|
||||
var exclamationCC = '!'.charCodeAt(0);
|
||||
var singleQuoteCC = "'".charCodeAt(0);
|
||||
var doubleQuoteCC = '"'.charCodeAt(0);
|
||||
var openCornerBracketCC = '['.charCodeAt(0);
|
||||
var closeCornerBracketCC = ']'.charCodeAt(0);
|
||||
|
||||
|
||||
/**
|
||||
* parsing a list of entries
|
||||
*/
|
||||
function parseChildren(tagName: string) {
|
||||
var children = [];
|
||||
while (source[pos]) {
|
||||
if (source.charCodeAt(pos) == openBracketCC) {
|
||||
if (source.charCodeAt(pos + 1) === slashCC) {
|
||||
var closeStart = pos + 2;
|
||||
pos = source.indexOf(closeBracket, pos);
|
||||
|
||||
var closeTag = source.substring(closeStart, pos)
|
||||
if (closeTag.indexOf(tagName) == -1) {
|
||||
var parsedText = source.substring(0, pos).split('\n');
|
||||
throw new Error(
|
||||
'Unexpected close tag\nLine: ' + (parsedText.length - 1) +
|
||||
'\nColumn: ' + (parsedText[parsedText.length - 1].length + 1) +
|
||||
'\nChar: ' + source[pos]
|
||||
);
|
||||
}
|
||||
|
||||
if (pos + 1) pos += 1
|
||||
|
||||
return children;
|
||||
} else if (source.charCodeAt(pos + 1) === exclamationCC) {
|
||||
if (source.charCodeAt(pos + 2) == minusCC) {
|
||||
//comment support
|
||||
const startCommentPos = pos;
|
||||
while (pos !== -1 && !(source.charCodeAt(pos) === closeBracketCC && source.charCodeAt(pos - 1) == minusCC && source.charCodeAt(pos - 2) == minusCC && pos != -1)) {
|
||||
pos = source.indexOf(closeBracket, pos + 1);
|
||||
}
|
||||
if (pos === -1) {
|
||||
pos = source.length
|
||||
}
|
||||
if (keepComments) {
|
||||
children.push(source.substring(startCommentPos, pos + 1));
|
||||
}
|
||||
} else if (
|
||||
source.charCodeAt(pos + 2) === openCornerBracketCC &&
|
||||
source.charCodeAt(pos + 8) === openCornerBracketCC &&
|
||||
source.substr(pos + 3, 5).toLowerCase() === 'cdata'
|
||||
) {
|
||||
// cdata
|
||||
var cdataEndIndex = source.indexOf(']]>', pos);
|
||||
if (cdataEndIndex == -1) {
|
||||
children.push(source.substr(pos + 9));
|
||||
pos = source.length;
|
||||
} else {
|
||||
children.push(source.substring(pos + 9, cdataEndIndex));
|
||||
pos = cdataEndIndex + 3;
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
// doctypesupport
|
||||
const startDoctype = pos + 1;
|
||||
pos += 2;
|
||||
var encapsuled = false;
|
||||
while ((source.charCodeAt(pos) !== closeBracketCC || encapsuled === true) && source[pos]) {
|
||||
if (source.charCodeAt(pos) === openCornerBracketCC) {
|
||||
encapsuled = true;
|
||||
} else if (encapsuled === true && source.charCodeAt(pos) === closeCornerBracketCC) {
|
||||
encapsuled = false;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
children.push(source.substring(startDoctype, pos));
|
||||
}
|
||||
pos++;
|
||||
continue;
|
||||
}
|
||||
var node = parseNode();
|
||||
children.push(node);
|
||||
if (node.tagName[0] === '?') {
|
||||
children.push(...node.children);
|
||||
node.children = [];
|
||||
}
|
||||
} else {
|
||||
var text = parseText();
|
||||
if (keepWhitespace) {
|
||||
if (text.length > 0) {
|
||||
children.push(text);
|
||||
}
|
||||
} else {
|
||||
var trimmed = text.trim();
|
||||
if (trimmed.length > 0) {
|
||||
children.push(trimmed);
|
||||
}
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the text outside of texts until the first '<'
|
||||
*/
|
||||
function parseText() {
|
||||
var start = pos;
|
||||
pos = source.indexOf(openBracket, pos) - 1;
|
||||
if (pos === -2)
|
||||
pos = source.length;
|
||||
return source.slice(start, pos + 1);
|
||||
}
|
||||
/**
|
||||
* returns text until the first nonAlphabetic letter
|
||||
*/
|
||||
var nameSpacer = '\r\n\t>/= ';
|
||||
|
||||
function parseName() {
|
||||
var start = pos;
|
||||
while (nameSpacer.indexOf(source[pos]) === -1 && source[pos]) {
|
||||
pos++;
|
||||
}
|
||||
return source.slice(start, pos);
|
||||
}
|
||||
/**
|
||||
* is parsing a node, including tagName, Attributes and its children,
|
||||
* to parse children it uses the parseChildren again, that makes the parsing recursive
|
||||
*/
|
||||
var NoChildNodes = options.noChildNodes || ['img', 'br', 'input', 'meta', 'link', 'hr'];
|
||||
|
||||
function parseNode(): Node {
|
||||
pos++;
|
||||
const tagName = parseName();
|
||||
const attributes: Record<string, string> = {};
|
||||
let children: (string | Node)[] = [];
|
||||
|
||||
// parsing attributes
|
||||
while (source.charCodeAt(pos) !== closeBracketCC && source[pos]) {
|
||||
var c = source.charCodeAt(pos);
|
||||
if ((c > 64 && c < 91) || (c > 96 && c < 123)) {
|
||||
//if('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(S[pos])!==-1 ){
|
||||
var name = parseName();
|
||||
// search beginning of the string
|
||||
var code = source.charCodeAt(pos);
|
||||
while (code && code !== singleQuoteCC && code !== doubleQuoteCC && !((code > 64 && code < 91) || (code > 96 && code < 123)) && code !== closeBracketCC) {
|
||||
pos++;
|
||||
code = source.charCodeAt(pos);
|
||||
}
|
||||
if (code === singleQuoteCC || code === doubleQuoteCC) {
|
||||
var value = parseString();
|
||||
if (pos === -1) {
|
||||
return {
|
||||
tagName,
|
||||
attributes,
|
||||
children,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
value = null;
|
||||
pos--;
|
||||
}
|
||||
attributes[name] = value;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
// optional parsing of children
|
||||
if (source.charCodeAt(pos - 1) !== slashCC) {
|
||||
if (tagName == "script") {
|
||||
var start = pos + 1;
|
||||
pos = source.indexOf('</script>', pos);
|
||||
children = [source.slice(start, pos)];
|
||||
pos += 9;
|
||||
} else if (tagName == "style") {
|
||||
var start = pos + 1;
|
||||
pos = source.indexOf('</style>', pos);
|
||||
children = [source.slice(start, pos)];
|
||||
pos += 8;
|
||||
} else if (NoChildNodes.indexOf(tagName) === -1) {
|
||||
pos++;
|
||||
children = parseChildren(tagName);
|
||||
} else {
|
||||
pos++
|
||||
}
|
||||
} else {
|
||||
pos++;
|
||||
}
|
||||
return {
|
||||
tagName,
|
||||
attributes,
|
||||
children,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* is parsing a string, that starts with a char and with the same usually ' or "
|
||||
*/
|
||||
|
||||
function parseString() {
|
||||
var startChar = source[pos];
|
||||
var startpos = pos + 1;
|
||||
pos = source.indexOf(startChar, startpos)
|
||||
return source.slice(startpos, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function findElements() {
|
||||
var r = new RegExp('\\s' + options.attrName + '\\s*=[\'"]' + options.attrValue + '[\'"]').exec(source)
|
||||
if (r) {
|
||||
return r.index;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
var out: (string | Node)[] | null = null;
|
||||
if (options.attrValue !== undefined) {
|
||||
options.attrName = options.attrName || 'id';
|
||||
out = [];
|
||||
|
||||
while ((pos = findElements()) !== -1) {
|
||||
pos = source.lastIndexOf('<', pos);
|
||||
if (pos !== -1) {
|
||||
out.push(parseNode());
|
||||
}
|
||||
source = source.substr(pos);
|
||||
pos = 0;
|
||||
}
|
||||
} else if (options.parseNode) {
|
||||
out = parseNode()
|
||||
} else {
|
||||
out = parseChildren('');
|
||||
}
|
||||
|
||||
if (options.filter) {
|
||||
out = filter(out, options.filter);
|
||||
}
|
||||
|
||||
if (options.simplify) {
|
||||
return simplify(Array.isArray(out) ? out : [out]);
|
||||
}
|
||||
|
||||
if (options.setPos) {
|
||||
out.pos = pos;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* transform the DomObject to an object that is like the object of PHP`s simple_xmp_load_*() methods.
|
||||
* this format helps you to write that is more likely to keep your program working, even if there a small changes in the XML schema.
|
||||
* be aware, that it is not possible to reproduce the original xml from a simplified version, because the order of elements is not saved.
|
||||
* therefore your program will be more flexible and easier to read.
|
||||
*
|
||||
* @param {tNode[]} children the childrenList
|
||||
*/
|
||||
export function simplify(children: any[]) {
|
||||
var out = {};
|
||||
if (!children.length) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (children.length === 1 && typeof children[0] == 'string') {
|
||||
return children[0];
|
||||
}
|
||||
// map each object
|
||||
children.forEach(function(child: { tagName: string | number; children: any; attributes: {}; }) {
|
||||
if (typeof child !== 'object') {
|
||||
return;
|
||||
}
|
||||
if (!out[child.tagName])
|
||||
out[child.tagName] = [];
|
||||
var kids = simplify(child.children);
|
||||
out[child.tagName].push(kids);
|
||||
if (Object.keys(child.attributes).length && typeof kids !== 'string') {
|
||||
kids._attributes = child.attributes;
|
||||
}
|
||||
});
|
||||
|
||||
for (var i in out) {
|
||||
if (out[i].length == 1) {
|
||||
out[i] = out[i][0];
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* similar to simplify, but lost less
|
||||
*
|
||||
* @param {tNode[]} children the childrenList
|
||||
*/
|
||||
export function simplifyLostLess(children: any[], parentAttributes = {}) {
|
||||
var out = {};
|
||||
if (!children.length) {
|
||||
return out;
|
||||
}
|
||||
|
||||
if (children.length === 1 && typeof children[0] == 'string') {
|
||||
return Object.keys(parentAttributes).length ? {
|
||||
_attributes: parentAttributes,
|
||||
value: children[0]
|
||||
} : children[0];
|
||||
}
|
||||
// map each object
|
||||
children.forEach(function(child: { tagName: string | number; children: any; attributes: {} | undefined; }) {
|
||||
if (typeof child !== 'object') {
|
||||
return;
|
||||
}
|
||||
if (!out[child.tagName])
|
||||
out[child.tagName] = [];
|
||||
var kids = simplifyLostLess(child.children || [], child.attributes);
|
||||
out[child.tagName].push(kids);
|
||||
if (Object.keys(child.attributes).length) {
|
||||
kids._attributes = child.attributes;
|
||||
}
|
||||
});
|
||||
|
||||
return out;
|
||||
};
|
||||
|
||||
/**
|
||||
* behaves the same way as Array.filter, if the filter method return true, the element is in the resultList
|
||||
* @params children{Array} the children of a node
|
||||
* @param f{function} the filter method
|
||||
*/
|
||||
export function filter(children: any[], f: (arg0: any, arg1: any, arg2: number, arg3: string) => any, dept = 0, path = '') {
|
||||
var out: any[] = [];
|
||||
children.forEach(function(child: { children: any; tagName: string; }, i: string) {
|
||||
if (typeof(child) === 'object' && f(child, i, dept, path)) out.push(child);
|
||||
if (child.children) {
|
||||
var kids = filter(child.children, f, dept + 1, (path ? path + '.' : '') + i + '.' + child.tagName);
|
||||
out = out.concat(kids);
|
||||
}
|
||||
});
|
||||
return out;
|
||||
};
|
||||
|
||||
/**
|
||||
* stringify a previously parsed string object.
|
||||
* this is useful,
|
||||
* 1. to remove whitespace
|
||||
* 2. to recreate xml data, with some changed data.
|
||||
* @param {tNode} O the object to Stringify
|
||||
*/
|
||||
export function stringify(O: any) {
|
||||
var out = '';
|
||||
|
||||
function writeChildren(O: string | any[]) {
|
||||
if (O) {
|
||||
for (var i = 0; i < O.length; i++) {
|
||||
if (typeof O[i] == 'string') {
|
||||
out += O[i].trim();
|
||||
} else {
|
||||
writeNode(O[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function writeNode(N: { tagName: string | string[]; attributes: { [x: string]: string; }; children: any; }) {
|
||||
out += "<" + N.tagName;
|
||||
for (var i in N.attributes) {
|
||||
if (N.attributes[i] === null) {
|
||||
out += ' ' + i;
|
||||
} else if (N.attributes[i].indexOf('"') === -1) {
|
||||
out += ' ' + i + '="' + N.attributes[i].trim() + '"';
|
||||
} else {
|
||||
out += ' ' + i + "='" + N.attributes[i].trim() + "'";
|
||||
}
|
||||
}
|
||||
if (N.tagName[0] === '?') {
|
||||
out += '?>';
|
||||
return;
|
||||
}
|
||||
out += '>';
|
||||
writeChildren(N.children);
|
||||
out += '</' + N.tagName + '>';
|
||||
}
|
||||
writeChildren(O);
|
||||
|
||||
return out;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* use this method to read the text content, of some node.
|
||||
* It is great if you have mixed content like:
|
||||
* this text has some <b>big</b> text and a <a href=''>link</a>
|
||||
* @return {string}
|
||||
*/
|
||||
export function toContentString(tDom: string): string {
|
||||
if (Array.isArray(tDom)) {
|
||||
var out = '';
|
||||
tDom.forEach(function(e) {
|
||||
out += ' ' + toContentString(e);
|
||||
out = out.trim();
|
||||
});
|
||||
return out;
|
||||
} else if (typeof tDom === 'object') {
|
||||
return toContentString(tDom.children)
|
||||
} else {
|
||||
return ' ' + tDom;
|
||||
}
|
||||
};
|
||||
|
||||
export function getElementById(S: string, id: any, simplified: any) {
|
||||
var out = parse(S, {
|
||||
attrValue: id
|
||||
});
|
||||
return simplified ? simplify(out) : out[0];
|
||||
};
|
||||
|
||||
export function getElementsByClassName(S: string, classname: string, simplified: any) {
|
||||
const out = parse(S, {
|
||||
attrName: 'class',
|
||||
attrValue: '[a-zA-Z0-9- ]*' + classname + '[a-zA-Z0-9- ]*'
|
||||
});
|
||||
return simplified ? simplify(out) : out;
|
||||
};
|
||||
87
src/lib/pdf/datenblatt.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<div class="flex flex-row justify-between">
|
||||
<h1 class="underline font-bold">Datenblatt Energieausweis</h1>
|
||||
<p><span class="font-bold">Ausweis ID:</span> 1225432</p>
|
||||
</div>
|
||||
<h2 class="font-bold">Gebäudedaten</h2>
|
||||
<p>Adresse: Beispielstraße 15, 22587 Beispielnese</p>
|
||||
|
||||
<div class="flex flex-row justify-between">
|
||||
<div class="flex flex-row gap-2">
|
||||
<input type="checkbox">
|
||||
<p>Neubau</p>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2">
|
||||
<input type="checkbox">
|
||||
<p>Vermietung/Verkauf</p>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2">
|
||||
<input type="checkbox">
|
||||
<p>Modernisierung</p>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2">
|
||||
<input type="checkbox">
|
||||
<p>Sonstiges</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="font-bold">Gebäudetyp</td>
|
||||
<td class="font-bold">Wohnfläche</td>
|
||||
<td class="font-bold">Leerstand</td>
|
||||
<td class="font-bold">Wohnungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doppelhaushälfte</td>
|
||||
<td>DIN Wohnfläche innen 141m2</td>
|
||||
<td>0%</td>
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Dachgeschoss</td>
|
||||
<td>Keller</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>unbeheizt</td>
|
||||
<td>nein</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2 class="font-bold">Verbrauch</h2>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Von: 01.01.2014</td>
|
||||
<td>Von: 01.01.2015</td>
|
||||
<td>Von: 01.01.2016</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Bis: 31.12.2014</td>
|
||||
<td>Bis: 31.12.2015</td>
|
||||
<td>Bis: 31.12.2016</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heizöl EL</td>
|
||||
<td>1947 l</td>
|
||||
<td>1907 l</td>
|
||||
<td>2248 l</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brennholz</td>
|
||||
<td>6 m3</td>
|
||||
<td>6 m3</td>
|
||||
<td>6 m3</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Warmwasseranteil: 18%</p>
|
||||
26
src/lib/pdf/elements/Checkbox.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { PDFPage, rgb } from 'pdf-lib';
|
||||
import { PDFElement } from './PDFElement.js';
|
||||
|
||||
export class Checkbox extends PDFElement {
|
||||
private borderWidth: number = 1;
|
||||
|
||||
constructor(protected _width: number, protected _height: number) {
|
||||
super();
|
||||
}
|
||||
|
||||
addChild(...children: PDFElement[]): void {
|
||||
throw new Error('Method not supported.');
|
||||
}
|
||||
|
||||
draw(page: PDFPage, x: number, y: number): void {
|
||||
page.drawRectangle({
|
||||
x: x + this.borderWidth,
|
||||
// NOTE: Keine Ahnung warum * 1.5 aber dann passt es...
|
||||
y: y - this._height - this.borderWidth * 1.5,
|
||||
width: this._width,
|
||||
height: this._height,
|
||||
borderColor: rgb(0, 0, 0),
|
||||
borderWidth: this.borderWidth
|
||||
});
|
||||
}
|
||||
}
|
||||
175
src/lib/pdf/elements/Flex.ts
Normal file
@@ -0,0 +1,175 @@
|
||||
import { PDFPage } from 'pdf-lib';
|
||||
import { PDFElement, Size } from './PDFElement.js';
|
||||
|
||||
export interface FlexOptions {
|
||||
page: PDFPage;
|
||||
width: number;
|
||||
height: number;
|
||||
x?: number;
|
||||
y?: number;
|
||||
direction?: 'row' | 'column';
|
||||
justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
|
||||
align?: 'start' | 'center' | 'end' | 'stretch';
|
||||
gap?: number;
|
||||
children?: PDFElement[];
|
||||
}
|
||||
|
||||
export class Flex extends PDFElement {
|
||||
private page: PDFPage;
|
||||
private x: number;
|
||||
private y: number;
|
||||
private direction: 'row' | 'column';
|
||||
private justifyContent: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
|
||||
private alignItems: 'start' | 'center' | 'end' | 'stretch';
|
||||
private gap: number;
|
||||
private children: PDFElement[];
|
||||
|
||||
constructor(options: FlexOptions) {
|
||||
super();
|
||||
this.page = options.page;
|
||||
this._width = options.width;
|
||||
this._height = options.height;
|
||||
this.x = options.x ?? 0;
|
||||
this.y = options.y ?? 0;
|
||||
this.direction = options.direction ?? 'row';
|
||||
this.justifyContent = options.justify ?? 'start';
|
||||
this.alignItems = options.align ?? 'start';
|
||||
this.gap = options.gap ?? 0;
|
||||
this.children = options.children ?? [];
|
||||
}
|
||||
|
||||
addChild(...children: PDFElement[]): void {
|
||||
this.children.push(...children)
|
||||
}
|
||||
|
||||
get height(): number {
|
||||
if (typeof this._height === "number") {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
let currentHeight = 0
|
||||
|
||||
if (this.direction === "column") {
|
||||
for (const child of this.children) {
|
||||
currentHeight += child.height;
|
||||
}
|
||||
|
||||
currentHeight += this.gap * this.children.length - 1;
|
||||
} else {
|
||||
for (const child of this.children) {
|
||||
if (child.height > currentHeight) {
|
||||
currentHeight = child.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currentHeight;
|
||||
}
|
||||
|
||||
set width(value: Size) {
|
||||
this._width = value;
|
||||
}
|
||||
|
||||
get width(): number {
|
||||
if (typeof this._width === "number") {
|
||||
return this._width;
|
||||
}
|
||||
|
||||
let currentWidth = 0
|
||||
|
||||
if (this.direction === "row") {
|
||||
for (const child of this.children) {
|
||||
currentWidth += child.width;
|
||||
}
|
||||
|
||||
currentWidth += this.gap * this.children.length - 1;
|
||||
} else {
|
||||
for (const child of this.children) {
|
||||
if (child.width > currentWidth) {
|
||||
currentWidth = child.width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currentWidth;
|
||||
}
|
||||
|
||||
draw(page: PDFPage, x: number = this.x, y: number = this.y): void {
|
||||
const childPositions = this.calculateChildPositions(x, y);
|
||||
|
||||
// Draw each child
|
||||
this.children.forEach((child, i) => {
|
||||
const pos = childPositions[i];
|
||||
|
||||
child.draw(page, pos.x, pos.y);
|
||||
});
|
||||
}
|
||||
|
||||
private calculateChildPositions(x: number, y: number): { x: number; y: number }[] {
|
||||
const positions: { x: number; y: number }[] = [];
|
||||
let currentX = x;
|
||||
let currentY = y;
|
||||
|
||||
// Calculate total size of children and gaps
|
||||
const totalChildrenSize = this.children.reduce(
|
||||
(sum, child) => sum + (this.direction === 'row' ? child.width : child.height),
|
||||
0
|
||||
);
|
||||
|
||||
const totalGaps = this.gap * (this.children.length - 1);
|
||||
|
||||
// Justify content
|
||||
const justifyOffset = this.calculateJustifyOffset(totalChildrenSize, totalGaps);
|
||||
|
||||
// Since the origin is at X: 0 Y: page height and everything will be drawn
|
||||
// above the current position we first need to subtract the height of the
|
||||
// element from the current Y
|
||||
this.children.forEach((child, i) => {
|
||||
const childX = this.direction === 'row' ? currentX : currentX + this.calculateAlignOffset(child.width);
|
||||
const childY = this.direction === 'row' ? currentY - this.calculateAlignOffset(child.height) : currentY;
|
||||
|
||||
if (this.direction === "row") {
|
||||
currentX += child.width + this.gap + justifyOffset;
|
||||
}
|
||||
|
||||
if (this.direction === 'column') {
|
||||
currentY -= child.height + this.gap;
|
||||
}
|
||||
|
||||
positions.push({ x: childX, y: childY });
|
||||
});
|
||||
|
||||
return positions;
|
||||
}
|
||||
|
||||
private calculateJustifyOffset(totalChildrenSize: number, totalGaps: number): number {
|
||||
const remainingSpace =
|
||||
this.direction === 'row' ? this.width - totalChildrenSize - totalGaps : this.height - totalChildrenSize - totalGaps;
|
||||
|
||||
switch (this.justifyContent) {
|
||||
case 'center':
|
||||
return remainingSpace / 2;
|
||||
case 'end':
|
||||
return remainingSpace;
|
||||
case 'space-between':
|
||||
return totalGaps / (this.children.length - 1) + (this.width - totalChildrenSize) / this.children.length;
|
||||
case 'space-around':
|
||||
return remainingSpace / this.children.length;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private calculateAlignOffset(childSize: number): number {
|
||||
switch (this.alignItems) {
|
||||
case 'center':
|
||||
return (this.direction === 'row' ? this.height - childSize : this.width - childSize) / 2;
|
||||
case 'end':
|
||||
return this.direction === 'row' ? this.height - childSize : this.width - childSize;
|
||||
case 'stretch':
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
84
src/lib/pdf/elements/Layout.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
import { PDFPage } from "pdf-lib";
|
||||
import { PDFElement, Size } from "./PDFElement.js";
|
||||
|
||||
export type Margin = {
|
||||
top: number,
|
||||
left: number,
|
||||
right: number,
|
||||
bottom: number
|
||||
}
|
||||
|
||||
export type Padding = Margin;
|
||||
|
||||
export class Layout extends PDFElement {
|
||||
private margin: Margin
|
||||
protected _height: Size = "auto";
|
||||
protected _width: Size = "auto";
|
||||
|
||||
private padding: Padding = {
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0
|
||||
};
|
||||
|
||||
public children: PDFElement[];
|
||||
|
||||
constructor(children: PDFElement[] = [], options?: {
|
||||
margin?: Margin,
|
||||
padding?: Padding
|
||||
}) {
|
||||
super()
|
||||
|
||||
this.children = children
|
||||
this.margin = options?.margin ?? {
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0
|
||||
};
|
||||
|
||||
this.padding = options?.padding ?? {
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0
|
||||
};
|
||||
}
|
||||
|
||||
get height(): number {
|
||||
if (typeof this._height === "number") {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
let currentHeight = 0
|
||||
|
||||
for (const child of this.children) {
|
||||
currentHeight += child.height;
|
||||
}
|
||||
|
||||
return currentHeight;
|
||||
}
|
||||
|
||||
set height(value: number) {
|
||||
this._height = value;
|
||||
}
|
||||
|
||||
draw(page: PDFPage, x: number, y: number): void {
|
||||
let currentY = y - this.margin.top - this.padding.top;
|
||||
|
||||
for (const child of this.children) {
|
||||
child.draw(page, x + this.margin.left + this.padding.left, currentY);
|
||||
|
||||
currentY -= child.height;
|
||||
}
|
||||
}
|
||||
|
||||
addChild(...children: PDFElement[]): void {
|
||||
this.children.push(...children)
|
||||
}
|
||||
}
|
||||
|
||||
export function layout(...args: ConstructorParameters<typeof Layout>) {
|
||||
return new Layout(...args);
|
||||
}
|
||||
27
src/lib/pdf/elements/PDFElement.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { PDFPage } from 'pdf-lib';
|
||||
export type Size = number | "auto";
|
||||
|
||||
export abstract class PDFElement {
|
||||
protected _width: Size = 0;
|
||||
|
||||
get width(): number {
|
||||
return this._width === "auto" ? 0 : this._width
|
||||
}
|
||||
|
||||
set width(value: Size) {
|
||||
this._width = value;
|
||||
}
|
||||
protected _height: Size = 0;
|
||||
|
||||
get height(): number {
|
||||
return this._height === "auto" ? 0 : this._height
|
||||
}
|
||||
|
||||
set height(value: Size) {
|
||||
this._height = value;
|
||||
}
|
||||
|
||||
abstract draw(page: PDFPage, x: number, y: number): void;
|
||||
|
||||
abstract addChild(...children: PDFElement[]): void;
|
||||
}
|
||||
39
src/lib/pdf/elements/Text.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { PDFPage, PDFFont, rgb, RGB } from 'pdf-lib';
|
||||
import { PDFElement, Size } from './PDFElement.js';
|
||||
|
||||
export interface TextOptions {
|
||||
font: PDFFont;
|
||||
fontSize?: number;
|
||||
color?: RGB;
|
||||
}
|
||||
|
||||
export class Text extends PDFElement {
|
||||
private content: string;
|
||||
private font: PDFFont;
|
||||
private fontSize: number;
|
||||
private color: RGB;
|
||||
|
||||
constructor(content: string, options: TextOptions) {
|
||||
super();
|
||||
this.content = content;
|
||||
this.font = options.font;
|
||||
this.fontSize = options.fontSize ?? 12;
|
||||
this.color = options.color ?? rgb(0, 0, 0);
|
||||
this._width = this.font.widthOfTextAtSize(content, this.fontSize);
|
||||
this._height = this.font.heightAtSize(this.fontSize);
|
||||
}
|
||||
|
||||
addChild(...children: PDFElement[]): void {
|
||||
throw new Error("Cannot add child element to Text")
|
||||
}
|
||||
|
||||
draw(page: PDFPage, x: number, y: number): void {
|
||||
page.drawText(this.content, {
|
||||
x,
|
||||
y: y - this.height,
|
||||
size: this.fontSize,
|
||||
font: this.font,
|
||||
color: this.color,
|
||||
});
|
||||
}
|
||||
}
|
||||
20
src/lib/pdf/elements/index.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Flex, FlexOptions } from "./Flex.js";
|
||||
import { PDFElement } from "./PDFElement.js";
|
||||
import { TextOptions } from "./Text.js";
|
||||
|
||||
import { Checkbox } from "./Checkbox.js"
|
||||
import { Text } from "./Text.js"
|
||||
|
||||
export function flex(children: PDFElement[], options: Partial<FlexOptions>): Flex {
|
||||
return new Flex({ ...options, children });
|
||||
}
|
||||
|
||||
export function text(content: string, options: TextOptions): Text {
|
||||
return new Text(content, options);
|
||||
}
|
||||
|
||||
export function checkbox(width: number, height: number): Checkbox {
|
||||
return new Checkbox(width, height);
|
||||
}
|
||||
|
||||
export { Text, Checkbox, Flex }
|
||||
105
src/lib/pdf/elements/xml2pdf.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import * as txml from "#lib/helpers/txml.js"
|
||||
import { PDFDocument, PDFFont, rgb, StandardFonts } from "pdf-lib"
|
||||
import { Checkbox, Flex, Text } from "./index.js"
|
||||
import { Layout } from "./Layout.js"
|
||||
import { PDFElement } from "./PDFElement.js"
|
||||
|
||||
export function xml2pdf(xml: string, font: PDFFont) {
|
||||
const tree = txml.parse(xml)
|
||||
|
||||
const iterateChildren = (children: ReturnType<typeof txml.parse>, parent: PDFElement) => {
|
||||
for (const child of children) {
|
||||
if (typeof child === "string") {
|
||||
// Simple text
|
||||
parent.addChild(new Text(child, { font }))
|
||||
} else if (child.tagName === "flex") {
|
||||
const flexbox = new Flex({
|
||||
height: parseFloat(child.attributes.height) || "auto",
|
||||
width: parseFloat(child.attributes.width) || "auto",
|
||||
align: child.attributes.align,
|
||||
direction: child.attributes.direction,
|
||||
gap: parseFloat(child.attributes.gap) || 0,
|
||||
justify: child.attributes.justify
|
||||
})
|
||||
|
||||
iterateChildren(child.children, flexbox)
|
||||
parent.addChild(flexbox)
|
||||
} else if (child.tagName === "text") {
|
||||
|
||||
let color = rgb(0,0,0)
|
||||
|
||||
if (child.attributes.hasOwnProperty("color")) {
|
||||
const colorValue = child.attributes.color.split(",")
|
||||
|
||||
if (colorValue.length !== 3) {
|
||||
throw new Error("Invalid color, please provide 'r,g,b' as a value.")
|
||||
}
|
||||
|
||||
color = rgb(...colorValue.map((x) => parseInt(x) / 255) as [number, number, number]);
|
||||
}
|
||||
|
||||
const text = new Text(child.children[0] || "", { font: child.attributes.hasOwnProperty("bold") ? bold : font, fontSize: parseFloat(child.attributes.size) || 10, color })
|
||||
|
||||
parent.addChild(text)
|
||||
} else if (child.tagName === "checkbox") {
|
||||
if (typeof child.attributes.width === "undefined" || typeof child.attributes.height === "undefined") {
|
||||
throw new Error("Missing height or width property in Checkbox creation.")
|
||||
}
|
||||
|
||||
const checkbox = new Checkbox(parseFloat(child.attributes.width), parseFloat(child.attributes.height))
|
||||
|
||||
parent.addChild(checkbox);
|
||||
} else if (child.tagName === "layout") {
|
||||
const layout = new Layout([], {
|
||||
margin: {
|
||||
bottom: parseFloat(child.attributes.marginBottom) || 0,
|
||||
left: parseFloat(child.attributes.marginLeft) || 0,
|
||||
right: parseFloat(child.attributes.marginRight) || 0,
|
||||
top: parseFloat(child.attributes.marginTop) || 0,
|
||||
},
|
||||
padding: {
|
||||
bottom: parseFloat(child.attributes.paddingBottom) || 0,
|
||||
left: parseFloat(child.attributes.paddingLeft) || 0,
|
||||
right: parseFloat(child.attributes.paddingRight) || 0,
|
||||
top: parseFloat(child.attributes.paddingTop) || 0,
|
||||
}
|
||||
})
|
||||
|
||||
iterateChildren(child.children, layout)
|
||||
parent.addChild(layout)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const layout = new Layout([]);
|
||||
iterateChildren(tree, layout)
|
||||
|
||||
return layout
|
||||
}
|
||||
|
||||
const pdf = await PDFDocument.create()
|
||||
|
||||
const page = pdf.addPage()
|
||||
|
||||
const font = await pdf.embedFont(StandardFonts.Helvetica)
|
||||
const bold = await pdf.embedFont(StandardFonts.HelveticaBold)
|
||||
|
||||
const layout = xml2pdf(`<layout height="${page.getHeight()}" width="${page.getWidth()}" marginTop="0" marginLeft="0">
|
||||
<text bold size="40">Hello</text>
|
||||
<text color="255,0,255" size="24">Hello, how are you?</text>
|
||||
<flex direction="row" gap="8" align="center">
|
||||
<checkbox height="100" width="100"></checkbox>
|
||||
<text>Hello</text>
|
||||
<layout marginLeft="0">
|
||||
<text>Hello</text>
|
||||
<text>Nasya, i love you</text>
|
||||
</layout>
|
||||
</flex>
|
||||
</layout>`, font)
|
||||
|
||||
layout.draw(page, 0, page.getHeight())
|
||||
|
||||
import { writeFileSync } from "fs"
|
||||
import { FixedLengthArray } from "#lib/Berechnungen/BedarfsausweisWohnen/types.js"
|
||||
|
||||
writeFileSync("./test-pdf.pdf", await pdf.save())
|
||||
159
src/lib/pdf/pdfDatenblatt.ts
Normal file
@@ -0,0 +1,159 @@
|
||||
import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
|
||||
import { endEnergieVerbrauchVerbrauchsausweis_2016 } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016.js";
|
||||
import * as fs from "fs"
|
||||
import { PDFDocument, rgb, StandardFonts, TextAlignment } from "pdf-lib";
|
||||
import { checkbox, flex, text } from "./elements/index.js";
|
||||
|
||||
/* -------------------------------- Pdf Tools ------------------------------- */
|
||||
|
||||
export async function pdfDatenblatt(ausweis: VerbrauchsausweisWohnenClient) {
|
||||
const VerbrauchsausweisWohnenGEG2024PDF = fs.readFileSync(new URL("./templates/Leerseite_Datenblatt.pdf", import.meta.url), "base64");
|
||||
const pdf = await PDFDocument.load(VerbrauchsausweisWohnenGEG2024PDF)
|
||||
const pages = pdf.getPages()
|
||||
|
||||
// const template = VerbrauchsausweisWohnen2016Template as Template;
|
||||
|
||||
const berechnungen = await endEnergieVerbrauchVerbrauchsausweis_2016(ausweis);
|
||||
|
||||
const height = pages[0].getHeight()
|
||||
const width = pages[0].getWidth()
|
||||
|
||||
const font = await pdf.embedFont(StandardFonts.Helvetica)
|
||||
const bold = await pdf.embedFont(StandardFonts.HelveticaBold)
|
||||
|
||||
const form = pdf.getForm()
|
||||
form.updateFieldAppearances(font)
|
||||
|
||||
const marginX = 45;
|
||||
const marginY = 150;
|
||||
|
||||
const benutzer: typeof ausweis.benutzer = ausweis.benutzer || {
|
||||
vorname: "Max",
|
||||
name: "Mustermann",
|
||||
adresse: "Musterstraße 123",
|
||||
plz: "12345",
|
||||
ort: "Beispielhausen"
|
||||
};
|
||||
|
||||
pages[0].drawText(`${benutzer.vorname} ${benutzer.name}`, {
|
||||
x: marginX,
|
||||
y: height - marginY,
|
||||
font,
|
||||
size: 12
|
||||
})
|
||||
|
||||
pages[0].drawText(benutzer.adresse, {
|
||||
x: marginX,
|
||||
y: height - marginY - 15,
|
||||
font,
|
||||
size: 12
|
||||
})
|
||||
|
||||
pages[0].drawText(`${benutzer.plz} ${benutzer.ort}`, {
|
||||
x: marginX,
|
||||
y: height - marginY - 30,
|
||||
font,
|
||||
size: 12
|
||||
})
|
||||
|
||||
pages[0].drawText("Datenblatt Energieausweis", {
|
||||
x: marginX,
|
||||
y: height - marginY - 100,
|
||||
font: bold,
|
||||
size: 12,
|
||||
})
|
||||
|
||||
let ausweisIDText = `Ausweis ID: ${ausweis.uid}`
|
||||
|
||||
pages[0].drawText(ausweisIDText, {
|
||||
x: width - marginX - font.widthOfTextAtSize(ausweisIDText, 12),
|
||||
y: height - marginY - 100,
|
||||
font,
|
||||
size: 12,
|
||||
})
|
||||
|
||||
pages[0].drawText("Gebäudedaten", {
|
||||
x: marginX,
|
||||
y: height - marginY - 125,
|
||||
font: bold,
|
||||
size: 12,
|
||||
})
|
||||
|
||||
pages[0].drawText(`Adresse: ${ausweis.gebaeude_aufnahme_allgemein.adresse}, ${ausweis.gebaeude_aufnahme_allgemein.plz} ${ausweis.gebaeude_aufnahme_allgemein.ort}`, {
|
||||
x: marginX,
|
||||
y: height - marginY - 140,
|
||||
font,
|
||||
size: 12,
|
||||
})
|
||||
|
||||
const containerWidth = width - marginX;
|
||||
|
||||
const layout = flex([
|
||||
flex([
|
||||
checkbox(8, 8), text("Neubau", {
|
||||
color: rgb(0,0,0),
|
||||
font,
|
||||
fontSize: 12
|
||||
})
|
||||
], {
|
||||
align: "center",
|
||||
justify: "center",
|
||||
gap: 5,
|
||||
height: 12,
|
||||
page: pages[0]
|
||||
}),
|
||||
flex([
|
||||
checkbox(8, 8), text("Vermietung/Verkauf", {
|
||||
color: rgb(0,0,0),
|
||||
font,
|
||||
fontSize: 12
|
||||
})
|
||||
], {
|
||||
align: "center",
|
||||
justify: "center",
|
||||
gap: 5,
|
||||
height: 12,
|
||||
page: pages[0]
|
||||
}),
|
||||
flex([
|
||||
checkbox(8, 8), text("Modernisierung", {
|
||||
color: rgb(0,0,0),
|
||||
font,
|
||||
fontSize: 12
|
||||
})
|
||||
], {
|
||||
align: "center",
|
||||
justify: "center",
|
||||
gap: 5,
|
||||
height: 12,
|
||||
page: pages[0]
|
||||
}),
|
||||
flex([
|
||||
checkbox(8, 8), text("Sonstiges", {
|
||||
color: rgb(0,0,0),
|
||||
font,
|
||||
fontSize: 12
|
||||
})
|
||||
], {
|
||||
align: "center",
|
||||
justify: "center",
|
||||
gap: 5,
|
||||
height: 12,
|
||||
page: pages[0]
|
||||
})
|
||||
], {
|
||||
align: "center",
|
||||
justify: "space-between",
|
||||
gap: 15,
|
||||
x: marginX,
|
||||
y: height - marginY - 165,
|
||||
height: 12,
|
||||
width: containerWidth
|
||||
})
|
||||
|
||||
layout.draw(pages[0])
|
||||
|
||||
// pdf.getForm().flatten()
|
||||
|
||||
return pdf.save();
|
||||
}
|
||||
BIN
src/lib/pdf/templates/Leerseite_Datenblatt.pdf
Normal file
@@ -2,7 +2,7 @@
|
||||
|
||||
import Layout from "#layouts/Layout.astro";
|
||||
import { berechnungNutzenergiebedarfHeizen } from "#lib/Berechnungen/BedarfsausweisWohnen/BerechnungNutzenergiebedarfHeizen.js"
|
||||
import A12BerechnungNutzenergiebedarf from "#components/Tabellen/A12BerechnungNutzenergiebedarf.svelte";
|
||||
import A12NutzenergiebedarfHeizung from "#components/Tabellen/A12NutzenergiebedarfHeizung.svelte";
|
||||
import { BedarfsausweisWohnenClient, GebaeudeAufnahmeClient } from "#components/Ausweis/types";
|
||||
import A1AnlagenBeschreibung from "#components/Tabellen/A1AnlagenBeschreibung.svelte";
|
||||
import A2Wintergarten from "#components/Tabellen/A2Wintergarten.svelte";
|
||||
@@ -1039,8 +1039,6 @@ const gebaeude_aufnahme: GebaeudeAufnahmeClient = { flaeche: 152 }
|
||||
</div>
|
||||
|
||||
<A12NutzenergiebedarfHeizung {ausweis} {gebaeude_aufnahme} client:load></A12NutzenergiebedarfHeizung>
|
||||
|
||||
<A12BerechnungNutzenergiebedarf {ausweis}></A12BerechnungNutzenergiebedarf>>
|
||||
|
||||
<div class="overflow-x-auto mt-16">
|
||||
<table class="table-auto border-collapse border border-gray-300 w-full text-left">
|
||||
|
||||
9
src/pages/dev/datenblatt-viewer.astro
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
import BlankLayout from "#layouts/BlankLayout.astro";
|
||||
|
||||
|
||||
---
|
||||
|
||||
<BlankLayout title="Datenblatt Viewer">
|
||||
<iframe class="h-screen w-screen" src="http://localhost:3000/pdf/datenblatt?base64=eyJnZWJhZXVkZV9hdWZuYWhtZV9hbGxnZW1laW4iOnsiZ2ViYWV1ZGVfc3RhbW1kYXRlbiI6e30sImJhdWphaHJfZ2ViYWV1ZGUiOlsxOTYyXSwiYmF1amFocl9oZWl6dW5nIjpbMTk1Ml0sInBseiI6IjIxMDM5IiwiZ2ViYWV1ZGV0eXAiOiJFaW5mYW1pbGllbmhhdXMiLCJzYW5pZXJ0Ijp0cnVlLCJkYWNoZ2VzY2hvc3MiOiJOSUNIVF9WT1JIQU5ERU4iLCJrZWxsZXIiOiJOSUNIVF9WT1JIQU5ERU4iLCJicmVubnN0b2ZmXzEiOiJFcmRnYXMgSCIsImdlYmFldWRldGVpbCI6Ikdlc2FtdGdlYsOkdWRlIiwibHVlZnR1bmciOiJGZW5zdGVybMO8ZnR1bmciLCJrdWVobHVuZyI6IjEiLCJvYmVyc3RlX2dlc2Nob3NzZGVja2VfZ2VkYWVtbXQiOnRydWUsImRhY2hnZXNjaG9zc19nZWRhZW1tdCI6dHJ1ZSwiZWluaGVpdGVuIjoxLCJmbGFlY2hlIjoxNTIsIm51dHpmbGFlY2hlIjoxNzIsIm9ydCI6IkhhbWJ1cmciLCJhZHJlc3NlIjoiQ3Vyc2xhY2tlciBEZWljaCAxNzAifSwid2FybXdhc3Nlcl9hbnRlaWxfYmVrYW5udCI6ZmFsc2UsImF1c3N0ZWxsZ3J1bmQiOiJWZXJtaWV0dW5nIiwiZWluaGVpdF8xIjoia1doIiwidmVyYnJhdWNoXzEiOjE1MDAwLCJ2ZXJicmF1Y2hfMiI6MTQwMDAsInZlcmJyYXVjaF8zIjoxNjAwMCwia2VsbGVyX2JlaGVpenQiOnRydWUsImFudGVpbF93YXJtd2Fzc2VyXzEiOjE4LCJzdGFydGRhdHVtIjoiMjAyMC0xMi0zMVQxNzowMDowMC4wMDBaIn0="></iframe>
|
||||
</BlankLayout>
|
||||
@@ -1,11 +1,7 @@
|
||||
---
|
||||
import { generate } from "@pdfme/generator";
|
||||
import VerbrauchsausweisWohnen2016Template from "../../data/templates/verbrauchsausweis-wohnen-2016.json";
|
||||
import { convertAusweisData } from "#lib/AusweisData";
|
||||
import { variable } from "#lib/pdf/plugins/variables";
|
||||
import { text, image } from "@pdfme/schemas"
|
||||
import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
|
||||
import { BenutzerClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
|
||||
import { createCaller } from "#lib/caller";
|
||||
import { pdfDatenblatt } from "#lib/pdf/pdfDatenblatt";
|
||||
|
||||
const base64 = Astro.url.searchParams.get("base64");
|
||||
let ausweis: VerbrauchsausweisWohnenClient | null = null;
|
||||
@@ -24,25 +20,11 @@ if (base64) {
|
||||
|
||||
ausweis = await caller.v1.verbrauchsausweisWohnen.get({
|
||||
uid: uidAusweis
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
if (!ausweis) {
|
||||
return Astro.redirect("/404");
|
||||
}
|
||||
const pdf = await pdfDatenblatt(ausweis);
|
||||
|
||||
const pdf = await generate({
|
||||
template: VerbrauchsausweisWohnen2016Template,
|
||||
plugins: { text, image, variable },
|
||||
inputs: [convertAusweisData(ausweis)],
|
||||
options: {
|
||||
author: "IB Cornelsen",
|
||||
creationDate: new Date(),
|
||||
creator: "IB Cornelsen",
|
||||
language: "de",
|
||||
title: "Verbrauchsausweis Wohnen 2016",
|
||||
},
|
||||
});
|
||||
|
||||
return new Response(pdf, {
|
||||
headers: {
|
||||
|
||||
19
src/pages/sanierungsfahrplan/dach/index.astro
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
import Layout from "#layouts/Layout.astro";
|
||||
import SanierungsFahrplanDachTemplate from "#components/design/content/SanierungsFahrplanDachTemplate.svelte";
|
||||
|
||||
---
|
||||
|
||||
<Layout title="Sanierungsfahrplan - Dach">
|
||||
|
||||
<h1>Dach - energetischer Istzustand</h1>
|
||||
|
||||
<h2>Überblick zum energetischen Istzustand des Daches ihres Hauses</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<SanierungsFahrplanDachTemplate />
|
||||
|
||||
<hr>
|
||||
|
||||
</Layout>
|
||||
19
src/pages/sanierungsfahrplan/haus/index.astro
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
import Layout from "#layouts/Layout.astro";
|
||||
import SanierungsFahrplanHeizungTemplate from "#components/design/content/SanierungsFahrplanHeizungTemplate.svelte";
|
||||
|
||||
---
|
||||
|
||||
<Layout title="Sanierungsfahrplan - Heizung">
|
||||
|
||||
<h1>Heizung - energetischer Istzustand</h1>
|
||||
|
||||
<h2>Überblick zum energetischen Istzustand Ihrer Heizung</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<SanierungsFahrplanHeizungTemplate />
|
||||
|
||||
<hr>
|
||||
|
||||
</Layout>
|
||||
15
src/pages/sanierungsfahrplan/index.astro
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
import Layout from "#layouts/Layout.astro";
|
||||
import SanierungsFahrplanIstTemplate from "#components/design/content/SanierungsFahrplanIstTemplate.svelte";
|
||||
|
||||
---
|
||||
|
||||
<Layout title="Sanierungsfahrplan">
|
||||
|
||||
<h1>Ihr Haus heute - energetischer Istzustand</h1>
|
||||
|
||||
<h2>Überblick zum energetischen Istzustand und Sanierungsbedarf ihres Hauses</h2>
|
||||
|
||||
<SanierungsFahrplanIstTemplate client:load/>
|
||||
|
||||
</Layout>
|
||||
19
src/pages/sanierungsfahrplan/wände/index.astro
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
import Layout from "#layouts/Layout.astro";
|
||||
import SanierungsFahrplanWandTemplate from "#components/design/content/SanierungsFahrplanWandTemplate.svelte";
|
||||
|
||||
---
|
||||
|
||||
<Layout title="Sanierungsfahrplan - Wände">
|
||||
|
||||
<h1>Wände - energetischer Istzustand</h1>
|
||||
|
||||
<h2>Überblick zum energetischen Istzustand der Wände ihres Hauses</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<SanierungsFahrplanWandTemplate />
|
||||
|
||||
<hr>
|
||||
|
||||
</Layout>
|
||||
@@ -37,7 +37,16 @@ module.exports = {
|
||||
"formular-rahmen": "rgba(255,204,6,1)",
|
||||
|
||||
"bereich-box": "rgba(252,234,187,0.2)",
|
||||
|
||||
|
||||
"effizienzFarbe-1": "#00a759ff",
|
||||
"effizienzFarbe-2": "#56be06ff",
|
||||
"effizienzFarbe-3": "#d2dd00ff",
|
||||
"effizienzFarbe-4": "#fbe115ff",
|
||||
"effizienzFarbe-5": "#fbb900ff",
|
||||
"effizienzFarbe-6": "#f59401ff",
|
||||
"effizienzFarbe-7": "#ef6800ff",
|
||||
"effizienzFarbe-8": "#dd2a1bff",
|
||||
"effizienzFarbe-9": "#b11c0cff",
|
||||
|
||||
"pdf-yellow-bright": "#f3cb00",
|
||||
"pdf-yellow-light": "#fff6ca",
|
||||
|
||||
BIN
test-pdf.pdf
Normal file
@@ -41,5 +41,6 @@
|
||||
"#widgets/*": ["./src/components/widgets/*"]
|
||||
},
|
||||
"types": ["cypress", "cypress-file-upload", "bun-types", "svelte"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||