feat: move pelelong berlesen functions to operasi and update login and reports

This commit is contained in:
nurafrinaalimi16
2026-10-04 16:11:44 +08:00
parent 56ebb153b5
commit 2e10fe899f
36 changed files with 717 additions and 638 deletions
@@ -40,6 +40,13 @@ class LoginController extends Controller
$this->middleware('guest')->except('logout');
}
protected function credentials(\Illuminate\Http\Request $request)
{
return array_merge($request->only($this->username(), 'password'), [
'status' => 'active',
]);
}
public function username()
{
return 'username';
+2 -2
View File
@@ -155,7 +155,7 @@ class HomeController extends Controller
}
}
} else { //operasi,jurulelong
} else { //operasi
$sag = LelongBid::where('status_semak', 0) //belum disemak
->get();
}
@@ -608,7 +608,7 @@ class HomeController extends Controller
}
}
if ($user->hasAnyRole('operasi', 'pengurus-operasi', 'jurulelong')) {
if ($user->hasAnyRole('operasi', 'pengurus-operasi')) {
$arrayinfo = [];
+2 -2
View File
@@ -1948,7 +1948,7 @@ class LelongController extends Controller
public function stopcawangan($id,$cawid)
{
event(new LelongNotify('start'));
event(new LelongNotify('stop'));
$currentdate = Carbon::now();
$currenttime = $currentdate->toTimeString();
$endtime = $currentdate->addHours(2);
@@ -1965,7 +1965,7 @@ class LelongController extends Controller
$lelong->save();
return redirect()->route('home')
->with('success','Lelongan bermula');
->with('success','Lelongan ditamatkan');
}
public function startall($id)
@@ -843,6 +843,8 @@ class ReportController extends Controller
$pdf = PDF::loadView('pdf.simulasireportbycust',compact('simulasilel','cawanganDetail','marhuns','simulasi_id','cawid','ktlhbyr','cawname'))
->setPaper('a4','potrait');
$pdf->setPaper('a4', 'landscape');
return $pdf->download('Laporan Simulasi Cawangan by Pelanggan.pdf');