feat(cms): record hand-run legal translation reviews in the CMS (MITHOME-113)
Validation of legal translations is a manual flow (user decision): copy the prompt, run it in any vendor's model, paste the answer back. The legal validation block now holds the prompt panel and a list of reviews (model, date, verdict, pasted answer, notes) instead of a model list and report link. Approval needs two distinct models whose latest complete review does not reject; a newer review supersedes a model's rejection. The locale path collector now looks through row/collapsible wrappers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
acd1ff2ed9
commit
bff08edafe
@@ -0,0 +1,57 @@
|
||||
import type { GroupField } from 'payload'
|
||||
|
||||
import { REVIEW_VERDICTS, type ReviewVerdict } from '../../lib/legal-validation'
|
||||
|
||||
const VERDICT_LABELS: Record<ReviewVerdict, string> = {
|
||||
approve: 'Jóváhagyható',
|
||||
'approve-with-changes': 'Javításokkal jóváhagyható',
|
||||
reject: 'Elutasítva',
|
||||
}
|
||||
|
||||
/**
|
||||
* MITHOME-113 (design D7/D8): legal translation validation block — the
|
||||
* copyable prompt panel, then one row per model review with the pasted
|
||||
* answer. Shared across locales: it is metadata about the English text.
|
||||
*/
|
||||
export const legalValidationGroup: GroupField = {
|
||||
name: 'legalValidation',
|
||||
label: 'Jogi validáció (angol fordítás)',
|
||||
type: 'group',
|
||||
admin: {
|
||||
description:
|
||||
'1. Másold ki a promptot, és futtasd le egy magas szintű modellben. 2. A választ rögzítsd új validálásként. ' +
|
||||
'Jóváhagyáshoz legalább két különböző modell el nem utasító validálása kell (modellenként a legutóbbi számít). ' +
|
||||
'A modell-validáció nem helyettesíti a jogi szakvéleményt.',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'validationPrompt',
|
||||
type: 'ui',
|
||||
admin: { components: { Field: './src/components/admin/LegalValidationPrompt#LegalValidationPrompt' } },
|
||||
},
|
||||
{
|
||||
name: 'reviews',
|
||||
label: 'Validálások',
|
||||
labels: { singular: 'Validálás', plural: 'Validálások' },
|
||||
type: 'array',
|
||||
fields: [
|
||||
{
|
||||
type: 'row',
|
||||
fields: [
|
||||
{ name: 'model', label: 'Modell (pl. Claude Opus 5.5, GPT-5, Gemini)', type: 'text', required: true },
|
||||
{ name: 'reviewedAt', label: 'Dátum', type: 'date', required: true },
|
||||
{
|
||||
name: 'verdict',
|
||||
label: 'Ítélet',
|
||||
type: 'select',
|
||||
required: true,
|
||||
options: REVIEW_VERDICTS.map((value) => ({ label: VERDICT_LABELS[value], value })),
|
||||
},
|
||||
],
|
||||
},
|
||||
{ name: 'result', label: 'A modell válasza (beillesztve)', type: 'textarea', required: true },
|
||||
{ name: 'notes', label: 'Megjegyzés, meghozott döntések', type: 'textarea' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user