feat(dashboard/rekap-so): penambahan dashboard, rekap so

This commit is contained in:
majid
2025-06-20 09:12:50 +07:00
parent 887478c751
commit 3f979aef05
8 changed files with 715 additions and 32 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Modules\Lpj\Services\DashboardService;
class DashboardController extends Controller
{
public $dashboardService;
public function __construct(DashboardService $dashboardService)
{
$this->dashboardService = $dashboardService;
}
/**
* Display a listing of the resource.
*/
public function index(Request $request)
{
// nilai default
$start_date = $request->input('start_date', now()->startOfYear()->format('Y-m-d'));
$end_date = $request->input('end_date', now()->format('Y-m-d'));
$validate = $request->validate([
'start_date' => 'nullable|date_format:Y-m-d',
'end_date' => 'nullable|date_format:Y-m-d',
]);
$dashboard = $this->dashboardService->getDashboardData($start_date, $end_date);
// dd($dashboard);
return view('lpj::dashboard.index', compact('dashboard'));
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Modules\Lpj\Models\TujuanPenilaian;
class RekapHarianSoController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$tujuan_penilaian = TujuanPenilaian::all();
return view('lpj::rekap-harian-so.index', compact('tujuan_penilaian'));
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('lpj::create');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('lpj::show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
return view('lpj::edit');
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
}