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: Seats validation for team plan #2397

Merged
merged 3 commits into from
Nov 13, 2023
Merged

Conversation

RulaKhaled
Copy link
Contributor

Description

Add validation logic when person is trying add seats when going for team plan where it can't exceed 10 seats

Notable Changes

Alter schema to handle the seats validation for the team plan

Screenshots

Screenshot 2023-11-09 at 6 46 52 PM

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

netlify bot commented Nov 10, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit 48f98d9
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/6551e30fcf866000080cfefe
😎 Deploy Preview https://deploy-preview-2397--gazebo-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-staging
Copy link

codecov-staging bot commented Nov 10, 2023

Codecov Report

Merging #2397 (48f98d9) into main (5fa108f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2397   +/-   ##
=======================================
  Coverage   96.18%   96.18%           
=======================================
  Files         750      750           
  Lines        9402     9406    +4     
  Branches     2366     2318   -48     
=======================================
+ Hits         9043     9047    +4     
- Misses        341      343    +2     
+ Partials       18       16    -2     
Files Coverage Δ
...Routes/UpgradePlanPage/UpgradeForm/UpgradeForm.jsx 100.00% <ø> (ø)
src/shared/utils/upgradeForm.js 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5fa108f...48f98d9. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 10, 2023

Codecov Report

Merging #2397 (48f98d9) into main (5fa108f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2397   +/-   ##
=======================================
  Coverage   96.18%   96.18%           
=======================================
  Files         750      750           
  Lines        9402     9406    +4     
  Branches     2348     2351    +3     
=======================================
+ Hits         9043     9047    +4     
  Misses        341      341           
  Partials       18       18           
Files Coverage Δ
...Routes/UpgradePlanPage/UpgradeForm/UpgradeForm.jsx 100.00% <ø> (ø)
src/shared/utils/upgradeForm.js 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5fa108f...48f98d9. Read the comment docs.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #2397 (217536a) into main (5fa108f) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 217536a differs from pull request most recent head 48f98d9. Consider uploading reports for the commit 48f98d9 to get more accurate results

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2397   +/-   ##
=====================================
  Coverage   96.18   96.18           
=====================================
  Files        750     750           
  Lines       9402    9401    -1     
  Branches    2317    2361   +44     
=====================================
- Hits        9043    9042    -1     
  Misses       343     343           
  Partials      16      16           
Files Coverage Δ
...Routes/UpgradePlanPage/UpgradeForm/UpgradeForm.jsx 100.00% <ø> (ø)
src/shared/utils/upgradeForm.js 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5fa108f...48f98d9. Read the comment docs.

@@ -87,6 +92,16 @@ export const getSchema = ({ accountDetails, minSeats, trialStatus }) =>
message: `You cannot purchase a per user plan for less than ${minSeats} users`,
})
.transform((val, ctx) => {
if (
selectedPlan?.value === Plans.USERS_TEAMY &&
Copy link
Contributor

Choose a reason for hiding this comment

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

What about the monthly plan TEAMM?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh shiii thanks

@RulaKhaled RulaKhaled merged commit a246d20 into main Nov 13, 2023
28 checks passed
@RulaKhaled RulaKhaled deleted the seats-validation-team-plan branch November 13, 2023 08:55
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