Skip to main content

7 — Pareceres / Intervenções obrigatórias (BODIES_OPINION)

Source: src/components/workflow/BodiesOpinionPhaseView.tsx.

The odd one out. No Informação base necessária block, no deliverables block, no field drawer — just three numbered steps and two Alert banners. It is also the only phase whose very applicability is computed rather than fixed.

Applicability

ConditionWhat the view renders
dismissal_intent && employee_rep_or_union_related"Consulta obrigatória CT/Sindicato — Trabalhador com proteção especial. O projeto de decisão deve ser enviado à Comissão de Trabalhadores e/ou Sindicato, dispondo estes de 5 dias úteis para emitir parecer." Then the three steps below.
otherwise"Fase não obrigatória" + a single Avançar para Relatório Final button

When it is not applicable, useWorkflow also replaces the whole seeded checklist with one item: "Confirmar dispensa da consulta a CT/Sindicato (não aplicável)". See bodies opinion mandatory.

Step 1 — Envio do projeto de decisão

InputControlNotes
Email destinatáriotextPlaceholder and default come from companies.union_notification_email
Notas (opcional)textarea, 2 rows"Referência do envio, anexos, observações…"
Registar envioactionInserts a case_phase_deliverables row with metadata.recipient_email

Nothing is actually sent. The step records that a human sent something, somewhere, to that address — the email itself is out of band. Badge flips Por enviarEnviado.

Step 2 — Prazo de 5 dias úteis

No inputs. A countdown from the recorded send timestamp.

The five working days are counted in the browser by stepping the date forward and skipping Saturdays and Sundays — no Portuguese public holidays, and the anchor is the click time of Registar envio, not a legal service date. See naive deadline math and legal time vs click time.

Step 3 — Registo do parecer

InputControl
Anexar parecer (opcional)file upload → case-attachments bucket
Resumo / Observaçõestextarea
Registar pareceraction → second case_phase_deliverables row

Gate

Advances to FINAL_REPORT when either the parecer is registered or the five working days have elapsed — the transition guard in useWorkflow throws "Aguarde o parecer da CT/Sindicato ou a expiração do prazo de 5 dias úteis." until then.

Like every other guard in the PoC, that check runs in the browser: the phase can be skipped with a direct API call. See client-side integrity.