Skip to content

Implement banners - #30

Merged
bahman026 merged 11 commits into
adminfrom
implement_banners
Jun 20, 2026
Merged

Implement banners#30
bahman026 merged 11 commits into
adminfrom
implement_banners

Conversation

@bahman026

Copy link
Copy Markdown
Owner

No description provided.

bahman026 and others added 10 commits June 20, 2026 02:20
- BannerStatusEnum, Banner model, migration, factory, seeder
- BannerResource + pages (redirects to index after save)
- BannerResourceTest (6 passing tests)
- Updated ShoFlow db doc.md: banners section now documents polymorphic images
- Updated IMPLEMENTATION.md: Banners marked done
- Updated AGENTS.md: reference to CACHE.md added
- Added CACHE.md: register of identified but not-yet-implemented cache keys

Co-authored-by: Cursor <cursoragent@cursor.com>
Published updated Livewire JS assets, CSP variants, source maps,
and views via vendor:publish.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add booted() deleting event to cascade-delete images when a banner is deleted
- Fix @Property Image|null for featuredImage (can be null when no images exist)
- Remove redundant imageable_type/imageable_id from withImages() factory state

Co-authored-by: Cursor <cursoragent@cursor.com>
- Catalog: Products, Varieties, Categories, Brands
- Promotions: Discounts, Coupons
- Attribute, Content, Address: unchanged

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Validate required attribute groups before product is saved (beforeCreate/beforeSave
  with halt()), fixing the timing bug where validation ran after the record was written
- Move validation out of saveRelationshipsUsing into page lifecycle hooks
- Add ProductResource::missingRequiredGroups() static helper shared by both pages
- Remove dehydrated(false) so attributes state is available in beforeCreate/beforeSave
- Strip attributes from form data in mutateFormDataBefore* to prevent fill() conflict
- Remove // todo comment from attribute_group_category migration
- Product tests: add pivot sync, required-group blocking, variety_counts sync
- Variety tests: add variety_counts sync on create, delete, and resource delete

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add nullable attribute_id FK to varieties migration (nullOnDelete)
- Variety::booted() saving event auto-populates attribute_value and color
  from the linked Attribute record when attribute_id is set
- Add Variety::attribute() BelongsTo relationship
- VarietyResource: replace attribute_value/color TextInputs with a
  reactive attribute_id Select filtered by the product's attribute_group_id
- ProductResource variety repeater: same Select using ../../attribute_group_id
- VarietyFactory: attribute_id defaults to null, withAttribute() state added
- Add test: auto-fills attribute_value and color from attribute
- Fix: use Filament\Schemas\Components\Utilities\Get (not Filament\Forms\Get)
  for reactive options closures; document in AGENTS.md
- Update ShoFlow db doc.md and IMPLEMENTATION.md

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add $subheading to List pages: Products, Varieties, Discounts, Coupons,
  Attributes, AttributeGroups, AttributeGroupCategories
- Add hintIconTooltip to all key form fields across ProductResource,
  VarietyResource, DiscountResource, CouponResource, AttributeResource,
  AttributeGroupResource, AttributeGroupCategoryResource
- Fix null label TypeError in Discount/Coupon variety selects by using
  getOptionLabelFromRecordUsing with Product — Variety format and null fallback
- Add navigationSort to Attribute group: Ancestors(1), AttributeGroups(2),
  AttributeGroupCategories(3), Attributes(4)
- Make attribute_group_id searchable and live in ProductResource
- Remove Fieldset wrapper from variety repeater to fix reactive path resolution
- Development migration rule: update existing migrations + migrate:fresh
  (documented in AGENTS.md)
- Note cron jobs for discount/coupon expiry in IMPLEMENTATION.md

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Fix import order in VarietyResource (Pint unary_operator_spaces)
- Add declare(strict_types=1) to config/livewire.php (Pint)
- Use fully-qualified Collection return type alias in ProductResource (Pint)
- Type-hint closure parameter as mixed in missingRequiredGroups (type coverage 100%)
- Replace nullsafe ?-> with -> for non-nullable product relation in Discount/CouponResource (PHPStan)

Co-authored-by: Cursor <cursoragent@cursor.com>
@bahman026
bahman026 force-pushed the implement_banners branch from c28669b to ea71fb6 Compare June 20, 2026 00:20
@bahman026
bahman026 merged commit 17e4db0 into admin Jun 20, 2026
1 check passed
@bahman026
bahman026 deleted the implement_banners branch June 20, 2026 00:22
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