@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 +24 -0
- package/package.json +4 -4
- package/src/components/ui/finance/invoices/hooks.ts +5 -5
- package/src/components/ui/finance/invoices/pending-invoices-tab.tsx +14 -13
- package/src/components/ui/finance/invoices/query-invalidation.test.ts +1 -0
- package/src/components/ui/finance/invoices/query-invalidation.ts +1 -0
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.
|
|
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.
|
|
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.
|
|
94
|
+
"@tuturuuu/internal-api": "0.47.0",
|
|
95
95
|
"@tuturuuu/supabase": "0.5.2",
|
|
96
|
-
"@tuturuuu/utils": "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
|
-
|
|
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
|
-
//
|
|
818
|
-
export const
|
|
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-
|
|
824
|
+
queryKey: ['pending-invoices-count', wsId, groupByUser],
|
|
825
825
|
queryFn: async () => {
|
|
826
|
-
const count = await
|
|
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 {
|
|
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:
|
|
25
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
}
|