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

WIP: subscription, plan & permissions #841

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

elboletaire
Copy link
Member

@elboletaire elboletaire commented Nov 15, 2024

What's done so far:

  • Created the new "subscription" view (accessible via /admin/subscription)
  • Recovered the menu link to this new page (under Settings -> Subscription)
  • Display a table with the current subscription. It's been done as a table since it looks like it, but I'm not sure if it's useful considering there aren't plans for multiple subscriptions. Responsive tables are also a problem with the display: grid we're using in the dashboard. fixed in 9e2899c
  • Removed the temporary "open modal" button from the main menu
  • Such modal can now be opened using the "view plans & pricing" button in the new page
  • A new Subscription Provider/Context has been created, with a permissions method in order to check for permissions of the current plan, but it has not been applied yet anywhere
  • The pricing modal has been minimally changed to allow setting a custom title, and moving its contents into an independent component
  • Created upgrade tier and upgrade plan modals
  • Created usePricingModals hook (with its respective context and provider)
  • Integrate these modals into the invite team members flow, showing the modal for users trying to invite more memberships than allowed.

Copy link

github-actions bot commented Nov 15, 2024

@github-actions github-actions bot temporarily deployed to pull request November 15, 2024 14:53 Inactive
Copy link

github-actions bot commented Nov 15, 2024

@github-actions github-actions bot temporarily deployed to pull request November 15, 2024 15:12 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 12:37 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 12:37 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 14:34 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 14:34 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 14:59 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 14:59 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 15:06 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 15:06 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 16:44 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 16:44 Inactive
@elboletaire elboletaire changed the title WIP: subscription plan permissions WIP: subscription, plan & permissions Nov 20, 2024
@github-actions github-actions bot temporarily deployed to pull request November 22, 2024 17:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 22, 2024 17:16 Inactive
What's done so far:
- Created the new "subscription" view
- Recovered the menu link to this new page
- Show a table with the current subscription. It's been done as a table
  since it looks like it, but I'm not sure if it's useful considering
  there aren't plans for multiple subscriptions
- Removed the "open modal" temporary button from the main menu
- Such modal can now be opened using the "view plans & pricing" button
  in the new page
- A new Subscription Provider/Context has been created, with a
  `permissions` method in order to check for permissions of the current
  plan, but it has not been applied yet anywhere
- The pricing modal has been minimally changed to allow setting a custom
  title, and moving its contents into an independent component
- Created modals for the different tier/plan upgrade scenarios
@github-actions github-actions bot temporarily deployed to pull request November 26, 2024 18:02 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 26, 2024 18:02 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2024 13:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2024 13:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2024 13:32 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2024 13:32 Inactive
- Created a PricingModals provider and context, with their
  usePricingModals hook
- Integrated these into the invite team memberships, showing the upgrade
  tier modal there (which already links to the pricing one)
@github-actions github-actions bot temporarily deployed to pull request November 27, 2024 13:35 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2024 13:35 Inactive
<>
<SubscriptionModal isOpen={isOpen} onClose={onClose} title={t('pricing.title')} />
<Button onClick={onOpen} alignSelf='end'>
View Plans & Pricing
Copy link
Member

Choose a reason for hiding this comment

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

Translation missing

{subscription.plan.name} ({subscription.plan.organization.memberships} members)
</Td>
<Td>
<Tag>undefined</Tag>
Copy link
Member

Choose a reason for hiding this comment

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

Translation missing

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, this should be the price. Was set as undefined because I had no way to know it then. I'll fix it.

mb={44}
mt={6}
>
<>
<Box mb={5}>
<Heading as='h1' size='xl' mb={3}>
Privacy Policy
Copy link
Member

Choose a reason for hiding this comment

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

Translation missing

mt={6}
mx='auto'
>
<>
<Heading as='h1' size='xl'>
Terms and Conditions for Vocdoni Association
Copy link
Member

Choose a reason for hiding this comment

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

Translation missing

@@ -173,7 +160,7 @@ const Terms = () => (
By continuing to use app.vocdoni.io or onvote.app, you confirm your acceptance of these terms and your agreement
Copy link
Member

Choose a reason for hiding this comment

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

Translation missing

yarn.lock Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This field shouldn't be part of the git tracking...

- Trying to get rid of the plans mock, but it still needs some work
  (complicated when most features are missing from the plan rn)
- Commented all the non implemented features in the process create form
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