diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 5e7182b..3f60eca 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -15,19 +15,19 @@ buildscript { } dependencies { classpath("org.postgresql:postgresql:42.7.4") - classpath("org.testcontainers:postgresql:1.20.2") - classpath("org.jooq:jooq-codegen:3.19.13") - classpath("org.flywaydb:flyway-core:10.18.2") - classpath("org.flywaydb:flyway-database-postgresql:10.18.2") + classpath("org.testcontainers:postgresql:1.20.3") + classpath("org.jooq:jooq-codegen:3.19.15") + classpath("org.flywaydb:flyway-core:10.21.0") + classpath("org.flywaydb:flyway-database-postgresql:10.21.0") } } plugins { java - id("org.springframework.boot") version "3.3.4" + id("org.springframework.boot") version "3.3.5" id("io.spring.dependency-management") version "1.1.6" - id("org.openapi.generator") version "7.8.0" - id("com.google.cloud.tools.jib") version "3.4.3" + id("org.openapi.generator") version "7.9.0" + id("com.google.cloud.tools.jib") version "3.4.4" id("com.gorylenko.gradle-git-properties") version "2.4.2" } @@ -53,8 +53,8 @@ dependencies { implementation("org.flywaydb:flyway-database-postgresql") implementation("org.springframework.session:spring-session-core") - implementation("io.micrometer:micrometer-core:1.13.4") - implementation("io.micrometer:micrometer-registry-prometheus:1.13.5") + implementation("io.micrometer:micrometer-core:1.13.6") + implementation("io.micrometer:micrometer-registry-prometheus:1.13.6") implementation("net.ttddyy.observation:datasource-micrometer:1.0.5") implementation("io.swagger.core.v3:swagger-models:2.2.25") diff --git a/frontend/build.gradle.kts b/frontend/build.gradle.kts index 16ba62b..b2ea577 100644 --- a/frontend/build.gradle.kts +++ b/frontend/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.gradle.node.npm.task.NpmTask plugins { id("base") id("com.github.node-gradle.node") version "7.1.0" - id("org.openapi.generator") version "7.8.0" + id("org.openapi.generator") version "7.9.0" } node { diff --git a/frontend/src/components/orders/orderDetails/MenuPages.tsx b/frontend/src/components/orders/orderDetails/MenuPages.tsx index 24f1293..7a23f5e 100644 --- a/frontend/src/components/orders/orderDetails/MenuPages.tsx +++ b/frontend/src/components/orders/orderDetails/MenuPages.tsx @@ -16,31 +16,29 @@ function MenuPageImage({restaurant, page, opened, onSelect, navigation}: MenuPag const {restaurantApi} = useApiAccess(); const [loading, setLoading] = useState(false) - const [thumbnail, setThumbnail] = useState('') const [fullsize, setFullsize] = useState('') useEffect(() => { setLoading(true) + let tmp: string; + Promise.all([ - restaurantApi.fetchRestaurantsMenuPage(restaurant.id, page.id, true, {responseType: 'blob'}) - .then(res => URL.createObjectURL(new Blob([res.data]))) - .then(img => setThumbnail(img)), - restaurantApi.fetchRestaurantsMenuPage(restaurant.id, page.id, false, {responseType: 'blob'}) + restaurantApi.fetchRestaurantsMenuPage(restaurant.id, page.id, undefined, {responseType: 'blob'}) .then(res => URL.createObjectURL(new Blob([res.data]))) - .then(img => setFullsize(img)) + .then(img => { + tmp = img; + setFullsize(img); + }) ]) .finally(() => setLoading(false)) - }, [page.id, restaurant.id, restaurantApi]); - useEffect(() => { return () => { - if (thumbnail) - URL.revokeObjectURL(thumbnail) - if (fullsize) - URL.revokeObjectURL(fullsize) + if (tmp) { + URL.revokeObjectURL(tmp) + } } - }, [fullsize, thumbnail]); + }, [page.id, restaurant.id, restaurantApi]); const handleClick = () => { onSelect() @@ -64,7 +62,7 @@ function MenuPageImage({restaurant, page, opened, onSelect, navigation}: MenuPag }, }}> { if (await confirmDialog({ title: 'Ist die Bestellung erfolgreich bestellt worden?', - caption: "Die Bestellung wurde erfolgreich bestellt. Änderungen ausser dem Bezahlen sind nicht mehr möglich.", + caption: "Die Bestellung wurde erfolgreich bestellt. Änderungen außer Bezahlen sind nicht mehr möglich.", importantCaption: "Vergiss nicht, das Eintreffen der Bestellung hier abzuhaken und dafür zu sorgen, dass alle bezahlt haben.", })) { orderApi.orderIsNowOrdered(order.id, order.version) diff --git a/frontend/src/components/orders/orderDetails/OrderPositionsTable.tsx b/frontend/src/components/orders/orderDetails/OrderPositionsTable.tsx index f037082..ff44a93 100644 --- a/frontend/src/components/orders/orderDetails/OrderPositionsTable.tsx +++ b/frontend/src/components/orders/orderDetails/OrderPositionsTable.tsx @@ -240,7 +240,7 @@ const getSelectedHoverBackgroundColor = (color: string, mode: string) => mode == const StyledDataGrid = styled(DataGrid)(({theme}) => { return ({ '& .row-style-error': { - border: `3px solid ${getBackgroundColor(theme.palette.error.main, theme.palette.mode)}`, + backgroundColor: lighten(theme.palette.error.main, 0.8), '&:hover': { backgroundColor: getHoverBackgroundColor( theme.palette.warning.main, diff --git a/frontend/src/components/restaurant/RestaurantAvatar.tsx b/frontend/src/components/restaurant/RestaurantAvatar.tsx index 1d23398..bdfa7ba 100644 --- a/frontend/src/components/restaurant/RestaurantAvatar.tsx +++ b/frontend/src/components/restaurant/RestaurantAvatar.tsx @@ -45,7 +45,7 @@ function getContrastColor(rgb?: Uint8ClampedArray): string { return '#fff'; } // https://stackoverflow.com/a/3943023 - if ((rgb[0]*0.299 + rgb[1]*0.587 + rgb[2]*0.114) > 186) { + if ((rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) > 186) { return '#000'; } else { return '#fff'; @@ -62,5 +62,5 @@ function getRgbValues(cssColor: string | undefined) { context.fillStyle = cssColor; context.fillRect(0, 0, 1, 1); } - return context?.getImageData(0,0,1,1).data; + return context?.getImageData(0, 0, 1, 1).data; } \ No newline at end of file