Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release minor fixes and version upgrades #121

Merged
merged 17 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion frontend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
26 changes: 12 additions & 14 deletions frontend/src/components/orders/orderDetails/MenuPages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,29 @@ function MenuPageImage({restaurant, page, opened, onSelect, navigation}: MenuPag
const {restaurantApi} = useApiAccess();

const [loading, setLoading] = useState(false)
const [thumbnail, setThumbnail] = useState<string>('')
const [fullsize, setFullsize] = useState<string>('')

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()
Expand All @@ -64,7 +62,7 @@ function MenuPageImage({restaurant, page, opened, onSelect, navigation}: MenuPag
},
}}>
<CardMedia component="img"
image={thumbnail}
image={fullsize}
width="64px"
height="64px"
alt={page.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/restaurant/RestaurantAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
}