This commit is contained in:
@@ -16,6 +16,18 @@ use stdClass;
|
||||
|
||||
class CandidateSubmissions
|
||||
{
|
||||
/** @return LengthAwarePaginator<int, stdClass> */
|
||||
public function receipts(CandidateAccount $account, int $page = 1): LengthAwarePaginator
|
||||
{
|
||||
$path = '/candidaturas/'.$account->tenant_id.'/perfil';
|
||||
if (! Schema::hasTable('candidate_submissions')) {
|
||||
return (new LengthAwarePaginator([], 0, 12, $page))->withPath($path)->setPageName('submissions_page');
|
||||
}
|
||||
|
||||
return DB::table('candidate_submissions')->where('tenant_id', $account->tenant_id)->where('candidate_account_id', $account->id)
|
||||
->orderByDesc('id')->paginate(12, ['id', 'reference', 'created_at', 'snapshot->opportunity->title as title'], 'submissions_page', $page)->withPath($path);
|
||||
}
|
||||
|
||||
/** Only explicitly published, current and open opportunities; no internal process fields.
|
||||
* @return LengthAwarePaginator<int, stdClass>
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user