Commit Graph

8 Commits

Author SHA1 Message Date
Bastian Masanek
527379a2cd Enhance checkout flow with new components and validation
- Added AddressForm and CheckoutForm components for user input during checkout.
- Implemented validation using Zod and VeeValidate for billing address fields.
- Created OrderSummary and MockPayPalButton components for order confirmation and payment simulation.
- Updated CartSheet and CartSidebar to navigate to the new checkout page at '/kasse'.
- Introduced new API endpoints for validating checkout data and creating orders.
- Enhanced user experience with responsive design and error handling.

These changes complete the checkout functionality, allowing users to enter billing information, simulate payment, and confirm orders.
2025-11-03 15:38:16 +01:00
Bastian Masanek
e252d68f0c Add educator annual pass functionality and update product listings
- Introduced a new page for educator annual passes, displaying relevant products with a dedicated layout and loading/error states.
- Updated AreaTabs component to include the educator tab and adjusted routing logic.
- Modified useAuth to redirect users to the products page after login.
- Adjusted mock product prices and stock quantities in the database seeding script to reflect new pricing strategy.

These changes enhance the user experience for educators and improve product visibility in the application.
2025-11-03 14:03:29 +01:00
Bastian Masanek
d6404434a3 Refactor database schema for roles and visibility management
- Updated the roles table to use `code` as the primary key, enhancing readability and simplifying junction tables.
- Modified `user_roles` and `product_role_visibility` tables to reference `role_code` instead of `role_id`, maintaining many-to-many relationships.
- Added foreign key constraints and created new indexes to optimize queries.
- Removed the previous migration file that was no longer needed, ensuring a cleaner migration history.
- Updated related documentation to reflect the new schema changes and their benefits.
2025-11-03 10:54:58 +01:00
Bastian Masanek
68ab42f2f4 Refactor roles management to use role code as primary key
- Updated the roles table schema to use role code as the primary key, enhancing readability in junction tables.
- Modified related tables (user_roles, product_role_visibility) to reference role code instead of role ID.
- Adjusted seeding logic and utility functions to accommodate the new primary key structure, ensuring consistent role management across the application.
- Added a migration script to facilitate the database schema changes.
2025-11-03 10:45:11 +01:00
Bastian Masanek
268d91f548 Enhance database management with cleanup and reset scripts
- Added a new database cleanup script to remove all data while preserving the schema, facilitating a clean state before seeding.
- Updated package.json to include new commands for database cleaning and resetting.
- Modified schema definitions to use an array format for index and constraint definitions, improving clarity and consistency.
- Updated product seeding logic to utilize role-based assignments directly from mock data, enhancing flexibility in product-role relationships.
2025-11-02 10:35:07 +01:00
Bastian Masanek
ff9960edef Add role-based visibility and management features for products
- Introduced a role-based visibility system for products, ensuring that only users with approved roles can view specific products.
- Added new database tables for roles, user roles, and product role visibility to manage access control.
- Implemented utility functions for role management, including fetching approved roles, checking product visibility, and assigning roles to users and products.
- Updated API endpoints to filter products based on user roles, enhancing security and user experience.
- Prepared the database schema for future role request and approval workflows in upcoming phases.
2025-11-02 10:17:40 +01:00
Bastian Masanek
7ab80a6635 Add product detail and listing pages with API integration
- Created a new product detail page to display individual product information, including images, descriptions, and pricing.
- Implemented a product listing page to showcase all available products using the ProductCard and ProductGrid components.
- Added API endpoints for fetching product data, ensuring only active products are returned.
- Introduced a database seed script to populate the database with initial mock product data for development and testing.
- Updated settings to include new database seeding command and adjusted routing for product links.
2025-11-01 19:07:59 +01:00
Bastian Masanek
ef9845c5c5 Add Drizzle ORM setup and database configuration
- Add drizzle.config.ts for database migrations
- Create server/database/ structure with schema
- Add drizzle-orm and postgres dependencies
- Add db:* npm scripts for database management
2025-10-30 14:33:59 +01:00