Skip to content

Commit 4b91dc8

Browse files
subirjollySubir Jolly
andauthored
feat: change checkout routing and billing(page) for contract accountType (#3389)
* feat: change checkout routing and billing(page) for contract accountType * chore: 404 instead of routing to / Co-authored-by: Subir Jolly <subirjolly@Subirs-MacBook-Pro.local>
1 parent a82fb64 commit 4b91dc8

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

src/billing/components/BillingPageContents.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const BillingPageContents: FC = () => {
1414
const quartzMe = useSelector(getQuartzMe)
1515

1616
if (
17-
quartzMe?.accountType === 'pay_as_you_go' &&
17+
(quartzMe?.accountType === 'pay_as_you_go' ||
18+
quartzMe?.accountType === 'contract') &&
1819
quartzMe?.billingProvider !== 'zuora'
1920
) {
2021
return <MarketplaceBilling />

src/checkout/CheckoutPage.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ import CheckoutProvider from 'src/checkout/context/checkout'
77
import {isFlagEnabled} from 'src/shared/utils/featureFlag'
88
import ZuoraOutagePage from 'src/shared/components/zuora/ZuoraOutagePage'
99

10-
const CheckoutV2: FC = () => {
11-
return (
12-
<CheckoutProvider>
13-
<>
14-
<SuccessOverlay />
15-
{isFlagEnabled('quartzZuoraDisabled') ? (
16-
<ZuoraOutagePage />
17-
) : (
18-
<CheckoutForm />
19-
)}
20-
</>
21-
</CheckoutProvider>
22-
)
23-
}
10+
const CheckoutV2: FC = () => (
11+
<CheckoutProvider>
12+
<>
13+
<SuccessOverlay />
14+
{isFlagEnabled('quartzZuoraDisabled') ? (
15+
<ZuoraOutagePage />
16+
) : (
17+
<CheckoutForm />
18+
)}
19+
</>
20+
</CheckoutProvider>
21+
)
2422

2523
export default CheckoutV2

src/shared/containers/GetOrganizations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const canAccessCheckout = (me: Me): boolean => {
3434
if (!!me?.isRegionBeta) {
3535
return false
3636
}
37-
return me?.accountType !== 'pay_as_you_go'
37+
return me?.accountType !== 'pay_as_you_go' && me?.accountType !== 'contract'
3838
}
3939

4040
const GetOrganizations: FunctionComponent = () => {

0 commit comments

Comments
 (0)