From b1cc137440ddeb3b3ff2839f2e434974f35b9d4e Mon Sep 17 00:00:00 2001 From: Skym0sh0 <4696583+Skym0sh0@users.noreply.github.com> Date: Tue, 8 Oct 2024 11:12:04 +0200 Subject: [PATCH 01/11] fix: Formattings --- frontend/src/components/restaurant/RestaurantAvatar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From cd25a08589f9857ffac4c64bf8bb5843d589167f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 04:53:09 +0000 Subject: [PATCH 02/11] build(deps): bump org.openapi.generator from 7.8.0 to 7.9.0 Bumps org.openapi.generator from 7.8.0 to 7.9.0. --- updated-dependencies: - dependency-name: org.openapi.generator dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- backend/build.gradle.kts | 2 +- frontend/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 5e7182b..54c3bf3 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -26,7 +26,7 @@ plugins { java id("org.springframework.boot") version "3.3.4" id("io.spring.dependency-management") version "1.1.6" - id("org.openapi.generator") version "7.8.0" + id("org.openapi.generator") version "7.9.0" id("com.google.cloud.tools.jib") version "3.4.3" id("com.gorylenko.gradle-git-properties") version "2.4.2" } 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 { From 94153478964e328f11568726ff66dc34bda92d7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 04:53:15 +0000 Subject: [PATCH 03/11] build(deps): bump org.flywaydb:flyway-core from 10.18.2 to 10.19.0 Bumps [org.flywaydb:flyway-core](https://github.com/flyway/flyway) from 10.18.2 to 10.19.0. - [Release notes](https://github.com/flyway/flyway/releases) - [Commits](https://github.com/flyway/flyway/compare/flyway-10.18.2...flyway-10.19.0) --- updated-dependencies: - dependency-name: org.flywaydb:flyway-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- backend/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 5e7182b..586d5be 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -17,7 +17,7 @@ buildscript { 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-core:10.19.0") classpath("org.flywaydb:flyway-database-postgresql:10.18.2") } } From 0d2baf6b784cf3ae2974a6e79375cbcae284843a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 04:53:19 +0000 Subject: [PATCH 04/11] build(deps): bump io.micrometer:micrometer-core from 1.13.4 to 1.13.5 Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.13.4 to 1.13.5. - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.4...v1.13.5) --- updated-dependencies: - dependency-name: io.micrometer:micrometer-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- backend/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 5e7182b..b11b9fa 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -53,7 +53,7 @@ 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-core:1.13.5") implementation("io.micrometer:micrometer-registry-prometheus:1.13.5") implementation("net.ttddyy.observation:datasource-micrometer:1.0.5") From 06ff5df8fb905eb7cb4497c1f3692e7a52d41f59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:58:07 +0000 Subject: [PATCH 05/11] build(deps): bump org.flywaydb:flyway-database-postgresql Bumps org.flywaydb:flyway-database-postgresql from 10.18.2 to 10.19.0. --- updated-dependencies: - dependency-name: org.flywaydb:flyway-database-postgresql dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- backend/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index f3ebfdb..377c200 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -18,7 +18,7 @@ buildscript { classpath("org.testcontainers:postgresql:1.20.2") classpath("org.jooq:jooq-codegen:3.19.13") classpath("org.flywaydb:flyway-core:10.19.0") - classpath("org.flywaydb:flyway-database-postgresql:10.18.2") + classpath("org.flywaydb:flyway-database-postgresql:10.19.0") } } From 371a44ce84bf2b6ae836393deaabe3c09000dd59 Mon Sep 17 00:00:00 2001 From: Skym0sh0 <4696583+Skym0sh0@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:53:45 +0100 Subject: [PATCH 06/11] fix: Bump Versions --- backend/build.gradle.kts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 377c200..80fbc14 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -17,8 +17,8 @@ buildscript { 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.19.0") - classpath("org.flywaydb:flyway-database-postgresql:10.19.0") + classpath("org.flywaydb:flyway-core:10.20.1") + classpath("org.flywaydb:flyway-database-postgresql:10.20.1") } } @@ -27,7 +27,7 @@ plugins { id("org.springframework.boot") version "3.3.4" id("io.spring.dependency-management") version "1.1.6" id("org.openapi.generator") version "7.9.0" - id("com.google.cloud.tools.jib") version "3.4.3" + 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.5") - 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") From 313ddf626f3d5897ea45aafec71a061af3707844 Mon Sep 17 00:00:00 2001 From: Skym0sh0 <4696583+Skym0sh0@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:48:32 +0100 Subject: [PATCH 07/11] fix: Visuals --- .../src/components/orders/orderDetails/OrderPositionsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, From 188c33b578795ced0c7fb83b22fcf6f721cb0d1c Mon Sep 17 00:00:00 2001 From: Skym0sh0 <4696583+Skym0sh0@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:26:34 +0100 Subject: [PATCH 08/11] fix: Typo --- frontend/src/components/orders/orderDetails/OrderButtons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/orders/orderDetails/OrderButtons.tsx b/frontend/src/components/orders/orderDetails/OrderButtons.tsx index 554cd28..4799425 100644 --- a/frontend/src/components/orders/orderDetails/OrderButtons.tsx +++ b/frontend/src/components/orders/orderDetails/OrderButtons.tsx @@ -67,7 +67,7 @@ export default function OrderButtons({order, onRefresh}: { order: Order, onRefre const handleOrderIsOrdered = useCallback(async () => { 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) From 9f13543edceaf3359643cc7b3b99699c0c1ce9e3 Mon Sep 17 00:00:00 2001 From: Skym0sh0 <4696583+Skym0sh0@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:44:06 +0100 Subject: [PATCH 09/11] fix: Updated Versions --- backend/build.gradle.kts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 80fbc14..62a426f 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -16,15 +16,15 @@ 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.20.1") - classpath("org.flywaydb:flyway-database-postgresql:10.20.1") + 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.9.0" id("com.google.cloud.tools.jib") version "3.4.4" From f94b451bcaa815cbd935f0351b0aa8f1e42febc2 Mon Sep 17 00:00:00 2001 From: Skym0sh0 <4696583+Skym0sh0@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:45:55 +0100 Subject: [PATCH 10/11] fix: Updated Versions --- backend/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 62a426f..3f60eca 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -15,7 +15,7 @@ buildscript { } dependencies { classpath("org.postgresql:postgresql:42.7.4") - classpath("org.testcontainers:postgresql:1.20.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") From efd389201d55242466f6ac4505d25a93a9ec8dbf Mon Sep 17 00:00:00 2001 From: Skym0sh0 <4696583+Skym0sh0@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:03:08 +0100 Subject: [PATCH 11/11] fix: MenuPage Loading Problems fixed? --- .../orders/orderDetails/MenuPages.tsx | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) 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 }, }}>