Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make components optional un/controllable and init with values #1667

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

simensee
Copy link
Contributor

Summary of Changes in This PR

  • Refactored Checkbox & Input components to enforce best practices for controlled vs. uncontrolled behavior, preventing React warnings.

  • Introduced PrimitiveCheckboxProps and PrimitiveInputProps for better type safety and reusability.

  • Extracted getDefaultValues helper in RecruitmentPositionForm to centralize default values and improve maintainability.

  • Ensured form inputs always receive defined values by updating useForm initialization and form.reset().

  • Improved readability & structure by simplifying prop handling, restructuring long expressions, and using optional chaining.

@simensee simensee self-assigned this Jan 30, 2025
@simensee simensee linked an issue Jan 30, 2025 that may be closed by this pull request
@simensee simensee merged commit 8ba0100 into master Feb 13, 2025
5 checks passed
@simensee simensee deleted the 1644-multiselect-issue branch February 13, 2025 17:43
amaliejvik pushed a commit that referenced this pull request Feb 13, 2025
* make components optional un/controllable and init with values

* pass pipeline tests
amaliejvik added a commit that referenced this pull request Mar 11, 2025
* feat: add interview_availability_for_date in routes

Related to #1679

* feat: add intervieweravailabilitydto and function to get InterviewAvailability for a certain date

Related to #1679

* 1436 add breadcrumb to recruitmentgangallapplicantsadminpage (#1662)

* Add crumb to RecruitmentGangAllApplicantsAdminPage

* Run biome

* Add breadcrumb to RecruitmentUsersWithoutThreeInterviewCriteriaPage and RecruitmentUsersWithoutInterviewGangPage (#1669)

* Add crumb to RecruitmentUsersWithoutThreeInterviewCriteriaPage

* Fix breadcrumb of RecruitmentUsersWithoutInterviewGangPage by removing extra <Route>

* Delete wrong code from merge

* 1671 remove interview notes column from administrate applications and linked page (#1672)

* Removed unneccary linter changes

* added final changes

* Ran biome and removed console.log

* yarn bioma:fix

* Merged master and removed console.log

* Removed interview notes column and page

* yarn biome:fix

* feat: shared volume for generate_routes (#1684)

* make components optional un/controllable and init with values (#1667)

* make components optional un/controllable and init with values

* pass pipeline tests

* feat: update InterviewAvailabilityForDate view and getInterviewerAvailabilityOnDate() endpoint + start of TimeslotContainer, will look more at this

Related to #1679

* feat: backend changes to InterviewerAvailabilityForDate view to manage timezones and for better readability from get function

Related to #1679

* feat: logic for filtering and displaying the available interviewers at different timeslots through a timeslotmap and tooltip

Related to #1679

* fix: biome fix

Related to #1679

* fix: ruff fix

Related to #1679

* fix: final biome fix

Related to #1679

* fix: pipeline fix for mypy

Related to #1679

* feat: add translations

Related to #1679

* feat: timeslot interval of the current recruitment is being used when calculating availability

Add interval to RecruitmentAvailibilityView and RecruitmentAvailibilityDto. Query getRecruitmentAvailability in TimeslotContainer

Related to #1679

* fix: biome fix (dependency arrays)

Related to #1679

* fix: set explaining comment back into code

Related to #1679

---------

Co-authored-by: Johanne Grønlien Gjedrem <124079917+johannegg@users.noreply.github.com>
Co-authored-by: Simen Myrrusten <76472217+nemisis84@users.noreply.github.com>
Co-authored-by: Emil Solberg <86266961+emsoraffa@users.noreply.github.com>
Co-authored-by: Simen Seeberg-Rommetveit <99171937+simensee@users.noreply.github.com>
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.

Multiselect issue
3 participants