From 640b8de1b2a87278d8ab37c04901d460d6a061bf Mon Sep 17 00:00:00 2001 From: cproudlock Date: Thu, 9 Jul 2026 17:08:42 -0400 Subject: [PATCH] Bulk Dell warranty sync + add-warranty from asset pages - POST /warranty/sync/dell: auto-detect Dell hardware by service tag (asset serial) and create warranties for the ones Dell recognizes, in batches of 100. Only looks up assets that lack a dated warranty, so re-runs are cheap and non-Dell serials are filtered out by Dell. DellProvider.bulk_lookup batches tags over the cached token. - "Sync Dell" button on the Warranties page with a toast summary. - WarrantyPanel "Add one / Add-manage" links deep-link to the warranties add modal pre-linked to that asset (?addfor=); WarrantiesList opens it prefilled. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/api/index.js | 3 + frontend/src/components/WarrantyPanel.vue | 4 +- .../src/views/warranty/WarrantiesList.vue | 41 ++++++++- plugins/warranty/api/routes.py | 89 +++++++++++++++++++ plugins/warranty/services/providers.py | 28 ++++++ 5 files changed, 161 insertions(+), 4 deletions(-) diff --git a/frontend/src/api/index.js b/frontend/src/api/index.js index ce36406..4d05410 100644 --- a/frontend/src/api/index.js +++ b/frontend/src/api/index.js @@ -970,6 +970,9 @@ export const warrantyApi = { refresh(id) { return api.post(`/warranty/${id}/refresh`) }, + syncDell() { + return api.post('/warranty/sync/dell') + }, report() { return api.get('/warranty/report') } diff --git a/frontend/src/components/WarrantyPanel.vue b/frontend/src/components/WarrantyPanel.vue index be152b7..f546404 100644 --- a/frontend/src/components/WarrantyPanel.vue +++ b/frontend/src/components/WarrantyPanel.vue @@ -14,12 +14,12 @@ Tag {{ w.servicetag }} - Manage warranties + Add / manage
No warranty on record. - Add one + Add one
diff --git a/frontend/src/views/warranty/WarrantiesList.vue b/frontend/src/views/warranty/WarrantiesList.vue index faccf36..f6d3e69 100644 --- a/frontend/src/views/warranty/WarrantiesList.vue +++ b/frontend/src/views/warranty/WarrantiesList.vue @@ -2,7 +2,12 @@
@@ -137,14 +142,17 @@