feat(record): REOPEN operation — вернуть закрытую запись
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user