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 @@
+
+ This PC is retired.
+ It stays out of every list and report, and its history and relationships
+ are intact. Restore puts it back.
+
+
Loading...
@@ -644,6 +654,21 @@ async function confirmRestart() {
// Retire, not delete: the server deactivates the asset, so the PC
// leaves every list and report while its history and relationships stay put.
// Reversible by an admin setting isactive back to true.
+const isRetired = computed(() => computer.value?.isactive === false)
+
+async function restore() {
+ const label = computer.value?.assetnumber || computer.value?.name || 'this PC'
+ try {
+ await computersApi.update(route.params.id, { isactive: true })
+ toast.success(`Restored ${label}`)
+ const response = await computersApi.get(route.params.id)
+ computer.value = response.data.data
+ } catch (error) {
+ console.error('Error restoring:', error)
+ toast.error(apiError(error, 'Failed to restore'))
+ }
+}
+
async function confirmRetire() {
const label = computer.value?.assetnumber || computer.value?.name || 'this PC'
if (!confirm(`Retire ${label}?\n\nIt will no longer appear in ShopDB. `
@@ -660,6 +685,10 @@ async function confirmRetire() {