Skip to content

Commit

Permalink
feat: update sorting configurations and add user_id column in design …
Browse files Browse the repository at this point in the history
…tables

Signed-off-by: Amit Amrutiya <[email protected]>
  • Loading branch information
amitamrutiya committed Nov 25, 2024
1 parent 6765d63 commit be19b85
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/custom/CatalogDesignTable/CatalogDesignTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const CatalogDesignsTable: React.FC<CatalogDesignsTableProps> = ({
page,
elevation: 0,
sortOrder: {
name: 'updated_at At',
name: 'updated_at',
direction: 'desc'
},

Expand Down
10 changes: 10 additions & 0 deletions src/custom/CatalogDesignTable/DesignTableColumnConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const colViews: ColView[] = [
['created_at', 'na'],
['updated_at', 'l'],
['visibility', 'l'],
['user_id', 'na'],
['actions', 'xs']
];

Expand Down Expand Up @@ -141,6 +142,15 @@ export const createDesignsColumnsConfig = ({
searchable: true
}
},
{
name: 'user_id',
label: 'User ID',
options: {
filter: false,
sort: false,
searchable: false
}
},
{
name: 'actions',
label: 'Actions',
Expand Down
4 changes: 4 additions & 0 deletions src/custom/TeamTable/TeamTableConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ export default function TeamTableConfiguration({
backgroundColor: '#f3f1f1'
}
},
sortOrder: {
name: 'created_at',
direction: 'desc'
},
viewColumns: false,
search: false,
rowsExpanded: [ExpandedRowIdx],
Expand Down
4 changes: 4 additions & 0 deletions src/custom/UsersTable/UsersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ const UsersTable: React.FC<UsersTableProps> = ({
download: false,
elevation: 0,
serverSide: true,
sortOrder: {
name: 'last_login_time',
direction: 'desc'
},
onTableChange: (action: string, tableState: any) => {
const sortInfo = tableState.announceText ? tableState.announceText.split(' : ') : [];
let order = '';
Expand Down
4 changes: 4 additions & 0 deletions src/custom/Workspaces/EnvironmentTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ const EnvironmentTable: React.FC<EnvironmentTableProps> = ({
rowsPerPage: pageSize,
page,
elevation: 0,
sortOrder: {
name: 'updated_at',
direction: 'desc'
},
serverSide: true,
onTableChange: (action: string, tableState: any) => {
const sortInfo = tableState.announceText ? tableState.announceText.split(' : ') : [];
Expand Down

0 comments on commit be19b85

Please sign in to comment.