feat: email gửi tay/nhắc gia hạn, gói hosting, sửa dữ liệu sản phẩm

- Gửi email theo template cho 1 khách, tab lịch sử email, nhắc gia hạn dịch vụ hàng loạt
- Mail lưu from/bcc/sent_by; mẫu MARKETING và mẫu cũ trong TemplateSeeder
- Gói hosting: giới hạn, trạng thái, lấy plan Plesk qua CLI gateway
- Backfill payment_method và ngày đơn hàng còn thiếu
- Bổ sung field CPU/RAM/Disk/Băng thông cho loại sản phẩm vps và cloud

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-09 11:32:05 +07:00
co-authored by Claude Opus 5.5
parent 8651dde6b1
commit 30898ea46f
59 changed files with 1771 additions and 108 deletions
+1
View File
@@ -13,6 +13,7 @@ Route::prefix('orders')
->controller(OrderController::class)
->group(function () {
Route::get('/', 'index')->middleware('perm:order.view');
Route::get('/domain-pricing', 'domainPricing')->middleware('perm:order.create');
Route::post('/upload-proof', 'uploadProof')->middleware('perm:order.create');
Route::post('/', 'store')->middleware('perm:order.create');
Route::get('{id}', 'show')->middleware('perm:order.view');
+4
View File
@@ -12,6 +12,7 @@ Route::prefix('products')
->controller(ProductController::class)
->group(function () {
Route::get('/', 'index')->middleware('perm:product-service.view');
Route::get('export', 'export')->middleware('perm:product-service.view');
Route::post('/', 'store')->middleware('perm:product-service.create');
Route::post('bulk-update-status', 'bulkUpdateStatus')->middleware('perm:product-service.edit');
Route::post('bulk-destroy', 'bulkDestroy')->middleware('perm:product-service.destroy');
@@ -36,6 +37,9 @@ Route::prefix('product-categories')
->group(function () {
Route::get('/', 'index')->middleware('perm:product-service.view')->name('index');
Route::post('/', 'store')->middleware('perm:product-service.create')->name('store');
Route::post('seed-sample', 'seedSample')
->middleware('perm:product-service.create')
->name('seed-sample');
Route::get('trashed', 'trashed')->middleware('perm:product-service.view')->name('trashed');
Route::post('bulk-update-status', 'bulkUpdateStatus')
->middleware('perm:product-service.edit')
+10
View File
@@ -2,6 +2,7 @@
use App\Http\Controllers\Api\Admin\Customer\CustomerController;
use App\Http\Controllers\Api\Admin\Service\ServiceController;
use App\Http\Controllers\Api\Admin\Service\ServiceRenewalReminderController;
use Illuminate\Support\Facades\Route;
// Customers (module: customer)
@@ -18,7 +19,11 @@ Route::prefix('customers')
Route::delete('{uuid}/destroy', 'destroy')->middleware('perm:customer.destroy');
Route::post('{uuid}/reset-password', 'resetPassword')->middleware('perm:customer.edit');
Route::post('{uuid}/send-password', 'sendPasswordEmail')->middleware('perm:customer.edit');
Route::post('{uuid}/email-layout', 'emailLayout')->middleware('perm:customer.edit');
Route::post('{uuid}/email-preview', 'emailPreview')->middleware('perm:customer.edit');
Route::post('{uuid}/send-email', 'sendEmail')->middleware('perm:customer.edit');
Route::get('{uuid}/emails', 'emails')->middleware('perm:customer.view');
Route::get('{uuid}/emails/{id}', 'emailDetail')->whereNumber('id')->middleware('perm:customer.view');
Route::post('{uuid}/login-as', 'loginAs')->middleware('perm:customer.edit');
Route::post('{uuid}/add-credit', 'addCredit')->middleware('perm:customer.edit');
Route::post('{uuid}/add-total', 'addTotal')->middleware('perm:customer.edit');
@@ -64,6 +69,11 @@ Route::prefix('customers')
});
// Services (module: customer)
Route::prefix('services/renewal-reminders')->controller(ServiceRenewalReminderController::class)->group(function () {
Route::get('/', 'index')->middleware('perm:customer.view');
Route::post('/', 'send')->middleware('perm:customer.edit');
});
Route::prefix('services')->controller(ServiceController::class)->group(function () {
Route::get('/', 'index')->middleware('perm:customer.view');
Route::post('bulk-action', 'bulkAction')->middleware('perm:customer.edit');
+1
View File
@@ -25,6 +25,7 @@ Route::prefix('service-plans')
->group(function () {
Route::get('/', 'index')->middleware('perm:hosting.view')->name('index');
Route::post('/', 'store')->middleware('perm:hosting.create')->name('store');
Route::get('plesk-plans/{serverId}', 'pleskPlans')->middleware('perm:hosting.view')->whereNumber('serverId')->name('plesk-plans');
Route::get('{id}', 'show')->middleware('perm:hosting.view')->name('show');
Route::put('{id}', 'update')->middleware('perm:hosting.edit')->name('update');
Route::delete('{id}', 'destroy')->middleware('perm:hosting.destroy')->name('destroy');
+1
View File
@@ -137,6 +137,7 @@ Route::prefix('mail-campaigns')
->controller(MailCampaignController::class)
->group(function () {
Route::get('/', 'index')->middleware('perm:mail-campaign.view');
Route::get('variable-suggestions', 'variableSuggestions')->middleware('perm:mail-campaign.create');
Route::post('preview', 'preview')->middleware('perm:mail-campaign.create');
Route::get('{uuid}/preview', 'previewCampaign')->middleware('perm:mail-campaign.view');
Route::get('{uuid}/logs/{id}', 'showLog')->whereNumber('id')->middleware('perm:mail-campaign.view');