diff --git a/app/Enums/ApplicationStatus.php b/app/Enums/ApplicationStatus.php index 0fe3481..2a3fc7f 100644 --- a/app/Enums/ApplicationStatus.php +++ b/app/Enums/ApplicationStatus.php @@ -11,4 +11,90 @@ enum ApplicationStatus: string case TableOffered = 'table_offered'; case TableAccepted = 'table_accepted'; case CheckedIn = 'checked_in'; + + static function for(\App\Models\Application $application): ApplicationStatus + { + if (!is_null($application->canceled_at)) { + return ApplicationStatus::Canceled; + } elseif (!is_null($application->checked_in_at)) { + return ApplicationStatus::CheckedIn; + } elseif (!is_null($application->waiting_at)) { + return ApplicationStatus::Waiting; + } elseif (!is_null($application->offer_accepted_at)) { + return ApplicationStatus::TableAccepted; + } elseif (!is_null($application->offer_sent_at)) { + return ApplicationStatus::TableOffered; + } elseif (($application->type !== \App\Enums\ApplicationType::Dealer || !is_null($application->table_type_assigned)) && !empty($application->table_number)) { + return ApplicationStatus::TableAssigned; + } else { + return ApplicationStatus::Open; + } + } + + function orWhere(\Illuminate\Database\Eloquent\Builder $query) + { + return match ($this) { + ApplicationStatus::Canceled => $query->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('canceled_at', '!=', null) + ), + ApplicationStatus::CheckedIn => $query->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('canceled_at', '=', null) + ->where('checked_in_at', '!=', null) + ), + ApplicationStatus::Waiting => $query->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('canceled_at', '=', null) + ->where('checked_in_at', '=', null) + ->where('waiting_at', '!=', null) + ), + ApplicationStatus::TableAccepted => $query->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('canceled_at', '=', null) + ->where('checked_in_at', '=', null) + ->where('waiting_at', '=', null) + ->where('offer_accepted_at', '!=', null) + ), + ApplicationStatus::TableOffered => $query->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('canceled_at', '=', null) + ->where('checked_in_at', '=', null) + ->where('waiting_at', '=', null) + ->where('offer_accepted_at', '=', null) + ->where('offer_sent_at', '!=', null) + ), + ApplicationStatus::TableAssigned => $query->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('canceled_at', '=', null) + ->where('checked_in_at', '=', null) + ->where('waiting_at', '=', null) + ->where('offer_accepted_at', '=', null) + ->where('offer_sent_at', '=', null) + ->where('table_number', '!=', null) + ->where( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->orWhere('table_type_assigned', '!=', null) + ->orWhere('type', '!=', \App\Enums\ApplicationType::Dealer->value) + ) + ), + ApplicationStatus::Open => $query->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('canceled_at', '=', null) + ->where('checked_in_at', '=', null) + ->where('waiting_at', '=', null) + ->where('offer_accepted_at', '=', null) + ->where('offer_sent_at', '=', null) + ->where( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->orWhere('table_number', '=', null) + ->orWhere( + fn (\Illuminate\Database\Eloquent\Builder $query) => + $query->where('table_type_assigned', '=', null) + ->where('type', '=', \App\Enums\ApplicationType::Dealer->value) + ) + ) + ), + }; + } } diff --git a/app/Filament/Resources/ApplicationResource.php b/app/Filament/Resources/ApplicationResource.php index 49618d4..788bd44 100755 --- a/app/Filament/Resources/ApplicationResource.php +++ b/app/Filament/Resources/ApplicationResource.php @@ -19,7 +19,6 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Log; class ApplicationResource extends Resource { @@ -109,36 +108,66 @@ public static function table(Table $table): Table return $table ->columns([ Tables\Columns\TextColumn::make('id')->label("ID"), - Tables\Columns\TextColumn::make('user.name')->searchable(), - Tables\Columns\BadgeColumn::make('status')->enum(ApplicationStatus::cases())->formatStateUsing(function (Application $record) { - return $record->status->name; - })->colors([ - 'secondary', - 'success' => ApplicationStatus::TableAccepted->value, - 'danger' => ApplicationStatus::Canceled->value - ]), - Tables\Columns\TextColumn::make('requestedTable.name')->icon(fn($record) => $record->type === ApplicationType::Dealer && $record->table_type_requested !== $record->table_type_assigned ? 'heroicon-o-exclamation' : '')->iconPosition('after')->color(fn($record) => $record->type === ApplicationType::Dealer && $record->table_type_requested !== $record->table_type_assigned ? 'warning' : ''), - Tables\Columns\SelectColumn::make('tableTypeAssignedAutoNull')->label('Assigned table')->options(TableType::pluck('name', 'id')->toArray()), - Tables\Columns\TextColumn::make('type')->formatStateUsing(function (string $state) { - return ucfirst($state); - })->sortable(), - Tables\Columns\TextInputColumn::make('table_number')->sortable()->searchable(), - Tables\Columns\IconColumn::make('is_ready')->label('Ready')->getStateUsing(function (Application $record) { - return $record->isReady(); - })->boolean(), - Tables\Columns\TextColumn::make('dlrshp')->getStateUsing(function (Application $record) { - return $record->parent ?: $record->id; - })->sortable(query: function (Builder $query, string $direction): Builder { - return $query - ->orderBy(DB::raw('IF(`type` = \'dealer\', `id`,`parent`)'), $direction); - })->searchable(query: function (Builder $query, string $search): Builder { - return $query - ->where('id', '=', $search) - ->orWhere('parent', '=', $search); - }), - Tables\Columns\TextColumn::make('display_name')->searchable(), - Tables\Columns\IconColumn::make('wanted_neighbors')->label('N Wanted')->default(false)->boolean(), - Tables\Columns\IconColumn::make('comment')->default(false)->boolean(), + Tables\Columns\TextColumn::make('user.name') + ->searchable(), + Tables\Columns\BadgeColumn::make('status') + ->enum(ApplicationStatus::cases()) + ->formatStateUsing(function (Application $record) { + return $record->status->name; + }) + ->colors([ + 'secondary', + 'success' => ApplicationStatus::TableAccepted->value, + 'danger' => ApplicationStatus::Canceled->value + ]), + Tables\Columns\TextColumn::make('requestedTable.name') + ->icon(fn ($record) => $record->type === ApplicationType::Dealer && $record->table_type_requested !== $record->table_type_assigned ? 'heroicon-o-exclamation' : '') + ->iconPosition('after') + ->color(fn ($record) => $record->type === ApplicationType::Dealer && $record->table_type_requested !== $record->table_type_assigned ? 'warning' : '') + ->sortable(), + Tables\Columns\SelectColumn::make('tableTypeAssignedAutoNull') + ->label('Assigned table') + ->options(TableType::pluck('name', 'id')->toArray()) + ->sortable(query: function (Builder $query, string $direction): Builder { + return $query + ->orderBy('table_type_assigned', $direction); + }), + Tables\Columns\TextColumn::make('type') + ->formatStateUsing(function (string $state) { + return ucfirst($state); + }) + ->sortable(), + Tables\Columns\TextInputColumn::make('table_number') + ->sortable() + ->searchable(), + Tables\Columns\IconColumn::make('is_ready') + ->label('Ready') + ->getStateUsing(function (Application $record) { + return $record->isReady(); + }) + ->boolean(), + Tables\Columns\TextColumn::make('dlrshp') + ->getStateUsing(function (Application $record) { + return $record->parent ?: $record->id; + }) + ->sortable(query: function (Builder $query, string $direction): Builder { + return $query + ->orderBy(DB::raw('IF(`type` = \'dealer\', `id`,`parent`)'), $direction); + }) + ->searchable(query: function (Builder $query, string $search): Builder { + return $query + ->where('id', '=', $search) + ->orWhere('parent', '=', $search); + }), + Tables\Columns\TextColumn::make('display_name') + ->searchable(), + Tables\Columns\IconColumn::make('wanted_neighbors') + ->label('N Wanted') + ->default(false) + ->boolean(), + Tables\Columns\IconColumn::make('comment') + ->default(false) + ->boolean(), Tables\Columns\IconColumn::make('is_afterdark') ->label('AD') ->sortable() @@ -155,11 +184,41 @@ public static function table(Table $table): Table ->dateTime(), ]) ->filters([ - Tables\Filters\Filter::make('parent')->query(fn (Builder $query): Builder => $query->where('type', 'dealer'))->label('Only Dealerships'), - Tables\Filters\Filter::make('assignedTable')->query(fn (Builder $query): Builder => $query->whereNull('table_type_assigned'))->label('Missing assigned table'), - Tables\Filters\Filter::make('table_number')->query(fn (Builder $query): Builder => $query->whereNull('table_number'))->label('Missing table number'), - Tables\Filters\Filter::make('is_afterdark')->query(fn (Builder $query): Builder => $query->where('is_afterdark', '=', '1'))->label('Is Afterdark'), - Tables\Filters\Filter::make('table_assigned')->query(fn (Builder $query): Builder => $query->whereNotNull('offer_sent_at'))->label('Table assigned'), + Tables\Filters\Filter::make('parent') + ->query(fn (Builder $query): Builder => $query->where('type', 'dealer')) + ->label('Only Dealerships'), + Tables\Filters\Filter::make('assignedTable') + ->query(fn (Builder $query): Builder => $query->whereNull('table_type_assigned')) + ->label('Missing assigned table'), + Tables\Filters\Filter::make('table_number') + ->query(fn (Builder $query): Builder => $query->whereNull('table_number')) + ->label('Missing table number'), + Tables\Filters\Filter::make('is_afterdark') + ->query(fn (Builder $query): Builder => $query->where('is_afterdark', '=', '1')) + ->label('Is Afterdark'), + Tables\Filters\Filter::make('table_assigned') + ->query(fn (Builder $query): Builder => $query->whereNotNull('offer_sent_at')) + ->label('Table assigned'), + Tables\Filters\SelectFilter::make('requestedTable') + ->relationship('requestedTable', 'name') + ->multiple(), + Tables\Filters\SelectFilter::make('assignedTable') + ->relationship('assignedTable', 'name') + ->multiple(), + Tables\Filters\SelectFilter::make('status') + ->options(array_combine(array_column(ApplicationStatus::cases(), 'value'), array_column(ApplicationStatus::cases(), 'name'))) + ->query(function (Builder $query, array $data) { + \Illuminate\Support\Facades\Log::debug(print_r($data, true)); + if (!key_exists('values', $data)) { + return; + } + $query->where(function (Builder $query) use ($data) { + foreach ($data['values'] as $value) { + ApplicationStatus::tryFrom($value)?->orWhere($query); + } + }); + }) + ->multiple(), ]) ->actions([ Tables\Actions\EditAction::make(), @@ -237,7 +296,9 @@ public static function getRelations(): array { return [ RelationManagers\ChildrenRelationManager::class, - RelationManagers\ParentRelationManager::class + RelationManagers\ParentRelationManager::class, + RelationManagers\UserRelationManager::class, + RelationManagers\ProfileRelationManager::class, ]; } diff --git a/app/Filament/Resources/ApplicationResource/Pages/EditApplication.php b/app/Filament/Resources/ApplicationResource/Pages/EditApplication.php index 7e7ee5e..828e8cc 100644 --- a/app/Filament/Resources/ApplicationResource/Pages/EditApplication.php +++ b/app/Filament/Resources/ApplicationResource/Pages/EditApplication.php @@ -53,7 +53,7 @@ public function sendStatusNotification() ->body("Notified application {$application->id} of user {$user->name} about being put on the waiting list.") ->success(); break; - case StatusNotificationResult::SharesInvalid->name: + case StatusNotificationResult::SharesInvalid: $frontendNotification->title('Notification not sent') ->body("Application not notified because some uncanceled shares have not been assigned to the same table number!") ->danger(); diff --git a/app/Filament/Resources/ApplicationResource/RelationManagers/ProfileRelationManager.php b/app/Filament/Resources/ApplicationResource/RelationManagers/ProfileRelationManager.php new file mode 100644 index 0000000..634346c --- /dev/null +++ b/app/Filament/Resources/ApplicationResource/RelationManagers/ProfileRelationManager.php @@ -0,0 +1,58 @@ +schema([ + Forms\Components\TextInput::make('short_desc') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('short_desc'), + Tables\Columns\TextColumn::make('website'), + Tables\Columns\TextColumn::make('attends_thu'), + Tables\Columns\TextColumn::make('attends_fri'), + Tables\Columns\TextColumn::make('attends_sat'), + ]) + ->filters([ + // + ]) + ->headerActions([ + ]) + ->actions([ + Tables\Actions\Action::make('Show') + ->url(fn(Profile $record): string => ProfileResource::getUrl('edit', ['record' => $record])), + + ]) + ->bulkActions([ + ]); + } +} diff --git a/app/Filament/Resources/ApplicationResource/RelationManagers/UserRelationManager.php b/app/Filament/Resources/ApplicationResource/RelationManagers/UserRelationManager.php new file mode 100644 index 0000000..55f712d --- /dev/null +++ b/app/Filament/Resources/ApplicationResource/RelationManagers/UserRelationManager.php @@ -0,0 +1,64 @@ +schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name'), + Tables\Columns\TextColumn::make('reg_id'), + Tables\Columns\TextColumn::make('email'), + + Tables\Columns\BadgeColumn::make('packages booked') + ->formatStateUsing(fn(?User $record): string => implode(RegSysClientController::getPackages($record->reg_id)) ?? ''), + Tables\Columns\BadgeColumn::make('reg status') + ->formatStateUsing(fn(?User $record): string => RegSysClientController::getSingleReg($record->reg_id)['status'] ?? '') + ->colors([ + 'secondary', + 'success' => 'paid', + 'danger' => 'cancelled', + ]) + + ]) + ->filters([ + // + ]) + ->headerActions([ + ]) + ->actions([ + Tables\Actions\Action::make('Show') + ->url(fn(User $record): string => UserResource::getUrl('edit', ['record' => $record])), + + ]) + ->bulkActions([ + ]); + } +} diff --git a/app/Filament/Resources/ProfileResource.php b/app/Filament/Resources/ProfileResource.php index 19fa97b..a65551a 100644 --- a/app/Filament/Resources/ProfileResource.php +++ b/app/Filament/Resources/ProfileResource.php @@ -10,8 +10,6 @@ use Filament\Resources\Resource; use Filament\Resources\Table; use Filament\Tables; -use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\SoftDeletingScope; class ProfileResource extends Resource { @@ -47,21 +45,21 @@ public static function form(Form $form): Form ->imageResizeTargetWidth('60') ->imageResizeTargetHeight('60'), Forms\Components\Textarea::make('short_desc') - ->maxLength(1024), + ->maxLength(1024), Forms\Components\FileUpload::make('image_artist') ->image() ->imageResizeMode('force') ->imageResizeTargetWidth('400') ->imageResizeTargetHeight('400'), Forms\Components\Textarea::make('artist_desc') - ->maxLength(2048), + ->maxLength(2048), Forms\Components\FileUpload::make('image_art') ->image() ->imageResizeMode('force') ->imageResizeTargetWidth('400') ->imageResizeTargetHeight('450'), Forms\Components\Textarea::make('art_desc') - ->maxLength(2048), + ->maxLength(2048), ]), ]), @@ -134,7 +132,7 @@ public static function table(Table $table): Table public static function getRelations(): array { return [ - // + RelationManagers\ApplicationRelationManager::class ]; } diff --git a/app/Filament/Resources/ProfileResource/RelationManagers/ApplicationRelationManager.php b/app/Filament/Resources/ProfileResource/RelationManagers/ApplicationRelationManager.php new file mode 100644 index 0000000..44f6bb3 --- /dev/null +++ b/app/Filament/Resources/ProfileResource/RelationManagers/ApplicationRelationManager.php @@ -0,0 +1,55 @@ +columns([ + Tables\Columns\TextColumn::make('type'), + Tables\Columns\BadgeColumn::make('status')->enum(ApplicationStatus::cases())->formatStateUsing(function (Application $record) { + return $record->status->name; + })->colors([ + 'secondary', + 'success' => ApplicationStatus::TableAccepted->value, + 'danger' => ApplicationStatus::Canceled->value + ]), + Tables\Columns\TextColumn::make('requestedTable.name'), + Tables\Columns\TextColumn::make('assignedTable.name'), + Tables\Columns\TextColumn::make('table_number') + ]) + ->filters([ + // + ]) + ->headerActions([ + ]) + ->actions([ + Tables\Actions\Action::make('Show') + ->url(fn(Application $record): string => ApplicationResource::getUrl('edit', ['record' => $record])), + + ]) + ->bulkActions([ + ]); + } +} diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index 02cc1dd..0aa49ba 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -3,14 +3,15 @@ namespace App\Filament\Resources; use App\Filament\Resources\UserResource\Pages; +use App\Filament\Resources\UserResource\RelationManagers; use App\Http\Controllers\Client\RegSysClientController; use App\Models\User; use Filament\Forms; - use Filament\Resources\Form; use Filament\Resources\Resource; use Filament\Resources\Table; use Filament\Tables; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; class UserResource extends Resource @@ -38,9 +39,9 @@ public static function form(Form $form): Form Forms\Components\Fieldset::make('Reg status')->inlineLabel()->columns(1)->schema([ Forms\Components\Placeholder::make('packages booked') - ->content(fn(?User $record): string => implode(RegSysClientController::getPackages($record->reg_id)) ?? '-'), + ->content(fn(?User $record): string => implode(RegSysClientController::getPackages($record->reg_id)) ?? ''), Forms\Components\Placeholder::make('reg status') - ->content(fn(?User $record): string => RegSysClientController::getSingleReg($record->reg_id)['status'] ?? '-'), + ->content(fn(?User $record): string => RegSysClientController::getSingleReg($record->reg_id)['status'] ?? ''), ]), ]); } @@ -49,18 +50,25 @@ public static function table(Table $table): Table { return $table ->columns([ - Tables\Columns\TextColumn::make('reg_id'), + Tables\Columns\TextColumn::make('reg_id') + ->searchable() + ->sortable(), Tables\Columns\TextColumn::make('identity_id'), - Tables\Columns\TextColumn::make('name'), + Tables\Columns\TextColumn::make('name') + ->searchable() + ->sortable(), Tables\Columns\TextColumn::make('email') - ->url(fn(?User $record) => "mailto:{$record->email}"), + ->url(fn(?User $record) => "mailto:{$record->email}") + ->searchable(), Tables\Columns\TextColumn::make('created_at') - ->dateTime(), + ->dateTime() + ->sortable(), Tables\Columns\TextColumn::make('updated_at') - ->dateTime(), + ->dateTime() + ->sortable(), ]) ->filters([ - // + Tables\Filters\Filter::make('reg_id')->query(fn(Builder $query): Builder => $query->whereNull('reg_id'))->label('Missing Reg ID'), ]) ->actions([ Tables\Actions\EditAction::make(), @@ -84,17 +92,15 @@ public static function table(Table $table): Table $record->reg_id = null; } $record->save(); - } }), - ]) - ; + ]); } public static function getRelations(): array { return [ - // new ChildrenRelationManager() + RelationManagers\ApplicationRelationManager::class ]; } diff --git a/app/Filament/Resources/UserResource/RelationManagers/ApplicationRelationManager.php b/app/Filament/Resources/UserResource/RelationManagers/ApplicationRelationManager.php new file mode 100644 index 0000000..015fd44 --- /dev/null +++ b/app/Filament/Resources/UserResource/RelationManagers/ApplicationRelationManager.php @@ -0,0 +1,55 @@ +columns([ + Tables\Columns\TextColumn::make('type'), + Tables\Columns\BadgeColumn::make('status')->enum(ApplicationStatus::cases())->formatStateUsing(function (Application $record) { + return $record->status->name; + })->colors([ + 'secondary', + 'success' => ApplicationStatus::TableAccepted->value, + 'danger' => ApplicationStatus::Canceled->value + ]), + Tables\Columns\TextColumn::make('requestedTable.name'), + Tables\Columns\TextColumn::make('assignedTable.name'), + Tables\Columns\TextColumn::make('table_number') + ]) + ->filters([ + // + ]) + ->headerActions([ + ]) + ->actions([ + Tables\Actions\Action::make('Show') + ->url(fn(Application $record): string => ApplicationResource::getUrl('edit', ['record' => $record])), + + ]) + ->bulkActions([ + ]); + } +} diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 41f9036..f11ecf2 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -180,16 +180,15 @@ public function exportImages() $zip = new ZipArchive; - if (true === ($zip->open('storage/profileImages.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE))) { - foreach (Storage::allFiles('public') as $file) { + if (true === ($zip->open('profileImages.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE))) { + foreach (Storage::allFiles() as $file) { $name = basename($file); - if ($name !== '.gitignore') { - $zip->addFile(public_path('storage/' . $name), $name); + if ($name !== '.gitignore' && $name !== 'profileImages.zip') { + $zip->addFile(Storage::path($name), $name); } } $zip->close(); } - - return response()->download(public_path('storage/profileImages.zip'), 'profileImages.zip'); + return Storage::download('profileImages.zip'); } } diff --git a/app/Models/Application.php b/app/Models/Application.php index 4716267..d13a1de 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -8,8 +8,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Log; -use Illuminate\Validation\ValidationException; -use Symfony\Component\Console\Helper\Table; class Application extends Model { @@ -121,23 +119,13 @@ public function children() return $this->hasMany(__CLASS__, 'parent'); } + public function profile() { + return $this->belongsTo(Profile::class, 'id', 'application_id', 'profiles'); + } + public function getStatus() { - if (!is_null($this->canceled_at)) { - return ApplicationStatus::Canceled; - } elseif (!is_null($this->checked_in_at)) { - return ApplicationStatus::CheckedIn; - } elseif (!is_null($this->waiting_at)) { - return ApplicationStatus::Waiting; - } elseif (!is_null($this->offer_accepted_at)) { - return ApplicationStatus::TableAccepted; - } elseif (!is_null($this->offer_sent_at)) { - return ApplicationStatus::TableOffered; - } elseif (($this->type !== ApplicationType::Dealer || !is_null($this->table_type_assigned)) && !empty($this->table_number)) { - return ApplicationStatus::TableAssigned; - } else { - return ApplicationStatus::Open; - } + return ApplicationStatus::for($this); } public function isActive() diff --git a/app/Notifications/AlternateTableOfferedNotification.php b/app/Notifications/AlternateTableOfferedNotification.php index 07a0660..9447732 100644 --- a/app/Notifications/AlternateTableOfferedNotification.php +++ b/app/Notifications/AlternateTableOfferedNotification.php @@ -35,7 +35,7 @@ public function toMail(object $notifiable): MailMessage ->line('Unfortunately, we regret to inform you that the table size you have applied for is no longer available. However, we have some alternative table sizes we would like to offer that may be suitable for your needs.') ->line('Currently, the following table size is available:') ->line($this->tableAssigned . ' - ' . $this->price / 100 . ' EUR') - ->action('Review Dealership Package.', url('/table/confirm')) + ->action('Review Dealership Package', url('/table/confirm')) ->line('We understand that this alternative option may not be what you had in mind when applying, but we hope that it will still meet your needs and enable you to participate in the Eurofurence Dealers\' Den. As we have limited space, we will be offering any available table sizes to other applications on the waiting list if we do not receive a response from you within the next seven days. So please let us know within this time frame whether you would like to accept one of the alternative options or decline the offer and be put on the waiting list. To do so, simply reply to this email.') ->line('We apologize for any inconvenience this may have caused you, and we hope to hear back from you soon. Thank you for your understanding and cooperation.') ->salutation(new HtmlString('Best regards,
the Eurofurence Dealers\' Den Team')); diff --git a/app/Notifications/TableOfferedNotification.php b/app/Notifications/TableOfferedNotification.php index 9193ac8..e4c8ed2 100644 --- a/app/Notifications/TableOfferedNotification.php +++ b/app/Notifications/TableOfferedNotification.php @@ -28,7 +28,7 @@ public function toMail(object $notifiable): MailMessage ->subject(config('ef.con_name') . ' Dealers\' Den - Application Accepted') ->line('We are thrilled to inform you that your application for a dealership at ' . config('ef.con_name') . ' has been accepted! Congratulations!') ->line(new HtmlString('To review and confirm your placement as a dealer at ' . config('ef.con_name') . ', please click on the button below. By accepting the offered table, you are agreeing to the Dealers\' Den\'s terms and conditions, and the payment process will be initiated.')) - ->action('Review Dealership Package.', url('/table/confirm')) + ->action('Review Dealership Package', url('/table/confirm')) ->line(new HtmlString('Once you have confirmed the package, your Eurofurence event registration will be updated to include the fee for the assigned dealership. All payments must be handled through the Eurofurence registration system, available at ' . config('ef.idp_url') . '. Please note that you are required to pay all fees, including the Eurofurence event registration fee, within ' . config('ef.payment_timeframe') . ' of receiving this email to secure your placement as a dealer. If payment is overdue, Dealers\' Den management may void your placement and offer the space to the next dealer on the waiting list.')) ->line('Although all placements may be subject to change until the start of the convention, you will be sent an email containing the preliminary dealership table assignment for information.') ->line(new HtmlString('If you have any questions or concerns regarding the payment or subsequent processes, please contact Dealers\' Den management via ' . config('ef.dealers_email') . '.'))