update api register

This commit is contained in:
Wian Drs
2026-08-01 11:42:42 +07:00
parent b0d08211ec
commit 75342dc7b7
55 changed files with 2254 additions and 35 deletions
+57 -5
View File
@@ -1,5 +1,6 @@
<?php
use App\Http\Controllers\Access\RoleApplicationController;
use App\Http\Controllers\Audit\AuditLogController;
use App\Http\Controllers\AuthController;
use App\Http\Controllers\Billing\BillingProfileController;
@@ -22,8 +23,9 @@ use App\Http\Controllers\Ticket\TicketTypeController;
use App\Http\Controllers\Ticket\TicketWorkflowController;
use App\Http\Controllers\Topology\TopologyController;
use App\Http\Controllers\User\UserController;
use App\Http\Controllers\Wilayah\WilayahController;
use App\Http\Controllers\Voucher\VoucherController;
use App\Http\Controllers\Wallet\WalletController;
use App\Http\Controllers\Wilayah\WilayahController;
use Illuminate\Support\Facades\Route;
Route::post('/login', [AuthController::class, 'login']);
@@ -40,6 +42,40 @@ Route::post('/payment-webhooks/{accountUuid}', fn () => response()->json(['messa
Route::middleware(['auth:sanctum', 'tenant.context'])->group(function () {
Route::get('me/role-applications', [RoleApplicationController::class, 'mine'])->name('role-applications.mine');
Route::post('me/role-applications', [RoleApplicationController::class, 'store'])->name('role-applications.store');
Route::get('role-applications/tenant/menu-group-options', [RoleApplicationController::class, 'tenantMenuGroupOptions'])
->name('role-applications.tenant.menu-group-options');
Route::get('role-applications/staff/menu-group-options', [RoleApplicationController::class, 'staffMenuGroupOptions'])
->name('role-applications.staff.menu-group-options');
Route::get('role-applications/{type}', [RoleApplicationController::class, 'reviewList'])
->whereIn('type', ['tenant', 'agent', 'staff'])->name('role-applications.review.index');
Route::put('role-applications/{application}/review', [RoleApplicationController::class, 'review'])
->whereNumber('application')->name('role-applications.review.update');
Route::post('customer-user-links', [RoleApplicationController::class, 'linkCustomer'])->name('customer-user-links.store');
Route::get('voucher-hotspot/sales-options', [VoucherController::class, 'options'])
->defaults('voucher_scope', 'sales')->middleware('menu.permission:voucher-hotspot-sales,view')->name('voucher-hotspot.sales.options');
Route::get('voucher-hotspot/sales', [VoucherController::class, 'sales'])
->middleware('menu.permission:voucher-hotspot-sales,view')->name('voucher-hotspot.sales.index');
Route::post('voucher-hotspot/sales', [VoucherController::class, 'storeSale'])
->middleware('menu.permission:voucher-hotspot-sales,create')->name('voucher-hotspot.sales.store');
Route::get('voucher-hotspot/sales/{sale}', [VoucherController::class, 'showSale'])
->middleware('menu.permission:voucher-hotspot-sales,view')->whereNumber('sale')->name('voucher-hotspot.sales.show');
Route::middleware(['access.level:staff,tenant_owner', 'menu.resource:voucher-hotspot-agents'])->group(function () {
Route::get('voucher-hotspot/agent-options', [VoucherController::class, 'options'])->defaults('voucher_scope', 'agents')->name('voucher-hotspot.agents.options');
Route::get('voucher-hotspot/agents', [VoucherController::class, 'agents'])->name('voucher-hotspot.agents.index');
Route::post('voucher-hotspot/agents', [VoucherController::class, 'storeAgent'])->name('voucher-hotspot.agents.store');
Route::put('voucher-hotspot/agents/{agent}', [VoucherController::class, 'updateAgent'])->whereNumber('agent')->name('voucher-hotspot.agents.update');
Route::delete('voucher-hotspot/agents/{agent}', [VoucherController::class, 'destroyAgent'])->whereNumber('agent')->name('voucher-hotspot.agents.destroy');
});
Route::middleware(['access.level:staff,tenant_owner', 'menu.resource:voucher-hotspot-login-page'])->group(function () {
Route::get('voucher-hotspot/login-page-options', [VoucherController::class, 'options'])->defaults('voucher_scope', 'login-page')->name('voucher-hotspot.login-page.options');
Route::get('voucher-hotspot/login-page', [VoucherController::class, 'loginPage'])->name('voucher-hotspot.login-page.show');
Route::put('voucher-hotspot/login-page', [VoucherController::class, 'saveLoginPage'])->name('voucher-hotspot.login-page.update');
});
Route::get('payment-gateway/providers', [PaymentGatewayController::class, 'providers'])
->middleware('menu.permission:payment-gateway-settings,view')->name('payment-gateway.providers');
Route::get('payment-gateway/settings', [PaymentGatewayController::class, 'settings'])
@@ -53,12 +89,27 @@ Route::middleware(['auth:sanctum', 'tenant.context'])->group(function () {
Route::get('payment-gateway/transactions', [PaymentGatewayController::class, 'transactions'])
->middleware('menu.permission:payment-gateway-logs,view')->name('payment-gateway.transactions.index');
Route::get('wallets', [WalletController::class, 'index'])->name('wallets.index');
Route::get('wallets/{wallet}/ledger', [WalletController::class, 'ledger'])->whereNumber('wallet')->name('wallets.ledger');
Route::post('wallets/{wallet}/transfer', [WalletController::class, 'transfer'])->whereNumber('wallet')->name('wallets.transfer');
Route::post('wallets/{wallet}/withdraw', [WalletController::class, 'withdraw'])->whereNumber('wallet')->name('wallets.withdraw');
Route::middleware('menu.resource:wallet')->group(function () {
Route::get('wallets', [WalletController::class, 'index'])->name('wallets.index');
Route::get('wallets/{wallet}/ledger', [WalletController::class, 'ledger'])->whereNumber('wallet')->name('wallets.ledger');
Route::post('wallets/{wallet}/withdraw', [WalletController::class, 'withdraw'])->whereNumber('wallet')->name('wallets.withdraw');
});
Route::get('notifications/events', [NotificationController::class, 'events'])->name('notifications.events');
Route::get('notifications/system/campaigns', [NotificationController::class, 'systemCampaigns'])
->middleware('menu.permission:notifications-system,view')->name('notifications.system.campaigns.index');
Route::post('notifications/system/campaigns', [NotificationController::class, 'storeSystemCampaign'])
->middleware('menu.permission:notifications-system,create')->name('notifications.system.campaigns.store');
Route::get('notifications/system/audience-options', [NotificationController::class, 'systemAudienceOptions'])
->middleware('menu.permission:notifications-system,view')->name('notifications.system.audience-options');
Route::get('notifications/channels/whatsapp-unofficial/settings/{notificationChannel}/state', [NotificationController::class, 'whapiState'])
->middleware('menu.permission:notifications-wa-unofficial,view')->whereNumber('notificationChannel')->name('notifications.whapi.state');
Route::post('notifications/channels/whatsapp-unofficial/settings/{notificationChannel}/start', [NotificationController::class, 'whapiStart'])
->middleware('menu.permission:notifications-wa-unofficial,view')->whereNumber('notificationChannel')->name('notifications.whapi.start');
Route::get('notifications/channels/whatsapp-unofficial/settings/{notificationChannel}/qr', [NotificationController::class, 'whapiQr'])
->middleware('menu.permission:notifications-wa-unofficial,view')->whereNumber('notificationChannel')->name('notifications.whapi.qr');
Route::post('notifications/channels/whatsapp-unofficial/settings/{notificationChannel}/test-message', [NotificationController::class, 'whapiTestMessage'])
->middleware('menu.permission:notifications-wa-unofficial,view')->whereNumber('notificationChannel')->name('notifications.whapi.test-message');
Route::get('notifications/preferences', [NotificationController::class, 'preferences'])
->middleware('menu.permission:notifications-system,view')->name('notifications.preferences.index');
Route::put('notifications/preferences', [NotificationController::class, 'savePreferences'])
@@ -99,6 +150,7 @@ Route::middleware(['auth:sanctum', 'tenant.context'])->group(function () {
Route::post('/settings', 'storeChannel')->defaults('notification_channel', $notification['channel'])->name("notifications.{$path}.settings.store");
Route::put('/settings/{notificationChannel}', 'updateChannel')->defaults('notification_channel', $notification['channel'])->whereNumber('notificationChannel')->name("notifications.{$path}.settings.update");
Route::post('/settings/{notificationChannel}/test', 'testChannel')->defaults('notification_channel', $notification['channel'])->whereNumber('notificationChannel')->name("notifications.{$path}.settings.test");
Route::delete('/settings/{notificationChannel}', 'destroyChannel')->defaults('notification_channel', $notification['channel'])->whereNumber('notificationChannel')->name("notifications.{$path}.settings.destroy");
Route::get('/templates', 'templates')->defaults('notification_channel', $notification['channel'])->name("notifications.{$path}.templates.index");
Route::post('/templates', 'storeTemplate')->defaults('notification_channel', $notification['channel'])->name("notifications.{$path}.templates.store");
Route::put('/templates/{notificationTemplate}', 'updateTemplate')->defaults('notification_channel', $notification['channel'])->whereNumber('notificationTemplate')->name("notifications.{$path}.templates.update");