Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Display the note as well on table

Kiran Kce241794bb9b
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/fraud/resolved/resolved-fraud-group-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/fraud/resolved/resolved-fraud-group-table.tsx
index 344e919c9c..e7c8825ac7 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/fraud/resolved/resolved-fraud-group-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/fraud/resolved/resolved-fraud-group-table.tsx
@@ -118,20 +118,6 @@ export function ResolvedFraudGroupTable() {
}),
},
},
- {
- id: "resolvedAt",
- header: "Resolved on",
- cell: ({ row }: { row: Row<FraudGroupProps> }) => {
- const user = row.original.user;
- const resolvedAt = row.original.resolvedAt;
-
- if (!resolvedAt || !user) return "-";
-
- return (
- <UserRowItem user={user} date={resolvedAt} label="Resolved at" />
- );
- },
- },
{
id: "partner",
header: "Partner",
@@ -158,6 +144,37 @@ export function ResolvedFraudGroupTable() {
: {},
},
},
+ {
+ id: "resolvedAt",
+ header: "Resolved on",
+ cell: ({ row }: { row: Row<FraudGroupProps> }) => {
+ const user = row.original.user;
+ const resolvedAt = row.original.resolvedAt;
+
+ if (!resolvedAt || !user) return "-";
+
+ return (
+ <UserRowItem user={user} date={resolvedAt} label="Resolved at" />
+ );
+ },
+ },
+ {
+ id: "resolutionReason",
+ header: "Note",
+ cell: ({ row }: { row: Row<FraudGroupProps> }) => {
+ const resolutionReason = row.original.resolutionReason;
+
+ if (!resolutionReason) return "-";
+
+ return (
+ <Tooltip content={resolutionReason}>
+ <span className="line-clamp-1 cursor-help truncate">
+ {resolutionReason}
+ </span>
+ </Tooltip>
+ );
+ },
+ },
],
[],
);
diff --git a/packages/utils/src/functions/pretty-print.ts b/packages/utils/src/functions/pretty-print.ts
index 7575ecd3b8..c9e710c7bc 100644
--- a/packages/utils/src/functions/pretty-print.ts
+++ b/packages/utils/src/functions/pretty-print.ts
@@ -1,17 +1,15 @@
export function prettyPrint(value: any, indent = 2) {
- console.log(
- JSON.stringify(
- value,
- (_key, val) => {
- if (val instanceof Set) return { __type: "Set", values: [...val] };
- if (val instanceof Map)
- return { __type: "Map", entries: [...val.entries()] };
- if (val instanceof Date) return val.toISOString();
- if (val instanceof Error)
- return { __type: "Error", message: val.message, stack: val.stack };
- return val;
- },
- indent,
- ),
+ return JSON.stringify(
+ value,
+ (_key, val) => {
+ if (val instanceof Set) return { __type: "Set", values: [...val] };
+ if (val instanceof Map)
+ return { __type: "Map", entries: [...val.entries()] };
+ if (val instanceof Date) return val.toISOString();
+ if (val instanceof Error)
+ return { __type: "Error", message: val.message, stack: val.stack };
+ return val;
+ },
+ indent,
);
}