@tuturuuu/ui 0.36.0 → 0.37.0

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,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.37.0](https://github.com/tutur3u/platform/compare/ui-v0.36.1...ui-v0.37.0) (2026-09-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * **auth:** enforce required account MFA lifecycle ([#5448](https://github.com/tutur3u/platform/issues/5448)) ([d7a5ed4](https://github.com/tutur3u/platform/commit/d7a5ed453963e619bd1dc3bd8c8a18c5e027317c))
9
+ * **notes:** add archive views and structured editing ([1c78aa2](https://github.com/tutur3u/platform/commit/1c78aa292ebca25660c1ec7464cd6cc02144c82a))
10
+ * **notes:** archive views and structured editing ([#5576](https://github.com/tutur3u/platform/issues/5576)) ([a67b186](https://github.com/tutur3u/platform/commit/a67b186318153cad8b10b71bbfc9335b80d0768a))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **calendar:** treat working locations as non-reminder events ([454e666](https://github.com/tutur3u/platform/commit/454e666a6465e3debd06260aedc1de7b96ab5d67)) ([#5511](https://github.com/tutur3u/platform/issues/5511)) ([6508ad6](https://github.com/tutur3u/platform/commit/6508ad681aaa174b186022fcbd526e20be682973))
16
+ * **education:** label satellite navigation in Learn and Teach ([7728149](https://github.com/tutur3u/platform/commit/77281496b86def6f02afaaabea0fb39a89557717)) ([#5536](https://github.com/tutur3u/platform/issues/5536)) ([d76aa49](https://github.com/tutur3u/platform/commit/d76aa49d93303156d900c872ada803c43e1c8530))
17
+ * **finance:** count recurring sessions in subscription previews ([94119f5](https://github.com/tutur3u/platform/commit/94119f5126e2c48d7e096a572c5957610ce67724)) ([#5541](https://github.com/tutur3u/platform/issues/5541)) ([e645a51](https://github.com/tutur3u/platform/commit/e645a51b0c9006cc1baf66e9846c5656b2063220))
18
+ * **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))
19
+
20
+ ## [0.36.1](https://github.com/tutur3u/platform/compare/ui-v0.36.0...ui-v0.36.1) (2026-09-29)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **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))
26
+
3
27
  ## [0.36.0](https://github.com/tutur3u/platform/compare/ui-v0.35.1...ui-v0.36.0) (2026-09-27)
4
28
 
5
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuturuuu/ui",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
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.13.0",
92
92
  "@tuturuuu/hooks": "0.1.2",
93
93
  "@tuturuuu/icons": "0.1.1",
94
- "@tuturuuu/internal-api": "0.44.0",
94
+ "@tuturuuu/internal-api": "0.47.0",
95
95
  "@tuturuuu/supabase": "0.5.2",
96
- "@tuturuuu/utils": "0.31.0",
96
+ "@tuturuuu/utils": "0.33.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',