Skip to main content

Mandatory consultation (CT/Sindicato) before dismissal

The BODIES_OPINION phase models the Portuguese requirement to consult the works council (Comissão de Trabalhadores) / union (Sindicato) before dismissing certain protected employees. It is encoded as conditional on two case flags:

// getFilteredTransitions, EVIDENCE_PHASE branch
const bodiesRequired = flags.dismissal_intent && flags.employee_rep_or_union_related;
  • If both flags are true, the workflow routes EVIDENCE_PHASE → BODIES_OPINION (and FINAL_REPORT is removed as a direct option).
  • Otherwise it routes EVIDENCE_PHASE → FINAL_REPORT directly, skipping consultation.

Inside the phase, useWorkflow enforces a 5-working-day wait: to advance BODIES_OPINION → FINAL_REPORT the case must have a case_phase_deliverables row with metadata.kind = 'bodies_opinion_request' (proof the draft decision was sent to the CT/Sindicato), and either a bodies_opinion_response or the 5 working days elapsed from request.metadata.sent_at. Overridable via metadata.bodies_opinion_override.

The checklist for the phase also branches: if applicable, the full 5-item checklist; if not, a single "Confirmar dispensa da consulta a CT/Sindicato (não aplicável)" item.

Supporting schema: companies.union_notification_email, cases.dismissal_intent, cases.employee_rep_or_union_related.

What to verify / the danger

  • The rule reduces a legal obligation to a two-boolean AND. If either flag is mis-set at intake (there's no validation that they're consistent), a legally required consultation is silently skipped and the dismissal is procedurally defective.
  • The 5-working-day figure and the "both flags" trigger condition are uncited — confirm the exact statutory basis and which employees actually trigger it (union reps? works-council members? any employee where a rep is involved?).
  • The 5-day calc is holiday-blind (naive deadline math) and the whole guard is client-side only.

Rebuild implication

Derive the consultation requirement from properly-modelled employee/case facts (not two free booleans), enforce it server-side, cite the statute, and test both the required-and-skipped and required-and-honoured paths.