fix(dashboard): improvements to notifications templates
This commit is contained in:
@@ -10,7 +10,7 @@ type WithLabel = {
|
||||
children: React.ReactNode;
|
||||
label: string;
|
||||
error?: string | undefined;
|
||||
info?: string;
|
||||
info?: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
type InputWithLabelProps = InputProps & Omit<WithLabel, 'children'>;
|
||||
|
||||
@@ -28,7 +28,7 @@ export function useColumns() {
|
||||
const { title, isReadAt } = row.original;
|
||||
return (
|
||||
<div className="row gap-2 items-center">
|
||||
{isReadAt === null && <PingBadge>Unread</PingBadge>}
|
||||
{/* {isReadAt === null && <PingBadge>Unread</PingBadge>} */}
|
||||
<span className="max-w-md truncate font-medium">{title}</span>
|
||||
</div>
|
||||
);
|
||||
@@ -46,6 +46,22 @@ export function useColumns() {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'integration',
|
||||
header: 'Integration',
|
||||
cell({ row }) {
|
||||
const integration = row.original.integration;
|
||||
return <div>{integration?.name}</div>;
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'notificationRule',
|
||||
header: 'Rule',
|
||||
cell({ row }) {
|
||||
const rule = row.original.notificationRule;
|
||||
return <div>{rule?.name}</div>;
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'country',
|
||||
header: 'Country',
|
||||
@@ -121,16 +137,8 @@ export function useColumns() {
|
||||
header: 'Created at',
|
||||
cell({ row }) {
|
||||
const date = row.original.createdAt;
|
||||
const rule = row.original.integration?.notificationRules[0];
|
||||
return (
|
||||
<div className="col gap-1">
|
||||
<div>{isToday(date) ? formatTime(date) : formatDateTime(date)}</div>
|
||||
{rule && (
|
||||
<div className="text-sm text-muted-foreground">
|
||||
Rule: {rule.name}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div>{isToday(date) ? formatTime(date) : formatDateTime(date)}</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -62,7 +62,12 @@ export function Tooltiper({
|
||||
if (disabled) return children;
|
||||
return (
|
||||
<Tooltip delayDuration={delayDuration}>
|
||||
<TooltipTrigger asChild={asChild} className={className} onClick={onClick}>
|
||||
<TooltipTrigger
|
||||
asChild={asChild}
|
||||
className={className}
|
||||
onClick={onClick}
|
||||
type="button"
|
||||
>
|
||||
{children}
|
||||
</TooltipTrigger>
|
||||
<TooltipPortal>
|
||||
|
||||
Reference in New Issue
Block a user