File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
resources/views/my_job_application Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ public function index()
1212 'my_job_application.index ' ,
1313 [
1414 'applications ' => auth ()->user ()->jobApplications ()
15- ->with ('job ' , 'job.employer ' )
15+ ->with ([
16+ 'job ' => fn ($ query ) => $ query ->withCount ('jobApplications ' )
17+ ->withAvg ('jobApplications ' , 'expected_salary ' ),
18+ 'job.employer '
19+ ])
1620 ->latest ()->get ()
1721 ]
1822 );
Original file line number Diff line number Diff line change 33 :links =" ['My Job Applications' => '#']" />
44
55 @forelse ($applications as $application )
6- <x-job-card :job =" $application->job" ></x-job-card >
6+ <x-job-card :job =" $application->job" >
7+ <div class =" flex items-center justify-between text-xs text-slate-500" >
8+ <div >
9+ <div >
10+ Applied {{ $application -> created_at -> diffForHumans () } }
11+ </div >
12+ <div >
13+ Other {{ Str:: plural (' applicant' , $application -> job -> job_applications_count - 1 ) } }
14+ {{ $application -> job -> job_applications_count - 1 } }
15+ </div >
16+ <div >
17+ Your asking salary ${{ number_format ($application -> expected_salary ) } }
18+ </div >
19+ <div >
20+ Average asking salary
21+ ${{ number_format ($application -> job -> job_applications_avg_expected_salary ) } }
22+ </div >
23+ </div >
24+ <div >Right</div >
25+ </div >
26+ </x-job-card >
727 @empty
828 @endforelse
929</x-layout >
You can’t perform that action at this time.
0 commit comments