fix(cms): robust prompt copy and a readable legal approval rule (MITHOME-113)
Found during the live check on a staging copy: the embedded browser denied the async Clipboard API, so "copy prompt" failed silently. The panel now falls back to a selection copy and finally leaves the prompt selected with a Ctrl/Cmd+C hint; covered by component tests. Payload only shows a generic "field is invalid" toast for the rejected approval, so the legal pages' status field description now states the two-model rule next to the field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bff08edafe
commit
98ac9859c7
@@ -15,9 +15,11 @@ const LABELS: Record<EnTranslationStatus, string> = {
|
||||
*
|
||||
* WHY not localized: only English has a translation status — a localized
|
||||
* field would show a meaningless value in the Hungarian (source) view.
|
||||
* `validate` lets LegalPages add its multi-model validation rule.
|
||||
* `validate` + `extraDescription` let LegalPages add (and explain) its
|
||||
* multi-model validation rule — Payload only shows a generic "field is
|
||||
* invalid" toast, so the rule must be readable next to the field.
|
||||
*/
|
||||
export function translationStatusField(validate?: SelectFieldSingleValidation): SelectField {
|
||||
export function translationStatusField(validate?: SelectFieldSingleValidation, extraDescription = ''): SelectField {
|
||||
return {
|
||||
name: 'enTranslationStatus',
|
||||
label: 'Angol fordítás állapota',
|
||||
@@ -29,7 +31,8 @@ export function translationStatusField(validate?: SelectFieldSingleValidation):
|
||||
position: 'sidebar',
|
||||
description:
|
||||
'Az angol oldal csak „Jóváhagyva” állapotban jelenik meg; addig a látogatók a magyar szöveget látják. ' +
|
||||
'Az AI-draft gépi fordítás: jóváhagyás előtt ellenőrizni és szükség szerint javítani kell.',
|
||||
'Az AI-draft gépi fordítás: jóváhagyás előtt ellenőrizni és szükség szerint javítani kell.' +
|
||||
extraDescription,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user