Merged in nisha/feat-function-wtd (pull request #172)
feat-function-wtdv3
This commit is contained in:
@@ -91,7 +91,7 @@ class WTDController extends Controller
|
|||||||
'kodcaw.required' => 'Sila Pilih Cawangan Terlebih Dahulu.',
|
'kodcaw.required' => 'Sila Pilih Cawangan Terlebih Dahulu.',
|
||||||
'tahun.required' => 'Sila Masukkan Tahun Terlebih Dahulu.',
|
'tahun.required' => 'Sila Masukkan Tahun Terlebih Dahulu.',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$senaraiSimulasi = Http::get(config('api.url') . '/admin/wtd/janaSimulasi', ['kodcaw' => $request->kodcaw, 'tahun' => $request->tahun])->json();
|
$senaraiSimulasi = Http::get(config('api.url') . '/admin/wtd/janaSimulasi', ['kodcaw' => $request->kodcaw, 'tahun' => $request->tahun])->json();
|
||||||
|
|
||||||
$year = $request->tahun;
|
$year = $request->tahun;
|
||||||
@@ -107,7 +107,6 @@ class WTDController extends Controller
|
|||||||
$bulanNumber = date('n', strtotime($bulan));
|
$bulanNumber = date('n', strtotime($bulan));
|
||||||
|
|
||||||
$rekod = Http::get(config('api.url') . '/admin/wtd/rekodSimulasi', ['kodcaw' => $request->kodcaw, 'month' => $bulanNumber, 'year' => $request->year])->json();
|
$rekod = Http::get(config('api.url') . '/admin/wtd/rekodSimulasi', ['kodcaw' => $request->kodcaw, 'month' => $bulanNumber, 'year' => $request->year])->json();
|
||||||
|
|
||||||
$totalBaki = collect($rekod)->sum('baki');
|
$totalBaki = collect($rekod)->sum('baki');
|
||||||
|
|
||||||
// dd($rekod, $bulanNumber, $totalBaki, $bulan);
|
// dd($rekod, $bulanNumber, $totalBaki, $bulan);
|
||||||
@@ -176,7 +175,7 @@ class WTDController extends Controller
|
|||||||
|
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
dd($response);
|
//dd($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function summaryWtd(Request $request)
|
public function summaryWtd(Request $request)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="w-full px-4 py-2 text-white bg-yellow-600 rounded-lg hover:bg-yellow-700 focus:ring-4 focus:ring-yellow-300">
|
class="w-full px-4 py-2 text-white bg-yellow-600 rounded-lg hover:bg-yellow-700 focus:ring-4 focus:ring-yellow-300">
|
||||||
Submit
|
Hantar
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user