40 lines
2.4 KiB
Markdown
40 lines
2.4 KiB
Markdown
# Quickstart: Inventory Coverage Interactive Table
|
|
|
|
## Goal
|
|
|
|
Upgrade the tenant-scoped Inventory Coverage page from duplicated Blade tables to a Filament-native interactive table while preserving existing coverage semantics.
|
|
|
|
## Implementation Steps
|
|
|
|
1. Update `/Users/ahmeddarrazi/Documents/projects/TenantAtlas/app/Filament/Pages/InventoryCoverage.php` to implement Filament table behavior for custom runtime data.
|
|
2. Normalize supported policy types and foundation types into one runtime dataset with a `segment` field and source-derived filter option lists.
|
|
3. Define Filament table columns for type, label, category, dependencies, restore mode, risk, and segment context as needed for scanability.
|
|
4. Add native search on type and label, sorting on the main type or label column, category filtering, and conditional restore-mode filtering.
|
|
5. Replace the raw table markup in `/Users/ahmeddarrazi/Documents/projects/TenantAtlas/resources/views/filament/pages/inventory-coverage.blade.php` with a Filament table render plus concise explanatory framing and an explicit zero-results reset CTA.
|
|
6. Add a focused Pest test in `/Users/ahmeddarrazi/Documents/projects/TenantAtlas/tests/Feature/Filament/InventoryCoverageTableTest.php` and keep the existing page-load coverage in `/Users/ahmeddarrazi/Documents/projects/TenantAtlas/tests/Feature/Filament/InventoryPagesTest.php`.
|
|
|
|
## Verification
|
|
|
|
### Automated
|
|
|
|
```bash
|
|
vendor/bin/sail up -d
|
|
vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryCoverageTableTest.php
|
|
vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryPagesTest.php
|
|
vendor/bin/sail bin pint --dirty --format agent
|
|
```
|
|
|
|
### Manual
|
|
|
|
1. Open the tenant-scoped Inventory Coverage page.
|
|
2. Search for a known policy type and verify non-matching rows disappear.
|
|
3. Apply a category filter and confirm the dataset narrows correctly.
|
|
4. If restore metadata exists, apply a restore filter and confirm it narrows correctly.
|
|
5. Load or simulate a dataset without restore metadata and verify that no restore filter is exposed.
|
|
6. Toggle dark mode and verify text, badges, filters, and empty states remain readable.
|
|
7. Compare badge labels, colors, and icons against the previous page semantics.
|
|
|
|
## Rollback
|
|
|
|
- Revert the page class, Blade view, and test changes for this feature.
|
|
- No database rollback or cache invalidation is required because the feature is read-only and runtime-derived. |