Skip to main content
zerotal

Documentation


Documentation / @zerotal/admin / index / DatabaseNotificationOptions

Interface: DatabaseNotificationOptions

Defined in: admin/src/databaseNotifications.ts:33

Properties

table?

optional table?: string

Defined in: admin/src/databaseNotifications.ts:35

Table holding the notifications. Defaults to "notifications".


notifiable?

optional notifiable?: () => unknown

Defined in: admin/src/databaseNotifications.ts:41

Who the bell is showing. Defaults to the signed-in user from @zerotal/auth; returning null shows nothing, which is the right answer for a guest.

Returns

unknown


limit?

optional limit?: number

Defined in: admin/src/databaseNotifications.ts:43

How many to show. Defaults to 20 — a bell is not an archive.


present?

optional present?: (row, data) => AdminNotification

Defined in: admin/src/databaseNotifications.ts:49

Turn a stored row into what the panel renders. The default reads title, body/message, url/href and icon out of the payload, which is what most notifications carry.

Parameters

row

StoredNotification

data

Record<string, unknown>

Returns

AdminNotification