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} {#if $tags.length > 0}
{#each $tags as tag, i} {#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} {tag}
{#if !disable && !readonly} {#if !disable && !readonly}
<span <span

View File

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

View File

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