From fb63ef9d305dae5feeda1f1e4f1bf5c28bcc374a Mon Sep 17 00:00:00 2001 From: cproudlock Date: Thu, 3 Sep 2026 15:33:21 -0400 Subject: [PATCH] Make a retired asset findable and restorable from the product The retire dialog says "History and relationships are kept, and it can be restored." The API always kept that promise - ?active=false lists retired rows, PUT {"isactive": true} restores one - and no screen in the product could reach either. A retired asset simply vanished: the lists filtered it out, global search missed it, and its detail page still rendered Edit and Retire with nothing anywhere saying it was retired. Five list pages gained a "Show retired" toggle that passes active=false, and a retired row now carries a badge. Five detail pages gained a banner saying the record is retired and what that means, a Restore button, and the suppression of Edit and Retire while it is retired - offering Retire on an already-retired record was the part that made the state invisible. Verified end to end in a browser: retire a machine, the detail page says so and offers Restore, the list hides it until the toggle is ticked and badges it when shown, and Restore puts it back (isactive true again on the API). One thing this does NOT do: global search still does not reach a retired asset. That is a separate surface with its own filter, and worth deciding on deliberately rather than sliding in here - a search that returns retired records by default would change every result page. Scope: product --- plugins/computers/frontend/views/PCDetail.vue | 31 ++++++++++++++- plugins/computers/frontend/views/PCsList.vue | 12 +++++- .../machines/frontend/views/MachineDetail.vue | 38 +++++++++++++++++-- .../machines/frontend/views/MachinesList.vue | 12 ++++++ .../frontend/views/MeasuringToolDetail.vue | 33 +++++++++++++++- .../frontend/views/MeasuringToolsList.vue | 12 +++++- .../frontend/views/NetworkDevicesList.vue | 12 +++++- .../printers/frontend/views/PrinterDetail.vue | 33 +++++++++++++++- .../printers/frontend/views/PrintersList.vue | 12 +++++- 9 files changed, 182 insertions(+), 13 deletions(-) diff --git a/plugins/computers/frontend/views/PCDetail.vue b/plugins/computers/frontend/views/PCDetail.vue index af6986d2..6af38998 100644 --- a/plugins/computers/frontend/views/PCDetail.vue +++ b/plugins/computers/frontend/views/PCDetail.vue @@ -10,11 +10,21 @@
Print Label Edit - + + + {{ returnLabel }}
+
+ This PC is retired. + It stays out of every list and report, and its history and relationships + are intact. Restore puts it back. +
+
Loading...