Implement discounts - #27
Merged
Merged
Conversation
…ETED, PUBLISHED, and DRAFT cases - Implement label() method for human-readable status labels - Implement color() method for status color codes - Add HasOptions trait for additional enum functionality
…ent/eloquent-power-joins from 4.2.7 to 4.2.8 - Update laravel/framework from v12.23.0 to v12.24.0 - Update nikic/php-parser from v5.6.0 to v5.6.1 - Update fidry/cpu-core-counter from 1.2.0 to 1.3.0 - Update sebastian/recursion-context from6.0.2 to 6.0.3
- Add Variety model to represent product varieties - Create varieties table with necessary fields - Establish relationship between Variety and Product models - Implement VarietyStatusEnum for variety status
- Create new VarietyResource for managing product varieties - Add form fields for product attributes, pricing, and inventory - Implement table view with relevant columns and actions - Set up navigation group and icon for easy access
… for creating, editing, and listing varieties - Add CreateVariety, EditVariety, and ListVarieties classes - Implement basic functionality for variety resource management
- Add VarietyFactory class to the database/factories directory - Define factory for Variety model with attributes: - product_id Product) - attribute_value - color - price - sale_price - inventory - has_stock - status ( VarietyStatusEnum )
- Add comprehensive tests for VarietyResource, including index, list, edit, create, and delete functionality - Update ProductResource tests to include variety data when creating and editing products - Improve test coverage for product images and varieties
- Add variety details section to product form - Change default product status to PUBLISHED - Add new fields for variety attributes: attribute_value, color, price, sale_price, inventory, has_stock, status- Use VarietyStatusEnum for variety status options
feat: update ProductResource form fields and column configurations - Disable variety_counts field and make it calculated automatically - Add helper text for variety_counts field - Remove numeric validation from attributeGroup and category columns - Change category.title to category.heading and brand.title to brand.heading - Remove required validation from weight field refactor: remove unused imports and properties from User model - Remove RolesEnum import - Remove HasRoles trait - Remove addresses property annotation feat: add automatic featured image management in Image model - Implement booted method with saved event listener- Ensure only one featured image per imageable model- Update other images to non-featured when one becomes featured feat: add automatic variety count synchronization in Variety model - Implement booted method with saved and deleted event listeners - Create syncProductVarietyCount method to update product counts - Automatically update variety_counts when varieties are added/removed ```
feat(database): update role permission seeder with improved logic - Replace truncate and create with firstOrCreate to prevent duplicate entries - Update variable names from $key/$role to $value/$label for clarity- Use null-safe operator when syncing permissions to handle potential null values - Reorder admin permissions array for better consistency- Add view_posts permission to admin role in correct position - Include additional settings permissions for super admin role - Use RolesEnum::ADMIN->value instead of hardcoded USER constant - Merge admin permissions into super admin permissions array```
- Updated PHP version requirement from ^8.4 to ^8.5 - Replaced mohamedsabil83/filament-forms-tinyeditor with amidesfahani/filament-tinyeditor ^5.0 - Upgraded filament/filament from ^3.2 to ^5.0 - Updated laravel/framework from ^12.0 to ^13.0 - Updated laravel/tinker from ^2.9 to ^3.0 - Upgraded spatie/laravel-permission from ^6.19 to ^7.0 - Updated laravel/pint from ^1.13 to ^1.27 - Upgraded pestphp/pest ecosystem from ^3.0 to ^4.0 - Added new test-dev script with comprehensive testing workflow - Updated nunoMaduro/collision from ^8.0 to ^8.6
- Fix VarietyResource table to show product.heading (was product.title with numeric on a string) - Add IMPLEMENTATION.md roadmap and ShoFlow db doc schema reference - Document roadmap/docs conventions in AGENTS.md - Bump GitHub Actions PHP version to 8.5 Co-authored-by: Cursor <cursoragent@cursor.com>
Implement variety
…domain Add FK constraints with delete rules across products, varieties, attributes, and the product_attribute pivot, plus a unique pivot index. Make the ProductResource attribute label null-safe when an attribute has no group. Co-authored-by: Cursor <cursoragent@cursor.com>
…workflow Prevent the attribute repeater's default empty row from syncing a blank attribute_id, which now violates the product_attribute foreign key. Document the docker exec command and the pre-commit composer test-dev step in AGENTS.md. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Implement variety
…t/coupon entities Fix attribute/variety/pivot mismatches, document the new foreign-key and unique constraints, and complete the discounts and coupons domain descriptions. Co-authored-by: Cursor <cursoragent@cursor.com>
Implement the discounts table (per-variety auto price rules) with enum, model, factory, Filament resource, and Pest tests. Add factory-based sample seeders in a dedicated TestSeeder, limit the variety table product heading, and update docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.