Warranty polish: hero badges everywhere, search/pagination, re-check, shared apiError
- Shared utils/apiError.js reads the correct nested error message (with fallbacks); swept 37 views/components off the shallow path so real backend messages (e.g. in-use 409s) surface instead of generic "Failed". - useWarrantyBadge composable: warranty hero status/end-date badge now on PC, equipment, printer, and network detail heroes (one shared fetch feeds the badge + the WarrantyPanel). - Warranties list: client-side search (vendor/level/tag/asset) + pagination; truncate long service levels so they stop blowing out the table width. - "Re-check all" button + POST /warranty/sync/dell?all=true to re-pull dated Dell warranties, not just missing ones. - Deprecate the standalone pxe-images/warranty_sync.py in favor of the plugin. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -225,13 +225,16 @@ def sync_dell():
|
||||
and non-Dell serials are filtered out by Dell (they return no coverage).
|
||||
"""
|
||||
provider = get_provider('dell')
|
||||
# ?all=true re-checks assets that already have a dated warranty too.
|
||||
recheck_all = request.args.get('all', 'false').lower() == 'true'
|
||||
|
||||
# Assets already covered by a dated warranty - skip these.
|
||||
# Assets already covered by a dated warranty - skipped unless recheck_all.
|
||||
covered = set()
|
||||
for link in WarrantyAsset.query.all():
|
||||
w = Warranty.query.get(link.warrantyid)
|
||||
if w and w.isactive and w.enddate:
|
||||
covered.add(link.assetid)
|
||||
if not recheck_all:
|
||||
for link in WarrantyAsset.query.all():
|
||||
w = Warranty.query.get(link.warrantyid)
|
||||
if w and w.isactive and w.enddate:
|
||||
covered.add(link.assetid)
|
||||
|
||||
# Candidate assets: active, have a serial, not already covered.
|
||||
candidates = (Asset.query
|
||||
|
||||
Reference in New Issue
Block a user