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

feat: support for grouppasses #49

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat: support for grouppasses #49

wants to merge 6 commits into from

Conversation

d-vostrikov
Copy link
Contributor

Added

  • Grouppass support: holders of this pass can now select n amount of discounts on tariffs.
  • StepperField component, which is used to select a number within a specific range:
    afbeelding
  • Extra colors to mobile theme palette.

Changed

  • Target OpenAPI schema in Orval config to unreleased branch to include code generation for latest API version.
  • Refactored savings page:
    • Extracted passholder data to separate component & created one for grouppass as well for better maintainability.
    • Split up OpportunityState into two separate components for maintainability.

Removed

Fixed


Ticket: #UPS-5301

) {
setIsGroupPass(true);
}
}, [passHoldersData]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Afgeleide van data bijhouden in local state is een anti-pattern in React, het is beter gewoon een lokale variabele te voorzien

const isGroupPass = passHoldersData?.data.member && passHoldersData.data.member.length === 0

@@ -120,14 +136,19 @@ export const OpportunityState = ({ passholder }: OpportunityStateDateProps) => {
if (cardSystem) {
if (cardSystem.socialTariff) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In 1 if steken?

if (cardSystem?.socialTariff) {

Nu was ik op zoek naar een else, maar is er niet

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