- 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.
- 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.
- 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.
- 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.
- 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.
- 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.