From 24266146d8e87beb30eb4d78249c4eb0ad651037 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Wed, 5 Aug 2026 10:16:21 -0400 Subject: [PATCH] Show the model's type only when it differs from the asset's own Adding a "Model type" row next to "Type" put two rows in the Hardware section that read identically. They come from different tables - modeltypes is the catalog-wide list spanning every kind of asset, machinetypes is machine-only - but the names line up in practice: all 262 machines in the development database match exactly, which is the same fact that makes the type backfill safe. So the row now appears only when the two disagree, which is the case worth seeing: a model catalogued as one thing fitted to an asset recorded as another. When they agree it says nothing and is hidden. Applied to machines, PCs, printers and network devices, each compared against its own type table. --- plugins/computers/frontend/views/PCDetail.vue | 10 +++++++--- plugins/machines/frontend/views/MachineDetail.vue | 10 +++++++--- plugins/network/frontend/views/NetworkDeviceDetail.vue | 7 ++++--- plugins/printers/frontend/views/PrinterDetail.vue | 7 ++++--- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/plugins/computers/frontend/views/PCDetail.vue b/plugins/computers/frontend/views/PCDetail.vue index 64d7e65..6970377 100644 --- a/plugins/computers/frontend/views/PCDetail.vue +++ b/plugins/computers/frontend/views/PCDetail.vue @@ -105,9 +105,13 @@ Model {{ computer.computer?.modelname || '-' }} - -
+ +
Model type {{ computer.computer.modeltypename }}
diff --git a/plugins/machines/frontend/views/MachineDetail.vue b/plugins/machines/frontend/views/MachineDetail.vue index 945834f..27cce65 100644 --- a/plugins/machines/frontend/views/MachineDetail.vue +++ b/plugins/machines/frontend/views/MachineDetail.vue @@ -124,9 +124,13 @@ Model {{ machine.machine?.modelname || '-' }}
- -
+ +
Model type {{ machine.machine.modeltypename }}
diff --git a/plugins/network/frontend/views/NetworkDeviceDetail.vue b/plugins/network/frontend/views/NetworkDeviceDetail.vue index c7a56c7..3e984f1 100644 --- a/plugins/network/frontend/views/NetworkDeviceDetail.vue +++ b/plugins/network/frontend/views/NetworkDeviceDetail.vue @@ -98,9 +98,10 @@ Model {{ device.networkdevice.modelname }}
- -
+ +
Model type {{ device.networkdevice.modeltypename }}
diff --git a/plugins/printers/frontend/views/PrinterDetail.vue b/plugins/printers/frontend/views/PrinterDetail.vue index 7fbe610..b5c4229 100644 --- a/plugins/printers/frontend/views/PrinterDetail.vue +++ b/plugins/printers/frontend/views/PrinterDetail.vue @@ -49,9 +49,10 @@ Model {{ printer.printer.modelname }}
- -
+ +
Model type {{ printer.printer.modeltypename }}