Skip to content

Commit 3a2eccb

Browse files
authored
feat(contract-preview) - mark contract as reviewed (#778)
1 parent c705ae2 commit 3a2eccb

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

example/src/ContractorOnboarding.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ const MultiStepForm = ({
275275
className='submit-button'
276276
onClick={() => setErrors({ apiError: '', fieldErrors: [] })}
277277
/>
278+
<button
279+
className='submit-button'
280+
onClick={() => contractorOnboardingBag.markContractAsReviewed()}
281+
>
282+
Mark as reviewed
283+
</button>
278284
</div>
279285
</div>
280286
);

src/flows/ContractorOnboarding/hooks.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,12 @@ export const useContractorOnboarding = ({
11091109
}
11101110
}
11111111

1112+
const markContractAsReviewed = () => {
1113+
setFieldValues({
1114+
review_completed: true,
1115+
});
1116+
};
1117+
11121118
const handleNextStep = () => {
11131119
if (internalEmploymentId) {
11141120
refetchEmployment();
@@ -1140,6 +1146,13 @@ export const useContractorOnboarding = ({
11401146
*/
11411147
checkFieldUpdates: setFieldValues,
11421148

1149+
/**
1150+
* Function to mark the contract as reviewed
1151+
* @param values - New form values to check
1152+
* @returns {boolean}
1153+
*/
1154+
markContractAsReviewed,
1155+
11431156
/**
11441157
* Function to handle going back to the previous step
11451158
* @returns {void}

0 commit comments

Comments
 (0)