ManageRecipients
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
Configure the table settings.
Define the columns for the table.
Define the filters for the table.
Define validation rules.
Prepare the modal for creating a new recipient.
Verify validation rules and create a new recipient.
Prepare the modal for editing an existing recipient.
Update the existing recipient.
Open confirmation modal for deleting a recipient.
Delete the confirmed recipient.
Define the bulk actions available for the table.
Export all data to Excel.
Export filtered data to Excel.
Export selected rows to Excel.
Details
at line 59
void
settings()
Configure the table settings.
at line 83
array
columns()
Define the columns for the table.
at line 118
array
filters()
Define the filters for the table.
at line 128
protected array<string,string>
rules()
Define validation rules.
at line 144
void
openNewRecipientModal()
Prepare the modal for creating a new recipient.
at line 157
void
storeRecipient()
Verify validation rules and create a new recipient.
at line 180
void
editRecipient(int|string $id)
Prepare the modal for editing an existing recipient.
at line 198
void
updateRecipient()
Update the existing recipient.
at line 218
void
confirmDeleteRecipient(int|string $id)
Open confirmation modal for deleting a recipient.
at line 229
void
deleteRecipient()
Delete the confirmed recipient.
at line 247
array
options()
Define the bulk actions available for the table.
at line 261
BinaryFileResponse
export_all()
Export all data to Excel.
at line 272
BinaryFileResponse
export_filtered()
Export filtered data to Excel.
at line 283
BinaryFileResponse|void
export_selected()
Export selected rows to Excel.