Skip to content

Commit

Permalink
Correction to call to edit inprogress contact action
Browse files Browse the repository at this point in the history
  • Loading branch information
mythilytm committed Oct 16, 2024
1 parent 6c2fe15 commit 83dd5b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hrm-domain/hrm-core/contact/canPerformContactAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ export const canPerformEditContactAction = canPerformActionOnContact(
checkFinalizedContactEditsOnlyChangeForm,
);

export const canPerformEditInProgressContactAction = canPerformActionOnContact(
actionsMaps.contact.EDIT_INPROGRESS_CONTACT,
checkFinalizedContactEditsOnlyChangeForm,
);

export const canPerformViewContactAction = canPerformActionOnContact(
actionsMaps.contact.VIEW_CONTACT,
);
Expand Down
2 changes: 2 additions & 0 deletions hrm-domain/hrm-core/contact/contactRoutesV0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
canChangeContactConnection,
canDisconnectContact,
canPerformEditContactAction,
canPerformEditInProgressContactAction,
canPerformViewContactAction,
} from './canPerformContactAction';

Expand Down Expand Up @@ -173,6 +174,7 @@ contactsRouter.patch(
'/:contactId',
validatePatchPayload,
canPerformEditContactAction,
canPerformEditInProgressContactAction,
async (req, res) => {
const { hrmAccountId, user } = req;
const { contactId } = req.params;
Expand Down

0 comments on commit 83dd5b1

Please sign in to comment.