Commit Graph

12 Commits

Author SHA1 Message Date
2345de679b feat: admin monthly active users metric (#1724) 2025-06-19 15:12:17 +10:00
484f6c8b85 fix: admin metrics broken (#1845) 2025-06-17 21:15:11 +10:00
e6dc237ad2 feat: add organisations (#1820) 2025-06-10 11:49:52 +10:00
383b5f78f0 feat: migrate nextjs to rr7 2025-02-13 14:10:38 +11:00
7d0a9c6439 fix: refactor prisma relations (#1581) 2025-01-13 13:41:53 +11:00
7e065764ec chore: use luxon for dates 2024-06-25 15:10:58 +00:00
39e7eb0568 fix: remove cummulative 2024-05-21 22:45:32 +00:00
95a94d4fc1 chore: use single chart graphs 2024-05-21 09:28:23 +00:00
7615c9d2fa feat: add chat to admin dashboard 2024-04-05 17:49:32 +00:00
88534fa1c6 feat: add multi subscription support (#734)
## Description

Previously we assumed that there can only be 1 subscription per user.
However, that will soon no longer the case with the introduction of the
Teams subscription.

This PR will apply the required migrations to support multiple
subscriptions.

## Changes Made

- Updated the Prisma schema to allow for multiple `Subscriptions` per
`User`
- Added a Stripe `customerId` field to the `User` model
- Updated relevant billing sections to support multiple subscriptions

## Testing Performed

- Tested running the Prisma migration on a demo database created on the
main branch

Will require a lot of additional testing.

## Checklist

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.

## Additional Notes

Added the following custom SQL statement to the migration:

> DELETE FROM "Subscription" WHERE "planId" IS NULL OR "priceId" IS
NULL;

Prior to deployment this will require changes to Stripe products:
- Adding `type` meta attribute

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2023-12-14 15:22:54 +11:00
3d44821bff fix: build errors 2023-11-06 13:02:19 +11:00
a2635851cf chore: rename files 2023-11-06 13:01:12 +11:00