2020-05-22 03:49:16 +01:00
@ extends ( 'adminlte::page' )
2022-03-19 18:39:59 +00:00
@ section ( 'title' , config ( 'app.name' ) . ' | ' . __ ( 'Viewing application' ))
2020-05-22 03:49:16 +01:00
@ section ( 'content_header' )
2022-03-19 18:39:59 +00:00
< h4 > {{ __ ( 'Application Management' )}} / {{ __ ( " Viewing :userNameValue's application " , [ 'userNameValue' => $application -> user -> name ])}} </ h4 >
2020-05-22 03:49:16 +01:00
@ stop
@ section ( 'css' )
< link rel = " stylesheet " href = " /css/mixed.css " >
< link rel = " stylesheet " href = " /css/viewapplication.css " >
2020-06-27 00:32:33 +01:00
< link rel = " stylesheet " href = " /css/comments.css " >
2020-05-22 03:49:16 +01:00
<!-- TODO : Move to Mix + Webpack -->
@ stop
@ section ( 'js' )
< script type = " text/javascript " src = " /js/app.js " ></ script >
< x - global - errors ></ x - global - errors >
2020-06-27 00:32:33 +01:00
@ if ( ! $canVote && Auth :: user () -> can ( 'applications.vote' ) && $application -> applicationStatus == 'STAGE_PEERAPPROVAL' )
2020-05-30 00:20:39 +01:00
< script >
2022-03-19 18:39:59 +00:00
toastr . info ( '{{__(' You cannot vote on this application anymore . ')}}' , '{{__(' Warning ')}}' )
2020-05-30 00:20:39 +01:00
</ script >
@ endif
2020-05-22 03:49:16 +01:00
@ stop
@ section ( 'content' )
2020-06-27 00:32:33 +01:00
@ if ( ! is_null ( $application -> appointment ))
@ canany ( 'applications.view.all' , 'appointments.*' )
2022-03-19 18:39:59 +00:00
< x - modal id = " notes " modal - label = " notes " modal - title = " { { __('Shared Notepad')}} " include - close - button = " true " >
2020-06-27 00:32:33 +01:00
2020-09-03 00:38:59 +01:00
< form id = " meetingNotes " method = " POST " action = " { { route('saveNotes', ['application' => $application->id ])}} " >
2020-06-27 00:32:33 +01:00
@ csrf
@ method ( 'PATCH' )
2022-03-19 18:39:59 +00:00
< textarea name = " noteText " rows = " 5 " class = " form-control " > {{ $application -> appointment -> meetingNotes ? ? __ ( 'There are no notes yet. Add some!' )}} </ textarea >
2020-06-27 00:32:33 +01:00
</ form >
2022-03-19 18:39:59 +00:00
< p class = " text-muted text-sm " > {{ __ ( 'Last updated' )}} @ {{ $application -> appointment -> updated_at }} </ p >
2020-06-27 00:32:33 +01:00
< x - slot name = " modalFooter " >
2022-03-19 18:39:59 +00:00
< button type = " button " class = " btn btn-success " onclick = " document.getElementById('meetingNotes').submit() " >< i class = " far fa-paper-plane " ></ i > {{ __ ( 'Save & Quit' )}} </ button >
2020-06-27 00:32:33 +01:00
</ x - slot >
</ x - modal >
@ endcanany
@ endif
2020-05-30 00:20:39 +01:00
2020-06-27 00:32:33 +01:00
@ role ( 'hiringManager' )
2020-05-30 00:20:39 +01:00
2022-03-19 18:39:59 +00:00
< x - modal id = " denyApplication " modal - label = " denyApplicationLabel " modal - title = " { { __('Please Confirm')}} " include - close - button = " true " >
2020-05-30 00:20:39 +01:00
2022-03-19 18:39:59 +00:00
< p > {{ __ ( 'Are you sure you want to deny this application? Please keep in mind that this user will only be allowed to apply 30 days after their first application.' )}} </ p >
< p class = " text-muted " > {{ __ ( 'This action cannot be undone.' )}} </ p >
2020-05-22 03:49:16 +01:00
2020-06-27 00:32:33 +01:00
< x - slot name = " modalFooter " >
2020-05-22 03:49:16 +01:00
2020-07-16 21:21:28 +01:00
< form id = " updateApplication " action = " { { route('updateApplicationStatus', ['application' => $application->id , 'newStatus' => 'deny'])}} " method = " POST " >
2020-06-27 00:32:33 +01:00
@ csrf
@ method ( 'PATCH' )
2022-10-24 01:04:22 +01:00
< button type = " submit " class = " btn btn-danger " >< i class = " fas fa-ban " ></ i > {{ __ ( 'Confirm' )}} </ button >
2020-06-27 00:32:33 +01:00
</ form >
</ x - slot >
2020-05-22 03:49:16 +01:00
2020-06-27 00:32:33 +01:00
</ x - modal >
2020-05-22 03:49:16 +01:00
2021-11-03 00:37:47 +00:00
< x - modal id = " cancelAppointmentModal " modal - label = " cancelAppointmentModalLabel " modal - title = " { { __('Cancel appointment?')}} " include - close - button = " true " >
< div class = " alert alert-warning " >
< p class = " text-bold " >< i class = " fas fa-exclamation-triangle " ></ i > {{ __ ( 'Caution' ) }} </ p >
< p > {{ __ ( 'Are you sure you want to cancel this appointment? The user will be notified of this via email, and you will be able to reschedule.' )}} </ p >
< p > {{ __ ( 'Before you can cancel this appointment, you\'ll need to provide a reason in writing. ' ) }} </ p >
</ div >
< form id = " confirmCancelAppointment " method = " POST " action = " { { route('deleteAppointment', ['application' => $application->id ]) }} " >
@ method ( 'DELETE' )
@ csrf
< div class = " input-group mb-3 " >
< div class = " input-group-prepend " >
< span class = " input-group-text " >< i class = " fas fa-comment " ></ i ></ span >
</ div >
< input type = " text " name = " reason " id = " reason " class = " form-control " placeholder = " { { __('Cancellation reason...') }} " required >
</ div >
</ form >
< x - slot name = " modalFooter " >
2022-03-19 18:39:59 +00:00
< button type = " button " class = " btn btn-warning " onclick = " $ ('#confirmCancelAppointment').submit() " >< i class = " fas fa-calendar-times " ></ i > {{ __ ( 'Finish cancelling appointment' ) }} </ button >
2021-11-03 00:37:47 +00:00
</ x - slot >
</ x - modal >
2020-06-27 00:32:33 +01:00
@ endhasrole
2020-05-22 03:49:16 +01:00
2020-07-15 06:48:49 +01:00
< div class = " row " >
< div class = " col " >
< div class = " alert alert-warning alert-dismissible " >
< a href = " # " class = " close " data - dismiss = " alert " aria - label = " close " >& times ; </ a >
2022-03-19 18:39:59 +00:00
{{ __ ( 'If this form has been updated, new fields and updated questions will not show up here!' )}}
2020-07-15 06:48:49 +01:00
</ div >
</ div >
</ div >
2020-05-22 03:49:16 +01:00
< div class = " row " >
< div class = " col " >
< div class = " card " >
< div class = " card-header " >
< div class = " card-title " > {{ $formStructure -> formName }} </ div >
</ div >
< div class = " card-body " >
@ foreach ( $structuredResponses [ 'responses' ] as $content )
< div class = " mt-4 mb-3 " >
< h5 > {{ $content [ 'title' ]}} </ h5 >
2021-09-04 00:44:54 +01:00
2021-01-29 17:28:29 +00:00
< p > { !! GrahamCampbell\Markdown\Facades\Markdown :: convertToHtml ( $content [ 'response' ]) !! } </ p >
2020-05-22 03:49:16 +01:00
</ div >
@ endforeach
</ div >
</ div >
</ div >
2020-06-27 00:32:33 +01:00
<!-- TODO : Simplify logic by using switches , as well as a single Gate check -->
2020-05-22 03:49:16 +01:00
< div class = " col " >
< div class = " row " >
< div class = " col " >
< div class = " card bg-gray " >
< div class = " card-header bg-gradient-gray " >
2022-03-19 18:39:59 +00:00
< div class = " card-title " > {{ __ ( 'Contextual information' )}} </ div >
2020-05-22 03:49:16 +01:00
</ div >
< div class = " card-body " >
2022-03-19 18:39:59 +00:00
< p >< b > {{ __ ( 'Applicant Name' )}} </ b > < span class = " badge badge-primary " > {{ $application -> user -> name }} </ span ></ p >
2022-10-24 01:04:22 +01:00
@ if ( $application -> user -> hasDiscordConnection ())
< p >< b > {{ __ ( 'Discord tag: ' ) }} </ b >< i class = " fab fa-discord " > </ i > {{ __ ( ':discordUsername (Connected account)' , [ 'discordUsername' => $application -> user -> username ]) }} </ p >
@ endif
2022-10-28 20:15:45 +01:00
< p >< b > {{ __ ( 'Age: ' ) }} </ b > {{ __ ( ':age years old' , [ 'age' => \Carbon\Carbon :: parse ( $application -> user -> dob ) -> age ]) }} </ p >
2020-06-27 00:32:33 +01:00
@ if ( Auth :: user () -> hasRole ( 'hiringManager' ))
2022-10-24 01:04:22 +01:00
< p >< b > {{ __ ( 'Applicant IP Address' )}} </ b > < span class = " badge badge-primary " > {{ ( ! $shouldCollect ) ? __ ( '0.0.0.0 (censored)' ) : $application -> user -> registrationIp }} </ span ></ p >
2020-06-27 00:32:33 +01:00
@ endif
2022-03-19 18:39:59 +00:00
< p >< b > {{ __ ( 'Application Date' )}} </ b > < span class = " badge badge-primary " > {{ $application -> created_at }} </ span ></ p >
< p >< b > {{ __ ( 'Last updated' )}} </ b >< span class = " badge badge-primary " > {{ $application -> updated_at }} </ span ></ p >
< p >< b > {{ __ ( 'Applying for' )}} </ b > < span class = " badge badge-primary " > {{ $vacancy -> vacancyName }} </ span ></ p >
< p class = " mt-2 " >< b > {{ __ ( 'Current Status' )}} </ b >
2020-05-22 03:49:16 +01:00
@ switch ( $application -> applicationStatus )
@ case ( 'STAGE_SUBMITTED' )
2022-03-19 18:39:59 +00:00
< span class = " badge badge-warning " > {{ __ ( 'Outstanding' )}} </ span >
2020-05-22 03:49:16 +01:00
@ break
@ case ( 'STAGE_PEERAPPROVAL' )
2022-03-19 18:39:59 +00:00
< span class = " badge badge-primary " > {{ __ ( 'Peer Approval' )}} </ span >
2020-05-22 03:49:16 +01:00
@ break
@ case ( 'STAGE_INTERVIEW' )
2022-03-19 18:39:59 +00:00
< span class = " badge badge-primary " > {{ __ ( 'Pending Interview' )}} </ span >
2020-05-22 03:49:16 +01:00
@ break
@ case ( 'STAGE_INTERVIEW_SCHEDULED' )
2022-03-19 18:39:59 +00:00
< span class = " badge badge-primary " >< i class = " fas fa-clock " ></ i > {{ __ ( 'Interview Scheduled' )}} </ span >
2020-05-22 03:49:16 +01:00
@ break
@ case ( 'APPROVED' )
2022-03-19 18:39:59 +00:00
< span class = " badge badge-success " >< i class = " fa fa-check-double " ></ i > {{ __ ( 'Approved' )}} </ span >
2020-05-22 03:49:16 +01:00
@ break
@ case ( 'DENIED' )
2022-03-19 18:39:59 +00:00
< span class = " badge badge-danger " >< i class = " fa fa-ban " ></ i > {{ __ ( 'Denied' )}} </ span >
2020-05-22 03:49:16 +01:00
@ break
@ endswitch
</ p >
</ div >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col " >
2020-06-27 00:32:33 +01:00
@ if ( $application -> applicationStatus == 'STAGE_SUBMITTED' && Auth :: user () -> hasRole ( 'hiringManager' ))
2020-05-22 03:49:16 +01:00
< div class = " card bg-gray " >
< div class = " card-header bg-gradient-gray " >
2022-03-19 18:39:59 +00:00
< div class = " card-title " > {{ __ ( 'Decision & Moderation Tools' )}} </ div >
2020-05-22 03:49:16 +01:00
</ div >
< div class = " card-body text-center " style = " white-space: nowrap " >
< div class = " row " >
< div class = " col mr-5 " >
2022-10-24 01:04:22 +01:00
< button type = " button " class = " btn btn-danger " onclick = " $ ('#denyApplication').modal('show') " {{( $application -> applicationStatus == 'DENIED' ) ? 'disabled' : '' }} >< i class = " fas fa-arrow-left " ></ i > {{ __ ( 'Decline application' )}} </ button >
2020-05-22 03:49:16 +01:00
</ div >
< div class = " col " >
2020-07-16 21:21:28 +01:00
< form method = " POST " action = " { { route('updateApplicationStatus', ['application' => $application->id , 'newStatus' => 'interview'])}} " >
2020-05-22 03:49:16 +01:00
@ csrf
@ method ( 'PATCH' )
2022-03-19 18:39:59 +00:00
< button type = " submit " class = " btn btn-success " {{( $application -> applicationStatus == 'DENIED' ) ? 'disabled' : '' }} >< i class = " fas fa-arrow-right " ></ i > {{ __ ( 'Move to next stage' )}} </ button >
2020-05-22 03:49:16 +01:00
</ form >
</ div >
</ div >
</ div >
</ div >
@ endif
</ div >
</ div >
2020-06-27 00:32:33 +01:00
@ if ( $application -> applicationStatus == 'STAGE_INTERVIEW' && Auth :: user () -> hasRole ( 'hiringManager' ))
2020-05-22 03:49:16 +01:00
< div class = " row " >
< div class = " col " >
2022-03-19 18:39:59 +00:00
< x - card id = " appointmentCard " card - title = " { { __('Schedule an Appointment')}} " footer - style = " text-center " >
2020-05-22 03:49:16 +01:00
< x - slot name = " cardHeader " >
</ x - slot >
2020-07-16 21:21:28 +01:00
< form id = " scheduleAppointment " action = " { { route('scheduleAppointment', ['application' => $application->id ])}} " method = " POST " >
2020-05-22 03:49:16 +01:00
@ csrf
2022-03-19 18:39:59 +00:00
< label for = " appointmentDescription " > {{ __ ( 'Appointment description' )}} </ label >
2020-05-22 03:49:16 +01:00
< input type = " text " class = " form-control " name = " appointmentDescription " >
2022-03-19 18:39:59 +00:00
< label for = " appointmentDateTime " > {{ __ ( 'Appointment Date & Time' )}} </ label >
2020-05-22 03:49:16 +01:00
< input type = " text " class = " form-control " name = " appointmentDateTime " id = " appointmentDateTime " >
2022-03-19 18:39:59 +00:00
< p class = " text-muted text-sm " > {{ __ ( 'Click to choose a date' )}} </ p >
2020-05-22 03:49:16 +01:00
2022-03-19 18:39:59 +00:00
< label for = " appointmentLocation " > {{ __ ( 'Appointment Location' )}} </ label >
2020-05-22 03:49:16 +01:00
< select class = " custom-select " id = " appointmentLocation " name = " appointmentLocation " >
2022-03-19 18:39:59 +00:00
< option value = " nil " disabled > {{ __ ( 'Select your preferred platform' )}} </ option >
< option value = " ZOOM " > {{ __ ( 'Zoom' ) }} </ option >
< option value = " DISCORD " > {{ __ ( 'Discord' ) }} </ option >
< option value = " SKYPE " > {{ __ ( 'Skype' ) }} </ option >
< option value = " MEET " > {{ __ ( 'Google Meet' ) }} </ option >
< option value = " TEAMSPEAK " > {{ __ ( 'Teamspeak' ) }} </ option >
2020-05-22 03:49:16 +01:00
</ select >
2022-03-19 18:39:59 +00:00
< p class = " text-muted text-sm " > {{ __ ( 'Embedded in-house video conferencing coming soon, powered by Jitsi Meet' )}} </ p >
2020-05-22 03:49:16 +01:00
</ form >
< x - slot name = " cardFooter " >
2022-03-19 18:39:59 +00:00
< button type = " button " class = " btn btn-warning text-center " onclick = " document.getElementById('scheduleAppointment').submit() " >< i class = " fas fa-clock " ></ i > {{ __ ( 'Schedule' )}} </ button >
2020-05-22 03:49:16 +01:00
</ x - slot >
</ x - card >
</ div >
</ div >
@ endif
@ if ( $application -> applicationStatus == 'STAGE_INTERVIEW_SCHEDULED' )
< div class = " row " >
< div class = " col " >
2022-03-19 18:39:59 +00:00
< x - card id = " scheduleInfo " card - title = " { { __('Appointment Information')}} " footer - style = " text-center " >
2020-05-22 03:49:16 +01:00
< x - slot name = " cardHeader " ></ x - slot >
< p class = " text-muted " > {{ $application -> appointment -> appointmentDescription }} </ p >
2022-03-19 18:39:59 +00:00
< p >< b > {{ __ ( 'Interview Scheduled for:' )}} </ b > < span class = " badge badge-primary " > {{ $application -> appointment -> appointmentDate }} </ span ></ p >
< p >< b > {{ __ ( 'Status' )}} : </ b > < span class = " badge badge-primary " > {{ Str :: ucfirst ( Str :: lower ( $application -> appointment -> appointmentStatus ))}} </ span ></ p >
< p >< b > {{ __ ( 'Platform' )}} :</ b > < span class = " badge badge-primary " > {{ Str :: ucfirst ( Str :: lower ( $application -> appointment -> appointmentLocation ))}} </ span ></ p >
2020-05-22 03:49:16 +01:00
< x - slot name = " cardFooter " >
2020-06-27 00:32:33 +01:00
@ can ( 'appointments.schedule.edit' )
2020-07-16 21:21:28 +01:00
< form style = " white-space: nowrap;display:inline-block " class = " footer-button " action = " { { route('updateAppointment', ['application' => $application->id , 'status' => 'concluded'])}} " method = " POST " >
2020-06-27 00:32:33 +01:00
@ csrf
@ method ( 'PATCH' )
2022-03-19 18:39:59 +00:00
< button type = " submit " class = " btn btn-success btn-sm " >< i class = " fas fa-check " ></ i > {{ __ ( 'Finish Meeting' )}} </ button >
2020-06-27 00:32:33 +01:00
</ form >
2021-11-03 00:37:47 +00:00
< button type = " button " class = " btn btn-danger btn-sm " onclick = " $ ('#cancelAppointmentModal').modal('show') " >< i class = " far fa-calendar-times " ></ i > {{ __ ( 'Cancel meeting' )}} </ button >
2020-06-27 00:32:33 +01:00
@ endcan
@ can ( 'applications.vote' )
2022-03-19 18:39:59 +00:00
< button class = " btn btn-warning mr-3 btn-sm " onclick = " $ ('#notes').modal('show') " >< i class = " fas fa-clipboard " ></ i > {{ __ ( 'View Meeting Notes' )}} </ button >
2020-06-27 00:32:33 +01:00
@ endcan
2020-05-22 03:49:16 +01:00
</ x - slot >
</ x - card >
</ div >
</ div >
@ endif
2020-06-27 00:32:33 +01:00
@ if ( $application -> applicationStatus == 'STAGE_PEERAPPROVAL' && Auth :: user () -> can ( 'applications.vote' ))
2020-05-22 03:49:16 +01:00
2022-03-19 18:39:59 +00:00
< x - card id = " peerApproval " card - title = " { { __('Vote on this application')}} " footer - style = " text-center " >
2020-05-22 03:49:16 +01:00
< x - slot name = " cardHeader " ></ x - slot >
2022-03-19 18:39:59 +00:00
< p class = " text-muted " > {{ __ ( " If you weren't present during this meeting, you can view the shared meeting notepad to help you make a decision. " )}} </ p >
< p class = " text-muted " > {{ __ ( 'You may vote on as many applications as needed; However, you can only vote once per application.' )}} </ p >
2020-05-22 03:49:16 +01:00
2022-03-19 18:39:59 +00:00
< p class = " text-muted " > {{ __ ( 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.' )}} </ p >
2020-05-22 03:49:16 +01:00
< x - slot name = " cardFooter " >
2020-05-30 00:20:39 +01:00
@ if ( $canVote )
2020-07-16 21:21:28 +01:00
< form class = " d-inline-block " method = " POST " action = " { { route('voteApplication', ['application' => $application->id ])}} " >
2020-05-30 00:20:39 +01:00
@ csrf
< input type = " hidden " name = " voteType " value = " VOTE_APPROVE " >
2022-03-19 18:39:59 +00:00
< button type = " submit " class = " btn btn-sm btn-warning " > {{ __ ( 'Vote: Approve Applicant' )}} </ button >
2020-05-30 00:20:39 +01:00
</ form >
2020-07-16 21:21:28 +01:00
< form class = " d-inline-block " method = " POST " action = " { { route('voteApplication', ['application' => $application->id ])}} " >
2020-05-30 00:20:39 +01:00
@ csrf
< input type = " hidden " name = " voteType " value = " VOTE_DENY " >
2022-03-19 18:39:59 +00:00
< button type = " submit " class = " btn btn-sm btn-warning " > {{ __ ( 'Vote: Deny Applicant' )}} </ button >
2020-05-30 00:20:39 +01:00
</ form >
@ endif
2020-05-22 03:49:16 +01:00
2022-03-19 18:39:59 +00:00
< button type = " button " class = " btn btn-sm btn-warning { { ( $canVote ) ? 'ml-5' : ''}} " onclick = " $ ('#notes').modal('show') " > {{ __ ( 'Meeting notes' )}} </ button >
2020-05-22 03:49:16 +01:00
</ x - slot >
</ x - card >
@ endif
2020-06-27 00:32:33 +01:00
@ can ( 'applications.view.all' )
2020-05-22 03:49:16 +01:00
2020-06-27 00:32:33 +01:00
< div class = " row " >
2020-05-22 03:49:16 +01:00
2020-06-27 00:32:33 +01:00
< div class = " col text-center " >
2022-03-19 18:39:59 +00:00
< button type = " button " class = " btn btn-primary " onclick = " window.location.href=' { { route('allApplications')}}' " > {{ __ ( 'View more Applications' )}} </ button >
2020-06-27 00:32:33 +01:00
</ div >
2020-05-22 03:49:16 +01:00
</ div >
2020-06-27 00:32:33 +01:00
@ endcan
2020-05-22 03:49:16 +01:00
</ div >
</ div >
2020-06-27 00:32:33 +01:00
@ hasanyrole ( 'reviewer|hiringManager|admin' )
@ if ( ! Auth :: user () -> is ( $application -> user ))
< div class = " row mb-3 mt-2 " >
2022-03-19 18:39:59 +00:00
< h3 > {{ __ ( 'Comments' )}} ({{ $comments -> count ()}}) </ h3 >
2020-06-27 00:32:33 +01:00
</ div >
< div class = " row " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< div class = " col " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
@ if ( $comments -> isEmpty ())
< div class = " alert alert-warning " >
2020-09-01 19:30:28 +01:00
< i class = " fas fa-question " ></ i > < b ></ b >
2020-06-27 00:32:33 +01:00
2022-03-19 18:39:59 +00:00
< p > {{ __ ( 'There are no comments here! Comments are only visible to staff members. Be the first to share your input! Commenting may help with decision-making when time comes to vote for an application.' )}} </ p >
2020-09-01 19:30:28 +01:00
2020-06-27 00:32:33 +01:00
</ div >
@ endif
</ div >
</ div >
@ if ( ! $comments -> isEmpty ())
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
@ foreach ( $comments as $comment )
2020-07-15 06:48:49 +01:00
< div class = " row mt-3 mb-3 " >
2020-06-27 00:32:33 +01:00
< div class = " col-md-2 " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< div class = " text-center " >
2022-02-22 03:20:46 +00:00
@ if ( $comment -> user -> profile -> avatarPreference == 'gravatar' )
2022-03-19 18:39:59 +00:00
< img class = " profile-user-img img-fluid img-circle " src = " https://gravatar.com/avatar/ { { md5( $comment->user ->email)}} " alt = " { { __('User profile picture') }} " >
2020-06-27 00:32:33 +01:00
@ else
2022-03-19 18:39:59 +00:00
< img class = " profile-user-img img-fluid img-circle " src = " https://crafatar.com/avatars/ { { $comment -> user -> uuid } } " alt = " { { __('User profile picture') }} " >
2020-06-27 00:32:33 +01:00
@ endif
</ div >
</ div >
< div class = " card comment " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< div class = " card-header comment-header " >
2020-09-01 19:30:28 +01:00
<!-- Carbon has to be set to translate diffs , can ' t do directly . -->
< h1 class = " commenter " > {{ $comment -> user -> name }} & #9679; {{Carbon\Carbon::parse($comment->created_at)->diffForHumans()}}</h1>
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
</ div >
< div class = " card-body " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
{{ $comment -> text }}
</ div >
@ if ( Auth :: user () -> is ( $comment -> user ) || Auth :: user () -> hasRole ( 'admin' ))
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< div class = " card-footer comment-footer " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< form method = " POST " id = " deleteComment " action = " { { route('deleteApplicationComment', ['comment' => $comment->id ])}} " >
@ csrf
@ method ( 'DELETE' )
< button type = " submit " class = " btn btn-outline-danger " >< i class = " fas fa-trash-alt " ></ i ></ button >
</ form >
</ div >
@ endif
</ div >
</ div >
@ endforeach
@ endif
<!-- display comments here -->
< div class = " row mt-5 " >
< div class = " col-md-2 " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< div class = " text-center " >
@ if ( $application -> user -> avatarPreference == 'gravatar' )
2022-03-19 18:39:59 +00:00
< img class = " profile-user-img img-fluid img-circle " src = " https://gravatar.com/avatar/ { { md5(Auth::user()->email)}} " alt = " { { __( " User profile picture " )}} " >
2020-06-27 00:32:33 +01:00
@ else
2022-10-26 21:18:57 +01:00
< img class = " profile-user-img img-fluid img-circle " src = " https://crafatar.com/avatars/ { { Auth::user()->uuid}} " alt = " { { __( " User profile picture " )}} " >
2020-06-27 00:32:33 +01:00
@ endif
</ div >
2020-07-15 06:48:49 +01:00
</ div >
2020-06-27 00:32:33 +01:00
< div class = " col " >
< div class = " card border-top border-bottom " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< div class = " card-body " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< form id = " newComment " method = " POST " action = " { { route('addApplicationComment', ['application' => $application->id ])}} " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
@ csrf
< textarea id = " comment " name = " comment " class = " form-control " id = " commentText " ></ textarea >
</ form >
< div class = " row " >
2020-07-15 06:48:49 +01:00
2020-06-27 00:32:33 +01:00
< div class = " col text-left " >
2022-03-19 18:39:59 +00:00
< p class = " text-sm text-muted " > {{ __ ( 'Commenting as :usernameValue' , [ 'usernameValue' => Auth :: user () -> name ])}} </ p >
2020-06-27 00:32:33 +01:00
</ div >
< div class = " col text-right " >
2020-07-15 06:48:49 +01:00
2022-10-26 21:18:57 +01:00
< p class = " text-sm text-muted " > { !! __ ( '<span id="charcount">0</span>/600 max characters' ) !! } </ p >
2020-06-27 00:32:33 +01:00
</ div >
</ div >
</ div >
< div class = " card-footer text-right " >
2020-07-15 06:48:49 +01:00
2022-03-19 18:39:59 +00:00
< button type = " button " id = " submitComment " class = " btn btn-sm btn-secondary " > {{ __ ( 'Post' )}} </ button >
2020-06-27 00:32:33 +01:00
</ div >
</ div >
</ div >
</ div >
@ endif
@ endhasanyrole
2020-05-22 03:49:16 +01:00
2020-07-16 06:46:20 +01:00
@ stop
@ section ( 'footer' )
@ include ( 'breadcrumbs.dashboard.footer' )
@ stop