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: convert rating.client.service.js to typescript enum #1955

Merged
merged 4 commits into from
May 25, 2021

Conversation

chowyiyin
Copy link
Contributor

@chowyiyin chowyiyin commented May 24, 2021

This PR replaces rating.client.service.js with a new Typescript enum Rating in types/form.ts and the existing RatingShape enum in types/field/ratingField.ts.

Closes #1839

Tests

  • Create new rating field. Ensure that all ratings (1-10) and rating shapes (heart and star) are present and check that preview and subsequent form has the correct number of rating options.

src/types/form.ts Outdated Show resolved Hide resolved
src/types/form.ts Outdated Show resolved Hide resolved
src/types/form.ts Outdated Show resolved Hide resolved
src/types/form.ts Outdated Show resolved Hide resolved
src/types/form.ts Outdated Show resolved Hide resolved
@@ -41,6 +42,8 @@ export enum ResponseMode {
Email = 'email',
}

export const Rating = range(1, 11).map(String)
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, very functional

@mantariksh mantariksh changed the title refactor - convert rating.client.service.js to typescript enum refactor: convert rating.client.service.js to typescript enum May 24, 2021
@chowyiyin chowyiyin merged commit f379eef into develop May 25, 2021
@karrui karrui deleted the refactor/ratingClientService branch August 17, 2021 02:45
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.

Convert rating.client.service.js to TypeScript enums
2 participants