<?php

use Illuminate\Support\Facades\Route;
use App\Services\ImbangdugaServices;
use Illuminate\Support\Facades\Storage;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/',['as'=>'login','uses'=>'HomeController@index']);

Route::get('/testtry',function(ImbangdugaServices $imbangduga){

    // return view('testing');
    $test = $imbangduga->OperationImbangDuga('KB2');
    dd($test->getContent());
});


//Testing Jer
Route::get('test', function () {
    // event(new App\Events\StatusLiked('KOK LANAS','KOK KELI'));
    // return "Event has been try je sent!";

    event(new App\Events\Dashboard\GadaiNotify('lulus','KB2'));


    // $actionId = 'score_update';
    // $actionData = array('team1_score' => 46);
    // event(new App\Events\ActionEvent($actionId, $actionData));

    // event(new App\Events\ActionEvent('1234','test'));

    return "event test je";
});

Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index');
Route::get('change-password', ['as'=>'user.password','uses'=>'ChangePasswordController@index']);
Route::post('change-password', ['as'=>'change.password','uses'=>'ChangePasswordController@store']);

Route::get('/welcome',function(){

    $auth_user = Auth::user();
    $cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
    $cawangan_detail=$cawangan[0];

    return view('print.suratgadaihilang', compact('cawangan_detail'));

});

Route::get('/testing',function(){

    $auth_user = Auth::user();
    $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
    $cawangan_detail=$cawangan[0];

    return view('testing', compact('cawangan_detail'));

});


// Auth::routes();

Route::post('logout', ['as' => 'logout', 'uses' => 'Auth\LoginController@logout']);

// Route::get('register', 'Auth\RegisterController@register');
// Route::post('register', 'Auth\RegisterController@store');
Route::get('login', 'Auth\LoginController@login')->name('login');
Route::post('login', 'Auth\LoginController@authenticate');
// Route::get('logout', 'Auth\LoginController@logout')->name('logout');

Route::get('/', 'HomeController@index')->name('home');
Route::get('/home', 'HomeController@index')->name('home');

//Teller
Route::get('/pelanggan','CustomersController@index')->middleware('auth','teller');
Route::get('/customer_info',['as'=>'customer_info','uses'=>'CustomersController@info'])->middleware('auth','teller');
Route::get('/gadaian',['as'=>'gadaian','uses'=>'GadaianController@index'])->middleware('auth','teller');
Route::get('/daftar_marhun',['as'=>'daftar_marhun','uses'=>'MarhunController@index'])->middleware('auth','teller');
Route::get('/penebusan/{norujukan}',['as'=>'penebusan','uses' => 'PenebusanController@index'])->middleware('auth');
Route::get('/lelongan/{norujukan}',['as'=>'lelongan','uses' => 'LelongController@index'])->middleware('auth','teller');
Route::get('/aliran_tunai','AliranTunaiController@index')->middleware('auth','teller');
Route::get('/aliran_tunai/laporantunaiteller',['as'=>'laporan.tunaiteller','uses' => 'AliranTunaiController@LaporanTunaiTeller'])->middleware('auth','teller');
Route::get('/aliran_tunai/account_statement',['as'=>'laporan.acc_statement','uses' => 'AliranTunaiController@LaporanAccStatement'])->middleware('auth','teller');
Route::get('/aliran_tunai/laporanserahan',['as'=>'laporan.serahanteller','uses' => 'AliranTunaiController@LaporanSerahan'])->middleware('auth','teller');
Route::get('/aliran_tunai/laporanserahanberkala',['as'=>'laporan.serahantellerberkala','uses' => 'AliranTunaiController@LaporanSerahanBerkala'])->middleware('auth','teller');
Route::get('/aliran_tunai/laporanalirantunai/{teller}',['as'=>'laporan.alirantunai','uses' => 'AliranTunaiController@LaporanAliranTunai'])->middleware('auth','teller');
Route::put('/aliran_tunai/Gadaian',['as'=>'alirantunai.gadai','uses' => 'AliranTunaiController@alirantunaiGadai'])->middleware('auth','teller');
Route::put('/aliran_tunai/Tebusan',['as'=>'alirantunai.tebus','uses' => 'AliranTunaiController@alirantunaiTebus'])->middleware('auth','teller');
Route::put('/aliran_tunai/advansur',['as'=>'alirantunai.advansur','uses' => 'AliranTunaiController@alirantunaiUpahBknTawarruq'])->middleware('auth','teller');
Route::get('/harga_emas','HargaEmasController@index')->middleware('auth','teller');
Route::get('/profile',['as'=>'profile','uses'=>'UserController@index'])->middleware('auth');
Route::get('/profile/edit',['as'=>'profile.edit','uses'=>'UserController@edit'])->middleware('auth');
Route::post('/profile/edit/store',['as'=>'profile.editstore','uses'=>'UserController@editStore'])->middleware('auth');
Route::get('/customer/search',['as'=>'customer.search','uses'=>'CustomersController@search'])->middleware('auth','teller');
Route::post('/customer/store',['as'=>'customer.store','uses'=>'CustomersController@store'])->middleware('auth','teller');
Route::post('/gadai/store',['as'=>'gadai.store','uses'=>'GadaianController@store'])->middleware('auth','teller');
Route::get('/gadai/batal',['as'=>'gadai.batal','uses'=>'GadaianController@batal'])->middleware('auth','teller');
Route::get('/customer/otp',['as'=>'customer.otp','uses'=>'CustomersController@getOTP'])->middleware('auth','teller');
Route::get('/getwakil',['as'=>'wakil.search','uses'=>'PenebusanController@getWakil'])->middleware('auth','teller');
Route::get('/cari',['as'=>'wakil.caricustomer','uses'=>'CustomersController@cari'])->middleware('auth','teller');
Route::post('/createwakil',['as'=>'wakil.create','uses'=>'PenebusanController@createWakil'])->middleware('auth','teller');
Route::get('/firstwakil',['as'=>'wakil.first','uses'=>'PenebusanController@getfirstWakil'])->middleware('auth','teller');
Route::get('/history',['as'=>'gadai.history','uses'=>'GadaianController@history'])->middleware('auth','teller');
Route::get('/history/khazanah',['as'=>'gadai.history.khazanah','uses'=>'GadaianController@history'])->middleware('auth','khazanah');

//Kemaskini Upah
Route::get('/kemaskiniupah',['as'=>'kemaskini.upah','uses'=>'AliranTunaiController@kemaskiniupah'])->middleware('auth','teller');

//Kemaskini Aliran Tunai
Route::get('/periksaalirantunai',['as'=>'periksa.alirantunai','uses'=>'AliranTunaiController@periksaAliranTunai'])->middleware('auth','teller');
Route::get('/kemaskinialirantunai',['as'=>'kemaskini.alirantunai','uses'=>'AliranTunaiController@kemaskiniAliranTunai'])->middleware('auth','teller');


//MAINTENANCE
Route::get('/tebuspenuh',['as'=>'tebus.penuh','uses'=>'PenebusanController@tebuspenuh'])->middleware('auth','teller');
Route::get('/tebusautotawarruq',['as'=>'tebus.autotawarruq','uses'=>'PenebusanController@tebusautotawarruq'])->middleware('auth','teller');
Route::get('/tebusseparuh',['as'=>'tebus.separuh','uses'=>'PenebusanController@tebusseparuh'])->middleware('auth','teller');
Route::get('/tambahpinjaman',['as'=>'tambah.pinjaman','uses'=>'PenebusanController@tambahpinjaman'])->middleware('auth','teller');
Route::get('/bayaransurans',['as'=>'bayaran.ansurans','uses'=>'PenebusanController@bayaransurans'])->middleware('auth','teller');
Route::get('/bayaransuranstawarruq',['as'=>'bayaran.ansuranstawarruq','uses'=>'PenebusanController@bayaransuransTawarruq'])->middleware('auth','teller');

//Penilai
Route::get('/gadaiansemasa',['as'=>'gadaian.semasa','uses'=>'GadaianController@gadaiansemasa'])->middleware('auth','penilai');
Route::post('/gadaiancetak',['as'=>'gadaian.cetak','uses'=>'GadaianController@cetakSAG'])->middleware('auth','penilai');
Route::post('/serahmarhun',['as'=>'marhun.serah','uses'=>'GadaianController@serahMarhun'])->middleware('auth','penilai');
Route::post('/printsag',['as'=>'printsag','uses'=>'GadaianController@printSAG'])->middleware('auth','penilai');

//Khazanah
Route::get('/menu','KhazanahController@menu')->middleware('auth','khazanah');
Route::get('/pendahuluanserahan','KhazanahController@pendahuluanserahandaftar')->middleware('auth','khazanah');
Route::get('/khazanahgadaian',['as'=>'khazanah.gadaian','uses'=>'KhazanahController@gadaian'])->middleware('auth','khazanah');
Route::get('/khazanahtebus',['as'=>'khazanah.tebus','uses'=>'KhazanahController@tebus'])->middleware('auth','khazanah');
Route::get('/kelulusan','KhazanahController@kelulusan')->middleware('auth','khazanah');
Route::get('/kelulusanrekodlepas',['as'=>'khazanah.rekodlepas','uses'=>'KhazanahController@kelulusanrekodlepas'])->middleware('auth','khazanah');
Route::get('/kelulusanrekodlepasoperasi',['as'=>'operasi.rekodlepas','uses'=>'OperasiController@kelulusanrekodlepas'])->middleware('auth','operasi');
Route::get('/pendahuluan',['as'=>'khazanah.pendahulu','uses'=>'KhazanahController@pendahuluan'])->middleware('auth','khazanah');
Route::get('/serahan',['as'=>'khazanah.serahan','uses'=>'KhazanahController@serahan'])->middleware('auth','khazanah');
Route::get('/laporanscanbarcode',['as'=>'laporanscanbarcode','uses'=>'KhazanahController@LaporanSemakBarcode'])->middleware('auth','khazanah');
Route::get('/laporan',['as'=>'laporan','uses'=>'KhazanahController@laporan'])->middleware('auth','khazanah');
Route::get('/laporan/gadaian',['as'=>'laporan.gadaian','uses'=>'KhazanahController@laporanGadaian'])->middleware('auth','khazanah');
Route::post('laporan/gadaian/cetak',['as'=>'gadaian.laporancetak','uses'=>'KhazanahController@cetakLaporanGadai'])->middleware('auth','khazanah');
Route::get('/laporan/tebus',['as'=>'laporan.tebus','uses'=>'KhazanahController@laporanPenebusan'])->middleware('auth','khazanah');
Route::post('laporan/tebus/cetak',['as'=>'tebus.laporancetak','uses'=>'KhazanahController@cetakLaporanPenebusan'])->middleware('auth','khazanah');
Route::get('/khazanah/pelanggan',['as'=>'khazanah.pelanggan','uses'=>'KhazanahController@index'])->middleware('auth','khazanah');
Route::get('/khazanah/customer_info',['as'=>'khazanah.customer_info','uses'=>'KhazanahController@info'])->middleware('auth','khazanah');
Route::get('/khazanah/searchpelanggan',['as'=>'khazanah.searchpelanggan','uses'=>'KhazanahController@search'])->middleware('auth','khazanah');
Route::post('/khazanah/pendahuluanserahanHQ',['as'=>'khazanah.pendahuluanserahanHQ','uses'=>'KhazanahController@pendahuluanserahanHQ'])->middleware('auth','khazanah');
Route::get('/penebusankhazanah/{norujukan}',['as'=>'penebusan.khazanah','uses' => 'PenebusanController@PenebusanKhazanah'])->middleware('auth','khazanah');
Route::get('/lelongankhazanah/{norujukan}',['as'=>'lelongan.khazanah','uses' => 'KhazanahController@lelongan'])->middleware('auth','khazanah');
Route::get('/permohonan',['as'=>'permohonan.index','uses' => 'KhazanahController@PaparanPermohonan'])->middleware('auth','khazanah');
Route::get('/permohonan/rekod',['as'=>'permohonan.rekod','uses' => 'KhazanahController@RekodPermohonan'])->middleware('auth','khazanah');
Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahController@SimpanPermohonan'])->middleware('auth','khazanah');
Route::get('/permohonan/status/{mohonid}',['as'=>'permohonan.status','uses' => 'KhazanahController@StatusPermohonan'])->middleware('auth','khazanah');
Route::post('/permohonan/cit',['as'=>'permohonan.cit','uses' => 'KhazanahController@CITPermohonan'])->middleware('auth','khazanah');
Route::post('/permohonan/download',['as'=>'permohonan.download','uses' => 'KhazanahController@DownloadFiles'])->middleware('auth','khazanah');
Route::post('/khazanah/autoserahan',['as'=>'khazanah.autoserahan','uses'=>'KhazanahController@AutoSerahan'])->middleware('auth','khazanah');


Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);

Route::get('/khazanah/harga_emas',['as'=>'khazanah.harga_emas','uses'=>'HargaEmasController@index'])->middleware('auth','khazanah');

//Request Teller Batal Route
Route::get('/requestbatal',['as'=>'request.pembatalan','uses'=>'KhazanahController@RequestPembatalan'])->middleware('auth','khazanah');

//Added Yang Baru
Route::post('/barcodescannedtebus',['as'=>'barcodetebus.scanned','uses'=>'KhazanahController@barcodescannedtebus'])->middleware('auth','khazanah');
Route::get('/pendahuluanserah/{id}',['as'=>'pendahuluan.serah','uses'=>'KhazanahController@pendahuluanserah'])->middleware('auth','khazanah');
Route::get('/khazanahserahan/{id}',['as'=>'khazanah.serah','uses'=>'KhazanahController@khazanahserahan'])->middleware('auth','khazanah');
Route::post('/kemaskinipendahuluan', ['as' =>'khazanah.kemaskiniPendahuluan','uses'=>'KhazanahController@kemaskiniPendahuluan'])->middleware('auth','khazanah');
Route::post('/kemaskiniserahan',['as'=>'khazanah.KemaskiniSerahan','uses'=>'KhazanahController@KemaskiniSerahan'])->middleware('auth','khazanah');
Route::get('/kakitangan',['as'=>'khazanah.kakitangan','uses'=>'KhazanahController@kakitangan'])->middleware('auth','khazanah');
Route::get('/dashboard',['as'=>'khazanah.dashboard','uses'=>'KhazanahController@dashboard'])->middleware('auth','khazanah');
Route::get('/dashboarddate',['as'=>'khazanah.dashboarddate','uses'=>'KhazanahController@changedatedashboard'])->middleware('auth','khazanah');
Route::get('/capaian',['as'=>'khazanah.capaian','uses'=>'KhazanahController@capaian'])->middleware('auth','khazanah');
Route::get('/alirantunai',['as'=>'khazanah.alirantunai','uses'=>'KhazanahController@alirantunai'])->middleware('auth','khazanah');
Route::get('/pelangganan',['as'=>'khazanah.pelangganan','uses'=>'KhazanahController@pelanggan'])->middleware('auth','khazanah');
Route::get('/bajet',['as'=>'khazanah.bajet','uses'=>'KhazanahController@bajet'])->middleware('auth','khazanah');
Route::get('/panjar',['as'=>'khazanah.panjar','uses'=>'KhazanahController@panjar'])->middleware('auth','khazanah');
Route::get('/getkelulusan',['as'=>'khazanah.getkelulusan','uses'=>'KhazanahController@getkelulusan'])->middleware('auth','teller');
Route::post('/createkelulusan',['as'=>'khazanah.createkelulusan','uses'=>'KhazanahController@createkelulusan'])->middleware('auth','teller');
Route::put('/updatekelulusan',['as'=>'khazanah.updatekelulusan','uses'=>'KhazanahController@updatekelulusan'])->middleware('auth','khazanah');
Route::get('/mintasemulakelulusan',['as'=>'khazanah.getmintasemulakelulusan','uses'=>'KhazanahController@mintakatalaluansemula'])->middleware('auth','khazanah');
Route::get('/mintasemulakelulusan/operasi',['as'=>'operasi.getmintasemulakelulusan','uses'=>'OperasiController@mintakatalaluansemula'])->middleware('auth','operasi');
Route::post('/createpanjar',['as'=>'khazanah.createpanjar','uses'=>'KhazanahController@createpanjar'])->middleware('auth','khazanah');
Route::post('/deletepanjar',['as'=>'khazanah.deletepanjar','uses'=>'KhazanahController@deletepanjar'])->middleware('auth','khazanah');
Route::get('/gadaian/edit/{norujukan}',['as'=>'gadaian.edit','uses'=>'GadaianController@edit'])->middleware('auth','teller');
Route::post('/gadai/edit/store',['as'=>'gadai.editstore','uses'=>'GadaianController@editstore'])->middleware('auth','teller');
Route::put('/gadai/edit/deletemarhun',['as'=>'gadai.editmarhun','uses'=>'GadaianController@editmarhun'])->middleware('auth','teller');
Route::get('/gadai/edit/editmarhun',['as'=>'gadai.ubahmarhun','uses'=>'GadaianController@ubahmarhun'])->middleware('auth','teller');
Route::post('/deletependahuluanserahan',['as'=>'khazanah.deletependser','uses'=>'KhazanahController@deletependahuluanserahan'])->middleware('auth','khazanah');


//Ubah dan Hapus
Route::get('/getkelulu',['as'=>'teller.getkelulusan','uses'=>'GadaianController@getkelulusan'])->middleware('auth','teller');
Route::post('/createkelulu',['as'=>'teller.createkelulusan','uses'=>'GadaianController@createkelulusan'])->middleware('auth');
Route::put('/updatekelulu',['as'=>'teller.updatekelulusan','uses'=>'GadaianController@updatekelulusan'])->middleware('auth','khazanah');


//Tukaran Harga Emas Semasa
Route::get('/gethargaemassemasa',['as'=>'tukaran.hargaemas','uses'=>'PenebusanController@tukaranhargaemas']);

//Tuntut Baki
Route::put('/simpantuntutbaki',['as'=>'lelong.tuntutbaki','uses'=>'LelongController@transaksituntutbaki'])->middleware('auth','teller');

//Laporan Baru
Route::get('/laporan/lelongan',['as'=>'laporan.lelongan','uses'=>'KhazanahController@laporanLelongan'])->middleware('auth','khazanah');
Route::get('laporan/lelongan/cetakan',['as'=>'lelongan.laporancetak','uses'=>'KhazanahController@cetaklaporanLelongan'])->middleware('auth','khazanah');
Route::get('/laporan/homepage/ansuranupah',['as'=>'homepage.ansuranupah','uses'=>'KhazanahController@PemilihanAnsUpah'])->middleware('auth','khazanah');
Route::get('/laporan/upah',['as'=>'laporan.upah','uses'=>'KhazanahController@LaporanUpah'])->middleware('auth','khazanah');
Route::post('laporan/upah/cetak',['as'=>'upah.laporancetak','uses'=>'KhazanahController@cetaklaporan_Upah'])->middleware('auth','khazanah');
Route::get('/laporan/ansuran',['as'=>'laporan.ansuran','uses'=>'KhazanahController@laporanAnsuran'])->middleware('auth','khazanah');
Route::post('laporan/ansuran/cetak',['as'=>'ansuran.laporancetak','uses'=>'KhazanahController@cetakLaporanAnsuran'])->middleware('auth','khazanah');
Route::get('/laporan/pelangganbaru',['as'=>'laporan.pelangganbaru','uses'=>'KhazanahController@laporanPelangganBaru'])->middleware('auth','khazanah');
Route::post('laporan/pelangganbaru/cetak',['as'=>'pelangganbaru.laporancetak','uses'=>'KhazanahController@cetakLaporanPelangganBaru'])->middleware('auth','khazanah');
Route::get('/laporan/stokaudit',['as'=>'laporan.stokaudit','uses'=>'KhazanahController@laporanStokAudit'])->middleware('auth','khazanah');
Route::get('laporan/stokaudit/cetak',['as'=>'stokaudit.laporancetak','uses'=>'KhazanahController@cetakLaporanStokAudit'])->middleware('auth','khazanah');
Route::get('/laporan/kawalanstok',['as'=>'laporan.kawalanstok','uses'=>'KhazanahController@laporanKawalanStok'])->middleware('auth','khazanah');
Route::post('laporan/kawalanstok/cetak',['as'=>'kawalanstok.laporancetak','uses'=>'KhazanahController@cetakLaporanKawalanStok'])->middleware('auth','khazanah');
Route::get('/laporan/batalsuratgadai',['as'=>'laporan.batalsuratgadai','uses'=>'KhazanahController@laporanBatalSuratGadai'])->middleware('auth','khazanah');
Route::post('laporan/batalsuratgadai/cetak',['as'=>'batalsuratgadai.laporancetak','uses'=>'KhazanahController@cetakLaporanBatalSuratGadai'])->middleware('auth','khazanah');
Route::get('/laporan/marhunharian',['as'=>'laporan.marhunharian','uses'=>'KhazanahController@laporanMarhunHarian'])->middleware('auth','khazanah');
Route::post('laporan/marhunharian/cetak',['as'=>'marhunharian.laporancetak','uses'=>'KhazanahController@cetakLaporanMarhunHarian'])->middleware('auth','khazanah');
Route::get('/laporan/petibesi',['as'=>'laporan.petibesi','uses'=>'KhazanahController@laporanPetiBesi'])->middleware('auth','khazanah');
Route::post('laporan/petibesi/cetak',['as'=>'petibesi.laporancetak','uses'=>'KhazanahController@cetakLaporanPetiBesi'])->middleware('auth','khazanah');
Route::get('/laporan/marhunterkumpul',['as'=>'laporan.marhunterkumpul','uses'=>'KhazanahController@laporanMarhunTerkumpul'])->middleware('auth','khazanah');
Route::post('laporan/marhunterkumpul/cetak',['as'=>'marhunterkumpul.laporancetak','uses'=>'KhazanahController@cetakLaporanMarhunTerkumpul'])->middleware('auth','khazanah');
Route::get('laporan/ringkasanharian/',['as'=>'laporan.ringkasanharian','uses'=>'KhazanahController@laporanRingkasanHarian'])->middleware('auth','khazanah');
Route::get('laporan/ringkasanharian/cetak',['as'=>'ringkasanharian.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanHarian'])->middleware('auth','khazanah');
Route::get('laporan/ringkasanterkumpul/',['as'=>'laporan.ringkasanterkumpul','uses'=>'KhazanahController@laporanRingkasanTerkumpul'])->middleware('auth','khazanah');
Route::get('laporan/ringkasanterkumpul/cetak',['as'=>'ringkasanterkumpul.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanTerkumpul'])->middleware('auth','khazanah');
Route::get('/laporan/agingbulanan', [ 'as'=>'laporan.agingbulanan', 'uses'=>'KhazanahController@laporanAging_Bulanan'])->middleware('auth','khazanah');
Route::post('/laporan/agingbulanan/cetak', ['as'=>'agingbulan.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporang_Aging'])->middleware('auth','khazanah');
Route::get('/laporan/perbelanjaan', [ 'as'=>'laporan.perbelanjaan', 'uses'=>'KhazanahController@laporan_Perbelanjaan'])->middleware('auth','khazanah');
Route::post('/laporan/perbelanjaan/cetak', ['as'=>'perbelanjaan.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporan_Perbelanjaan'])->middleware('auth','khazanah');
Route::get('/laporan/perbelanjaan/cetak/{baucer}', ['as'=>'perbelanjaan.cetaklaporanbaucer', 'uses'=>'KhazanahController@cetaklaporan_Perbelanjaan_Baucer'])->middleware('auth','khazanah');
Route::get('/laporan/tuntutbaki', [ 'as'=>'laporan.tuntutbaki', 'uses'=>'KhazanahController@laporan_tuntutbaki'])->middleware('auth','khazanah');
Route::post('/laporan/tuntutbaki/cetak', ['as'=>'tuntutbaki.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporan_tuntutbaki'])->middleware('auth','khazanah');
Route::get('/laporan/pendserahan', [ 'as'=>'laporan.pendserahan', 'uses'=>'KhazanahController@laporan_pendserahan'])->middleware('auth','khazanah');
Route::post('/laporan/pendserahan/cetak', ['as'=>'pendserahan.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporan_laporan_pendserahan'])->middleware('auth','khazanah');
Route::get('laporan/denominasi/',['as'=>'laporan.denominasi','uses'=>'KhazanahController@laporanDenominasi'])->middleware('auth','khazanah');
Route::get('laporan/denominasi/cetak',['as'=>'denominasi.laporancetak','uses'=>'KhazanahController@cetakLaporanDenominasi'])->middleware('auth','khazanah');
Route::get('/laporan/senaraipetibesi', [ 'as'=>'laporan.senaraipetibesi', 'uses'=>'KhazanahController@laporan_senaraipetibesi'])->middleware('auth','khazanah');
Route::post('/laporan/senaraipetibesi/cetak', ['as'=>'senaraipetibesi.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporan_senaraipetibesi'])->middleware('auth','khazanah');
Route::get('laporan/hargaemas/',['as'=>'laporan.hargaemas','uses'=>'KhazanahController@laporanhargaemas'])->middleware('auth','khazanah');
Route::post('laporan/hargaemas/cetak',['as'=>'hargaemas.laporancetak','uses'=>'KhazanahController@cetakLaporanhargaemas'])->middleware('auth','khazanah');
Route::get('laporan/audittrail/',['as'=>'laporan.audittrail','uses'=>'KhazanahController@laporanAuditTrail'])->middleware('auth','khazanah');
Route::post('laporan/audittrail/cetak',['as'=>'audittrail.laporancetak','uses'=>'KhazanahController@cetakLaporanAuditTrail'])->middleware('auth','khazanah');
Route::get('laporan/wakil/',['as'=>'laporan.wakil','uses'=>'KhazanahController@laporanWakil'])->middleware('auth','khazanah');
Route::post('laporan/wakil/cetak',['as'=>'wakil.laporancetak','uses'=>'KhazanahController@cetakLaporanWakil'])->middleware('auth','khazanah');
// Route::get('laporan/hapushq/',['as'=>'laporan.hapushq','uses'=>'KhazanahController@laporanHapusHQ'])->middleware('auth','khazanah');
// Route::post('laporan/hapushq/cetak',['as'=>'hapushq.laporancetak','uses'=>'KhazanahController@cetakLaporanHapusHQ'])->middleware('auth','khazanah');
Route::get('laporan/saghilang/',['as'=>'laporan.saghilang','uses'=>'KhazanahController@laporanSAGHilang'])->middleware('auth','khazanah');
Route::post('laporan/saghilang/cetak',['as'=>'saghilang.laporancetak','uses'=>'KhazanahController@cetakLaporanSAGHilang'])->middleware('auth','khazanah');
// Route::get('/laporan/agingbulanan', [ 'as'=>'laporan.agingbulanan', 'uses'=>'KhazanahController@laporanAging_Bulanan'])->middleware('auth','khazanah');
// Route::post('/laporan/agingbulanan/cetak', ['as'=>'agingbulan.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporang_Aging'])->middleware('auth','khazanah');

Route::get('/laporan/stokauditbackdate',['as'=>'laporan.stokauditbackdate','uses'=>'KhazanahController@laporanStokAuditBackdate'])->middleware('auth','khazanah');
Route::get('laporan/stokauditbackdate/cetak',['as'=>'stokauditbackdate.laporancetak','uses'=>'KhazanahController@cetakLaporanStokAuditBackdate'])->middleware('auth','khazanah');

Route::get('laporan/lelongan/notislelong/',['as'=>'lelongan.notis','uses'=>'KhazanahController@NotisLelong']);

Route::get('laporan/lelongan/tuntutbaki/',['as'=>'lelongan.tuntutbaki','uses'=>'KhazanahController@TuntutBakiByBatchNo'])->middleware('auth','khazanah');
Route::get('laporan/lelongan/notistuntutbaki/',['as'=>'lelongan.notistuntutbaki','uses'=>'KhazanahController@NotisTuntutBaki'])->middleware('auth','khazanah');


Route::get('/laporan/komoditi',['as'=>'laporan.komoditi','uses'=>'KomuditiController@cetakRekodKomoditi']);

Route::get('laporan/serahmarhungadai/',['as'=>'laporan.serahmarhungadai','uses'=>'KhazanahController@Laporan_SerahPetiBesiGadai'])->middleware('auth','khazanah');
Route::post('/laporan/serahmarhungadai/cetak',['as'=>'laporan.serahmarhungadaicetak','uses'=>'KhazanahController@cetak_serahBarcodeGadai']);
Route::get('laporan/serahmarhuntebus/',['as'=>'laporan.serahmarhuntebus','uses'=>'KhazanahController@Laporan_SerahMarhunTebus'])->middleware('auth','khazanah');
Route::post('/laporan/serahmarhuntebus/cetak',['as'=>'laporan.serahmarhuntebuscetak','uses'=>'KhazanahController@cetak_serahMarhunTebus']);

Route::get('laporan/auditcustomer/',['as'=>'laporan.auditcustomer','uses'=>'KhazanahController@Laporan_AuditCustomer'])->middleware('auth','khazanah');
Route::post('/laporan/auditcustomer/cetak',['as'=>'laporan.auditcustomercetak','uses'=>'KhazanahController@cetak_AuditCustomer']);

Route::get('/laporanscantebusbarcode',['as'=>'laporanscantebusbarcode','uses'=>'KhazanahController@LaporanTebusBarcode'])->middleware('auth','khazanah');

Route::get('laporan/ringkasanharianujrah/',['as'=>'laporan.ringkasanharianujrah','uses'=>'KhazanahController@laporanRingkasanHarianUjrah'])->middleware('auth','khazanah');
Route::get('laporan/ringkasanharianujrah/cetak',['as'=>'ringkasanharianujrah.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanHarianUjrah'])->middleware('auth','khazanah');



//stokauditkhas
Route::get('laporan/stokauditkhas',['as'=>'laporan.stokauditkhas','uses'=>'KhazanahController@laporanStokAuditKhas'])->middleware('auth','khazanah');
Route::get('laporan/stokauditkhas/cetak',['as'=>'stokaudit.laporancetakkhas','uses'=>'KhazanahController@cetakLaporanStokAuditKhas'])->middleware('auth','khazanah');
Route::post('laporan/stokauditkhas/cetakexport',['as'=>'stokaudit.exportlaporancetakkhas','uses'=>'KhazanahController@cetakExportLaporanStokAuditKhas'])->middleware('auth','khazanah');
Route::get('laporan/rekodblast',['as'=>'stokaudit.rekodblast','uses'=>'KhazanahController@rekodblast'])->middleware('auth','khazanah');
Route::post('laporan/rekodblastexport',['as'=>'stokaudit.rekodblastexport','uses'=>'KhazanahController@rekodblastexport'])->middleware('auth','khazanah');
Route::get('laporan/rekodblastsms',['as'=>'stokaudit.rekodblastsms','uses'=>'KhazanahController@rekodblastsms'])->middleware('auth','khazanah');
Route::post('laporan/rekodblastsmsexport',['as'=>'stokaudit.rekodblastsmsexport','uses'=>'KhazanahController@rekodblastsmsexport'])->middleware('auth','khazanah');

Route::get('/laporan/stokauditcombine',['as'=>'laporan.stokauditcombine','uses'=>'KhazanahController@laporanStokAuditCombine'])->middleware('auth','khazanah');
Route::get('laporan/stokauditcombine/cetak',['as'=>'stokauditcombine.laporancetak','uses'=>'KhazanahController@cetakLaporanStokAuditCombine'])->middleware('auth','khazanah');

//Resit Ansurans
Route::get('/resit/{id}',['as'=>'resit.ansuran','uses'=>'GadaianController@resit'])->middleware(['auth','teller','khazanah']);
Route::get('/resitansurans/{id}',['as'=>'resit.ansurans','uses'=>'GadaianController@resitansurans'])->middleware(['auth','teller','khazanah']);
Route::get('/resitbelumansurans/{id}',['as'=>'resit.belumansurans','uses'=>'GadaianController@resitbelumansurans'])->middleware(['auth','teller','khazanah']);
Route::get('/resit/tebus/{id}',['as'=>'resit.tebus','uses'=>'GadaianController@resittebus'])->middleware(['auth','teller','khazanah']);
Route::get('/resit/advansur/{id}',['as'=>'resit.advansur','uses'=>'GadaianController@resitadvansur'])->middleware(['auth','teller','khazanah']);
Route::get('/resit/tebusseparuh/{id}',['as'=>'resit.tebusseparuh','uses'=>'GadaianController@resittebusseparuh'])->middleware(['auth','teller','khazanah']);
Route::get('/resit/belumtebus/{id}',['as'=>'resit.belumtebus','uses'=>'GadaianController@resitbelumtebus'])->middleware(['auth','teller','khazanah']);
Route::get('/resit/tambahpinjam/{id}',['as'=>'resit.tambahpinjam','uses'=>'GadaianController@resittambahpinjam'])->middleware(['auth','teller','khazanah']);
Route::get('/resit/tuntutbaki/{id}',['as'=>'resit.tuntutbaki','uses'=>'LelongController@resittuntutbaki'])->middleware(['auth','teller','khazanah']);
Route::get('/resit/tebusautotawarruq/{id}',['as'=>'resit.autotawarruq','uses'=>'GadaianController@resitautotawarruq'])->middleware(['auth','teller','khazanah']);

Route::group(['middleware' => ['khazanah']], function() {

    Route::get('/khazanah/resit/{id}',['as'=>'resit.khazanah.ansuran','uses'=>'GadaianController@resit']);
    Route::get('/khazanah/resitansurans/{id}',['as'=>'resit.khazanah.ansurans','uses'=>'GadaianController@resitansurans']);
    Route::get('/khazanah/resitbelumansurans/{id}',['as'=>'resit.khazanah.belumansurans','uses'=>'GadaianController@resitbelumansurans']);
    Route::get('/khazanah/resit/tebus/{id}',['as'=>'resit.khazanah.tebus','uses'=>'GadaianController@resittebus']);
    Route::get('/khazanah/resit/advansur/{id}',['as'=>'resit.khazanah.advansur','uses'=>'GadaianController@resitadvansur']);
    Route::get('/khazanah/resit/tebusseparuh/{id}',['as'=>'resit.khazanah.tebusseparuh','uses'=>'GadaianController@resittebusseparuh']);
    Route::get('/khazanah/resit/belumtebus/{id}',['as'=>'resit.khazanah.belumtebus','uses'=>'GadaianController@resitbelumtebus']);
    Route::get('/khazanah/resit/tambahpinjam/{id}',['as'=>'resit.khazanah.tambahpinjam','uses'=>'GadaianController@resittambahpinjam']);
    Route::get('/khazanah/resit/tuntutbaki/{id}',['as'=>'resit.khazanah.tuntutbaki','uses'=>'LelongController@resittuntutbaki']);
    Route::get('/khazanah/resit/tebusautotawarruq/{id}',['as'=>'resit.khazanah.autotawarruq','uses'=>'GadaianController@resitautotawarruq']);

});


Route::post('/barcodescanned',['as'=>'barcode.scanned','uses'=>'KhazanahController@barcodescanned'])->middleware('auth','khazanah');

//Operasi
Route::get('/operasi/kelulusan','OperasiController@kelulusan')->name('operasi.kelulusan')->middleware('auth','operasi');
Route::post('/operasi/createkelulusan',['as'=>'operasi.createkelulusan','uses'=>'OperasiController@createkelulusan'])->middleware('auth','teller');
Route::get('/operasi/getkelulusan',['as'=>'operasi.getkelulusan','uses'=>'OperasiController@getkelulusan'])->middleware('auth','teller');
Route::put('/operasi/updatekelulusan',['as'=>'operasi.updatekelulusan','uses'=>'OperasiController@updatekelulusan'])->middleware('auth','operasi');
Route::get('/operasi/parameter','OperasiController@parameter')->name('parameter')->middleware('auth','operasi');
Route::get('/operasi/hargaemas',['as'=>'operasi.hargaemas','uses'=>'OperasiController@hargaemas'])->middleware('auth','operasi');
Route::post('/operasi/hargaemas/update',['as'=>'hargaemas.update','uses'=>'OperasiController@updatehargaemas'])->middleware('auth','operasi');
Route::post('/operasi/hargaemas',['as'=>'hargaemas.create','uses'=>'OperasiController@createhargaemas'])->middleware('auth','operasi');
Route::get('/daftar/kakitangan',['as'=>'daftar.kakitangan','uses'=>'KakitanganController@daftarKakitangan'])->middleware('auth','operasi');
Route::post('/daftar/kakitangan/baru',['as'=>'kakitangan.baru','uses'=>'KakitanganController@registerStaff'])->middleware('auth','operasi');
Route::get('kakitangan/tukar_taraf',['as'=>'kakitangan.tukartaraf','uses'=>'KakitanganController@tukartaraf'])->middleware('auth','operasi');
Route::post('kakitangan/tukar_taraf/update',['as'=>'kakitangan.tukartaraf.update','uses'=>'KakitanganController@tukartarafUpdate'])->middleware('auth','operasi');
Route::get('kakitangan/tukar_cawangan',['as'=>'kakitangan.tukarcawangan','uses'=>'KakitanganController@tukarcawangan'])->middleware('auth','operasi');
Route::post('kakitangan/tukar_cawangan/update',['as'=>'kakitangan.tukarcawangan.update','uses'=>'KakitanganController@tukarcawanganUpdate'])->middleware('auth','operasi');
Route::post('operasi/komoditi/limit',['as'=>'komoditi.limit','uses'=>'KomuditiController@komoditiUpdate'])->middleware('auth','operasi');
Route::post('operasi/kakitangan/delete',['as'=>'operasi.kakitangan.delete','uses'=>'KakitanganController@deleteKakitangan'])->middleware('auth','operasi');
Route::get('operasi/kakitangan/edit',['as'=>'operasi.kakitangan.edit','uses'=>'KakitanganController@editKakitangan'])->middleware('auth','operasi');
Route::post('operasi/kakitangan/edit/store',['as'=>'operasi.kakitangan.edit.store','uses'=>'KakitanganController@editStoreKakitangan'])->middleware('auth','operasi');


Route::get('/operasi/margin',['as'=>'operasi.margin','uses'=>'OperasiController@margin'])->middleware('auth','operasi');

Route::get('/komoditi',['as'=>'komuditi','uses'=>'KomuditiController@index']);
Route::get('/komoditi/rekod',['as'=>'rekod.komoditi','uses'=>'KomuditiController@rekodKomoditi']);
Route::get('/komoditi/rekod/print',['as'=>'komoditi.rekod.print','uses'=>'KomuditiController@printRekodTransaksi']);

Route::post('/khazanah/suratakuangadaian',['as'=>'agh.create','uses'=>'KhazanahController@SuratAkuanGadaian'])->middleware('auth','khazanah');
Route::post('/khazanah/suratakuangadaianedit',['as'=>'agh.update','uses'=>'KhazanahController@SuratAkuanGadaianUpdate'])->middleware('auth','khazanah');
Route::get('/khazanah/ulangcetakagh/{norujukan}',['as'=>'agh.ulangcetak','uses'=>'KhazanahController@ulangcetakSuratAkuanGadaianHilang'])->middleware('auth','khazanah');

Route::get('/laporan/stokauditbersih', ['as'=>'laporan.stokauditbersih', 'uses'=>'KhazanahController@stokAuditBersih'])->middleware('auth','khazanah');
Route::post('/laporan/stokauditbersih_cetak',['as' =>'stokauditbersih.cetakstokauditbersih', 'uses'=>'KhazanahController@cetakStok_AuditBersih'])->middleware('auth','khazanah');

Route::get('/laporan/stokauditdetails', ['as'=>'laporan.stokauditdetails','uses'=>'KhazanahController@stokAuditDetails'])->middleware('auth','khazanah');
Route::post('laporan/stokauditdetails_cetak',['as'=>'stokauditdetails.stokauditdetails_cetak', 'uses'=>'KhazanahController@cetak_stokAuditDetails'])->middleware('auth', 'khazanah');

Route::get('/laporan/datalejeram',['as' =>'laporan.datalejer_am', 'uses'=>'KhazanahController@data_lejer_am'])->middleware('auth', 'khazanah');
route::post('/cetaklejer_am',['as'=>'cetak.lejer_am', 'uses'=>'KhazanahController@cetak_lejer_am'])->middleware('auth', 'khazanah');

Route::get('laporan/dataimbangduga',['as'=> 'laporan.imbangduga' , 'uses'=>'KhazanahController@laporanImbangduga' ])->middleware('auth','khazanah');
Route::post('/laporan/imbangduga',['as' =>'imbangduga.cetak', 'uses'=>'KhazanahController@cetakImbangDuga'])->middleware('auth', 'khazanah');

Route::get('laporan/imbangduga-akru',['as'=> 'laporan.imbangdugaakru' , 'uses'=>'KhazanahController@ImbangDugaAkru' ])->middleware('auth','khazanah');
Route::post('/laporan/cetak/imbangduga-akru',['as' =>'imbangdugaakru.cetak', 'uses'=>'KhazanahController@cetakimbangdugaAkru'])->middleware('auth', 'khazanah');

Route::get('khazanah/jana_permohonan',['as'=> 'permohonan.jana' , 'uses'=>'KhazanahController@JanaPermohonan' ])->middleware('auth','khazanah');
Route::post('khazanah/jana_permohonan/proses_permohonan',['as'=> 'permohonan.proses' , 'uses'=>'KhazanahController@ProsesPermohonan'])->middleware('auth','khazanah');

//ADMIN

Route::get('admin/daftar/kakitangan',['as'=>'admin.daftar.kakitangan','uses'=>'KakitanganController@daftarKakitangan'])->middleware('auth','admin');
Route::post('admin/daftar/kakitangan/baru',['as'=>'admin.kakitangan.baru','uses'=>'KakitanganController@registerStaff'])->middleware('auth','admin');
Route::get('admin/kakitangan/tukar_taraf',['as'=>'admin.kakitangan.tukartaraf','uses'=>'KakitanganController@tukartaraf'])->middleware('auth','admin');
Route::post('admin/kakitangan/tukar_taraf/update',['as'=>'admin.kakitangan.tukartaraf.update','uses'=>'KakitanganController@tukartarafUpdate'])->middleware('auth','admin');
Route::get('admin/kakitangan/tukar_cawangan',['as'=>'admin.kakitangan.tukarcawangan','uses'=>'KakitanganController@tukarcawangan'])->middleware('auth','admin');
Route::post('admin/kakitangan/tukar_cawangan/update',['as'=>'admin.kakitangan.tukarcawangan.update','uses'=>'KakitanganController@tukarcawanganUpdate'])->middleware('auth','admin');
Route::post('admin/kakitangan/delete',['as'=>'admin.kakitangan.delete','uses'=>'KakitanganController@deleteKakitangan'])->middleware('auth','admin');
Route::get('admin/kakitangan/edit',['as'=>'admin.kakitangan.edit','uses'=>'KakitanganController@editKakitangan'])->middleware('auth','admin');
Route::post('admin/kakitangan/edit/store',['as'=>'admin.kakitangan.edit.store','uses'=>'KakitanganController@editStoreKakitangan'])->middleware('auth','admin');
Route::get('admin/kakitangan/resetcredentials',['as'=>'admin.kakitangan.resetcredentials','uses'=>'KakitanganController@resetCredentials'])->middleware('auth','admin');
Route::get('admin/pelanggan',['as'=>'admin.pelanggan','uses'=>'KhazanahController@index'])->middleware('auth','admin');
Route::get('admin/customer_info',['as'=>'admin.customer_info','uses'=>'KhazanahController@infoAdmin'])->middleware('auth','admin');
Route::get('admin/searchpelanggan',['as'=>'admin.searchpelanggan','uses'=>'KhazanahController@searchAdmin'])->middleware('auth','admin');
Route::get('admin/poskod',['as'=>'admin.poskod','uses'=>'HomeController@poskod']);

Route::get('pembeliannotifykomuditi',['as'=>'beli.notifyKomoditi','uses'=>'OperasiController@notifyKomoditi'])->middleware('auth','operasi');

//LAPORAN UJRAH ROLE KHAZANAH

Route::get('/laporan/gadaianujrah',['as'=>'laporan.gadaianujrah','uses'=>'KhazanahController@laporanGadaianUjrah'])->middleware('auth','khazanah');
Route::post('laporan/gadaianujrah/cetak',['as'=>'gadaianujrah.laporancetak','uses'=>'KhazanahController@cetakLaporanGadaiUjrah'])->middleware('auth','khazanah');

Route::get('/laporan/tebusujrah',['as'=>'laporan.tebusujrah','uses'=>'KhazanahController@laporanPenebusanUjrah'])->middleware('auth','khazanah');
Route::post('laporan/tebusujrah/cetak',['as'=>'tebusujrah.laporancetak','uses'=>'KhazanahController@cetakLaporanPenebusanUjrah'])->middleware('auth','khazanah');

Route::get('/laporan/ansuranujrah',['as'=>'laporan.ansuranujrah','uses'=>'KhazanahController@laporanAnsuranUjrah'])->middleware('auth','khazanah');
Route::post('laporan/ansuranujrah/cetak',['as'=>'ansuranujrah.laporancetak','uses'=>'KhazanahController@cetakLaporanAnsuranUjrah'])->middleware('auth','khazanah');

//ROLE CALLCENTER
Route::get('/notisperingatan',['as'=>'arcc.notisperingatan','uses'=>'CallCenterController@notisperingatan'])->middleware('auth','callcenter');
Route::get('/notisperingatanpertama',['as'=>'arcc.notisperingatanpertama','uses'=>'CallCenterController@notisperingatanpertama'])->middleware('auth','callcenter');
Route::get('/cariansag',['as'=>'arcc.cariansag','uses'=>'CallCenterController@cariansag'])->middleware('auth','callcenter');
Route::get('/cariansagnotispertama',['as'=>'arcc.cariansagnotispertama','uses'=>'CallCenterController@cariansagnotispertama'])->middleware('auth','callcenter');
Route::post('/janadatanotisperingatan',['as'=>'arcc.janadatanotisperingatan','uses'=>'CallCenterController@janadatanotisperingatan'])->middleware('auth','callcenter');
Route::post('/janadatanotispertama',['as'=>'arcc.janadatanotispertama','uses'=>'CallCenterController@janadatanotispertama'])->middleware('auth','callcenter');
Route::get('/rekodnotisperingatan',['as'=>'arcc.rekodnotisperingatan','uses'=>'CallCenterController@rekodnotisperingatan'])->middleware('auth','callcenter');
Route::get('/detailnotisperingatan/{notisid}',['as'=>'arcc.detailnotisperingatan','uses'=>'CallCenterController@detailnotisperingatan'])->middleware('auth','callcenter');
Route::get('/bycawnotisperingatan/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisperingatan','uses'=>'CallCenterController@bycawnotisperingatan'])->middleware('auth','callcenter');
Route::post('/blastpertama/{kodcaw}/{notisid}',['as'=>'arcc.blastpertama','uses'=>'CallCenterController@blastpertama'])->middleware('auth','callcenter');
Route::get('/arcc/pelanggan',['as'=>'arcc.pelanggan','uses'=>'CallCenterController@pelanggan'])->middleware('auth','callcenter');
Route::get('/arcc/searchpelanggan',['as'=>'arcc.searchpelanggan','uses'=>'CallCenterController@search'])->middleware('auth','callcenter');
Route::get('/arcc/customer_info',['as'=>'arcc.customer_info','uses'=>'CallCenterController@info'])->middleware('auth','callcenter');
Route::get('/arcc/history',['as'=>'arcc.history','uses'=>'CallCenterController@history'])->middleware('auth','callcenter');
Route::get('/notisperingatankedua',['as'=>'arcc.notisperingatankedua','uses'=>'CallCenterController@notisperingatankedua'])->middleware('auth','callcenter');
Route::get('/rekodnotisperingatankedua',['as'=>'arcc.rekodnotisperingatankedua','uses'=>'CallCenterController@rekodnotisperingatankedua'])->middleware('auth','callcenter');
Route::get('/kemaskininotisperingatan/{notisid}',['as'=>'arcc.kemaskininotisperingatan','uses'=>'CallCenterController@kemaskininotisperingatan'])->middleware('auth','callcenter');
Route::get('/cariansagnotiskedua',['as'=>'arcc.cariansagnotiskedua','uses'=>'CallCenterController@cariansagnotiskedua'])->middleware('auth','callcenter');
Route::get('/detailnotisperingatankedua/{notisid}',['as'=>'arcc.detailnotisperingatankedua','uses'=>'CallCenterController@detailnotisperingatankedua'])->middleware('auth','callcenter');
Route::get('/bycawnotisperingatankedua/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisperingatankedua','uses'=>'CallCenterController@bycawnotisperingatankedua'])->middleware('auth','callcenter');
Route::post('/blastkedua/{kodcaw}/{notisid}',['as'=>'arcc.blastkedua','uses'=>'CallCenterController@blastkedua'])->middleware('auth','callcenter');
Route::get('/kemaskininotisperingatankedua/{notisid}',['as'=>'arcc.kemaskininotisperingatankedua','uses'=>'CallCenterController@kemaskininotisperingatankedua'])->middleware('auth','callcenter');
Route::get('/kemaskininotisperingatanbycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatanbycaw','uses'=>'CallCenterController@kemaskininotisperingatanbycaw'])->middleware('auth','callcenter');
Route::get('/kemaskininotisperingatankeduabycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatankeduabycaw','uses'=>'CallCenterController@kemaskininotisperingatankeduabycaw'])->middleware('auth','callcenter');
Route::get('/arcc/tanyaupah/{norujukan}',['as'=>'tanyaupah','uses' => 'CallCenterController@tanyaupah'])->middleware('auth','callcenter');

//taraf pc atau ppc
Route::get('/cawangan/notisperingatan',['as'=>'laporan.notisperingatan','uses'=>'KhazanahController@notisperingatan'])->middleware('auth','khazanah');
Route::get('/cawangan/rekodnotisperingatanpertama',['as'=>'laporan.rekodnotisperingatanpertama','uses'=>'KhazanahController@rekodnotisperingatanpertama'])->middleware('auth','khazanah');
Route::get('/cawangan/rekodnotisperingatankedua',['as'=>'laporan.rekodnotisperingatankedua','uses'=>'KhazanahController@rekodnotisperingatankedua'])->middleware('auth','khazanah');
Route::get('/cawangan/detailnotisperingatan',['as'=>'laporan.detailnotisperingatan','uses'=>'KhazanahController@detailnotisperingatan'])->middleware('auth','khazanah');
Route::get('/cawangan/bycawnotisperingatan/{kodcaw}/{notisid}',['as'=>'laporan.bycawnotisperingatan','uses'=>'KhazanahController@bycawnotisperingatan'])->middleware('auth','khazanah');



//surat wakil
Route::get('/khazanah/indexwakil',['as'=>'khazanah.indexwakil','uses'=>'WakilController@indexwakil'])->middleware('auth','khazanah');
Route::get('/khazanah/suratwakil',['as'=>'khazanah.suratwakil','uses'=>'WakilController@suratwakil'])->middleware('auth','khazanah');
Route::get('/khazanah/sag_info',['as'=>'khazanah.sag_info','uses'=>'WakilController@sagInfo'])->middleware('auth','khazanah');
Route::get('/khazanah/print.suratwakil/{norujukan}',['as'=>'khazanah.print.suratwakil','uses'=>'WakilController@printSuratWakil'])->middleware('auth','khazanah');
Route::get('/penilai/print.suratwakil/{norujukan}',['as'=>'penilai.print.suratwakil','uses'=>'WakilController@printSuratWakilPenilai'])->middleware('auth','penilai');


Route::get('/notisjbg',['as'=>'arcc.notisjbg','uses'=>'CallCenterController@notisJbg'])->middleware('auth','callcenter');
Route::get('/carianjbg',['as'=>'arcc.carianjbg','uses'=>'CallCenterController@carianJbg'])->middleware('auth','callcenter');
Route::post('/janadatanotisjbg',['as'=>'arcc.janadatanotisjbg','uses'=>'CallCenterController@janadatanotisjbg'])->middleware('auth','callcenter');
Route::get('/rekodnotisjbg',['as'=>'arcc.rekodnotisjbg','uses'=>'CallCenterController@rekodnotisjbg'])->middleware('auth','callcenter');
Route::get('/detailnotisjbg/{notisid}',['as'=>'arcc.detailnotisjbg','uses'=>'CallCenterController@detailnotisjbg'])->middleware('auth','callcenter');
Route::get('/bycawnotisjbg/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisjbg','uses'=>'CallCenterController@bycawnotisjbg'])->middleware('auth','callcenter');
Route::get('/detsagcallbyjbg/{kodcaw}/{notisid}/{id}',['as'=>'arcc.detsagcallbyjbg','uses'=>'CallCenterController@detsagcallbyjbg'])->middleware('auth','callcenter');
Route::get('/bycawnotisjbg2/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisjbg2','uses'=>'CallCenterController@bycawnotisjbg2'])->middleware('auth','callcenter');
Route::get('/detsagcallbyjbg2/{kodcaw}/{notisid}/{nokp}',['as'=>'arcc.detsagcallbyjbg2','uses'=>'CallCenterController@detsagcallbyjbg2'])->middleware('auth','callcenter');
Route::post('/printnotiscall/{kodcaw}/{notisid}',['as'=>'arcc.printnotiscall','uses'=>'CallCenterController@printnotiscall'])->middleware('auth','callcenter');

Route::get('/roles_harian/{kodcaw}', 'Auth\LoginController@GetRolesHarian');

Route::get('supports/driver/mykad-reader',['as'=>'mykadreader.driver', function(){
    return view('supports.driver.mykad-reader.download');
}])->middleware('auth','teller');
Route::get('supports/driver/mykad-reader/download',['as'=>'mykadreader.driver.download', function(){
   return Storage::disk('supports')->download('MykadReaderDriver.zip');
}])->middleware('auth','teller');

/* Event Trigger */
Route::get('/event/tellercash',['as'=>'event.tellercash','uses'=>'EventTriggerController@TellerCash'])->middleware('auth');


/* Perubatan */
Route::get('/perubatan',['as'=>'perubatan','uses'=>'PerubatanController@index'])->middleware('auth','operasi');
Route::get('/perubatan/search',['as'=>'perubatan.search','uses'=>'PerubatanController@search'])->middleware('auth','operasi');
Route::put('/perubatan/update',['as'=>'perubatan.update','uses'=>'PerubatanController@update'])->middleware('auth','operasi');
