@tuturuuu/ui 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/package.json +47 -47
- package/src/components/ui/finance/invoices/components/subscription-attendance-summary.tsx +19 -5
- package/src/components/ui/finance/invoices/components/subscription-prepaid-controls.test.tsx +41 -0
- package/src/components/ui/finance/invoices/components/subscription-prepaid-controls.tsx +93 -0
- package/src/components/ui/finance/invoices/hooks/use-subscription-auto-selection.ts +82 -70
- package/src/components/ui/finance/invoices/hooks/use-subscription-invoice-content.ts +50 -25
- package/src/components/ui/finance/invoices/hooks.ts +11 -2
- package/src/components/ui/finance/invoices/internal-api.ts +5 -0
- package/src/components/ui/finance/invoices/subscription-invoice.tsx +92 -31
- package/src/components/ui/finance/invoices/utils.test.ts +82 -0
- package/src/components/ui/finance/invoices/utils.ts +240 -7
- package/src/components/ui/text-editor/__tests__/extensions.test.ts +22 -0
- package/src/components/ui/tu-do/shared/__tests__/board-client.test.tsx +7 -0
- package/src/components/ui/tu-do/shared/__tests__/task-board-loading-state.test.tsx +37 -0
- package/src/components/ui/tu-do/shared/board-client.tsx +3 -1
- package/src/components/ui/tu-do/shared/task-board-loading-state.tsx +55 -1
- package/src/components/ui/tu-do/shared/task-edit-dialog/components/task-description-editor.tsx +3 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/components/task-list-selector.tsx +18 -2
- package/src/components/ui/tu-do/shared/task-edit-dialog/description-versions.test.ts +97 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/description-versions.ts +210 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-activity-section.tsx +56 -8
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-description-change-dialog.test.tsx +63 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-description-change-dialog.tsx +218 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-description-restore-banner.tsx +83 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-description-version-restore-dialog.test.tsx +120 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-description-version-restore-dialog.tsx +180 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-properties-section.test.tsx +157 -4
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-properties-section.tsx +178 -14
- package/src/components/ui/tu-do/shared/task-edit-dialog/utils.test.ts +100 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/utils.ts +109 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog.tsx +381 -34
- package/src/components/ui/tu-do/templates/task-template-api.ts +142 -0
- package/src/components/ui/tu-do/templates/task-template-card.tsx +118 -0
- package/src/components/ui/tu-do/templates/task-template-client.test.tsx +52 -0
- package/src/components/ui/tu-do/templates/task-template-client.tsx +258 -0
- package/src/components/ui/tu-do/templates/task-template-dialogs.test.tsx +167 -0
- package/src/components/ui/tu-do/templates/task-template-dialogs.tsx +376 -0
- package/src/components/ui/tu-do/templates/task-templates-hub.test.tsx +114 -0
- package/src/components/ui/tu-do/templates/task-templates-hub.tsx +50 -0
- package/src/components/ui/tu-do/templates/task-templates-page.tsx +6 -11
|
@@ -2,10 +2,10 @@ import { Store } from '@tuturuuu/icons';
|
|
|
2
2
|
import { createAdminClient } from '@tuturuuu/supabase/next/server';
|
|
3
3
|
import { Button } from '@tuturuuu/ui/button';
|
|
4
4
|
import FeatureSummary from '@tuturuuu/ui/custom/feature-summary';
|
|
5
|
-
import
|
|
5
|
+
import { TaskTemplatesHub } from '@tuturuuu/ui/tu-do/templates/task-templates-hub';
|
|
6
6
|
import type { BoardTemplate } from '@tuturuuu/ui/tu-do/templates/types';
|
|
7
7
|
import { getCurrentUser } from '@tuturuuu/utils/user-helper';
|
|
8
|
-
import {
|
|
8
|
+
import { getWorkspace } from '@tuturuuu/utils/workspace-helper';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import { notFound, redirect } from 'next/navigation';
|
|
11
11
|
import { getTranslations } from 'next-intl/server';
|
|
@@ -121,13 +121,8 @@ export default async function TaskTemplatesPage({
|
|
|
121
121
|
|
|
122
122
|
const wsId = workspace.id;
|
|
123
123
|
|
|
124
|
-
const permissions = await getPermissions({ wsId });
|
|
125
|
-
if (!permissions) notFound();
|
|
126
|
-
const { withoutPermission } = permissions;
|
|
127
|
-
if (withoutPermission('manage_projects')) redirect(`/${wsId}`);
|
|
128
|
-
|
|
129
124
|
const { templates } = await getTemplates(wsId, user.id);
|
|
130
|
-
const t = await getTranslations('ws-
|
|
125
|
+
const t = await getTranslations('ws-task-templates');
|
|
131
126
|
|
|
132
127
|
const marketplaceUrl = `/${wsId}/${templatesBasePath}/marketplace`;
|
|
133
128
|
|
|
@@ -144,14 +139,14 @@ export default async function TaskTemplatesPage({
|
|
|
144
139
|
<Link href={marketplaceUrl}>
|
|
145
140
|
<Button variant="outline" size="sm" className="gap-2">
|
|
146
141
|
<Store className="h-4 w-4" />
|
|
147
|
-
{t('gallery.
|
|
142
|
+
{t('gallery.board_marketplace')}
|
|
148
143
|
</Button>
|
|
149
144
|
</Link>
|
|
150
145
|
}
|
|
151
146
|
/>
|
|
152
|
-
<
|
|
147
|
+
<TaskTemplatesHub
|
|
148
|
+
boardTemplates={templates}
|
|
153
149
|
wsId={wsId}
|
|
154
|
-
initialTemplates={templates}
|
|
155
150
|
templatesBasePath={templatesBasePath}
|
|
156
151
|
/>
|
|
157
152
|
</div>
|