feat(customers): tambahkan rute dan breadcrumb untuk manajemen pelanggan dan email blast
- Menambahkan rute untuk manajemen pelanggan dan email blast. - Mengimplementasikan breadcrumb untuk navigasi yang lebih baik. - Memperbarui file module.json untuk menambahkan menu baru.
This commit is contained in:
36
module.json
36
module.json
@@ -10,8 +10,40 @@
|
|||||||
],
|
],
|
||||||
"files": [],
|
"files": [],
|
||||||
"menu": {
|
"menu": {
|
||||||
"main": [],
|
"main": [{
|
||||||
"master": [],
|
"title": "Staging Data",
|
||||||
|
"path": "",
|
||||||
|
"icon": "ki-filled ki-questionnaire-tablet text-lg text-primary",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": []
|
||||||
|
},{
|
||||||
|
"title": "Nasabah",
|
||||||
|
"path": "customer",
|
||||||
|
"icon": "ki-filled ki-people text-lg text-primary",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": []
|
||||||
|
},{
|
||||||
|
"title": "Email Blast",
|
||||||
|
"path": "emailblast",
|
||||||
|
"icon": "ki-filled ki-sms text-lg text-primary",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": []
|
||||||
|
}],
|
||||||
|
"master": [{
|
||||||
|
"title": "Pesan Sponsor",
|
||||||
|
"path": "migrasi",
|
||||||
|
"icon": "ki-filled ki-category text-lg",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": []
|
||||||
|
}],
|
||||||
"system": []
|
"system": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Modules\Webstatement\Http\Controllers\WebstatementController;
|
use Modules\Webstatement\Http\Controllers\CustomerController;
|
||||||
|
use Modules\Webstatement\Http\Controllers\EmailBlastController;
|
||||||
|
|
||||||
/*
|
Route::post('/email-blast', [EmailBlastController::class, 'sendEmailBlast']);
|
||||||
*--------------------------------------------------------------------------
|
Route::get('/email-blast-history', [EmailBlastController::class, 'getEmailBlastHistory']);
|
||||||
* API Routes
|
Route::get('/customers/search', [CustomerController::class, 'search']);
|
||||||
*--------------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Here is where you can register API routes for your application. These
|
|
||||||
* routes are loaded by the RouteServiceProvider within a group which
|
|
||||||
* is assigned the "api" middleware group. Enjoy building your API!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::middleware(['auth:sanctum'])->prefix('v1')->group(function () {
|
|
||||||
Route::apiResource('webstatement', WebstatementController::class)->names('webstatement');
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -1,5 +1,57 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Diglactic\Breadcrumbs\Breadcrumbs;
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
||||||
use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail;
|
use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail;
|
||||||
|
|
||||||
|
// Home
|
||||||
|
Breadcrumbs::for('home', function (BreadcrumbTrail $trail) {
|
||||||
|
$trail->push('Home', route('dashboard'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Customers
|
||||||
|
Breadcrumbs::for('customer.index', function (BreadcrumbTrail $trail) {
|
||||||
|
$trail->parent('home');
|
||||||
|
$trail->push('Customers', route('customer.index'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Customers > Create
|
||||||
|
Breadcrumbs::for('customer.create', function (BreadcrumbTrail $trail) {
|
||||||
|
$trail->parent('customer.index');
|
||||||
|
$trail->push('Create Customer', route('customer.create'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Customers > [Customer Name]
|
||||||
|
Breadcrumbs::for('customer.show', function (BreadcrumbTrail $trail, $customer) {
|
||||||
|
$trail->parent('customer.index');
|
||||||
|
$trail->push($customer->name, route('customer.show', $customer));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Customers > [Customer Name] > Edit
|
||||||
|
Breadcrumbs::for('customer.edit', function (BreadcrumbTrail $trail, $customer) {
|
||||||
|
$trail->parent('customer.show', $customer);
|
||||||
|
$trail->push('Edit', route('customer.edit', $customer));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Email Blasts
|
||||||
|
Breadcrumbs::for('emailblast.index', function (BreadcrumbTrail $trail) {
|
||||||
|
$trail->parent('home');
|
||||||
|
$trail->push('Email Blasts', route('emailblast.index'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Email Blasts > Create
|
||||||
|
Breadcrumbs::for('emailblast.create', function (BreadcrumbTrail $trail) {
|
||||||
|
$trail->parent('emailblast.index');
|
||||||
|
$trail->push('Create Email Blast', route('emailblast.create'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Email Blasts > View Email Blast
|
||||||
|
Breadcrumbs::for('emailblast.view', function (BreadcrumbTrail $trail, $emailBlast) {
|
||||||
|
$trail->parent('emailblast.index');
|
||||||
|
$trail->push('View Email Blast', route('emailblast.view', $emailBlast->id));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Home > Email Blasts > Edit Email Blast
|
||||||
|
Breadcrumbs::for('emailblast.edit', function (BreadcrumbTrail $trail, $emailBlast) {
|
||||||
|
$trail->parent('emailblast.index');
|
||||||
|
$trail->push('Edit Email Blast', route('emailblast.edit', $emailBlast->id));
|
||||||
|
});
|
||||||
|
|||||||
@@ -2,18 +2,40 @@
|
|||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Modules\Webstatement\Http\Controllers\MigrasiController;
|
use Modules\Webstatement\Http\Controllers\MigrasiController;
|
||||||
|
use Modules\Webstatement\Http\Controllers\WebstatementController;
|
||||||
|
use Modules\Webstatement\Http\Controllers\CustomerController;
|
||||||
|
use Modules\Webstatement\Http\Controllers\EmailBlastController;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Web Routes
|
| Web Routes
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here is where you can register web routes for your application. These
|
| Here is where you can register web routes for your application. These
|
||||||
| routes are loaded by the RouteServiceProvider within a group which
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
| contains the "web" middleware group. Now create something great!
|
| contains the "web" middleware group. Now create something great!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Route::middleware(['auth'])->group(function () {});
|
Route::middleware(['auth'])->group(function () {
|
||||||
|
//Route::get('/', [WebstatementController::class, 'index'])->name('webstatement.index');
|
||||||
|
|
||||||
|
// Customer routes
|
||||||
|
Route::get('datatables', [CustomerController::class, 'dataForDatatables'])->name('customer.datatables');
|
||||||
|
Route::get('export', [CustomerController::class, 'export'])->name('customer.export');
|
||||||
|
Route::resource('customer', CustomerController::class);
|
||||||
|
|
||||||
|
|
||||||
|
Route::prefix('emailblast')->group(function () {
|
||||||
|
Route::get('/', [EmailBlastController::class, 'index'])->name('emailblast.index');
|
||||||
|
Route::get('/create', [EmailBlastController::class, 'create'])->name('emailblast.create');
|
||||||
|
Route::post('/', [EmailBlastController::class, 'store'])->name('emailblast.store');
|
||||||
|
Route::get('/{id}/view', [EmailBlastController::class, 'view'])->name('emailblast.view');
|
||||||
|
Route::get('/datatables', [EmailBlastController::class, 'datatables'])->name('emailblast.datatables');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
Route::get('migrasi', [MigrasiController::class, 'index'])->name('migrasi.index');
|
Route::get('migrasi', [MigrasiController::class, 'index'])->name('migrasi.index');
|
||||||
|
|
||||||
|
Route::get('/stmt-entries/{accountNumber}', [MigrasiController::class, 'getStmtEntryByAccount']);
|
||||||
|
|||||||
Reference in New Issue
Block a user