ADR-013 Phase 3: migrate all detail pages to PluginAssetPanels; drop WarrantyPanel
Rolls the generic renderer into the remaining four detail pages (PCDetail, PrinterDetail, NetworkDeviceDetail, MeasuringToolDetail), replacing the hand-composed <WarrantyPanel> with <PluginAssetPanels>. The warranty hero badge (useWarrantyBadge) stays on the pages that show it; MeasuringToolDetail dropped its now-unused warranty composable usage. WarrantyPanel.vue is deleted - warranty now renders entirely from its get_asset_panels JSON declaration through the generic renderer. Verified live on a PC with a warranty: the card is identical to the old bespoke panel (vendor title, Expiring Soon status badge with color, servicelevel/ends/tag meta, manage link) with no warranty-specific frontend code. Build clean, 58 vitest, naming green.
This commit is contained in:
@@ -210,7 +210,7 @@
|
||||
<CustomFieldsSection :assetid="computer.assetid" />
|
||||
|
||||
<!-- Warranty -->
|
||||
<WarrantyPanel :assetid="computer.assetid" :items="warranties" />
|
||||
<PluginAssetPanels :assetid="computer.assetid" />
|
||||
|
||||
<!-- All relationships (controls, defaultprinter, ...) -->
|
||||
<AssetRelationships v-if="computer.assetid" :assetid="computer.assetid" />
|
||||
@@ -244,7 +244,7 @@ import { computersApi, applicationsApi } from '../../api'
|
||||
import { useWarrantyBadge } from '../../composables/warrantyBadge'
|
||||
import LocationMapTooltip from '../../components/LocationMapTooltip.vue'
|
||||
import CustomFieldsSection from '../../components/CustomFieldsSection.vue'
|
||||
import WarrantyPanel from '../../components/WarrantyPanel.vue'
|
||||
import PluginAssetPanels from '../../components/PluginAssetPanels.vue'
|
||||
import AssetRelationships from '../../components/AssetRelationships.vue'
|
||||
import { useIdentifierFlags } from '../../composables/identifierSettings'
|
||||
|
||||
@@ -256,7 +256,7 @@ const computer = ref(null)
|
||||
const installedApps = ref([])
|
||||
|
||||
// Warranty fetch + hero badge (shared across asset detail pages).
|
||||
const { warranties, heroWarranty, warrantyDate: formatWarrantyDate } = useWarrantyBadge(() => computer.value?.assetid)
|
||||
const { heroWarranty, warrantyDate: formatWarrantyDate } = useWarrantyBadge(() => computer.value?.assetid)
|
||||
|
||||
// relationships render via the shared AssetRelationships card
|
||||
|
||||
|
||||
Reference in New Issue
Block a user