diff --git a/src/components/admin/devices/admin-devices-overview.tsx b/src/components/admin/devices/admin-devices-overview.tsx index 57c858f..65435bf 100644 --- a/src/components/admin/devices/admin-devices-overview.tsx +++ b/src/components/admin/devices/admin-devices-overview.tsx @@ -6013,7 +6013,14 @@ export function DeviceDetails({ device }: DeviceDetailsProps) { Campos personalizados — {device.displayName ?? device.hostname ?? "Dispositivo"} - Adicione e ajuste informações complementares deste dispositivo. + + Adicione e ajuste informações complementares deste dispositivo. + {device.deviceType && device.deviceType !== "all" && ( + + Exibindo campos para {device.deviceType === "mobile" ? "celulares" : device.deviceType === "desktop" ? "desktops" : device.deviceType}. + + )} +
@@ -6080,7 +6087,10 @@ export function DeviceDetails({ device }: DeviceDetailsProps) { ) : null} {editableFields.length === 0 ? ( -
Nenhum campo disponível para este tipo de dispositivo.
+
+

Nenhum campo disponível para {device.deviceType === "mobile" ? "celulares" : device.deviceType === "desktop" ? "desktops" : "este tipo de dispositivo"}.

+

Clique em "Novo campo" para criar um campo específico para este dispositivo.

+
) : (
{editableFields.map((field) => { @@ -6090,9 +6100,23 @@ export function DeviceDetails({ device }: DeviceDetailsProps) {
{field.type === "text" ? ( - setValue(e.target.value)} /> +
+ setValue(e.target.value)} className="flex-1" /> + {value && ( + + )} +
) : field.type === "number" ? ( - setValue(e.target.value === "" ? null : Number(e.target.value))} /> +
+ setValue(e.target.value === "" ? null : Number(e.target.value))} className="flex-1" /> + {value != null && ( + + )} +
) : field.type === "date" ? ( handleSearch("")} className="size-10 shrink-0" - title="Limpar pesquisa" > @@ -166,7 +165,7 @@ export function DeviceSoftwareList({ machineId }: DeviceSoftwareListProps) {
- Mostrando {result.items.length} de {result.total} softwares + Mostrando {pageIndex * 30 + 1}-{Math.min((pageIndex + 1) * 30, result.total)} de {result.total} softwares