class ManageRecipients extends YATBaseTable

Livewire component to manage Alert Recipients.

This component provides a comprehensive interface for managing alert recipients, including creating, editing, and deleting recipients, as well as managing their active status.

Properties

string $tableName

The name of the table displayed

string $model

The model class associated with the table

AlertRecipient|null $selectedRecipient

The currently selected recipient for editing/deleting

bool $createRecipient

Whether the modal is in create mode

bool $openEditRecipientModal

Whether the edit/create modal is open

int|string $recipientType

The selected alert type ID

int|string $recipientChannel

The selected channel ID

string $recipientAddress

The recipient's address (email, chat ID, etc.)

string|null $recipientBot

The bot identifier (optional)

bool $recipientIsActive

The active status of the recipient

Collection $types

Available alert types

Collection $channels

Available alert channels

bool $openDeleteConfirmationModal

Whether the delete confirmation modal is open

int|string|null $recipientToDeleteId

The ID of the recipient pending deletion

Methods

void
settings()

Configure the table settings.

array
columns()

Define the columns for the table.

array
filters()

Define the filters for the table.

array<string,string>
rules()

Define validation rules.

void
openNewRecipientModal()

Prepare the modal for creating a new recipient.

void
storeRecipient()

Verify validation rules and create a new recipient.

void
editRecipient(int|string $id)

Prepare the modal for editing an existing recipient.

void
updateRecipient()

Update the existing recipient.

void
confirmDeleteRecipient(int|string $id)

Open confirmation modal for deleting a recipient.

void
deleteRecipient()

Delete the confirmed recipient.

array
options()

Define the bulk actions available for the table.

BinaryFileResponse
export_all()

Export all data to Excel.

BinaryFileResponse
export_filtered()

Export filtered data to Excel.

BinaryFileResponse|void
export_selected()

Export selected rows to Excel.

Details

at line 59
void settings()

Configure the table settings.

Return Value

void

at line 83
array columns()

Define the columns for the table.

Return Value

array

at line 118
array filters()

Define the filters for the table.

Return Value

array

at line 128
protected array<string,string> rules()

Define validation rules.

Return Value

array<string,string>

at line 144
void openNewRecipientModal()

Prepare the modal for creating a new recipient.

Return Value

void

at line 157
void storeRecipient()

Verify validation rules and create a new recipient.

Return Value

void

at line 180
void editRecipient(int|string $id)

Prepare the modal for editing an existing recipient.

Parameters

int|string $id

The ID of the recipient

Return Value

void

at line 198
void updateRecipient()

Update the existing recipient.

Return Value

void

at line 218
void confirmDeleteRecipient(int|string $id)

Open confirmation modal for deleting a recipient.

Parameters

int|string $id

The ID of the recipient to delete

Return Value

void

at line 229
void deleteRecipient()

Delete the confirmed recipient.

Return Value

void

at line 247
array options()

Define the bulk actions available for the table.

Return Value

array

at line 261
BinaryFileResponse export_all()

Export all data to Excel.

Return Value

BinaryFileResponse

at line 272
BinaryFileResponse export_filtered()

Export filtered data to Excel.

Return Value

BinaryFileResponse

at line 283
BinaryFileResponse|void export_selected()

Export selected rows to Excel.

Return Value

BinaryFileResponse|void