From c6c8cf0ae82d7c75427781dadd37538a270a7aa5 Mon Sep 17 00:00:00 2001 From: Tobias Zoghaib Date: Fri, 27 Sep 2024 13:08:43 +0200 Subject: [PATCH] Move Navigation from NavDrawer to AppBar, redesign page structure and routes --- README.md | 62 ++----------------- software/src/App.vue | 29 +++++---- .../navigation/navigationAppendItems.vue | 29 +++++++++ .../navigation/navigationPrependItems.vue | 48 ++++++++++++++ software/src/locales/de.json | 5 +- software/src/locales/en.json | 5 +- .../accountDataPage}/accountDataCard.vue | 0 .../accountDataPage}/accountManagingCard.vue | 0 .../accountDataPage}/addressesCard.vue | 0 .../accountDataPage}/index.vue | 1 - .../accountDataPage}/paymentsCard.vue | 0 .../pages/account/accountHomePage/index.vue | 10 +++ .../pages/{ => account}/loginPage/index.vue | 0 .../{ => account}/loginPage/loginForm.vue | 0 .../{ => account}/loginPage/registerForm.vue | 0 .../pages/{ => account}/ordersPage/index.vue | 0 .../{ => account}/ordersPage/ordersCard.vue | 0 .../pages/{helpPage => homePage}/index.vue | 2 +- software/src/pages/shows/eventsPage/index.vue | 6 ++ software/src/pages/shows/genresPage/index.vue | 6 ++ .../src/pages/shows/locationsPage/index.vue | 6 ++ software/src/pages/shows/searchPage/index.vue | 6 ++ .../ticketsPage}/filterNavDrawer.vue | 0 .../ticketsPage}/index.vue | 0 .../ticketsPage}/productDetailsDialog.vue | 0 .../ticketsPage}/tourCard.vue | 0 .../{ => shows}/tourDetailPage/index.vue | 0 .../helpPage}/index.vue | 0 .../helpPage}/scoreCard.vue | 0 .../{ => system}/preferencesPage/index.vue | 0 .../preferencesPage/pageSetup.vue | 0 .../preferencesPage/systemSetup.vue | 0 software/src/plugins/vuetify.ts | 4 +- software/src/router/account.routes.ts | 11 ++++ software/src/router/admin.routes.ts | 2 +- software/src/router/routes.ts | 26 +++----- software/src/router/show.routes.ts | 11 ++++ software/src/router/system.routes.ts | 7 +++ 38 files changed, 184 insertions(+), 92 deletions(-) create mode 100644 software/src/components/navigation/navigationAppendItems.vue create mode 100644 software/src/components/navigation/navigationPrependItems.vue rename software/src/pages/{accountPage => account/accountDataPage}/accountDataCard.vue (100%) rename software/src/pages/{accountPage => account/accountDataPage}/accountManagingCard.vue (100%) rename software/src/pages/{accountPage => account/accountDataPage}/addressesCard.vue (100%) rename software/src/pages/{accountPage => account/accountDataPage}/index.vue (95%) rename software/src/pages/{accountPage => account/accountDataPage}/paymentsCard.vue (100%) create mode 100644 software/src/pages/account/accountHomePage/index.vue rename software/src/pages/{ => account}/loginPage/index.vue (100%) rename software/src/pages/{ => account}/loginPage/loginForm.vue (100%) rename software/src/pages/{ => account}/loginPage/registerForm.vue (100%) rename software/src/pages/{ => account}/ordersPage/index.vue (100%) rename software/src/pages/{ => account}/ordersPage/ordersCard.vue (100%) rename software/src/pages/{helpPage => homePage}/index.vue (89%) create mode 100644 software/src/pages/shows/eventsPage/index.vue create mode 100644 software/src/pages/shows/genresPage/index.vue create mode 100644 software/src/pages/shows/locationsPage/index.vue create mode 100644 software/src/pages/shows/searchPage/index.vue rename software/src/pages/{toursPage => shows/ticketsPage}/filterNavDrawer.vue (100%) rename software/src/pages/{toursPage => shows/ticketsPage}/index.vue (100%) rename software/src/pages/{toursPage => shows/ticketsPage}/productDetailsDialog.vue (100%) rename software/src/pages/{toursPage => shows/ticketsPage}/tourCard.vue (100%) rename software/src/pages/{ => shows}/tourDetailPage/index.vue (100%) rename software/src/pages/{scoreBoardPage => system/helpPage}/index.vue (100%) rename software/src/pages/{scoreBoardPage => system/helpPage}/scoreCard.vue (100%) rename software/src/pages/{ => system}/preferencesPage/index.vue (100%) rename software/src/pages/{ => system}/preferencesPage/pageSetup.vue (100%) rename software/src/pages/{ => system}/preferencesPage/systemSetup.vue (100%) create mode 100644 software/src/router/account.routes.ts create mode 100644 software/src/router/show.routes.ts create mode 100644 software/src/router/system.routes.ts diff --git a/README.md b/README.md index b1cb944..2d15b24 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ The application host it's data in a SQLite database. The access is managed by an -
+
GET /shows/:id (Get all information about one show) @@ -122,7 +122,7 @@ The application host it's data in a SQLite database. The access is managed by an -
+
GET /tours (Get all tours) @@ -136,7 +136,7 @@ The application host it's data in a SQLite database. The access is managed by an
-
+
GET /genres (Get all genres) @@ -151,7 +151,7 @@ The application host it's data in a SQLite database. The access is managed by an -
+
GET /locations (Get all locations) @@ -236,23 +236,6 @@ The application host it's data in a SQLite database. The access is managed by an
-
-POST /products/ (Create a new product) - - -##### Parameters -> | name | type | data type | description | -> | :---: | --- | --- | --- | -> | None | required | object (JSON) | Model of a Product | - -##### Responses -> | http code | content-type | response | -> | :---: | --- | --- | -> | `201` | `application/json` | `ProductModel` | -> | `400` | `application/json` | `{code: 400, message: "..."}` | -
- -
POST /orders/ (Create a new order) @@ -268,23 +251,6 @@ The application host it's data in a SQLite database. The access is managed by an > | `201` | `application/json` | `OrderModel` |
- -
-POST /categories/ (Create a new category) - - -##### Parameters -> | name | type | data type | description | -> | :---: | --- | --- | --- | -> | None | required | object (JSON) | Model of a Category | - -##### Responses -> | http code | content-type | response | -> | :---: | --- | --- | -> | `201` | `application/json` | `OrderModel` | -> | `400` | `application/json` | `{code: 400, message: "..."}` | -
- --- #### Updating existing @@ -309,7 +275,7 @@ The application host it's data in a SQLite database. The access is managed by an #### Delete existing -
+ --- diff --git a/software/src/App.vue b/software/src/App.vue index e762ded..8128d9b 100644 --- a/software/src/App.vue +++ b/software/src/App.vue @@ -1,9 +1,9 @@ + + \ No newline at end of file diff --git a/software/src/components/navigation/navigationPrependItems.vue b/software/src/components/navigation/navigationPrependItems.vue new file mode 100644 index 0000000..e34855e --- /dev/null +++ b/software/src/components/navigation/navigationPrependItems.vue @@ -0,0 +1,48 @@ + + + \ No newline at end of file diff --git a/software/src/locales/de.json b/software/src/locales/de.json index e94501a..4aaec23 100644 --- a/software/src/locales/de.json +++ b/software/src/locales/de.json @@ -1,8 +1,9 @@ { "menu": { "shopping": { - "shopping": "Einkaufen", - "ticket": "Ticket | Tickets", + "allEvents": "Alle Events", + "allLocations": "Alle Orte", + "allGenres": "Alle Genres", "basket": "Warenkorb" }, "account": { diff --git a/software/src/locales/en.json b/software/src/locales/en.json index 0fc724e..86c61d6 100644 --- a/software/src/locales/en.json +++ b/software/src/locales/en.json @@ -1,8 +1,9 @@ { "menu": { "shopping": { - "shopping": "Shopping", - "ticket": "Ticket | Tickets", + "allEvents": "All Events", + "allLocations": "All Locations", + "allGenres": "All Genres", "basket": "Basket" }, "account": { diff --git a/software/src/pages/accountPage/accountDataCard.vue b/software/src/pages/account/accountDataPage/accountDataCard.vue similarity index 100% rename from software/src/pages/accountPage/accountDataCard.vue rename to software/src/pages/account/accountDataPage/accountDataCard.vue diff --git a/software/src/pages/accountPage/accountManagingCard.vue b/software/src/pages/account/accountDataPage/accountManagingCard.vue similarity index 100% rename from software/src/pages/accountPage/accountManagingCard.vue rename to software/src/pages/account/accountDataPage/accountManagingCard.vue diff --git a/software/src/pages/accountPage/addressesCard.vue b/software/src/pages/account/accountDataPage/addressesCard.vue similarity index 100% rename from software/src/pages/accountPage/addressesCard.vue rename to software/src/pages/account/accountDataPage/addressesCard.vue diff --git a/software/src/pages/accountPage/index.vue b/software/src/pages/account/accountDataPage/index.vue similarity index 95% rename from software/src/pages/accountPage/index.vue rename to software/src/pages/account/accountDataPage/index.vue index 7d87a0d..72f57ce 100644 --- a/software/src/pages/accountPage/index.vue +++ b/software/src/pages/account/accountDataPage/index.vue @@ -1,5 +1,4 @@ + + \ No newline at end of file diff --git a/software/src/pages/loginPage/index.vue b/software/src/pages/account/loginPage/index.vue similarity index 100% rename from software/src/pages/loginPage/index.vue rename to software/src/pages/account/loginPage/index.vue diff --git a/software/src/pages/loginPage/loginForm.vue b/software/src/pages/account/loginPage/loginForm.vue similarity index 100% rename from software/src/pages/loginPage/loginForm.vue rename to software/src/pages/account/loginPage/loginForm.vue diff --git a/software/src/pages/loginPage/registerForm.vue b/software/src/pages/account/loginPage/registerForm.vue similarity index 100% rename from software/src/pages/loginPage/registerForm.vue rename to software/src/pages/account/loginPage/registerForm.vue diff --git a/software/src/pages/ordersPage/index.vue b/software/src/pages/account/ordersPage/index.vue similarity index 100% rename from software/src/pages/ordersPage/index.vue rename to software/src/pages/account/ordersPage/index.vue diff --git a/software/src/pages/ordersPage/ordersCard.vue b/software/src/pages/account/ordersPage/ordersCard.vue similarity index 100% rename from software/src/pages/ordersPage/ordersCard.vue rename to software/src/pages/account/ordersPage/ordersCard.vue diff --git a/software/src/pages/helpPage/index.vue b/software/src/pages/homePage/index.vue similarity index 89% rename from software/src/pages/helpPage/index.vue rename to software/src/pages/homePage/index.vue index d1f6730..67b94f6 100644 --- a/software/src/pages/helpPage/index.vue +++ b/software/src/pages/homePage/index.vue @@ -2,5 +2,5 @@ \ No newline at end of file diff --git a/software/src/pages/shows/eventsPage/index.vue b/software/src/pages/shows/eventsPage/index.vue new file mode 100644 index 0000000..c12ab13 --- /dev/null +++ b/software/src/pages/shows/eventsPage/index.vue @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/software/src/pages/shows/genresPage/index.vue b/software/src/pages/shows/genresPage/index.vue new file mode 100644 index 0000000..db9cc6f --- /dev/null +++ b/software/src/pages/shows/genresPage/index.vue @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/software/src/pages/shows/locationsPage/index.vue b/software/src/pages/shows/locationsPage/index.vue new file mode 100644 index 0000000..0e82771 --- /dev/null +++ b/software/src/pages/shows/locationsPage/index.vue @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/software/src/pages/shows/searchPage/index.vue b/software/src/pages/shows/searchPage/index.vue new file mode 100644 index 0000000..6404e3e --- /dev/null +++ b/software/src/pages/shows/searchPage/index.vue @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/software/src/pages/toursPage/filterNavDrawer.vue b/software/src/pages/shows/ticketsPage/filterNavDrawer.vue similarity index 100% rename from software/src/pages/toursPage/filterNavDrawer.vue rename to software/src/pages/shows/ticketsPage/filterNavDrawer.vue diff --git a/software/src/pages/toursPage/index.vue b/software/src/pages/shows/ticketsPage/index.vue similarity index 100% rename from software/src/pages/toursPage/index.vue rename to software/src/pages/shows/ticketsPage/index.vue diff --git a/software/src/pages/toursPage/productDetailsDialog.vue b/software/src/pages/shows/ticketsPage/productDetailsDialog.vue similarity index 100% rename from software/src/pages/toursPage/productDetailsDialog.vue rename to software/src/pages/shows/ticketsPage/productDetailsDialog.vue diff --git a/software/src/pages/toursPage/tourCard.vue b/software/src/pages/shows/ticketsPage/tourCard.vue similarity index 100% rename from software/src/pages/toursPage/tourCard.vue rename to software/src/pages/shows/ticketsPage/tourCard.vue diff --git a/software/src/pages/tourDetailPage/index.vue b/software/src/pages/shows/tourDetailPage/index.vue similarity index 100% rename from software/src/pages/tourDetailPage/index.vue rename to software/src/pages/shows/tourDetailPage/index.vue diff --git a/software/src/pages/scoreBoardPage/index.vue b/software/src/pages/system/helpPage/index.vue similarity index 100% rename from software/src/pages/scoreBoardPage/index.vue rename to software/src/pages/system/helpPage/index.vue diff --git a/software/src/pages/scoreBoardPage/scoreCard.vue b/software/src/pages/system/helpPage/scoreCard.vue similarity index 100% rename from software/src/pages/scoreBoardPage/scoreCard.vue rename to software/src/pages/system/helpPage/scoreCard.vue diff --git a/software/src/pages/preferencesPage/index.vue b/software/src/pages/system/preferencesPage/index.vue similarity index 100% rename from software/src/pages/preferencesPage/index.vue rename to software/src/pages/system/preferencesPage/index.vue diff --git a/software/src/pages/preferencesPage/pageSetup.vue b/software/src/pages/system/preferencesPage/pageSetup.vue similarity index 100% rename from software/src/pages/preferencesPage/pageSetup.vue rename to software/src/pages/system/preferencesPage/pageSetup.vue diff --git a/software/src/pages/preferencesPage/systemSetup.vue b/software/src/pages/system/preferencesPage/systemSetup.vue similarity index 100% rename from software/src/pages/preferencesPage/systemSetup.vue rename to software/src/pages/system/preferencesPage/systemSetup.vue diff --git a/software/src/plugins/vuetify.ts b/software/src/plugins/vuetify.ts index 79a50ad..6917739 100644 --- a/software/src/plugins/vuetify.ts +++ b/software/src/plugins/vuetify.ts @@ -20,7 +20,7 @@ const vuetify = createVuetify({ secondary: colors.red.lighten2 } }, - lightRed: { + lightRed: { dark: false, colors: { primary: colors.red.darken1, @@ -30,7 +30,7 @@ const vuetify = createVuetify({ darkBlue: { dark: true, colors: { - primary: colors.blue.darken1, + primary: colors.blue.darken4, secondary: colors.blue.lighten2 } }, diff --git a/software/src/router/account.routes.ts b/software/src/router/account.routes.ts new file mode 100644 index 0000000..82b9e37 --- /dev/null +++ b/software/src/router/account.routes.ts @@ -0,0 +1,11 @@ +import AccountHomePage from "@/pages/account/accountHomePage/index.vue"; +import AccountDataPage from "@/pages/account/accountDataPage/index.vue"; +import OrdersPage from "@/pages/account/ordersPage/index.vue"; +import LoginPage from "@/pages/account/loginPage/index.vue" + +export const accountRoutes = [ + { path: '/account/home', component: AccountHomePage }, + { path: '/account/login', component: LoginPage }, + { path: '/account/edit', component: AccountDataPage }, + { path: '/account/orders', component: OrdersPage }, +] \ No newline at end of file diff --git a/software/src/router/admin.routes.ts b/software/src/router/admin.routes.ts index 44ff2ce..642ce19 100644 --- a/software/src/router/admin.routes.ts +++ b/software/src/router/admin.routes.ts @@ -4,7 +4,7 @@ import AccountsPage from "@/pages/admin/accountsPage/index.vue" import ProductsPage from "@/pages/admin/productsPage/index.vue" import BrandsPage from "@/pages/admin/brandsPage/index.vue" -export default [ +export const adminRoutes = [ { path: '/admin/dashboard', component: DashboardPage diff --git a/software/src/router/routes.ts b/software/src/router/routes.ts index 3c807bf..4ce752e 100644 --- a/software/src/router/routes.ts +++ b/software/src/router/routes.ts @@ -1,23 +1,17 @@ -import AccountPage from "@/pages/accountPage/index.vue"; -import OrdersPage from "@/pages/ordersPage/index.vue"; -import PreferencesPage from "@/pages/preferencesPage/index.vue"; -import TourPage from "@/pages/toursPage/index.vue"; -import LoginPage from "@/pages/loginPage/index.vue" import BasketPage from "@/pages/basketPage/index.vue" -import HelpPage from "@/pages/helpPage/index.vue" -import ScoreBoardPage from "@/pages/scoreBoardPage/index.vue" -import adminRoutes from "./admin.routes"; +import HomePage from "@/pages/homePage/index.vue" +import { adminRoutes } from "./admin.routes"; +import { accountRoutes } from "./account.routes"; +import { showRoutes } from "./show.routes"; +import { systemRoutes } from "./system.routes"; const routes = [ - { path: '/', component: TourPage }, - { path: '/account', component: AccountPage }, - { path: '/orders', component: OrdersPage }, - { path: '/preferences', component: PreferencesPage }, - { path: '/login', component: LoginPage }, + { path: "/", component: HomePage }, { path: '/basket', component: BasketPage }, - { path: '/scoreboard', component: ScoreBoardPage }, - { path: '/help', component: HelpPage }, - ...adminRoutes + ...showRoutes, + ...accountRoutes, + ...adminRoutes, + ...systemRoutes ] export default routes \ No newline at end of file diff --git a/software/src/router/show.routes.ts b/software/src/router/show.routes.ts new file mode 100644 index 0000000..711fd32 --- /dev/null +++ b/software/src/router/show.routes.ts @@ -0,0 +1,11 @@ +import EventsPage from "@/pages/shows/eventsPage/index.vue"; +import GenresPage from "@/pages/shows/genresPage/index.vue"; +import LocationsPage from "@/pages/shows/locationsPage/index.vue" +import SearchPage from "@/pages/shows/searchPage/index.vue" + +export const showRoutes = [ + { path: '/shows/events', component: EventsPage }, + { path: '/shows/genres', component: GenresPage }, + { path: '/shows/locations', component: LocationsPage }, + { path: '/shows/search', component: SearchPage }, +] \ No newline at end of file diff --git a/software/src/router/system.routes.ts b/software/src/router/system.routes.ts new file mode 100644 index 0000000..2a05819 --- /dev/null +++ b/software/src/router/system.routes.ts @@ -0,0 +1,7 @@ +import PreferencesPage from "@/pages/system/preferencesPage/index.vue"; +import HelpPage from "@/pages/system/helpPage/index.vue" + +export const systemRoutes = [ + { path: '/system/preferences', component: PreferencesPage }, + { path: '/system/help', component: HelpPage } +] \ No newline at end of file