feat: add membership creation date to Organization Member List table (CAL-5406) (#20595)
* feat: add membership creation date to Organization Member List table (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * feat: add migration for membership creation date (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * feat: make createdAt and updatedAt nullable (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * feat: add updatedAt column to Organization Member List table (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * fix: use type assertion to access createdAt and updatedAt fields (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * fix: display N/A for null date values (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * fix: use proper type assertions for createdAt and updatedAt fields (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * fix: add createdAt and updatedAt to UserTableUser mock in test (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * feat: add PostgreSQL trigger for membership timestamps (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * fix: use empty string instead of N/A and add translations for column headers (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * add i18n text * clean up type issue * feat: add translation keys for column headers (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * disable sort * remove duplicated i18n texts * feat: add filters for lastActiveAt, createdAt, and updatedAt (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * support date range filter * fix date range for end date * hide columns by default * revert wrong change * add missing selects * fix e2e test * fix: remove PostgreSQL trigger and let application handle timestamps (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * feat: add application-level timestamp handling for Membership model (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * add more timestamp handling * refactor: use Prisma's built-in decorators for Membership timestamps (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * refactor: remove application-level timestamp handling in favor of Prisma decorators (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * refactor: remove more application-level timestamp handling in favor of Prisma decorators (CAL-5406) Co-Authored-By: [email protected] <[email protected]> * fix e2e test --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Anik Dhabal Babu <[email protected]> Co-authored-by: Eunjae Lee <[email protected]>
This commit is contained in:
13 files changed
+152
-14
No files matched your search
@@ -131,7 +131,7 @@ function UserListTableContent({ oAuthClientId }: PlatformManagedUsersTableProps)
|
||||
enableHiding: false,
|
||||
size: 200,
|
||||
header: () => {
|
||||
return `Managed Users`;
|
||||
return t("managed_users");
|
||||
},
|
||||
cell: ({ row }) => {
|
||||
if (isPending) {
|
||||
@@ -166,7 +166,7 @@ function UserListTableContent({ oAuthClientId }: PlatformManagedUsersTableProps)
|
||||
{
|
||||
id: "role",
|
||||
accessorFn: (data) => data.role,
|
||||
header: "Role",
|
||||
header: t("role"),
|
||||
size: 100,
|
||||
cell: ({ row, table }) => {
|
||||
if (isPending) {
|
||||
@@ -188,7 +188,7 @@ function UserListTableContent({ oAuthClientId }: PlatformManagedUsersTableProps)
|
||||
{
|
||||
id: "teams",
|
||||
accessorFn: (data) => data.teams.map((team) => team.name),
|
||||
header: "Teams",
|
||||
header: t("teams"),
|
||||
size: 140,
|
||||
cell: ({ row, table }) => {
|
||||
if (isPending) {
|
||||
|
||||
@@ -74,6 +74,8 @@ const initalColumnVisibility = {
|
||||
member: true,
|
||||
role: true,
|
||||
teams: true,
|
||||
createdAt: false,
|
||||
updatedAt: false,
|
||||
actions: true,
|
||||
};
|
||||
|
||||
@@ -366,9 +368,52 @@ function UserListTableContent() {
|
||||
...generateAttributeColumns(),
|
||||
{
|
||||
id: "lastActiveAt",
|
||||
header: "Last Active",
|
||||
accessorKey: "lastActiveAt",
|
||||
header: t("last_active"),
|
||||
enableSorting: false,
|
||||
enableColumnFilter: true,
|
||||
meta: {
|
||||
filter: {
|
||||
type: ColumnFilterType.DATE_RANGE,
|
||||
dateRangeOptions: {
|
||||
endOfDay: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
cell: ({ row }) => <div>{row.original.lastActiveAt}</div>,
|
||||
},
|
||||
{
|
||||
id: "createdAt",
|
||||
accessorKey: "createdAt",
|
||||
header: t("member_since"),
|
||||
enableSorting: false,
|
||||
enableColumnFilter: true,
|
||||
meta: {
|
||||
filter: {
|
||||
type: ColumnFilterType.DATE_RANGE,
|
||||
dateRangeOptions: {
|
||||
endOfDay: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
cell: ({ row }) => <div>{row.original.createdAt || ""}</div>,
|
||||
},
|
||||
{
|
||||
id: "updatedAt",
|
||||
accessorKey: "updatedAt",
|
||||
header: t("last_updated"),
|
||||
enableSorting: false,
|
||||
enableColumnFilter: true,
|
||||
meta: {
|
||||
filter: {
|
||||
type: ColumnFilterType.DATE_RANGE,
|
||||
dateRangeOptions: {
|
||||
endOfDay: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
cell: ({ row }) => <div>{row.original.updatedAt || ""}</div>,
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
enableHiding: false,
|
||||
|
||||
Reference in new issue
Block a user