Skip to content

Commit 789e0b7

Browse files
rsbhclaude
andauthored
fix(admin): update sort key name case as api response (#1443)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 92cc59b commit 789e0b7

10 files changed

Lines changed: 38 additions & 34 deletions

File tree

web/apps/admin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@hookform/resolvers": "^3.0.1",
1919
"@radix-ui/react-form": "^0.0.2",
2020
"@radix-ui/react-icons": "^1.3.0",
21-
"@raystack/apsara": "0.56.5",
21+
"@raystack/apsara": "0.56.6",
2222
"@raystack/frontier": "workspace:^",
2323
"@raystack/proton": "0.1.0-b1687af73f994fa9612a023c850aa97c35735af8",
2424
"@stitches/react": "^1.2.8",

web/pnpm-lock.yaml

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/sdk/admin/views/organizations/details/apis/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const ErrorState = () => {
4949
);
5050
};
5151

52-
const DEFAULT_SORT: DataTableSort = { name: "created_at", order: "desc" };
52+
const DEFAULT_SORT: DataTableSort = { name: 'createdAt', order: 'desc' };
5353
const INITIAL_QUERY: DataTableQuery = {
5454
offset: 0,
5555
limit: DEFAULT_PAGE_SIZE,

web/sdk/admin/views/organizations/details/invoices/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { transformDataTableQueryToRQLRequest } from "../../../../utils/transform-query";
1717
import { useDebounceValue } from "usehooks-ts";
1818

19-
const DEFAULT_SORT: DataTableSort = { name: "created_at", order: "desc" };
19+
const DEFAULT_SORT: DataTableSort = { name: 'createdAt', order: 'desc' };
2020
const INITIAL_QUERY: DataTableQuery = {
2121
offset: 0,
2222
limit: DEFAULT_PAGE_SIZE,

web/sdk/admin/views/organizations/details/members/index.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ import { AdminServiceQueries } from "@raystack/proton/frontier";
99
import {
1010
useInfiniteQuery,
1111
createConnectQueryKey,
12-
useTransport,
13-
} from "@connectrpc/connect-query";
14-
import { useQueryClient } from "@tanstack/react-query";
15-
import { UsersIcon } from "../../../../assets/icons/UsersIcon";
16-
import { ExclamationTriangleIcon } from "@radix-ui/react-icons";
17-
import { OrganizationContext } from "../contexts/organization-context";
18-
import { AssignRole } from "../../../../components/AssignRole";
19-
import { RemoveMember } from "./remove-member";
20-
import { getConnectNextPageParam, DEFAULT_PAGE_SIZE } from "../../../../utils/connect-pagination";
21-
import { transformDataTableQueryToRQLRequest } from "../../../../utils/transform-query";
22-
import { useDebounceValue } from "usehooks-ts";
23-
24-
const DEFAULT_SORT: DataTableSort = { name: "org_joined_at", order: "desc" };
12+
useTransport
13+
} from '@connectrpc/connect-query';
14+
import { useQueryClient } from '@tanstack/react-query';
15+
import { UsersIcon } from '../../../../assets/icons/UsersIcon';
16+
import { ExclamationTriangleIcon } from '@radix-ui/react-icons';
17+
import { OrganizationContext } from '../contexts/organization-context';
18+
import { AssignRole } from '../../../../components/AssignRole';
19+
import { RemoveMember } from './remove-member';
20+
import {
21+
getConnectNextPageParam,
22+
DEFAULT_PAGE_SIZE
23+
} from '../../../../utils/connect-pagination';
24+
import { transformDataTableQueryToRQLRequest } from '../../../../utils/transform-query';
25+
import { useDebounceValue } from 'usehooks-ts';
26+
27+
const DEFAULT_SORT: DataTableSort = { name: 'orgJoinedAt', order: 'desc' };
2528
const INITIAL_QUERY: DataTableQuery = {
2629
offset: 0,
2730
limit: DEFAULT_PAGE_SIZE,

web/sdk/admin/views/organizations/details/projects/index.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ import { useContext, useEffect, useMemo, useState } from "react";
1111
import { getColumns } from "./columns";
1212
import type { SearchOrganizationProjectsResponse_OrganizationProject } from "@raystack/proton/frontier";
1313
import { AdminServiceQueries } from "@raystack/proton/frontier";
14-
import {
15-
useInfiniteQuery,
16-
} from "@connectrpc/connect-query";
14+
import { useInfiniteQuery } from "@connectrpc/connect-query";
1715
import { OrganizationContext } from "../contexts/organization-context";
1816
import { FileIcon, ExclamationTriangleIcon } from "@radix-ui/react-icons";
1917
import { ProjectMembersDialog } from "./members";
20-
import { getConnectNextPageParam, DEFAULT_PAGE_SIZE } from "../../../../utils/connect-pagination";
21-
import { transformDataTableQueryToRQLRequest } from "../../../../utils/transform-query";
22-
import { useDebounceValue } from "usehooks-ts";
18+
import {
19+
getConnectNextPageParam,
20+
DEFAULT_PAGE_SIZE
21+
} from '../../../../utils/connect-pagination';
22+
import { transformDataTableQueryToRQLRequest } from '../../../../utils/transform-query';
23+
import { useDebounceValue } from 'usehooks-ts';
2324

24-
const DEFAULT_SORT: DataTableSort = { name: "created_at", order: "desc" };
25+
const DEFAULT_SORT: DataTableSort = { name: 'createdAt', order: 'desc' };
2526
const INITIAL_QUERY: DataTableQuery = {
2627
offset: 0,
2728
limit: DEFAULT_PAGE_SIZE,

web/sdk/admin/views/organizations/details/tokens/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { transformDataTableQueryToRQLRequest } from "../../../../utils/transform
1313
import { getColumns } from "./columns";
1414
import { useDebounceValue } from "usehooks-ts";
1515

16-
const DEFAULT_SORT: DataTableSort = { name: "created_at", order: "desc" };
16+
const DEFAULT_SORT: DataTableSort = { name: 'createdAt', order: 'desc' };
1717
const INITIAL_QUERY: DataTableQuery = {
1818
offset: 0,
1919
limit: DEFAULT_PAGE_SIZE,

web/sdk/admin/views/organizations/list/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const NoOrganizations = () => {
3939
);
4040
};
4141

42-
const DEFAULT_SORT: DataTableSort = { name: "created_at", order: "desc" };
42+
const DEFAULT_SORT: DataTableSort = { name: 'createdAt', order: 'desc' };
4343
const INITIAL_QUERY: DataTableQuery = {
4444
offset: 0,
4545
limit: DEFAULT_PAGE_SIZE,

web/sdk/admin/views/users/list/list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const NoUsers = () => {
3030
);
3131
};
3232

33-
const DEFAULT_SORT: DataTableSort = { name: "created_at", order: "desc" };
33+
const DEFAULT_SORT: DataTableSort = { name: 'createdAt', order: 'desc' };
3434
const INITIAL_QUERY: DataTableQuery = {
3535
offset: 0,
3636
limit: DEFAULT_PAGE_SIZE,

web/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"@jest/globals": "^29.7.0",
6969
"@radix-ui/react-form": "^0.0.2",
7070
"@radix-ui/react-icons": "^1.3.2",
71-
"@raystack/apsara": "0.56.5",
71+
"@raystack/apsara": "0.56.6",
7272
"@raystack/eslint-config": "workspace:^",
7373
"@raystack/frontier-tsconfig": "workspace:^",
7474
"@size-limit/preset-small-lib": "^8.2.6",

0 commit comments

Comments
 (0)