@tuturuuu/ui 0.35.1 → 0.36.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.36.1](https://github.com/tutur3u/platform/compare/ui-v0.36.0...ui-v0.36.1) (2026-09-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **finance:** respect class join dates in pending tuition ([1aaaff0](https://github.com/tutur3u/platform/commit/1aaaff054d9b87c8ada88af6bdcadb840e54a186)) ([#5618](https://github.com/tutur3u/platform/issues/5618)) ([4a0d26c](https://github.com/tutur3u/platform/commit/4a0d26ca1246cd4075e9fcc6ad3dd7a093861766))
9
+
10
+ ## [0.36.0](https://github.com/tutur3u/platform/compare/ui-v0.35.1...ui-v0.36.0) (2026-09-27)
11
+
12
+
13
+ ### Features
14
+
15
+ * **notes:** add archive views and structured editing ([1c78aa2](https://github.com/tutur3u/platform/commit/1c78aa292ebca25660c1ec7464cd6cc02144c82a))
16
+ * **notes:** archive views and structured editing ([#5576](https://github.com/tutur3u/platform/issues/5576)) ([a67b186](https://github.com/tutur3u/platform/commit/a67b186318153cad8b10b71bbfc9335b80d0768a))
17
+
3
18
  ## [0.35.1](https://github.com/tutur3u/platform/compare/ui-v0.35.0...ui-v0.35.1) (2026-09-26)
4
19
 
5
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuturuuu/ui",
3
- "version": "0.35.1",
3
+ "version": "0.36.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -88,12 +88,12 @@
88
88
  "@tiptap/react": "3.31.3",
89
89
  "@tiptap/starter-kit": "3.31.3",
90
90
  "@tuturuuu/ai": "0.16.1",
91
- "@tuturuuu/apis": "0.11.4",
91
+ "@tuturuuu/apis": "0.12.0",
92
92
  "@tuturuuu/hooks": "0.1.2",
93
93
  "@tuturuuu/icons": "0.1.1",
94
- "@tuturuuu/internal-api": "0.43.0",
94
+ "@tuturuuu/internal-api": "0.46.0",
95
95
  "@tuturuuu/supabase": "0.5.2",
96
- "@tuturuuu/utils": "0.31.0",
96
+ "@tuturuuu/utils": "0.32.0",
97
97
  "@types/debug": "^4.1.13",
98
98
  "browser-image-compression": "^2.0.2",
99
99
  "class-variance-authority": "^0.7.1",
@@ -6,7 +6,7 @@ import {
6
6
  useQueryClient,
7
7
  } from '@tanstack/react-query';
8
8
  import {
9
- getPendingFinanceInvoicesCurrentMonthCount,
9
+ getPendingFinanceInvoicesCount,
10
10
  getSubscriptionInvoiceContext,
11
11
  listFinanceInvoices,
12
12
  listPendingFinanceInvoices,
@@ -814,16 +814,16 @@ export const usePendingInvoices = (
814
814
  });
815
815
  };
816
816
 
817
- // Get count of pending invoices for the current month
818
- export const usePendingInvoicesCurrentMonthCount = (
817
+ // Count the same all-month scope shown in the table and downloaded report.
818
+ export const usePendingInvoicesCount = (
819
819
  wsId: string,
820
820
  groupByUser = false,
821
821
  enabled = true
822
822
  ) => {
823
823
  return useQuery({
824
- queryKey: ['pending-invoices-current-month', wsId, groupByUser],
824
+ queryKey: ['pending-invoices-count', wsId, groupByUser],
825
825
  queryFn: async () => {
826
- const count = await getPendingFinanceInvoicesCurrentMonthCount(wsId, {
826
+ const count = await getPendingFinanceInvoicesCount(wsId, {
827
827
  groupByUser,
828
828
  });
829
829
  return typeof count === 'number' ? count : 0;
@@ -4,7 +4,7 @@ import { CircleDashed } from '@tuturuuu/icons';
4
4
  import { Badge } from '@tuturuuu/ui/badge';
5
5
  import { TabsTrigger } from '@tuturuuu/ui/tabs';
6
6
  import { useWorkspaceConfig } from '../../../../hooks/use-workspace-config';
7
- import { usePendingInvoicesCurrentMonthCount } from './hooks';
7
+ import { usePendingInvoicesCount } from './hooks';
8
8
 
9
9
  interface Props {
10
10
  wsId: string;
@@ -21,23 +21,24 @@ export function PendingInvoicesTab({ wsId, label }: Props) {
21
21
 
22
22
  const groupByUser = groupByUserConfig === 'true';
23
23
 
24
- const { data: currentMonthCount, isLoading } =
25
- usePendingInvoicesCurrentMonthCount(wsId, groupByUser, !isConfigLoading);
24
+ const { data: pendingCount, isLoading } = usePendingInvoicesCount(
25
+ wsId,
26
+ groupByUser,
27
+ !isConfigLoading
28
+ );
26
29
 
27
30
  return (
28
31
  <TabsTrigger value="pending" className="gap-2">
29
32
  <CircleDashed className="h-4 w-4" />
30
33
  {label}
31
- {!isLoading &&
32
- currentMonthCount !== undefined &&
33
- currentMonthCount > 0 && (
34
- <Badge
35
- variant="destructive"
36
- className="ml-1 h-5 min-w-5 justify-center px-1.5 text-xs"
37
- >
38
- {currentMonthCount}
39
- </Badge>
40
- )}
34
+ {!isLoading && pendingCount !== undefined && pendingCount > 0 && (
35
+ <Badge
36
+ variant="destructive"
37
+ className="ml-1 h-5 min-w-5 justify-center px-1.5 text-xs"
38
+ >
39
+ {pendingCount}
40
+ </Badge>
41
+ )}
41
42
  </TabsTrigger>
42
43
  );
43
44
  }
@@ -9,6 +9,7 @@ it('refreshes coverage and analytics after invoice changes without invalidating
9
9
  'subscription-invoice-context',
10
10
  'invoice-analytics',
11
11
  'pending-invoices',
12
+ 'pending-invoices-count',
12
13
  ];
13
14
  for (const root of roots)
14
15
  for (const ws of ['ws1', 'ws2'])
@@ -19,6 +19,7 @@ const INVOICE_MUTATION_QUERY_ROOTS = new Set([
19
19
  'opening-balance',
20
20
  'pending-invoices',
21
21
  'pending-invoices-current-month',
22
+ 'pending-invoices-count',
22
23
  'promotions',
23
24
  'spending_trends',
24
25
  'subscription-invoice-context',
@@ -95,6 +95,32 @@ const getMentionVisualMeta = (entityType?: string): MentionVisualMeta => {
95
95
  </span>
96
96
  ),
97
97
  };
98
+ case 'event':
99
+ case 'meeting':
100
+ return {
101
+ prefix: '@',
102
+ pillClass: 'border-border bg-muted text-foreground',
103
+ avatarClass: 'border-border bg-background text-foreground',
104
+ fallback: 'E',
105
+ icon: renderToString(
106
+ <span className="flex h-full w-full items-center justify-center">
107
+ <Calendar className="h-3 w-3" />
108
+ </span>
109
+ ),
110
+ };
111
+ case 'finance':
112
+ case 'note':
113
+ return {
114
+ prefix: '@',
115
+ pillClass: 'border-border bg-muted text-foreground',
116
+ avatarClass: 'border-border bg-background text-foreground',
117
+ fallback: entityType === 'finance' ? 'F' : 'N',
118
+ icon: renderToString(
119
+ <span className="flex h-full w-full items-center justify-center">
120
+ <Box className="h-3 w-3" />
121
+ </span>
122
+ ),
123
+ };
98
124
  case 'external-user':
99
125
  return {
100
126
  prefix: '@',