diff --git a/software/backend/database.ts b/software/backend/database.ts index 401c808..cc5b00a 100644 --- a/software/backend/database.ts +++ b/software/backend/database.ts @@ -41,7 +41,7 @@ export const sequelize = new Sequelize({ }) export function startDatabase() { - let force = true + let force = false // Create database and tables sequelize.sync({ force: force }) diff --git a/software/backend/routes/order.routes.ts b/software/backend/routes/order.routes.ts index 1808562..aa9fa8f 100644 --- a/software/backend/routes/order.routes.ts +++ b/software/backend/routes/order.routes.ts @@ -6,6 +6,7 @@ import { Payment } from "../models/user/payment.model"; import { Address } from "../models/user/address.model"; import { Band } from "../models/acts/band.model"; import { Location } from "../models/locations/location.model"; +import { Event } from "../models/acts/event.model"; export const order = Router() @@ -19,7 +20,13 @@ order.get("/:id", (req: Request, res: Response) => { include: [ { model: Concert, - include: [ Band, Location ], + include: [ + { + model: Event, + include: [ Band ] + }, + Location + ], attributes: { exclude: [ "categoryId", diff --git a/software/src/locales/de.json b/software/src/locales/de.json index b6fa5cc..f46587a 100644 --- a/software/src/locales/de.json +++ b/software/src/locales/de.json @@ -35,14 +35,6 @@ "emptyBasketText": "Gehe zu unseren Produkten und lege Artikel in den Warenkorb", "totalPrice": "Gesamtpreis", "orderNow": "Jetzt bestellen", - "orders": { - "orderFrom": "Bestellung vom", - "ordered": "Bestellt", - "preparingForShipping": "Versandvorbereitung", - "shipped": "Versendet", - "delivered": "Geliefert", - "inDelivery": "In Zustellung" - }, "userInfo": { "firstName": "Vorname", "lastName": "Nachname", @@ -151,5 +143,15 @@ "loading": "Lade", "orderSummary": "Bestellübersicht", "basket": "Warenkorb", - "event": "Event" + "event": "Event", + "hello": "Hallo", + "accountManagement": "Account verwalten", + "accountManagementDescription": "Persönliche Daten, Adressen, Bezahlmethoden", + "orders": "Bestellung | Bestellungen", + "ordersDescription": "Übersicht aller getätigten Bestellungen", + "onePageBack": "Zurück zur vorherigen Seite", + "orderedAt": "Bestellt am", + "logout": "Ausloggen", + "logoutDescription": "Aktuellen Useraccount ausloggen", + "login": "Login" } diff --git a/software/src/locales/en.json b/software/src/locales/en.json index 6c7e07d..c3a432f 100644 --- a/software/src/locales/en.json +++ b/software/src/locales/en.json @@ -35,14 +35,6 @@ "emptyBasketText": "Go to our products and add some of them to the basket", "totalPrice": "Total price", "orderNow": "Order now", - "orders": { - "orderFrom": "Order from", - "ordered": "Ordered", - "preparingForShipping": "Preparing for shipping", - "shipped": "Shipped", - "delivered": "Delivered", - "inDelivery": "In Delivery" - }, "userInfo": { "firstName": "First Name", "lastName": "Family Name", @@ -151,5 +143,15 @@ "loading": "Loading", "orderSummary": "Order Summary", "basket": "Basket", - "event": "Event" + "event": "Event", + "hello": "Hello", + "accountManagement": "Account Management", + "accountManagementDescription": "Contact data, Addresses, Payment methods", + "orders": "Order | Orders", + "ordersDescription": "Overview about all orders", + "onePageBack": "Back to previous page", + "orderedAt": "Ordered at", + "logout": "Logout", + "logoutDescription": "Logout current account", + "login": "Login" } diff --git a/software/src/pages/account/accountDataPage/accountManagingCard.vue b/software/src/pages/account/accountDataPage/accountManagingCard.vue index f5dbf40..af72990 100644 --- a/software/src/pages/account/accountDataPage/accountManagingCard.vue +++ b/software/src/pages/account/accountDataPage/accountManagingCard.vue @@ -2,13 +2,24 @@ import cardView from '@/components/cardView.vue'; import confirmDialog from '@/components/confirmDialog.vue'; import outlinedButton from '@/components/outlinedButton.vue'; +import { useAccountStore } from '@/data/stores/accountStore'; import { ref } from 'vue'; const showConfirmDialog = ref(false) +const updateInProgress = ref(false) +const accountStore = useAccountStore() function deleteAccount() { // todo } + +async function updateAccount() { + updateInProgress.value = true + + await accountStore.updateAccount() + + updateInProgress.value = false +}