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

refactor: use shared DateSelectedValidation enum instead of DATE_VALIDATION_OPTIONS #1724

Merged
merged 3 commits into from
Apr 27, 2021

Conversation

yong-jie
Copy link
Member

Problem

An enum called DateSelectedValidation was introduced during a typescript migration task #749, but the frontend codebase has not been updated to make use of this enum.

Closes #777

Solution

Remove the naming conflict between DateValidationOptions and DATE_VALIDATION_OPTIONS. The former is actually a list of options and the latter is the enum. The former is now called DateValidationOptionList.

Edit usages of the enum from lower-case to title-case to match the new enum. i.e. DateValidationOptions.custom to DateValidationOptions.Custom

Reviewers

@tshuli appreciate if you could take a quick look to see if these changes are indeed what you had intended.

@yong-jie yong-jie requested a review from tshuli April 26, 2021 04:14
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

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

lgtm, but wait for @tshuli for final say hehe

@karrui karrui changed the title use shared DateSelectedValidation enum instead of DATE_VALIDATION_OPTIONS refactor: use shared DateSelectedValidation enum instead of DATE_VALIDATION_OPTIONS Apr 26, 2021
Copy link
Contributor

@tshuli tshuli left a comment

Choose a reason for hiding this comment

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

thanks! lgtm :)

@liangyuanruo liangyuanruo merged commit 2c5b87c into develop Apr 27, 2021
@liangyuanruo liangyuanruo deleted the date-validation-enum branch April 27, 2021 02:27
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.

Frontend to use shared DateValidationOptions enum instead of DATE_VALIDATION_OPTIONS
4 participants