refactor(approval-ux): eng-review fixes — extract helpers, add tests, register i18n

This commit is contained in:
Александр Зимин
2026-05-14 13:52:12 +00:00
parent 31ad140a02
commit 4c29f4e7cb
8 changed files with 365 additions and 109 deletions
+10 -4
View File
@@ -128,6 +128,9 @@ i18n
'reviews.drawer.commentPlaceholder': 'Для approve опционально, для reject обязательно',
'schema.approvalRequired.label': 'Требовать approval (maker-checker)',
'schema.approvalRequired.hint': 'Approval Workflow v2. Все CRUD операции пойдут через draft → review → approve. Защита от operator error на критичных справочниках. Существующие маршруты (POST/PUT/DELETE) вернут 409 draft_required с pointer на /drafts API.',
'schema.approvalRequired.editorBlockTitle': 'Изменения требуют ревью',
'schema.approvalRequired.editorBlock': 'Этот словарь требует maker-checker review. Откройте черновик — ваши текущие изменения будут предзаполнены, вам нужно только указать причину и отправить на согласование.',
'schema.approvalRequired.openDraftCta': 'Создать черновик с моими изменениями',
'schema.approvalMinRole.label': 'Минимальная роль ревьюера (опционально)',
'schema.approvalMinRole.hint': 'Например ordinis:internal или ordinis:restricted. Если задано — backend требует чтобы ревьюер имел эту роль (поверх стандартных ordinis:record:reviewer / ordinis:schema:reviewer) для approve / reject / publish. Пусто = достаточно стандартной reviewer role. ordinis:admin проходит всегда.',
'search.title': 'Smart search',
@@ -577,8 +580,8 @@ i18n
// === Schema review queue panel ===
'reviews.tab.records': 'Записи',
'reviews.tab.schemas': 'Схемы',
'reviews.schema.empty': 'Нет схем на ревью',
'reviews.schema.emptyDescription': 'Когда maker отправит schema draft на ревью, он появится здесь.',
'reviews.schema.empty': 'Очередь пуста',
'reviews.schema.emptyDescription': 'Схемы на ревью появятся здесь.',
'reviews.schema.title': 'Изменения схем',
'reviews.schema.label': 'Schema workflow',
'reviews.schema.queueTotal_one': '{{count}} draft ждёт ревью',
@@ -843,6 +846,9 @@ i18n
'reviews.drawer.commentPlaceholder': 'Optional for approve, required for reject',
'schema.approvalRequired.label': 'Require approval (maker-checker)',
'schema.approvalRequired.hint': 'Approval Workflow v2. All CRUD goes through draft → review → approve. Protects critical dictionaries from operator error. Existing endpoints (POST/PUT/DELETE) return 409 draft_required pointing to /drafts API.',
'schema.approvalRequired.editorBlockTitle': 'Changes require review',
'schema.approvalRequired.editorBlock': 'This dictionary requires maker-checker review. Open a draft — your current edits will be pre-filled, you only need to add a reason and submit for review.',
'schema.approvalRequired.openDraftCta': 'Create draft with my changes',
'schema.approvalMinRole.label': 'Minimum reviewer role (optional)',
'schema.approvalMinRole.hint': 'e.g. ordinis:internal or ordinis:restricted. When set, backend requires reviewer to hold this role (on top of standard ordinis:record:reviewer / ordinis:schema:reviewer) for approve / reject / publish. Empty = standard reviewer role suffices. ordinis:admin always passes.',
'search.title': 'Smart search',
@@ -1272,8 +1278,8 @@ i18n
// === Schema review queue panel ===
'reviews.tab.records': 'Records',
'reviews.tab.schemas': 'Schemas',
'reviews.schema.empty': 'No schemas under review',
'reviews.schema.emptyDescription': 'Once a maker submits a schema draft for review, it will appear here.',
'reviews.schema.empty': 'Queue is empty',
'reviews.schema.emptyDescription': 'Schemas under review will appear here.',
'reviews.schema.title': 'Schema changes',
'reviews.schema.label': 'Schema workflow',
'reviews.schema.queueTotal_one': '{{count}} draft awaiting review',