Change shared.ts

This commit is contained in:
Moritz Utcke
2023-05-18 15:15:22 +04:00
parent f0999f3a97
commit f14aa4d7c6
3 changed files with 13 additions and 17 deletions

View File

@@ -62,7 +62,7 @@
>
{#if $tags.length > 0}
{#each $tags as tag, i}
<button class="rounded-lg bg-white px-1.5 border flex flex-row items-center justify-between gap-2" on:click={onTagClick(tag)}>
<button class="rounded-lg bg-white px-1.5 border flex flex-row items-center justify-between gap-2" type="button" on:click={onTagClick(tag)}>
{tag}
{#if !disable && !readonly}
<span

View File

@@ -6,12 +6,14 @@ export function auditBedarfsausweisBenoetigt(gebaeude: Gebaeude): boolean {
return false;
}
return ((gebaeude.baujahr[0] < 1978 &&
gebaeude.einheiten <= 4 &&
gebaeude.saniert == false &&
(ausweis.ausstellgrund == "Vermietung" ||
ausweis.ausstellgrund == "Sonstiges" ||
ausweis.ausstellgrund == "Verkauf")) ||
ausweis.ausstellgrund == "Neubau" ||
ausweis.ausstellgrund == "Modernisierung");
}
return (
(gebaeude.baujahr[0] < 1978 &&
gebaeude.einheiten <= 4 &&
gebaeude.saniert == false &&
(ausweis.ausstellgrund == "Vermietung" ||
ausweis.ausstellgrund == "Sonstiges" ||
ausweis.ausstellgrund == "Verkauf")) ||
ausweis.ausstellgrund == "Neubau" ||
ausweis.ausstellgrund == "Modernisierung"
);
}

View File

@@ -3,13 +3,7 @@ import knex, { Knex } from "knex";
export function dbOpen(): Knex {
const db = knex({
client: 'pg',
connection: {
host : process.env.DB_CONNECTION,
port : Number(process.env.DB_PORT),
user : 'main',
password : 'hHMP8cd^N3SnzGRR',
database : 'main'
}
connection: process.env.DB_CONNECTION
})
return db;