@@ -706,7 +738,9 @@ function FeaturesSection({
Feature
Status
- Upgrade
+ {showSelfServe ? (
+ Upgrade
+ ) : null}
@@ -714,16 +748,19 @@ function FeaturesSection({
feature={features.hasStagingEnvironment}
upgradeType={stagingUpgradeType}
billingPath={billingPath}
+ showSelfServe={showSelfServe}
/>
@@ -735,10 +772,12 @@ function FeatureRow({
feature,
upgradeType,
billingPath,
+ showSelfServe,
}: {
feature: FeatureInfo;
upgradeType: "view-plans" | "contact-us" | "none";
billingPath: string;
+ showSelfServe: boolean;
}) {
const displayValue = () => {
if (feature.name === "Included compute" && typeof feature.value === "number") {
@@ -795,7 +834,7 @@ function FeatureRow({
{displayValue()}
-
{renderUpgrade()}
+ {showSelfServe ?
{renderUpgrade()} : null}
);
}
diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules/route.tsx
index bcb10409442..b7d56339471 100644
--- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules/route.tsx
+++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules/route.tsx
@@ -62,6 +62,7 @@ import {
scheduleTypeName,
} from "~/components/runs/v3/ScheduleType";
import { useEnvironment } from "~/hooks/useEnvironment";
+import { useShowSelfServe } from "~/hooks/useShowSelfServe";
import { useOrganization } from "~/hooks/useOrganizations";
import { usePathName } from "~/hooks/usePathName";
import { useProject } from "~/hooks/useProject";
@@ -218,6 +219,60 @@ export default function Page() {
const isShowingNewPane = pathName.endsWith("/new");
const isShowingSchedule = !!scheduleParam;
+ const showSelfServe = useShowSelfServe();
+
+ function ScheduleLimitActions({ variant = "banner" }: { variant?: "dialog" | "banner" } = {}) {
+ if (!showSelfServe) {
+ return (
+
Request more}
+ defaultValue="enterprise"
+ />
+ );
+ }
+
+ if (canPurchaseSchedules && schedulePricing) {
+ return (
+ Purchase more…
+ ) : undefined
+ }
+ />
+ );
+ }
+
+ if (canUpgrade) {
+ return variant === "dialog" ? (
+
+ Upgrade
+
+ ) : (
+
+ Upgrade
+
+ );
+ }
+
+ return (
+ Request more}
+ defaultValue="help"
+ />
+ );
+ }
+
return (
@@ -284,39 +339,16 @@ export default function Page() {
You've used {limits.used}/{limits.limit} of your schedules.
- {canPurchaseSchedules && schedulePricing ? (
- Purchase more…
- }
- />
- ) : canUpgrade ? (
-
- Upgrade
-
- ) : (
- Request more
- }
- defaultValue="help"
- />
- )}
+
) : (
)}
- {canPurchaseSchedules && schedulePricing ? (
-
- ) : canUpgrade ? (
-
- Upgrade
-
- ) : (
- Request more}
- defaultValue="help"
- />
- )}
+