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:
baodev0
2026-08-26 16:19:38 +07:00
parent 382b7c0ef8
commit c917e3bf5e
47 changed files with 2992 additions and 1759 deletions
+16
View File
@@ -18,6 +18,7 @@ use App\Http\Controllers\Api\Admin\Payment\PaymentController;
use App\Http\Controllers\Api\Admin\Addon\AddonController;
use App\Http\Controllers\Api\Admin\WebDesign\WebDesignQuoteController;
use App\Http\Controllers\Api\Admin\Product\ProductCategoryController;
use App\Http\Controllers\Api\Admin\Product\ProductTypeFieldController;
use App\Http\Controllers\Api\Admin\Product\ProductController;
use App\Http\Controllers\Api\Admin\Service\ServiceController;
use App\Http\Controllers\Api\Admin\VPS\VPSController;
@@ -127,6 +128,9 @@ Route::prefix('v1')
'perm:customer.edit',
);
Route::put('{uuid}/services/{serviceId}', 'updateService')->middleware('perm:customer.edit');
Route::post('{uuid}/services/{serviceId}/change-ip', 'changeServiceIp')->middleware('perm:customer.edit');
Route::post('{uuid}/services/{serviceId}/change-port', 'changeServicePort')->middleware('perm:customer.edit');
Route::post('{uuid}/services/{serviceId}/notify-renew', 'notifyServiceRenewal')->middleware('perm:customer.edit');
Route::get('{uuid}/notes', 'getCustomerNotes')->middleware('perm:customer.view');
Route::post('{uuid}/notes', 'storeCustomerNote')->middleware('perm:customer.edit');
Route::delete('{uuid}/notes/{noteId}', 'destroyCustomerNote')->middleware('perm:customer.edit');
@@ -164,6 +168,7 @@ Route::prefix('v1')
Route::get('/', 'index')->middleware('perm:customer.view');
Route::get('{id}', 'show')->middleware('perm:customer.view');
Route::patch('{id}/detach-customer', 'detachCustomer')->middleware('perm:customer.edit');
Route::post('{id}/resend-credentials', 'resendCredentials')->middleware('perm:customer.edit');
});
// Products (module: product-service)
@@ -221,6 +226,15 @@ Route::prefix('v1')
->name('force-delete');
});
Route::prefix('product-type-fields')
->controller(ProductTypeFieldController::class)
->group(function () {
Route::get('/', 'index')->middleware('perm:product-service.view');
Route::post('/', 'store')->middleware('perm:product-service.create');
Route::put('{id}', 'update')->middleware('perm:product-service.edit');
Route::delete('{id}', 'destroy')->middleware('perm:product-service.destroy');
});
// Addons (module: product-service)
Route::prefix('addons')
->controller(AddonController::class)
@@ -580,6 +594,7 @@ Route::prefix('v1')
Route::get('jobs/recent', 'recent');
Route::get('jobs/pending', 'pending');
Route::get('jobs/failed', 'failed');
Route::post('jobs/failed/{id}/retry', 'retry');
Route::get('jobs/metrics', 'metrics');
});
@@ -663,6 +678,7 @@ Route::prefix('v1')
Route::post('vm/update-config', 'updateConfig')->middleware('perm:module-vcenter.edit');
Route::post('vm/delete', 'deleteVM')->middleware('perm:module-vcenter.edit');
Route::get('vm/stats', 'stats')->middleware('perm:module-vcenter.view');
Route::get('vm/power-state', 'powerState')->middleware('perm:module-vcenter.view');
Route::get('vms/powered-off', 'getPoweredOffVms')->middleware('perm:module-vcenter.view');
});