From 167a9514cfdb3c353c31983b439a966710d66773 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Fri, 26 Jun 2026 09:29:30 -0400 Subject: [PATCH] Move relationship types + dashboard recent off the machines blueprint - Add /api/assets/relationshiptypes (GET/POST) serving RelationshipType; point relationshipTypesApi at it instead of the legacy /api/machines blueprint. - Dashboard recent-devices widget reads assetsApi.list (asset shape) instead of machinesApi. No frontend code references machinesApi anymore. Co-Authored-By: Claude Opus 4.8 --- frontend/src/api/index.js | 4 +-- frontend/src/views/Dashboard.vue | 18 ++++++------- shopdb/core/api/assets.py | 45 ++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 11 deletions(-) diff --git a/frontend/src/api/index.js b/frontend/src/api/index.js index 5dad473..d570ce9 100644 --- a/frontend/src/api/index.js +++ b/frontend/src/api/index.js @@ -176,10 +176,10 @@ export const computersApi = { // Relationship Types API export const relationshipTypesApi = { list() { - return api.get('/machines/relationshiptypes') + return api.get('/assets/relationshiptypes') }, create(data) { - return api.post('/machines/relationshiptypes', data) + return api.post('/assets/relationshiptypes', data) } } diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index ae70c06..d0821c0 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -65,18 +65,18 @@ - - + + - - - - - + + + + +
NameCategoryAsset # TypeStatus Business Unit
{{ machine.machinenumber || machine.hostname || machine.alias || '-' }}{{ machine.category || '-' }}{{ machine.machinetype || '-' }}{{ machine.businessunit || '-' }}
{{ machine.assetnumber || machine.name || '-' }}{{ machine.assettypename || '-' }}{{ machine.statusname || '-' }}{{ machine.businessunitname || '-' }}
@@ -93,7 +93,7 @@