From 8f23246cc30a9fc5d7e0a54ec05f6c1c5ffdf159 Mon Sep 17 00:00:00 2001 From: pdamianik <39028343+pdamianik@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:24:48 +0200 Subject: [PATCH] Fix list creation Signed-off-by: pdamianik <39028343+pdamianik@users.noreply.github.com> --- app/package.json | 6 ++- app/pnpm-lock.yaml | 17 ++++++++ app/src/lib/components/ListenItem.svelte | 15 ------- app/src/lib/components/ProductList.svelte | 45 ++++++++++++-------- app/src/lib/index.ts | 1 + app/src/routes/+page.svelte | 50 ++++++++++++++++++++--- app/src/routes/createlist/+page.svelte | 37 ----------------- 7 files changed, 94 insertions(+), 77 deletions(-) delete mode 100644 app/src/lib/components/ListenItem.svelte delete mode 100644 app/src/routes/createlist/+page.svelte diff --git a/app/package.json b/app/package.json index 616a6f1..4af4732 100644 --- a/app/package.json +++ b/app/package.json @@ -51,5 +51,9 @@ "vitest": "^1.2.0", "yaml": "^2.4.1" }, - "type": "module" + "type": "module", + "dependencies": { + "@types/speakingurl": "^13.0.6", + "speakingurl": "^14.0.1" + } } diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml index 6df9455..db7fc4b 100644 --- a/app/pnpm-lock.yaml +++ b/app/pnpm-lock.yaml @@ -4,6 +4,14 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +dependencies: + '@types/speakingurl': + specifier: ^13.0.6 + version: 13.0.6 + speakingurl: + specifier: ^14.0.1 + version: 14.0.1 + devDependencies: '@iconify-json/flowbite': specifier: ^1.1.2 @@ -904,6 +912,10 @@ packages: resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==} dev: true + /@types/speakingurl@13.0.6: + resolution: {integrity: sha512-ywkRHNHBwq0mFs/2HRgW6TEBAzH66G8f2Txzh1aGR0UC9ZoAUHfHxLZGDhwMpck4BpSnB61eNFIFmlV+TJ+KUA==} + dev: false + /@typescript-eslint/eslint-plugin@7.0.2(@typescript-eslint/parser@7.0.2)(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3205,6 +3217,11 @@ packages: resolution: {integrity: sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==} dev: true + /speakingurl@14.0.1: + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} + dev: false + /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true diff --git a/app/src/lib/components/ListenItem.svelte b/app/src/lib/components/ListenItem.svelte deleted file mode 100644 index 77b23c0..0000000 --- a/app/src/lib/components/ListenItem.svelte +++ /dev/null @@ -1,15 +0,0 @@ - - -
-

{liste.titel}

- - // Buttons für Bearbeiten und Löschen hier einfügen -
diff --git a/app/src/lib/components/ProductList.svelte b/app/src/lib/components/ProductList.svelte index 7c42ca4..f2181f7 100644 --- a/app/src/lib/components/ProductList.svelte +++ b/app/src/lib/components/ProductList.svelte @@ -1,38 +1,47 @@ - - - + let deleteModal = false; + let deleteModalId = ''; +
{productlist.name} - + +
+ + +
+ +

+ Sicher, dass sie dieses Produkt löschen möchten? +

+ + +
+
diff --git a/app/src/lib/index.ts b/app/src/lib/index.ts index 856f2b6..cfe6c83 100644 --- a/app/src/lib/index.ts +++ b/app/src/lib/index.ts @@ -1 +1,2 @@ // place files you want to import through the `$lib` alias in this folder. +export { default as getSlug } from 'speakingurl'; diff --git a/app/src/routes/+page.svelte b/app/src/routes/+page.svelte index c1adf08..e13ae30 100644 --- a/app/src/routes/+page.svelte +++ b/app/src/routes/+page.svelte @@ -1,10 +1,13 @@ @@ -74,11 +93,30 @@ {/await} - (createModal = true)} + class="mt-5 flex flex-row items-center justify-center gap-2" > - + Neue Liste erstellen - + + + +
+ Neue Einkaufsliste erstellen + + + +
+
diff --git a/app/src/routes/createlist/+page.svelte b/app/src/routes/createlist/+page.svelte deleted file mode 100644 index 70bbfef..0000000 --- a/app/src/routes/createlist/+page.svelte +++ /dev/null @@ -1,37 +0,0 @@ - - -
-

Neue Einkaufsliste erstellen

- -
-
- - -
- - -
-