import { useTechnicalIncidentHandling, type HandlingProps, type Command, } from '@/lib/technical-incident-handling'; import { button, control } from '@/pages/management/shared'; import { handlingLabels, commandLabels } from '@/lib/technical-incident-labels'; export default function TechnicalIncidentHandling(props: HandlingProps) { const edit = useTechnicalIncidentHandling(props), state = props.incident.handling; const actions: Command[] = state.status === 'resolved' ? ['note', 'reopen'] : [ 'claim', 'note', 'resolve', ...(state.status === 'in_progress' ? ['release' as const] : []), ]; return (

Tratar incidente técnico

O tratamento é partilhado pela equipa autorizada neste âmbito. Assumir um tratamento em curso substitui o responsável e conserva o histórico.

Resolver este incidente não submete, publica ou aprova a oportunidade.

{edit.notice &&

{edit.notice}

} {edit.error &&

{edit.error}

} {edit.stale && (

O incidente mudou. Compare antes de confirmar o estado actual.

Analisado: {handlingLabels[edit.base.status]} · responsável {edit.base.assignee_name || 'por assumir'} · versão {edit.base.version}

Actual: {handlingLabels[state.status]} · responsável{' '} {state.assignee_name || 'por assumir'} · versão{' '} {state.version}

)}