feat: initialize Dr-Panel project with patient file number support
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\PatientResource\Pages;
|
||||
|
||||
use App\Filament\Resources\PatientResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
use Filament\Support\Enums\Width;
|
||||
|
||||
class CreatePatient extends CreateRecord
|
||||
{
|
||||
protected static string $resource = PatientResource::class;
|
||||
|
||||
protected Width|string|null $maxContentWidth = Width::SevenExtraLarge;
|
||||
|
||||
protected function getFormActions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\PatientResource\Pages;
|
||||
|
||||
use App\Filament\Resources\PatientResource;
|
||||
use App\Models\SurgeryAppointment;
|
||||
use App\Models\SurgeryCenter;
|
||||
use Carbon\Carbon;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Schemas\Components\Grid;
|
||||
use Filament\Forms\Components\Placeholder;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TimePicker;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use Filament\Support\Enums\Width;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Morilog\Jalali\Jalalian;
|
||||
|
||||
class EditPatient extends EditRecord
|
||||
{
|
||||
protected static string $resource = PatientResource::class;
|
||||
|
||||
protected Width|string|null $maxContentWidth = Width::SevenExtraLarge;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
$this->getSaveFormAction()
|
||||
->formId('form'),
|
||||
|
||||
Action::make('surgeryAppointment')
|
||||
->label(__('patients.actions.surgery_appointment'))
|
||||
->icon('heroicon-o-calendar-days')
|
||||
->color(fn () => $this->getRecord()->surgeryAppointment ? 'success' : 'info')
|
||||
->modalWidth(Width::Large)
|
||||
->fillForm(function (): array {
|
||||
$appointment = $this->getRecord()->surgeryAppointment;
|
||||
|
||||
if ($appointment) {
|
||||
$surgeryDate = $appointment->surgery_date;
|
||||
return [
|
||||
'surgery_date' => $surgeryDate?->format('Y-m-d'),
|
||||
'surgery_time' => $surgeryDate?->format('H:i'),
|
||||
'surgery_center_id' => $appointment->surgery_center_id,
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'surgery_date' => null,
|
||||
'surgery_time' => '09:00',
|
||||
'surgery_center_id' => null,
|
||||
];
|
||||
})
|
||||
->form([
|
||||
Placeholder::make('patient_name')
|
||||
->label(__('patients.fields.full_name'))
|
||||
->content(fn () => $this->getRecord()->full_name),
|
||||
|
||||
Grid::make(2)
|
||||
->schema([
|
||||
DatePicker::make('surgery_date')
|
||||
->label(__('patients.fields.surgery_date'))
|
||||
->jalali()
|
||||
->minDate(today())
|
||||
->required(),
|
||||
|
||||
TimePicker::make('surgery_time')
|
||||
->label(__('patients.fields.surgery_time'))
|
||||
->native(false)
|
||||
->seconds(false)
|
||||
->minutesStep(15),
|
||||
]),
|
||||
|
||||
Select::make('surgery_center_id')
|
||||
->label(__('patients.fields.surgery_center'))
|
||||
->options(fn () => SurgeryCenter::pluck('name', 'id')->toArray())
|
||||
->searchable()
|
||||
->required(),
|
||||
])
|
||||
->modalSubmitAction(false)
|
||||
->extraModalFooterActions(fn (Action $action): array => [
|
||||
$action->makeModalSubmitAction('saveAppointment', arguments: ['save' => true])
|
||||
->label(__('patients.actions.save_appointment'))
|
||||
->color('primary')
|
||||
->icon('heroicon-o-check')
|
||||
->visible(fn () => $this->getRecord()->surgeryAppointment === null),
|
||||
|
||||
Action::make('printAdmissionFromModal')
|
||||
->label(__('patients.actions.print_admission'))
|
||||
->color('warning')
|
||||
->icon('heroicon-o-printer')
|
||||
->url(fn () => route('surgery-appointment.print.admission', $this->getRecord()), shouldOpenInNewTab: true)
|
||||
->visible(fn () => $this->getRecord()->surgeryAppointment !== null),
|
||||
|
||||
$action->makeModalSubmitAction('deleteAppointment', arguments: ['delete' => true])
|
||||
->label(__('patients.actions.delete_appointment'))
|
||||
->color('danger')
|
||||
->icon('heroicon-o-trash')
|
||||
->visible(fn () => $this->getRecord()->surgeryAppointment !== null),
|
||||
])
|
||||
->action(function (array $data, array $arguments): void {
|
||||
$record = $this->getRecord();
|
||||
|
||||
if (! empty($arguments['delete'])) {
|
||||
$existingAppointment = $record->surgeryAppointment;
|
||||
|
||||
$existingAppointment?->delete();
|
||||
$record->unsetRelation('surgeryAppointment');
|
||||
|
||||
if ($existingAppointment) {
|
||||
\App\Filament\Pages\SmsLogsPage::cancelAppointmentMessages(
|
||||
$record->hand_phone ?? '',
|
||||
$existingAppointment->surgery_date->toDateTimeString(),
|
||||
);
|
||||
}
|
||||
|
||||
\Filament\Notifications\Notification::make()
|
||||
->title(__('patients.actions.appointment_deleted'))
|
||||
->success()
|
||||
->send();
|
||||
return;
|
||||
}
|
||||
|
||||
$dateStr = $data['surgery_date'];
|
||||
$timeStr = $data['surgery_time'] ?? '00:00';
|
||||
$surgeryDateTime = Carbon::parse($dateStr . ' ' . $timeStr);
|
||||
$jalaliDate = Jalalian::fromCarbon($surgeryDateTime)->format('Y/m/d');
|
||||
|
||||
$apiKey = \App\Models\OsurgInitial::val('sms_api_key', config('sms.api_key'));
|
||||
$apiUrl = \App\Models\OsurgInitial::val('sms_api_url', config('sms.api_url'));
|
||||
$smsPayload = [
|
||||
'phoneNumber' => $record->hand_phone ?? '',
|
||||
'patientName' => $record->full_name,
|
||||
'surgeryDate' => $jalaliDate,
|
||||
'patientId' => $record->id,
|
||||
'surgeryDateFull' => $surgeryDateTime->toDateTimeString(),
|
||||
];
|
||||
|
||||
// مرحله ۱: ارسال پیامک اولیه
|
||||
try {
|
||||
$response = Http::timeout(30)
|
||||
->withHeader('X-API-Key', $apiKey)
|
||||
->asJson()
|
||||
->post($apiUrl . '/surgery-reminder', $smsPayload);
|
||||
|
||||
if (! ($response->json('success') ?? false)) {
|
||||
\Filament\Notifications\Notification::make()
|
||||
->title(__('patients.actions.api_failed'))
|
||||
->body($response->json('message') ?? '')
|
||||
->danger()
|
||||
->send();
|
||||
return;
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
\Filament\Notifications\Notification::make()
|
||||
->title(__('patients.actions.api_failed'))
|
||||
->body($e->getMessage())
|
||||
->danger()
|
||||
->send();
|
||||
return;
|
||||
}
|
||||
|
||||
$appointment = SurgeryAppointment::updateOrCreate(
|
||||
['patient_id' => $record->id],
|
||||
[
|
||||
'surgery_date' => $surgeryDateTime,
|
||||
'surgery_center_id' => $data['surgery_center_id'],
|
||||
]
|
||||
);
|
||||
|
||||
$record->unsetRelation('surgeryAppointment');
|
||||
|
||||
try {
|
||||
Http::timeout(30)
|
||||
->withHeader('X-API-Key', $apiKey)
|
||||
->asJson()
|
||||
->post($apiUrl . '/surgery-reminder', array_merge($smsPayload, [
|
||||
'appointmentId' => $appointment->id,
|
||||
]));
|
||||
} catch (\Throwable) {
|
||||
}
|
||||
|
||||
\Filament\Notifications\Notification::make()
|
||||
->title(__('patients.actions.appointment_saved'))
|
||||
->body(__('patients.actions.sms_sent'))
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
|
||||
Action::make('printPrescription')
|
||||
->label(__('prescriptions.actions.print_prescription'))
|
||||
->icon('heroicon-o-printer')
|
||||
->color('info')
|
||||
->visible(fn () => $this->getRecord()->prescriptions()->exists())
|
||||
->url(fn () => route('prescription.print', $this->getRecord()->prescriptions()->latest()->first()))
|
||||
->openUrlInNewTab(),
|
||||
|
||||
Action::make('printAdmission')
|
||||
->label(__('prescriptions.actions.print_admission'))
|
||||
->icon('heroicon-o-printer')
|
||||
->color('warning')
|
||||
->visible(fn () => $this->getRecord()->surgeryAppointment !== null)
|
||||
->url(fn () => route('surgery-appointment.print.admission', $this->getRecord()))
|
||||
->openUrlInNewTab(),
|
||||
|
||||
Action::make('printLab')
|
||||
->label(__('prescriptions.actions.print_lab'))
|
||||
->icon('heroicon-o-beaker')
|
||||
->color('gray')
|
||||
->url(fn () => route('patient.print.lab', $this->getRecord()))
|
||||
->openUrlInNewTab(),
|
||||
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
|
||||
protected function mutateFormDataBeforeFill(array $data): array
|
||||
{
|
||||
foreach (['birth_date'] as $field) {
|
||||
if (($data[$field] ?? null) === '') {
|
||||
$data[$field] = null;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (['surgery_before', 'sergery_after'] as $field) {
|
||||
if (($data[$field] ?? null) === '') {
|
||||
$data[$field] = null;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (['current_illness_1', 'current_illness_2', 'has_alergyto'] as $field) {
|
||||
if (is_null($data[$field] ?? null)) {
|
||||
$data[$field] = [];
|
||||
}
|
||||
}
|
||||
|
||||
foreach (['photos_before', 'photos_after', 'videos', 'audio_files'] as $field) {
|
||||
$data[$field] = static::normalizeFileList($data[$field] ?? null);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function normalizeFileList(mixed $value): array
|
||||
{
|
||||
if (empty($value)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (is_string($value)) {
|
||||
$decoded = json_decode($value, true);
|
||||
$value = is_array($decoded) ? $decoded : [$value];
|
||||
}
|
||||
|
||||
return collect((array) $value)
|
||||
->map(function ($item) {
|
||||
if (is_array($item) && isset($item['name'])) {
|
||||
return $item['name'];
|
||||
}
|
||||
if (is_string($item) && $item !== '') {
|
||||
return $item;
|
||||
}
|
||||
return null;
|
||||
})
|
||||
->filter()
|
||||
->values()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
protected function getFormActions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\PatientResource\Pages;
|
||||
|
||||
use App\Filament\Resources\PatientResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Filament\Support\Enums\Width;
|
||||
|
||||
class ListPatients extends ListRecords
|
||||
{
|
||||
protected static string $resource = PatientResource::class;
|
||||
|
||||
protected Width|string|null $maxContentWidth = Width::Full;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make()
|
||||
->icon('heroicon-o-plus'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\PatientResource\Pages;
|
||||
|
||||
use App\Filament\Resources\PatientResource;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Resources\Pages\ViewRecord;
|
||||
use Filament\Support\Enums\Width;
|
||||
|
||||
class ViewPatient extends ViewRecord
|
||||
{
|
||||
protected static string $resource = PatientResource::class;
|
||||
|
||||
protected Width|string|null $maxContentWidth = Width::SevenExtraLarge;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('printPrescription')
|
||||
->label(__('prescriptions.actions.print_prescription'))
|
||||
->icon('heroicon-o-printer')
|
||||
->color('info')
|
||||
->visible(fn () => $this->getRecord()->prescriptions()->exists())
|
||||
->url(fn () => route('prescription.print', $this->getRecord()->prescriptions()->latest()->first()))
|
||||
->openUrlInNewTab(),
|
||||
|
||||
Action::make('printAdmission')
|
||||
->label(__('prescriptions.actions.print_admission'))
|
||||
->icon('heroicon-o-printer')
|
||||
->color('warning')
|
||||
->visible(fn () => $this->getRecord()->surgeryAppointment !== null)
|
||||
->url(fn () => route('surgery-appointment.print.admission', $this->getRecord()))
|
||||
->openUrlInNewTab(),
|
||||
|
||||
Action::make('printLab')
|
||||
->label(__('prescriptions.actions.print_lab'))
|
||||
->icon('heroicon-o-beaker')
|
||||
->color('gray')
|
||||
->url(fn () => route('patient.print.lab', $this->getRecord()))
|
||||
->openUrlInNewTab(),
|
||||
|
||||
Action::make('edit')
|
||||
->label(__('filament-actions::edit.single.label'))
|
||||
->icon('heroicon-o-pencil-square')
|
||||
->color('primary')
|
||||
->url(fn () => PatientResource::getUrl('edit', ['record' => $this->getRecord()])),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\PatientResource\RelationManagers;
|
||||
|
||||
use App\Filament\Resources\PatientResource\Pages\CreatePatient;
|
||||
use App\Filament\Resources\PatientResource\Pages\EditPatient;
|
||||
use App\Filament\Resources\PatientResource\Pages\ViewPatient;
|
||||
use App\Models\Doctor;
|
||||
use App\Models\PaymentType;
|
||||
use App\Models\Treatment;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\TimePicker;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Schemas\Components\Grid;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Columns\Summarizers\Sum;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class VisitsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'visits';
|
||||
|
||||
public static function canViewForRecord(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): bool
|
||||
{
|
||||
return in_array($pageClass, [CreatePatient::class, EditPatient::class, ViewPatient::class]);
|
||||
}
|
||||
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __('navigation.visits.title');
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Grid::make()
|
||||
->schema([
|
||||
Section::make(__('visits.sections.visit_info'))
|
||||
->schema([
|
||||
DatePicker::make('visit_date')
|
||||
->label(__('visits.fields.visit_date'))
|
||||
->jalali()
|
||||
->default(now())
|
||||
->required(),
|
||||
|
||||
TimePicker::make('visit_time')
|
||||
->label(__('visits.fields.visit_time'))
|
||||
->native(false)
|
||||
->seconds(false)
|
||||
->afterStateHydrated(function ($component, $state) {
|
||||
if (blank($state)) {
|
||||
$component->state(now()->format('Y-m-d H:i:s'));
|
||||
}
|
||||
}),
|
||||
|
||||
Select::make('doctor')
|
||||
->label(__('visits.fields.doctor'))
|
||||
->options(fn () => Doctor::all()->mapWithKeys(
|
||||
fn ($d) => [$d->id => $d->full_name]
|
||||
)->toArray())
|
||||
->default(fn () => Doctor::where('is_default', true)->first()?->id)
|
||||
->nullable(),
|
||||
|
||||
Select::make('treatment')
|
||||
->label(__('visits.fields.treatment'))
|
||||
->options(fn () => Treatment::all()->mapWithKeys(
|
||||
fn ($t) => [$t->id => ($t->descriptions ? '★ ' : '') . ($t->treatment_name ?: $t->treatment_type)]
|
||||
)->toArray())
|
||||
->searchable()
|
||||
->required()
|
||||
->live()
|
||||
->afterStateUpdated(function ($state, callable $set) {
|
||||
if ($state) {
|
||||
$treatment = Treatment::find($state);
|
||||
if ($treatment) {
|
||||
if ($treatment->treatment_cost > 0) {
|
||||
$set('treatment_cost', $treatment->treatment_cost);
|
||||
$set('paid_amount', $treatment->treatment_cost);
|
||||
}
|
||||
if ($treatment->descriptions) {
|
||||
$set('treatment_description', $treatment->descriptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
])
|
||||
->columns(2)
|
||||
->columnSpanFull(),
|
||||
|
||||
Section::make(__('visits.sections.financial_info'))
|
||||
->schema([
|
||||
TextInput::make('treatment_cost')
|
||||
->label(__('visits.fields.treatment_cost'))
|
||||
->numeric()
|
||||
->nullable()
|
||||
->suffix(__('visits.fields.currency')),
|
||||
|
||||
TextInput::make('paid_amount')
|
||||
->label(__('visits.fields.paid_amount'))
|
||||
->numeric()
|
||||
->nullable()
|
||||
->suffix(__('visits.fields.currency')),
|
||||
|
||||
Select::make('payment_type')
|
||||
->label(__('visits.fields.payment_type'))
|
||||
->options(fn () => PaymentType::all()->mapWithKeys(
|
||||
fn ($p) => [$p->id => $p->payment_type]
|
||||
)->toArray())
|
||||
->searchable()
|
||||
->required(),
|
||||
])
|
||||
->columns(3)
|
||||
->columnSpanFull(),
|
||||
|
||||
Section::make(__('visits.sections.treatment_details'))
|
||||
->schema([
|
||||
Textarea::make('treatment_description')
|
||||
->label(__('visits.fields.treatment_description'))
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
|
||||
private static function jalaliDate(?string $date): string
|
||||
{
|
||||
if (! $date) {
|
||||
return '-';
|
||||
}
|
||||
try {
|
||||
return \Morilog\Jalali\Jalalian::fromCarbon(\Carbon\Carbon::parse($date))->format('Y/m/d');
|
||||
} catch (\Exception $e) {
|
||||
return $date;
|
||||
}
|
||||
}
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->recordTitleAttribute('visit_date')
|
||||
->modifyQueryUsing(fn ($query) => $query->with(['doctorRecord', 'treatmentRecord', 'paymentTypeRecord']))
|
||||
->deferLoading()
|
||||
->columns([
|
||||
TextColumn::make('visit_date')
|
||||
->label(__('visits.fields.visit_date'))
|
||||
->sortable()
|
||||
->wrap(false)
|
||||
->formatStateUsing(function ($state) {
|
||||
if (! $state) {
|
||||
return '-';
|
||||
}
|
||||
try {
|
||||
$date = \Carbon\Carbon::parse($state);
|
||||
return \Morilog\Jalali\Jalalian::fromCarbon($date)->format('Y/m/d');
|
||||
} catch (\Exception $e) {
|
||||
return $state;
|
||||
}
|
||||
})
|
||||
->placeholder('-'),
|
||||
|
||||
TextColumn::make('doctorRecord.first_name')
|
||||
->label(__('visits.fields.doctor'))
|
||||
->formatStateUsing(fn ($record) => $record->doctorRecord?->full_name ?? '-')
|
||||
->wrap(false)
|
||||
->placeholder('-'),
|
||||
|
||||
TextColumn::make('treatmentRecord.treatment_name')
|
||||
->label(__('visits.fields.treatment'))
|
||||
->formatStateUsing(fn ($record) => $record->treatmentRecord
|
||||
? ($record->treatmentRecord->treatment_name ?: $record->treatmentRecord->treatment_type)
|
||||
: '-')
|
||||
->wrap(false)
|
||||
->placeholder('-'),
|
||||
|
||||
TextColumn::make('treatment_cost')
|
||||
->label(__('visits.fields.treatment_cost'))
|
||||
->formatStateUsing(fn ($state) => $state !== null ? number_format((int) $state) : '-')
|
||||
->wrap(false)
|
||||
->placeholder('-')
|
||||
->summarize(
|
||||
Sum::make()
|
||||
->label(__('visits.fields.treatment_cost'))
|
||||
->formatStateUsing(fn ($state) => number_format((int) ($state ?? 0)))
|
||||
),
|
||||
|
||||
TextColumn::make('paid_amount')
|
||||
->label(__('visits.fields.paid_amount'))
|
||||
->formatStateUsing(fn ($state) => $state !== null ? number_format((int) $state) : '-')
|
||||
->wrap(false)
|
||||
->placeholder('-')
|
||||
->summarize(
|
||||
Sum::make()
|
||||
->label(__('visits.fields.paid_amount'))
|
||||
->formatStateUsing(fn ($state) => number_format((int) ($state ?? 0)))
|
||||
),
|
||||
|
||||
TextColumn::make('remained_amount')
|
||||
->label(__('visits.fields.remained_amount'))
|
||||
->state(fn ($record) => $record->remained_amount)
|
||||
->formatStateUsing(fn ($state) => number_format((int) $state))
|
||||
->color(fn ($record) => $record->remained_amount > 0 ? 'danger' : 'success')
|
||||
->wrap(false),
|
||||
|
||||
TextColumn::make('paymentTypeRecord.payment_type')
|
||||
->label(__('visits.fields.payment_type'))
|
||||
->wrap(false)
|
||||
->placeholder('-'),
|
||||
])
|
||||
->defaultSort('visit_date', 'desc')
|
||||
->headerActions([
|
||||
CreateAction::make()
|
||||
->label(__('visits.actions.create'))
|
||||
->icon('heroicon-o-plus')
|
||||
->slideOver()
|
||||
->modalWidth('4xl'),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
->slideOver()
|
||||
->modalWidth('4xl')
|
||||
->modalHeading(fn () => __('filament-actions::edit.single.modal.heading', ['label' => $this->getOwnerRecord()->full_name])),
|
||||
DeleteAction::make()
|
||||
->modalHeading(fn () => __('filament-actions::delete.single.modal.heading', ['label' => $this->getOwnerRecord()->full_name])),
|
||||
])
|
||||
->toolbarActions([]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user