From 26b1a65ec4ec4f82acf030fc6fff32c9da034e81 Mon Sep 17 00:00:00 2001 From: rever-tecnologia Date: Thu, 18 Dec 2025 11:48:12 -0300 Subject: [PATCH] refactor(devices): substitui badge arquitetura por status ativacao Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove identificador machine-xxx do header dos cards - Substitui badge de arquitetura (X86_64) por status de ativacao do Windows - Remove badge redundante de tipo de dispositivo - Ajusta altura da badge na sidebar para nao cortar texto 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../admin/devices/admin-devices-overview.tsx | 40 ++++++++++--------- src/components/sidebar-brand.tsx | 4 +- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/components/admin/devices/admin-devices-overview.tsx b/src/components/admin/devices/admin-devices-overview.tsx index 2502a11..44ffb54 100644 --- a/src/components/admin/devices/admin-devices-overview.tsx +++ b/src/components/admin/devices/admin-devices-overview.tsx @@ -6364,6 +6364,13 @@ function DeviceCard({ device, companyName }: { device: DevicesQueryItem; company })() const persona = collaborator?.role === "manager" ? "Gestor" : "Colaborador" const companyLabel = companyName ?? device.companySlug ?? null + const windowsActivationStatus = (() => { + const inv = device.inventory as DeviceInventory | null + const windowsExt = inv?.extended?.windows + const osInfo = parseWindowsOsInfo(windowsExt?.osInfo) + if (!osInfo) return null + return osInfo.isActivated ?? (typeof osInfo.licenseStatus === "number" ? osInfo.licenseStatus === 1 : null) + })() return ( @@ -6396,14 +6403,6 @@ function DeviceCard({ device, companyName }: { device: DevicesQueryItem; company {device.devicePlatform} ) : null} - {device.authEmail ? ( - <> - • - - {device.authEmail} - - - ) : null} {collaborator?.email ? (
@@ -6445,22 +6444,27 @@ function DeviceCard({ device, companyName }: { device: DevicesQueryItem; company return [name, ver].filter(Boolean).join(" ").trim() })()} - {device.architecture ? ( - - {device.architecture.toUpperCase()} + {windowsActivationStatus !== null ? ( + + {windowsActivationStatus ? "Ativado" : "Não ativado"} ) : null}
-
- - {deviceTypeLabel} - - {companyLabel ? ( + {companyLabel ? ( +
{companyLabel} - ) : null} -
+
+ ) : null}
diff --git a/src/components/sidebar-brand.tsx b/src/components/sidebar-brand.tsx index 1c0ccf4..48f8809 100644 --- a/src/components/sidebar-brand.tsx +++ b/src/components/sidebar-brand.tsx @@ -22,7 +22,7 @@ export function SidebarBrand({ logoSrc, logoAlt, title, subtitle }: SidebarBrand
@@ -37,7 +37,7 @@ export function SidebarBrand({ logoSrc, logoAlt, title, subtitle }: SidebarBrand
{title} - + {subtitle}