Summary of completed work: - Complete buyer portal (browse, cart, checkout, orders, invoices) - Complete seller portal (orders, manifests, fleet, picking) - Business onboarding wizards (buyer 4-step, seller 5-step) - Email verification and registration flows - Notification system for buyers and sellers - Payment term surcharges and pickup/delivery workflows - Filament admin resources (Business, Brand, Product, Order, Invoice, User) - 51 migrations executed successfully Renamed Company -> Business throughout codebase for consistency. Unified authentication flows with password reset. Added audit trail and telescope for debugging. Next: Week 4 Data Migration (Days 22-28) - Product migration (883 products from cannabrands_crm) - Company migration (81 buyer companies) - User migration (preserve password hashes) - Order history migration
59 lines
1.7 KiB
PHP
59 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\Business;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class ApplicationRejectedNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
public Business $business,
|
|
public string $rejectionReason
|
|
) {
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Get the notification's delivery channels.
|
|
*/
|
|
public function via(object $notifiable): array
|
|
{
|
|
return ['mail', 'database'];
|
|
}
|
|
|
|
/**
|
|
* Get the mail representation of the notification.
|
|
*/
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
return (new MailMessage)
|
|
->subject('Your ' . $this->business->name . ' Application Has Been Reviewed')
|
|
->markdown('emails.application-rejected', [
|
|
'business' => $this->business,
|
|
'rejectionReason' => $this->rejectionReason,
|
|
'resubmitUrl' => route('buyer.setup.create', 1),
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Get the array representation of the notification.
|
|
*/
|
|
public function toArray(object $notifiable): array
|
|
{
|
|
return [
|
|
'type' => 'application_rejected',
|
|
'business_id' => $this->business->id,
|
|
'business_name' => $this->business->name,
|
|
'rejection_reason' => $this->rejectionReason,
|
|
'title' => 'Application Rejected',
|
|
'message' => 'Your application for ' . $this->business->name . ' has been rejected. Please review the feedback and resubmit.',
|
|
];
|
|
}
|
|
}
|