From 6f70575142010adec7f842d24ce7a44c348d5197 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Fri, 26 Jun 2026 12:25:32 -0400 Subject: [PATCH] Revert "PCs: identify by hostname/serial, drop the PC Number field" This reverts commit 76ca95cc57c96cce9c0064380f402a26a0e86941. --- frontend/src/views/pcs/PCDetail.vue | 2 +- frontend/src/views/pcs/PCForm.vue | 36 ++++++++++++++++++----------- frontend/src/views/pcs/PCsList.vue | 4 +++- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/frontend/src/views/pcs/PCDetail.vue b/frontend/src/views/pcs/PCDetail.vue index eeb3c00..b6aca38 100644 --- a/frontend/src/views/pcs/PCDetail.vue +++ b/frontend/src/views/pcs/PCDetail.vue @@ -15,7 +15,7 @@
-

{{ computer.computer?.hostname || computer.serialnumber || computer.assetnumber }}

+

{{ computer.assetnumber }}

{{ computer.computer.hostname }}
diff --git a/frontend/src/views/pcs/PCForm.vue b/frontend/src/views/pcs/PCForm.vue index 9b38f75..93debf1 100644 --- a/frontend/src/views/pcs/PCForm.vue +++ b/frontend/src/views/pcs/PCForm.vue @@ -10,22 +10,21 @@
- + - Primary identifier for the PC
- + @@ -33,11 +32,21 @@
-
- +
+ +
+ +
+ + @@ -393,10 +402,9 @@ async function savePC() { try { // One payload for the computers plugin (asset core + computer extension + - // primary IP). PCs are identified by hostname (fall back to serial), which - // also seeds the required unique assetnumber. + // primary IP). "PC Number" is the business identifier (assetnumber). const payload = { - assetnumber: form.value.hostname || form.value.serialnumber, + assetnumber: form.value.machinenumber, hostname: form.value.hostname || null, serialnumber: form.value.serialnumber || null, computertypeid: form.value.machinetypeid || null, diff --git a/frontend/src/views/pcs/PCsList.vue b/frontend/src/views/pcs/PCsList.vue index d2f96e7..090759f 100644 --- a/frontend/src/views/pcs/PCsList.vue +++ b/frontend/src/views/pcs/PCsList.vue @@ -24,6 +24,7 @@ + @@ -35,6 +36,7 @@ + @@ -59,7 +61,7 @@ -
Asset Tag Hostname Serial Number Type
{{ item.assetnumber }} {{ item.computer?.hostname || '-' }} {{ item.serialnumber || '-' }} {{ item.computer?.computertypename || '-' }}
+ No computers found