Bildupload und Kundendaten

This commit is contained in:
Moritz Utcke
2025-01-22 15:29:11 +07:00
parent 46ef96becd
commit bd60df1ef4
29 changed files with 168 additions and 103 deletions

View File

@@ -2,7 +2,6 @@
import PerformanceScore from "#components/Ausweis/PerformanceScore.svelte";
import ProgressBar from "#components/Ausweis/Progressbar.svelte";
import Pruefung from "#components/Ausweis/Pruefung.svelte";
import ButtonZurueckSpeichernKaufabschluss from "#components/Ausweis/ButtonZurueckSpeichernKaufabschluss.svelte";
import type { Bezahlmethoden } from "@ibcornelsen/database/client";
import { Enums } from "@ibcornelsen/database/client";
@@ -10,21 +9,17 @@
import LoginDialog from "#components/LoginDialog.svelte";
import { PRICES } from "#lib/constants.js";
import {
AufnahmeClient,
BenutzerClient,
ObjektClient,
VerbrauchsausweisWohnenClient,
} from "#components/Ausweis/types.js";
import { validateAccessTokenClient } from "src/client/lib/validateAccessToken.js";
import { client } from "src/trpc.js";
export let user: BenutzerClient;
export let ausweis: VerbrauchsausweisWohnenClient;
export let bereich;
export let title;
export let bullets;
let aufnahme = ausweis.aufnahme || {};
let gebaeude = ausweis.aufnahme?.objekt || {};
export let aufnahme: AufnahmeClient;
export let objekt: ObjektClient;
let services = [
{
@@ -58,8 +53,8 @@
let prices: number[] = [];
if (ausweis.aufnahme.ausweisart) {
prices = PRICES[ausweis.aufnahme.ausweisart];
if (aufnahme.ausweisart) {
prices = PRICES[aufnahme.ausweisart];
}
let basePrice: number = prices[0];
@@ -71,7 +66,7 @@
0
);
async function speichern(e: MouseEvent) {
async function speichern(e: SubmitEvent) {
e.preventDefault();
// Um einen Ausweis zu speichern müssen wir eingeloggt sein, andernfalls wird die API den call ablehnen.
@@ -102,8 +97,8 @@
<div id="performance-box" class="w-full box relative px-4 order-2 2xl:order-1 self-stretch grid grid-cols-1">
<PerformanceScore
bind:ausweis
bind:aufnahme={aufnahme}
bind:objekt={gebaeude}
bind:aufnahme
bind:objekt
/>
</div>
@@ -301,7 +296,7 @@
</div>
<ButtonZurueckSpeichernKaufabschluss />
<!-- <ButtonZurueckSpeichernKaufabschluss bind:ausweis bind:aufnahme bind:objekt bind:bilder bind:user /> -->
</form>