Skip to content

Commit

Permalink
feat: add enterprise plan
Browse files Browse the repository at this point in the history
  • Loading branch information
pradel committed Jun 12, 2023
1 parent d2d0f25 commit 823ff8c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .changeset/breezy-lemons-hunt.md
@@ -0,0 +1,6 @@
---
'@sigle/server': patch
'@sigle/app': patch
---

Add Enterprise plan.
1 change: 1 addition & 0 deletions server/prisma/schema.prisma
Expand Up @@ -45,6 +45,7 @@ enum SubscriptionStatus {
enum SubscriptionPlan {
BASIC
PUBLISHER
ENTERPRISE
}

model Story {
Expand Down
2 changes: 1 addition & 1 deletion server/src/subscription/subscription.service.ts
Expand Up @@ -40,7 +40,7 @@ export class SubscriptionService {
stacksAddress: string;
}): Promise<{
id: string;
plan: 'BASIC' | 'PUBLISHER';
plan: 'BASIC' | 'PUBLISHER' | 'ENTERPRISE';
}> {
const nftHoldings = await this.nftApi.getNftHoldings({
principal: stacksAddress,
Expand Down
4 changes: 2 additions & 2 deletions sigle/src/modules/settings/plans/ComparePlans.tsx
Expand Up @@ -166,7 +166,7 @@ const Td = styled('td', {

interface TableProps {
children: React.ReactNode;
currentPlan: 'Starter' | 'Basic' | 'Publisher';
currentPlan: 'Starter' | 'Basic' | 'Publisher' | 'Enterprise';
}

const Table = ({ children, currentPlan }: TableProps) => (
Expand Down Expand Up @@ -318,7 +318,7 @@ const Table = ({ children, currentPlan }: TableProps) => (
);

interface ComparePlansProps {
currentPlan: 'Starter' | 'Basic' | 'Publisher';
currentPlan: 'Starter' | 'Basic' | 'Publisher' | 'Enterprise';
}

export const ComparePlans = ({ currentPlan }: ComparePlansProps) => {
Expand Down
13 changes: 8 additions & 5 deletions sigle/src/modules/settings/plans/CurrentPlan.tsx
Expand Up @@ -38,11 +38,14 @@ export const CurrentPlan = () => {
},
});

const currentPlan: 'Starter' | 'Basic' | 'Publisher' = !userSubscription
? 'Starter'
: userSubscription.plan === 'BASIC'
? 'Basic'
: 'Publisher';
const currentPlan: 'Starter' | 'Basic' | 'Publisher' | 'Enterprise' =
!userSubscription
? 'Starter'
: userSubscription.plan === 'BASIC'
? 'Basic'
: userSubscription.plan === 'ENTERPRISE'
? 'Enterprise'
: 'Publisher';

const handleSyncWallet = () => {
syncWithNftSubscription();
Expand Down

0 comments on commit 823ff8c

Please sign in to comment.