feat(record): REOPEN operation — вернуть закрытую запись

This commit is contained in:
Александр Зимин
2026-06-22 09:18:50 +00:00
parent 8dff458b83
commit 444c004e3c
10 changed files with 151 additions and 5 deletions
@@ -1719,6 +1719,26 @@ function DictionaryDetail() {
},
})
} : undefined}
// Reopen: submit REOPEN draft. Same approval gate как CLOSE — пройдёт
// через DRAFT_SUBMIT → DRAFT_APPROVE. Admin self-approve работает
// если admin role есть. Backend применит applyApprovedReopen и
// создаст новую active версию с данными последней closed-версии.
onReopen={canMutate ? () => {
if (!historyKey) return
const confirmed = window.confirm(
t('history.reopenConfirm', { defaultValue: 'Открыть запись заново? Будет создан REOPEN-draft, требуется approve.' }) as string
)
if (!confirmed) return
submitDraftMut.mutate({
businessKey: historyKey,
operation: 'REOPEN',
comment: null,
}, {
onSuccess: () => {
setHistoryKey(undefined)
},
})
} : undefined}
/>
<CascadeConfirmDialog