Skip to content

Implement variety - #25

Merged
bahman026 merged 16 commits into
adminfrom
implement_variety
Jun 19, 2026
Merged

Implement variety#25
bahman026 merged 16 commits into
adminfrom
implement_variety

Conversation

@bahman026

Copy link
Copy Markdown
Owner

No description provided.

bahman026 and others added 16 commits August 15, 2025 21:24
…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>
@bahman026
bahman026 merged commit 513cdbe into admin Jun 19, 2026
1 check passed
@bahman026
bahman026 deleted the implement_variety branch June 19, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant