diff --git a/00-backend/datasource/database.sqlite b/00-backend/datasource/database.sqlite index 9b0642d..23b59ab 100644 Binary files a/00-backend/datasource/database.sqlite and b/00-backend/datasource/database.sqlite differ diff --git a/00-backend/src/main/java/de/htwsaar/webshop/util/DanielDimensionException.java b/00-backend/src/main/java/de/htwsaar/webshop/util/DanielDimensionException.java deleted file mode 100644 index 844d1b2..0000000 --- a/00-backend/src/main/java/de/htwsaar/webshop/util/DanielDimensionException.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.htwsaar.webshop.util; - -public class DanielDimensionException extends RuntimeException { - - public DanielDimensionException(String message) { - super(message); - } - - public DanielDimensionException(String message, Throwable cause) { - super(message, cause); - } - - public DanielDimensionException(Throwable cause) { - super(cause); - } - -} diff --git a/01-frontend/public/locales/en/translation.json b/01-frontend/public/locales/en/translation.json index 9de533f..64abece 100644 --- a/01-frontend/public/locales/en/translation.json +++ b/01-frontend/public/locales/en/translation.json @@ -102,7 +102,7 @@ "surname": "Surname", "language": "Language", "password": "Password", - "actualPrice": "Price in €", + "actualPrice": "Price after Discount", "stock": "Stock", "price100": "Price in ct", "price100€": "Price in €", @@ -154,4 +154,4 @@ "createNewItem": "Create New Item", "stockExpected": "Expected Stock", "addProduct": "Add Product" -} \ No newline at end of file +} diff --git a/01-frontend/src/helper/homepage/ItemCard.tsx b/01-frontend/src/helper/homepage/ItemCard.tsx index 112b9ed..a9458fb 100644 --- a/01-frontend/src/helper/homepage/ItemCard.tsx +++ b/01-frontend/src/helper/homepage/ItemCard.tsx @@ -54,6 +54,11 @@ export default function ItemCard({item}: { item: ItemWithImage }) { {(item.price100 / 100 * (1 - item.discount100 / 100)).toFixed(2)} € + {item.discount100 == 0 ? <> : + + {(- item.discount100)}% + + } { @@ -83,4 +88,4 @@ export default function ItemCard({item}: { item: ItemWithImage }) { ) -} \ No newline at end of file +} diff --git a/start.sh b/start.sh index 08615ef..52320ce 100755 --- a/start.sh +++ b/start.sh @@ -1,7 +1,6 @@ #!/bin/sh -# Function to clean up background processes on script exit cleanup() { echo "[DPS] Cleaning up..." pkill $backend_pid # pkill because subshells @@ -10,8 +9,8 @@ cleanup() { exit } -# Trap SIGINT (Ctrl+C) -trap cleanup SIGINT +# Trap INT (Ctrl+C) +trap cleanup INT echo "[DPS] trapped" cd ./00-backend @@ -25,5 +24,5 @@ frontend_pid=$! echo "[DPS] Frontend started with PID $frontend_pid" echo "[DPS] Ctrl+C to stop" -# Wait indefinitely; cleanup will handle interruption +# Wait for cleanup wait