Bugfix database creation

This commit is contained in:
2024-11-12 05:09:54 +01:00
parent b97cc1af20
commit e690fb984d
6 changed files with 30 additions and 20 deletions

View File

@@ -148,8 +148,6 @@ export async function prepopulateDatabase() {
capacity++
}
await Seat.bulkCreate(seats)
})
}
else
@@ -159,17 +157,17 @@ export async function prepopulateDatabase() {
for (let row = 0; row < location.rows; row++) {
seatRows.push({
row: row + 1,
SeatGroupId: seatGroup.dataValues.id
seatGroupId: seatGroup.dataValues.id
})
}
await SeatRow.bulkCreate(seatRows)
.then(seatRowRes => {
for (let seatRow of seatRowRes) {
for (let col = 0; col < seatGroup.capacity / location.rows; col++) {
for (let col = 0; col < seatGroup.dataValues.capacity / location.rows; col++) {
seats.push({
seatNr: col,
seatRowId: seatRow.id
seatRowId: seatRow.dataValues.id
})
capacity++

View File

@@ -30,7 +30,7 @@ app.use('/static', express.static(path.join(__dirname, 'images')))
// Add delay for more realistic response times
app.use((req, res, next) => {
setTimeout(next, Math.floor((Math.random () * 2000) + 100))
setTimeout(next, Math.floor((Math.random() * 1000) + 100))
})
// Routes

View File

@@ -120,7 +120,8 @@
"orderedAt": "Bestellt am",
"noOrdersText": "Bisher wurden keine Bestellungen von diesem Account getätigt. Gehe zum Warenkorb und bestelle!",
"ordersDescription": "Übersicht aller getätigten Bestellungen",
"order": "Bestellung | Bestellungen"
"order": "Bestellung | Bestellungen",
"notShipped": "noch nicht versendet"
},
"basket": {
"addToBasket": "Zum Warenkorb hinzufügen",
@@ -183,8 +184,8 @@
"bandSavedSuccessful": "Band erfolgreich gespeichert",
"genreDeleteError": "Fehler beim Löschen des Genres",
"genreDeleteSuccessful": "Genre erfolgreich gelöscht",
"genreSavedError": "Genre erfolgreich gespeichert",
"genreSavedSuccessful": "Fehler beim Speichern des Genres"
"genreSavedError": "Fehler beim Speichern des Genres",
"genreSavedSuccessful": "Genre erfolgreich gespeichert"
},
"misc": {
"404": {

View File

@@ -120,7 +120,8 @@
"orderedAt": "Ordered at",
"noOrdersText": "Bisher wurden keine Bestellungen von diesem Account getätigt. Gehe zum Warenkorb und bestelle!",
"ordersDescription": "Overview of all placed orders",
"order": "Order | Orders"
"order": "Order | Orders",
"notShipped": "don't shipped"
},
"basket": {
"addToBasket": "Add to basket",
@@ -183,8 +184,8 @@
"bandSavedSuccessful": "Band successfully saved",
"genreDeleteError": "Error on deleting Genre",
"genreDeleteSuccessful": "Genre successfully deleted",
"genreSavedError": "Genre successfully saved",
"genreSavedSuccessful": "Error on saving genre"
"genreSavedError": "Error on saving genre",
"genreSavedSuccessful": "Genre successfully saved"
},
"misc": {
"404": {

View File

@@ -21,13 +21,21 @@ defineProps({
:title="title"
:icon="icon"
>
<div class="text-h4 text-center">
<v-skeleton-loader
type="heading"
:loading="loading"
class="text-h4 d-flex justify-center"
>
{{ firstLine }}
</div>
</v-skeleton-loader>
<div class="text-h6 text-center text-disabled">
<v-skeleton-loader
type="text"
:loading="loading"
class="text-h6 text-disabled d-flex justify-center"
>
{{ secondLine }}
</div>
</v-skeleton-loader>
<template #actions>
<outlined-button

View File

@@ -110,7 +110,9 @@ orderStore.getAllOrders()
:title="$t('order.order', 2)"
icon="mdi-basket"
:first-line="orderStore.orders.length + ' ' + $t('order.order', 2)"
second-line="todo"
:second-line="orderStore.orders.reduce((counter, obj) => {
return !obj.shipped ? counter += 1 : counter
}, 0) + ' ' + $t('order.notShipped')"
button-route="/admin/orders"
:loading="orderStore.fetchInProgress"
/>