mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Ready for release 1.1.4
This commit is contained in:
+6
-1
@@ -5,6 +5,7 @@ import {NotifierCard} from "@/components/wrappers/dashboard/common/notifier/noti
|
||||
import {useState} from "react";
|
||||
import {EmptyStatePlaceholder} from "@/components/wrappers/common/empty-state-placeholder";
|
||||
import {OrganizationWithMembers} from "@/db/schema/03_organization";
|
||||
import {NotifierAddEditModal} from "@/components/wrappers/dashboard/common/notifier/notifier-add-edit-modal";
|
||||
|
||||
type NotificationChannelsSectionProps = {
|
||||
notificationChannels: NotificationChannelWith[]
|
||||
@@ -22,8 +23,10 @@ export const NotificationChannelsSection = ({
|
||||
|
||||
return (
|
||||
<div className="h-full">
|
||||
<NotifierAddEditModal open={isAddModalOpen} onOpenChangeAction={setIsAddModalOpen} adminView={false} trigger={false}/>
|
||||
{hasNotifiers ? (
|
||||
<div className="h-full">
|
||||
|
||||
<CardsWithPagination
|
||||
data={notificationChannels}
|
||||
cardItem={NotifierCard}
|
||||
@@ -36,7 +39,9 @@ export const NotificationChannelsSection = ({
|
||||
) : (
|
||||
<EmptyStatePlaceholder
|
||||
text="No notification channels configured yet"
|
||||
onClick={() => setIsAddModalOpen(true)}
|
||||
onClick={() => {
|
||||
setIsAddModalOpen(true)
|
||||
}}
|
||||
className="h-full"
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -54,16 +54,21 @@ export function notificationLogsColumns(): ColumnDef<NotificationLogWithRelation
|
||||
},
|
||||
{
|
||||
accessorKey: "policy",
|
||||
header: "Event Kinds",
|
||||
cell: ({row}) => {
|
||||
const eventKinds = row.original.policy?.eventKinds ?? [];
|
||||
header: "Event Kind",
|
||||
cell: ({ row }) => {
|
||||
const eventKind = row.original.policy?.event;
|
||||
|
||||
if (!eventKind) {
|
||||
return (
|
||||
<div className="text-muted-foreground italic">
|
||||
No event
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
{eventKinds.map((eventKind, idx) => (
|
||||
<div key={idx} className="flex items-center gap-2">
|
||||
<Badge>{eventKind}</Badge>
|
||||
</div>
|
||||
))}
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge>{eventKind}</Badge>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user