Files
documenso/packages/trpc/server
Ashraf Chowdury 861225b7c4 fix: Prevent users from bypassing document limitations (#898)
## Description

**Fixed document limitation bypassing issues through templates.**
Previously, users could bypass document restrictions by utilizing
templates even after reaching their limitations. This fix ensures that
templates will no longer function as a workaround when users reach their
document limits.

## Changes
1. imported `useLimits` hook on `data-table-templates.tsx`
2. Disabled the 'Use Template' button when the user reaches their limit.
3. Added an Alert Component on top of the templates page to notify users
that they can't use templates anymore because they have reached their
limit.
4. Used `getServerLimits` hook on `template-router` to a condition on
the server.

## Example

![image](https://github.com/documenso/documenso/assets/87828904/275e83ea-ca7b-4b0e-83f4-ac10da9aff6a)

## Issue
Closes #883
2024-02-02 15:48:42 +11:00
..
2023-11-06 13:01:06 +11:00
2023-11-06 13:02:18 +11:00
2024-01-25 16:07:57 +11:00
2024-01-31 12:27:40 +11:00
2024-01-30 17:32:20 +11:00
2023-11-06 13:01:06 +11:00
2024-01-25 16:07:57 +11:00