DONE: remove verified by ajk, fix bug on pagination, improve UI
This commit is contained in:
@@ -50,7 +50,7 @@ class VoteController extends Controller
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'Voted successfully',
|
||||
'message' => 'Undian anda telah berjaya dihantar.',
|
||||
'result' => Result::where('voter_id', Auth::id())->get()
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -96,9 +96,14 @@ class AttendanceController extends Controller
|
||||
$voter = Voter::findOrFail($id);
|
||||
$voter->fill($request->only(['name', 'no_kp', 'no_anggota', 'unit', 'kehadiran']));
|
||||
|
||||
// Skip admin verification phase for Fizikal.
|
||||
// When Fizikal is selected and (optionally) the counter gate code is valid, we auto-verify.
|
||||
// For non-Fizikal attendance, keep this field cleared.
|
||||
if ((int) $voter->kehadiran === 1) {
|
||||
$voter->fizikal_registration_verified_at = null;
|
||||
}
|
||||
$voter->fizikal_registration_verified_at = now();
|
||||
} else {
|
||||
$voter->fizikal_registration_verified_at = null;
|
||||
}
|
||||
|
||||
$voter->save();
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ class GetController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
return $q->paginate(50);
|
||||
// Return all voters with pagination
|
||||
return $q->paginate(1000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user