feat: Add IT Support catalog and related migrations, seeders, and email templates
- Created migration to add 'group_label' to 'product_type_fields' table. - Implemented ItSupportCatalogSeeder to populate IT Support features and tiers. - Added ProductCategorySeeder for initial product categories. - Developed ProductMockupSeeder for mockup products in various categories. - Introduced ProductTypeFieldSeeder to define fields for different product types. - Created email templates for VPS service information and service renewal reminders.
This commit is contained in:
@@ -3,11 +3,8 @@
|
||||
namespace App\Jobs\Mail;
|
||||
|
||||
use App\Http\Services\Telegram;
|
||||
use App\Mail\CreateVirtualMachine;
|
||||
use App\Mail\VmCredentialsMail;
|
||||
use App\Models\EmailNotificationTemplate;
|
||||
use App\Mail\VmInfoMail;
|
||||
use App\Models\Invoice;
|
||||
use App\Services\EmailNotificationTemplateRenderer;
|
||||
use App\Services\InvoicePdfService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Bus\Queueable;
|
||||
@@ -59,17 +56,7 @@ class SendInformationVirtualMachine implements ShouldQueue
|
||||
}
|
||||
}
|
||||
|
||||
// Try block-based DB template first
|
||||
$dbTemplate = EmailNotificationTemplate::where('type', 'vm_credentials')
|
||||
->where('is_active', true)
|
||||
->first();
|
||||
|
||||
if ($dbTemplate) {
|
||||
$email = new VmCredentialsMail($dbTemplate, $this->data, $invoice, $invoicePdf, $invoicePdfFileName);
|
||||
} else {
|
||||
// Fallback: legacy Template model (ID=2)
|
||||
$email = new CreateVirtualMachine(2, $this->data, $invoicePdf, $invoicePdfFileName);
|
||||
}
|
||||
$email = new VmInfoMail($this->data, $invoicePdf, $invoicePdfFileName);
|
||||
|
||||
Mail::to($this->customer->email)->send($email);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user