Skip to main content

4 — Consulta do Processo (CONSULTATION_PORTAL)

Disponibilizar ao arguido e, quando aplicável, ao seu mandatário, o acesso controlado às peças do processo para exercício do direito de defesa.

Source: src/components/workflow/ConsultaProcessoPhaseView.tsx, ConsultaProcessoAccessDrawer.tsx.

The only phase with no formal deliverable — the act being recorded is granting access, not producing a document. It is also the phase DEFAULT_CHECKLISTS forgets entirely, so the engine checklist is empty here and the UI shows "Sem checklist para a fase Consulta do Processo".

Acesso ao Portal — 4 rows, one drawer

The four rows in the UI are views over a single access-config form (ConsultaAccessConfig, stored in the deliverable metadata):

RowInputsControlConfig key
Destinatário principalNome · Emailtext · emailarguido_name · arguido_email
Mandatário / Representante legalTem mandatário (switch) → Nome do mandatário · Email do mandatário · Acesso concedido aswitch → text · email · selecthas_mandatario · mandatario_name · mandatario_email · access_granted_to
Método de autenticaçãoMagic link / OTP (código)selectauth_method
Expiração do acessoData de expiração do acessodateexpiry_date

Acesso concedido a options: Apenas arguido · Apenas mandatário · Ambos. When has_mandatario is off it is forced back to arguido on save.

Nome and Email default from cases.employee_name / employee_email.

The Mandatário row reports filled: true unconditionally — "Sem mandatário" counts as answered, which is correct as a question ("is there one?") but means the counter cannot tell an answered no from an untouched field.

Peças disponibilizadas no portal

No inputs in this phase. The block only reports how many portal_items exist and, per item, whether it is view-only or downloadable. The UI points elsewhere: "Gerir peças no separador 'Portal' deste processo." Each item there carries a type, an optional title_override and an allow_download flag.

So the phase whose entire legal purpose is controlling what the arguido may see delegates the choice of what he sees to another tab, and its own gate does not check it.

Ativar portal

One action. It inserts into process_portal_links:

WrittenFrom
invited_name · invited_emailconfig, falling back to the case's employee
invited_role"EMPLOYEE"
expires_atexpiry_date, defaulting to now + 30 days
allow_submissiontrue, always
otp_requiredauth_method === "otp"

A second link is created for the mandatário when has_mandatario and access_granted_to is mandatario or ambos.

The 30-day fallback is an invented number with no legal citation — see naive deadline math.

Prazo e estado do acesso — read-only

Data de ativação · Prazo final de consulta · Primeiro acesso · Último acesso · Estado do portal (Por ativar · Ativo · Expirado · Respondido).