feat(devices,custom-fields,csat,portal):\n- Editor de campos personalizados (inclui multiselect) e exibição no detalhe\n- Campos personalizados disponíveis nas colunas/templates de exportação\n- Move cópia de e-mail para ícone inline abaixo do nome do dispositivo\n- Portal: banner para avaliar último chamado e CSAT no detalhe\n- Tickets list inclui campos de CSAT para detectar pendências
This commit is contained in:
parent
06deb99bcd
commit
c2c5707a97
7 changed files with 299 additions and 14 deletions
|
|
@ -138,6 +138,19 @@ function formatDeviceCustomFieldDisplay(
|
|||
const option = options?.find((opt) => opt.value === raw || opt.label === raw)
|
||||
return option?.label ?? raw
|
||||
}
|
||||
case "multiselect": {
|
||||
const arr = Array.isArray(value)
|
||||
? value
|
||||
: typeof value === "string"
|
||||
? value.split(",").map((s) => s.trim()).filter(Boolean)
|
||||
: []
|
||||
if (arr.length === 0) return null
|
||||
const labels = arr.map((raw) => {
|
||||
const opt = options?.find((o) => o.value === raw || o.label === raw)
|
||||
return opt?.label ?? String(raw)
|
||||
})
|
||||
return labels.join(", ")
|
||||
}
|
||||
default:
|
||||
try {
|
||||
return JSON.stringify(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue