halaman-psikolog #1

Merged
Mahayoga merged 52 commits from halaman-psikolog into master 2026-07-06 12:37:30 +07:00
1 changed files with 5 additions and 3 deletions
Showing only changes of commit 043e2a81c0 - Show all commits

View File

@ -19,7 +19,7 @@ public function getchData() {
$data = BookingModel::get(); $data = BookingModel::get();
$data_ = $data->toArray(); $data_ = $data->toArray();
foreach($data_ as $key => $value) { foreach($data_ as $key => $value) {
if(time() > $value['unix_expired_time']) { if(time() > $value['unix_expired_time'] && $value['status_tes'] != '2') {
$data_session = TestSessionsModel::where('id_booking', $value['id_booking'])->first(); $data_session = TestSessionsModel::where('id_booking', $value['id_booking'])->first();
$data_booking = BookingModel::where('id_booking', $value['id_booking'])->first(); $data_booking = BookingModel::where('id_booking', $value['id_booking'])->first();
if($data_session != null) { if($data_session != null) {
@ -166,8 +166,10 @@ public function update(Request $request, string $id)
'status_tes' => ['required'] 'status_tes' => ['required']
]); ]);
BookingModel::where('id_booking', $id)->update([ $data = BookingModel::where('id_booking', $id)->first();
'status_tes' => $request->status_tes
$data->update([
'status_tes' => str($request->status_tes)
]); ]);
return response()->json([ return response()->json([