Commit Graph

470 Commits

Author SHA1 Message Date
giancarlo
3cf3c263bc Fixed issue with one-time payments; Updated packages 2024-05-18 22:56:57 +07:00
giancarlo
5c1e1d5cd0 Update package versions in pnpm-lock.yaml
Several package versions including '@types/node', '@supabase/supabase-js', '@tanstack/react-query' and others were updated in the pnpm-lock.yaml file. This commit ensures all references to these versions are properly updated across the project, contributing to the maintenance of dependency consistency.
2024-05-17 23:13:13 +07:00
giancarlo
e88ae7268a Update UI styles and behavior across various components
This commit updates a variety of user interface styles and interactivity across multiple components. Changes include altering color schemes and border styles, modifying button interactivity and behaviors, and updating font weights. An emphasis has been placed on enhancing visual appearance, improving user experience, and maintaining a more consistent look-and-feel across the application.
2024-05-16 15:56:25 +07:00
giancarlo
09c24346a6 Update logging and return statements in billing services
The commit modifies the logging level in the billing services from 'error' to 'info'. Moreover, the error statement has been modified to clarify that the subscription cancellation has possibly been done by the user. Also, it reduces redundant imports and beefs up the return structure in stripe-billing-strategy.service.
2024-05-15 11:28:37 +07:00
giancarlo
6fb315cc85 Merge remote-tracking branch 'origin/main' 2024-05-15 11:08:59 +07:00
Giancarlo Buomprisco
4e50094808 Fix upsert billing (#24)
This commit updates the product_id and variant_id in both the subscription_items and order_items in the billing tests. Updates also include adding new checks to verify these changes. Changes are reflected in corresponding SQL files for personal and team billing subscriptions/orders tests.
2024-05-15 11:08:19 +07:00
giancarlo
71d7675031 Set search path in schema migration file 2024-05-14 16:43:27 +07:00
giancarlo
fe86b04d95 Update database schema and tests for subscription and order management
This commit includes a significant change in the way subscriptions and orders are handled. It introduces the ability to update existing orders and subscriptions, including adding and deleting items. The diff also adds checks to ensure that only valid items can be read, and adds corresponding test cases to verify these changes.
2024-05-14 15:38:53 +07:00
giancarlo
f07610ad8e Remove 'taint' from experimental features in next.config
This commit removes the 'taint' feature from the experimental features list in the Next.js configuration file. This change has been made after reviewing that this feature was not required or being used in the current project.
2024-05-13 22:49:11 +07:00
giancarlo
9d30039ba8 Update package versions and optimize URL generation
Updated the versions of several packages including pino and pnpm. Also, the generation of URLs in the pricing-table.tsx file has been optimized by implementing URLSearchParams. A new global error page was also added.
2024-05-13 21:47:51 +07:00
giancarlo
a75009c0df Update route check and add PageBody wrapper
Updated the `isRouteActive` check in the sidebar component to ensure it doesn't falsely identify nested routes as active. Additionally, introduced a `PageBody` wrapper in the account page component for consistent styling and padding.
2024-05-13 19:51:33 +07:00
giancarlo
6ab4558691 Refactor page layout in admin accounts component
The layout of the admin accounts component has been refactored. The "Accounts" heading has been removed from the 'admin-accounts-table.tsx' component and placed as a PageHeader in the 'page.tsx'. A description has also been added to the PageHeader, and the content was wrapped in a PageBody component for better structure and readability.
2024-05-13 19:27:25 +07:00
giancarlo
55e364aebd Update packages to latest versions
Several packages have been updated to their latest versions. This includes "@tanstack/react-table", "@makerkit/data-loader-supabase", and "@tanstack/react-query". Moreover, some UI tweaks have been made in multi-factor-auth-setup-dialog.tsx.
2024-05-13 18:54:12 +07:00
giancarlo
741d54b994 Handle API error in team account retrieval
This update adds error handling for the API call in 'join' page while retrieving the team account information. If the call fails, it will catch the error and return undefined avoiding potential crashes.
2024-05-13 14:43:51 +07:00
giancarlo
f7be3e84f4 Add localization for teams-related strings in home component
Support for internationalization was added to the account components related to teams. This includes localizing messages prompting a user to create a team which were previously hardcoded. Additionally, `Trans` components from '@kit/ui/trans' has been imported and used to enable this.
2024-05-13 14:17:25 +07:00
giancarlo
c5f255d002 Refactor CardButtonTitle and CardButtonHeader components for flexibility
Changed the component type of CardButtonTitle from HTMLSpanElement to HTMLDivElement to provide more flexibility. Modified the CardButtonHeader component to include new optional properties (asChild and displayArrow), and revised its structure to correctly display its children and ChevronRight icon based on the provided props.
2024-05-13 12:38:26 +07:00
giancarlo
43bfa16db2 Improved CardButton component; Fixrd translation 2024-05-13 11:23:21 +07:00
giancarlo
84271a31a8 Add card button component and enhance routing
This commit introduces the Card Button component to the UI package and improves URL matching by allowing end to be a boolean or function. Navigation menu components now support both cases. Additionally, changes have been made to improve the visual and functional aspects of various components throughout the application. This includes changes in pricing display, route active checking, and the introduction of new files such as HomeAddAccountButton and HomeAccountsList.
2024-05-13 02:09:28 +07:00
giancarlo
f4e2b8cf75 Add action path to request headers for server actions
In the middleware.ts file, an action path has been appended to the request headers. This is particularly useful for identifying the action path in server actions. If the action is recognized as a server action, the 'x-action-path' is then set with the respective pathname from the request.
2024-05-12 14:52:12 +07:00
giancarlo
7ada6b53c6 Refactor billing service and enhance account APIs
This commit includes renaming and refactoring of some billing services for clarification and coherence. It also improves account APIs in team-accounts and accounts packages by having added `getAccount` and `getTeamAccount` methods, allowing retrieval of account details via slug and id. Changes also include type modifications in `getSupabaseServerActionClient` function for better flexibility and precision.
2024-05-12 14:05:08 +07:00
giancarlo
f22c9817bd Update dependencies versions in pnpm-lock.yaml
Updated the versions of various dependencies including '@tanstack/react-query', '@marsidev/react-turnstile', and 'i18next' among others in pnpm-lock.yaml. This ensures the project uses the latest and most secure versions of these dependencies.
2024-05-11 23:30:05 +07:00
giancarlo
1f75a84c8f Add scope options for Azure OAuth provider
Added a new feature that checks for an Azure provider and accordingly sets the scope for OAuth authentication. With this addition, the scope for the Azure provider in the 'oauth-providers' module is explicitly set to 'email'.
2024-05-10 23:43:49 +07:00
giancarlo
3740ed642a Refactor middleware to decompose user data object
This commit modifies the middleware in web application to decompose the user object from the returned data of the getUser function. This is a simplification of the code, eliminating unnecessary references to the "data" object when accessing the user's details and role. It's carried out in all places where the getUser function is called and user data is processed.
2024-05-10 22:52:28 +07:00
giancarlo
9d3f6eee92 Rename "user-workspace.loader" to "load-user-workspace"
The file "user-workspace.loader.ts" was renamed to "load-user-workspace.ts", in order to better reflect its purpose. All imports across different components and settings pages were updated accordingly. The changes ensure the application adheres to naming conventions, enhancing code readability and maintainability.
2024-05-10 20:53:14 +07:00
giancarlo
9acf6d1295 Revert "Rename 'team-account-workspace.loader' to 'load-user-workspace'"
This reverts commit 543a95c867.
2024-05-10 20:52:41 +07:00
giancarlo
543a95c867 Rename 'team-account-workspace.loader' to 'load-user-workspace'
The 'team-account-workspace.loader' module across various components was renamed to 'load-user-workspace' to better reflect its functionality. This change affects many import statements within these components. The file itself was also renamed.
2024-05-10 20:46:38 +07:00
giancarlo
39e0a229b6 Refactor account handling to improve performance
This commit dates the transition from a global user session to individual account handling based on user ID. The transition was made across several components, notably the account settings, icons, and selector. This change improves performance by reducing unnecessary requests and ensures more accurate data handling. The commit also includes some cleanups and minor fixes spread across different components.
2024-05-10 20:33:05 +07:00
giancarlo
6b3b3cb58b Update dependencies and improve CSS for notifications popover
This commit updated the lock file version and various module versions in pnpm-lock.yaml to reflect the latest versions of the dependencies. Simultaneously, the width of the notifications popover has been modified to allow for larger content by changing the className property of PopoverContent in notifications-popover.tsx.
2024-05-10 14:37:32 +07:00
giancarlo
1c20d4e052 Update UI styles in Button and Page components
Updated the link style in the Button component and streamlined the layout styles in the Page component. This gives the UI a more uniform appearance and improves overall readability. Also, adjusted padding in several classes within the Page component to optimize the layout on large screens.
2024-05-10 13:34:00 +07:00
giancarlo
6746ae3859 Update condition for rendering PlanIntervalSwitcher
Changed the condition to ensure PlanIntervalSwitcher is only rendered when there is more than one interval. This avoids unnecessary render when there's only a single interval.
2024-05-10 10:51:01 +07:00
giancarlo
aa01436f0d Add feature flag for team accounts in home-menu-navigation
In the home-menu-navigation.tsx file, a feature flag for displaying the Team Accounts section has been implemented leveraging the 'If' component and the flags from the feature-flags.config file. Now, the display of the HomeAccountSelector depends on the status of the 'enableTeamAccounts' flag.
2024-05-10 00:39:48 +07:00
giancarlo
659f1c5416 Fix HMAC verification wrong reference to window 2024-05-09 17:31:26 +07:00
giancarlo
7a1dd7768a Updated zod; Fix issue displaying mode toggle in site header when disabled 2024-05-09 10:46:00 +07:00
giancarlo
b81cc94800 Enforce config for billing; updated packages 2024-05-08 21:47:17 +07:00
giancarlo
a501bb5444 Update SQL tests and schema definitions for membership and invitation management
This commit includes updates to the SQL tests for the database layer handling memberships and invitations. Test cases are improved and expanded. It also introduces some changes to the underlying schema, including creation of new indices on the 'accounts' table and several adjustments to function definitions with regard to how user IDs are accessed. Also, some views related to user accounts are redefined for better data handling.
2024-05-08 17:16:33 +07:00
giancarlo
25abe83dfa Update README and .gitignore
Modified the README file to reflect the transition from development to a stable phase and removed the roadmap. Also, renamed `sidebar.config.ts` to `navigation.config.ts` for more clarity. Additionally, added `.zed` to `.gitignore` to prevent commit of unneeded files.
2024-05-08 01:25:33 +07:00
giancarlo
c330158b3f Remove unused import in content-renderer.tsx
The import statement for KeystaticContentRenderer from '@kit/keystatic' in content-renderer.tsx file was removed as it was not being used anywhere in the file. This helps to make the code cleaner and more efficient.
2024-05-07 20:15:02 +07:00
giancarlo
d06882898a Update content rendering method in Keystatic package
This commit changes the way content is handled in the Keystatic package. It introduces rendering the content to HTML in the Keystatic client rather than in the content renderer component. This simplifies the rendering processing and better utilises the properties of the Markdoc library.
2024-05-07 20:07:09 +07:00
giancarlo
951acd38a5 Update default path and string manipulation in keystatic.config.ts
A default path for createKeyStaticConfig function is added and conditional code block entered to append '/' to the path, if it doesn't end with it. This prevents potential path issues in future codes. Also, the default value of NEXT_PUBLIC_KEYSTATIC_CONTENT_PATH is changed to an empty string from 'content'.
2024-05-07 19:52:11 +07:00
giancarlo
ce993ad120 Refactor import statements and error handling in CMS renderers
The commit updates the way 'Markdoc' is imported in the Keystatic content renderer. It also introduces type checks for imports in the core renderer package. For better error handling, a console.error message has been added for unknown CMS client types.
2024-05-07 19:19:45 +07:00
giancarlo
dd99e47e70 Add production environment guards to Keystatic routes
Implemented production environment guards in Keystatic routes to prevent access to certain functions in production mode. Updated 'layout.tsx.hbs' to redirect to home if the environment is production, and modified 'keystatic-route-handler.ts' to return 404 status code if attempting to utilize route handlers while in production.
2024-05-07 19:07:35 +07:00
giancarlo
fc3929c7dd Update generator function names and revise transform method
Renamed the generator function names in both 'keystatic/generator.ts' and 'package/generator.ts' for clarity and specificity. Also removed 'answers' parameter from the transform function in 'keystatic/generator.ts' and subsequently removed the associated prettier formatting command.
2024-05-07 18:58:45 +07:00
giancarlo
374c506c38 Remove @keystatic/next and @kit/keystatic dependencies
The commits include removal of @keystatic/next and @kit/keystatic from the package.json file and pnpm-lock.yaml file. Removing these dependencies should clean up our package dependencies and prevent relying on deprecated or unused packages.
2024-05-07 18:54:10 +07:00
giancarlo
3e288a0c57 Updated pnpm-lock file with '@keystatic/next' version
This commit updates the pnpm-lock.yaml file with the latest version of '@keystatic/next'. The version specifier has been changed to "^5.0.0" to ensure compatibility with potential minor updates. It also includes addition to workspace dependencies, pointing to the relevant packages in the project.
2024-05-07 18:53:13 +07:00
giancarlo
bd79563dcd Refactor and add generators for keystatic and package
The changes include refactoring the create-reader in cms keystatic and changing @keystatic/next version. Additionally, code generators for keystatic and package have been added, and corresponding templates have been organized into their respective directories.
2024-05-07 18:52:30 +07:00
giancarlo
7c447c8848 Refactored e2e tests to use Promise.all for parallel execution
In this update, several end-to-end (e2e) tests were refactored to use Promise.all for parallel execution of operations. This was done to improve the efficiency and stability of the tests, as waiting for each operation one by one could cause bottlenecks and potential failures in the test execution. Receives and click actions were grouped together to allow them to be executed concurrently where possible. The changes were applied across different test scenarios.
2024-05-07 17:29:54 +07:00
giancarlo
171a404379 Integrate Markdoc library with Keystatic CMS.
The commit introduces the '@markdoc/markdoc' library to the Keystatic CMS. It modifies related functions and components such as 'KeystaticDocumentRenderer' and 'keystatic-client' to transform and render content using Markdoc. Additionally, the commit refactors 'keystatic.config.ts' file for more legible content field setup and adds related dependencies in the package.
2024-05-07 15:33:25 +07:00
giancarlo
05255cbebe Update react-query and lucide-react dependencies and improve lockfile version
This commit updates '@tanstack/react-query' from '5.32.0' to '5.35.1' and 'lucide-react' from '^0.376.0' to '^0.378.0' in package.json. Additionally, changes were made in pnpm-lock.yaml including updating the lockfile version from '9.0' to '6.0'.
2024-05-07 14:22:47 +07:00
giancarlo
9a2fa3be13 Remove unnecessary dependencies from pnpm-lock.yaml
This commit strips out several packages that were previously added as dependencies, including '@tanstack/react-table', 'next', 'tailwind-merge', and 'zod'. By removing these packages, the project now has a simplified dependencies list.
2024-05-06 23:47:56 +07:00
giancarlo
d9250510f4 Remove unused dependencies from multiple packages
Unused dependencies were removed from the `typescript`, `prettier`, `tailwind`, and `eslint` packages. Updating the `package.json` files for these packages should improve build time and reduce the project's overall disk usage.
2024-05-06 13:50:43 +07:00