diff --git a/app/models/schema-response-action.ts b/app/models/schema-response-action.ts index d4834aad4c5..e586e2811dc 100644 --- a/app/models/schema-response-action.ts +++ b/app/models/schema-response-action.ts @@ -8,7 +8,7 @@ import OsfModel from './osf-model'; export enum SchemaResponseActionTrigger { SubmitRevision = 'submit', - AdminApproveRevision = 'admin_approve', + AdminApproveRevision = 'approve', AdminRejectRevision = 'admin_reject', AcceptRevision = 'accept', RejectRevision = 'moderator_reject', @@ -16,7 +16,7 @@ export enum SchemaResponseActionTrigger { const TriggerToPastTenseTranslationKey: Record = { submit: 'registries.schemaResponseActions.triggerPastTense.submit', - admin_approve: 'registries.schemaResponseActions.triggerPastTense.admin_approve', + approve: 'registries.schemaResponseActions.triggerPastTense.approve', admin_reject: 'registries.schemaResponseActions.triggerPastTense.admin_reject', accept: 'registries.schemaResponseActions.triggerPastTense.accept', moderator_reject: 'registries.schemaResponseActions.triggerPastTense.moderator_reject', diff --git a/lib/registries/addon/edit-revision/-components/submit-and-decide/component.ts b/lib/registries/addon/edit-revision/-components/submit-and-decide/component.ts index ee518ac6c72..f4226c4352f 100644 --- a/lib/registries/addon/edit-revision/-components/submit-and-decide/component.ts +++ b/lib/registries/addon/edit-revision/-components/submit-and-decide/component.ts @@ -53,7 +53,7 @@ export default class SubmitAndDecide extends Component { try { const schemaResponseAction = this.store.createRecord('schema-response-action', { actionTrigger, - comment, + comment: comment ? comment : undefined, target: this.revisionManager.revision, }); await schemaResponseAction.save(); diff --git a/lib/registries/addon/edit-revision/-components/submit-and-decide/template.hbs b/lib/registries/addon/edit-revision/-components/submit-and-decide/template.hbs index 09d0f95b6ad..7541af7a3ea 100644 --- a/lib/registries/addon/edit-revision/-components/submit-and-decide/template.hbs +++ b/lib/registries/addon/edit-revision/-components/submit-and-decide/template.hbs @@ -36,7 +36,7 @@ data-analytics-name='Admin approve revision' local-class='registerButton {{if @showMobileView 'mobileReviewButtonItem'}}' @type='success' - @onClick={{perform this.submitAction 'admin_approve' ''}} + @onClick={{perform this.submitAction 'approve' ''}} > {{t 'registries.edit_revision.review.accept_changes'}} diff --git a/translations/en-us.yml b/translations/en-us.yml index 9d9188265f6..e357914e971 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -1494,7 +1494,7 @@ registries: schemaResponseActions: triggerPastTense: submit: 'submitted' - admin_approve: 'approved' + approve: 'approved' admin_reject: 'requested further edits' accept: 'accepted' moderator_reject: 'rejected'