Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

aaronlee777
Copy link
Contributor

Replaces self-onboarding trigger to use the switch component instead of a checkbox. This aligns with what is implemented in contractor onboarding.

  • Swap checkbox for switch
  • Add cardRadius to theme
  • Apply cardRadius to .cardContainer
  • Add self onboarding description to translations
  • Add description translation to switch component

Previous
Screenshot 2025-09-19 at 2 02 14 PM
Screenshot 2025-09-19 at 2 02 35 PM

New
Screenshot 2025-09-19 at 2 01 30 PM
Screenshot 2025-09-19 at 2 01 38 PM

@aaronlee777 aaronlee777 requested review from Copilot and serikjensen and removed request for Copilot September 19, 2025 18:16
Copy link
Member

@serikjensen serikjensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good! question on if we want to use the Card here given how this might look with an adapter. More context below

Comment on lines 62 to 74
<Components.Card>
<SwitchField
name="selfOnboarding"
description={t('selfOnboardingDescription')}
label={t('selfOnboardingLabel')}
isDisabled={
employee?.onboarded ||
employee?.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED ||
employee?.onboardingStatus ===
EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
}
/>
</Components.Card>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronlee777 i'm wondering about using Components.Card for this. I think it might be preferable just to add one off styling to this. My thought there is that a partner using the adapter is probably wiring card up to be a more traditional card in the UI. That might have a bigger drop shadow or other design elements that might not be suited to the usage here (thinking they might even have a max width on there. Curious on your thoughts!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that the same would also need to be applied to contractor onboarding as well, correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup i'd say the same thing there!

@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 18:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Refactors employee onboarding UI to replace checkbox with switch component for self-onboarding toggle, aligning with contractor onboarding design patterns.

  • Replace checkbox with switch component for self-onboarding control
  • Add consistent card styling with new cardRadius theme property
  • Add descriptive text for self-onboarding switch component

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/i18n/en/Employee.Profile.json Adds description text for self-onboarding switch
src/contexts/ThemeProvider/theme.ts Introduces cardRadius theme property for consistent styling
src/components/Employee/Profile/Profile.tsx Wraps profile sections in Grid layout for better organization
src/components/Employee/Profile/AdminPersonalDetails.tsx Replaces checkbox with switch component and reorders form elements
src/components/Employee/Profile/AdminPersonalDetails.module.scss Defines card container styling for switch field
src/components/Contractor/Profile/ContractorProfileForm.tsx Updates contractor form to use consistent card styling
src/components/Contractor/Profile/ContractorProfileForm.module.scss Defines matching card container styling
src/components/Common/UI/Card/Card.module.scss Updates Card component to use new theme radius and adds shadow
Comments suppressed due to low confidence (1)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<SelfPersonalDetails />
<HomeAddress />
<WorkAddress />
<Grid gridTemplateColumns="1fr" gap={24} className="mb-8">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! we don't have utility classes so this can be removed

Suggested change
<Grid gridTemplateColumns="1fr" gap={24} className="mb-8">
<Grid gridTemplateColumns="1fr" gap={24}>

Copy link
Member

@serikjensen serikjensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to approve since everything else looks good, but we should remove that className prior to submit :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants