2020-05-22 02:49:16 +00:00
|
|
|
@extends('adminlte::page')
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
@section('title', config('app.name') . ' | ' . __('messages.view_app.title'))
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
@section('content_header')
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<h4>{{__('messages.application_m.title')}} / {{__('messages.view_app.viewing_app', ['user' => $application->user->name])}}</h4>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('css')
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="/css/mixed.css">
|
|
|
|
<link rel="stylesheet" href="/css/viewapplication.css">
|
2020-06-26 23:32:33 +00:00
|
|
|
<link rel="stylesheet" href="/css/comments.css">
|
2020-05-22 02:49:16 +00: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-26 23:32:33 +00:00
|
|
|
@if (!$canVote && Auth::user()->can('applications.vote') && $application->applicationStatus == 'STAGE_PEERAPPROVAL')
|
2020-05-29 23:20:39 +00:00
|
|
|
<script>
|
2020-09-01 18:30:28 +00:00
|
|
|
toastr.info('{{__('messages.view_app.cantvote')}}', '{{__('messages.warn')}}')
|
2020-05-29 23:20:39 +00:00
|
|
|
</script>
|
|
|
|
@endif
|
|
|
|
|
2020-05-22 02:49:16 +00:00
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@if (!is_null($application->appointment))
|
|
|
|
|
|
|
|
@canany('applications.view.all', 'appointments.*')
|
|
|
|
|
2020-09-03 00:58:29 +00:00
|
|
|
<x-modal id="notes" modal-label="notes" modal-title="{{__('messages.reusable.notepad')}}" include-close-button="true">
|
2020-06-26 23:32:33 +00:00
|
|
|
|
2020-09-02 23:38:59 +00:00
|
|
|
<form id="meetingNotes" method="POST" action="{{route('saveNotes', ['application' => $application->id])}}">
|
2020-06-26 23:32:33 +00:00
|
|
|
@csrf
|
|
|
|
@method('PATCH')
|
2020-09-01 18:30:28 +00:00
|
|
|
<textarea name="noteText" rows="5" class="form-control">{{$application->appointment->meetingNotes ?? __('messages.view_app.no_notes')}}</textarea>
|
2020-06-26 23:32:33 +00:00
|
|
|
</form>
|
2020-09-01 18:30:28 +00:00
|
|
|
<p class="text-muted text-sm">{{__('messages.last_updated')}} @ {{$application->appointment->updated_at}}</p>
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
<x-slot name="modalFooter">
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="button" class="btn btn-success" onclick="document.getElementById('meetingNotes').submit()"><i class="far fa-paper-plane"></i> {{__('messages.save_exit')}}</button>
|
2020-06-26 23:32:33 +00:00
|
|
|
</x-slot>
|
|
|
|
</x-modal>
|
|
|
|
|
|
|
|
@endcanany
|
|
|
|
@endif
|
2020-05-29 23:20:39 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@role('hiringManager')
|
2020-05-29 23:20:39 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<x-modal id="denyApplication" modal-label="denyApplicationLabel" modal-title="{{__('messages.reusable.confirm')}}" include-close-button="true">
|
2020-05-29 23:20:39 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<p>{{__('messages.view_app.deny_confirm')}}</p>
|
|
|
|
<p class="text-muted">{{__('messages.view_app.deny_confirm_consequence')}}</p>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<x-slot name="modalFooter">
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-07-16 20:21:28 +00:00
|
|
|
<form id="updateApplication" action="{{route('updateApplicationStatus', ['application' => $application->id, 'newStatus' => 'deny'])}}" method="POST">
|
2020-06-26 23:32:33 +00:00
|
|
|
@csrf
|
|
|
|
@method('PATCH')
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="submit" class="btn btn-danger">{{__('messages.view_app.deny_confirm_btn')}}</button>
|
2020-06-26 23:32:33 +00:00
|
|
|
</form>
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{__('messages.modal_close')}}</button>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
</x-slot>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
</x-modal>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@endhasrole
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-07-15 05:48:49 +00:00
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
<div class="alert alert-warning alert-dismissible">
|
|
|
|
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
2020-09-01 18:30:28 +00:00
|
|
|
{{__('messages.view_app.form_updated_alert')}}
|
2020-07-15 05:48:49 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2020-05-22 02:49:16 +00: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-01-29 17:27:03 +00:00
|
|
|
|
|
|
|
<p>{{ GrahamCampbell\Markdown\Facades\Markdown::convertToHtml($content['response']) }}</p>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<!-- TODO: Simplify logic by using switches, as well as a single Gate check -->
|
2020-05-22 02:49:16 +00:00
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
<div class="card bg-gray">
|
|
|
|
|
|
|
|
<div class="card-header bg-gradient-gray">
|
2020-09-01 18:30:28 +00:00
|
|
|
<div class="card-title">{{__('messages.view_app.context_info')}}</div>
|
2020-05-22 02:49:16 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<p><b>{{__('messages.application_m.applicant_name')}} </b> <span class="badge badge-primary">{{$application->user->name}}</span></p>
|
2020-06-26 23:32:33 +00:00
|
|
|
@if (Auth::user()->hasRole('hiringManager'))
|
2020-09-01 18:30:28 +00:00
|
|
|
<p><b>{{__('messages.view_app.appl_ip')}}</b> <span class="badge badge-primary">{{$application->user->originalIP}}</span></p>
|
2020-06-26 23:32:33 +00:00
|
|
|
@endif
|
2020-09-01 18:30:28 +00:00
|
|
|
<p><b>{{__('messages.application_m.application_date')}}</b> <span class="badge badge-primary">{{$application->created_at}}</span></p>
|
|
|
|
<p><b>{{__('messages.last_updated')}}</b><span class="badge badge-primary">{{$application->updated_at}}</span></p>
|
|
|
|
<p><b>{{__('messages.view_app.appl_for')}}</b> <span class="badge badge-primary">{{$vacancy->vacancyName}}</span></p>
|
|
|
|
<p class="mt-2"><b>{{__('messages.view_app.currentstatus')}}</b>
|
2020-05-22 02:49:16 +00:00
|
|
|
@switch($application->applicationStatus)
|
|
|
|
|
|
|
|
@case('STAGE_SUBMITTED')
|
2020-09-01 18:30:28 +00:00
|
|
|
<span class="badge badge-warning">{{__('messages.application_m.outstanding_sm')}}</span>
|
2020-05-22 02:49:16 +00:00
|
|
|
@break
|
|
|
|
|
|
|
|
@case('STAGE_PEERAPPROVAL')
|
2020-09-01 18:30:28 +00:00
|
|
|
<span class="badge badge-primary">{{__('messages.user.peer_approval')}}</span>
|
2020-05-22 02:49:16 +00:00
|
|
|
@break
|
|
|
|
|
|
|
|
@case('STAGE_INTERVIEW')
|
2020-09-01 18:30:28 +00:00
|
|
|
<span class="badge badge-primary">{{__('messages.application_m.pending_int')}}</span>
|
2020-05-22 02:49:16 +00:00
|
|
|
@break
|
|
|
|
|
|
|
|
@case('STAGE_INTERVIEW_SCHEDULED')
|
2020-09-01 18:30:28 +00:00
|
|
|
<span class="badge badge-primary"><i class="fas fa-clock"></i> {{__('messages.application_m.interview_s')}}</span>
|
2020-05-22 02:49:16 +00:00
|
|
|
@break
|
|
|
|
|
|
|
|
@case('APPROVED')
|
2020-09-01 18:30:28 +00:00
|
|
|
<span class="badge badge-success"><i class="fa fa-check-double"></i> {{__('messages.application_m.approved')}}</span>
|
2020-05-22 02:49:16 +00:00
|
|
|
@break
|
|
|
|
|
|
|
|
@case('DENIED')
|
2020-09-01 18:30:28 +00:00
|
|
|
<span class="badge badge-danger"><i class="fa fa-ban"></i> {{__('messages.application_m.denied')}}</span>
|
2020-05-22 02:49:16 +00:00
|
|
|
@break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@endswitch
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@if ($application->applicationStatus == 'STAGE_SUBMITTED' && Auth::user()->hasRole('hiringManager'))
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
<div class="card bg-gray">
|
|
|
|
<div class="card-header bg-gradient-gray">
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<div class="card-title">{{__('messages.view_app.decisionmod')}}</div>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body text-center" style="white-space: nowrap">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col mr-5">
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="button" class="btn btn-danger" onclick="$('#denyApplication').modal('show')" {{($application->applicationStatus == 'DENIED') ? 'disabled' : ''}}><i class="fas fa-arrow-left"></i> {{__('messages.view_app.denyapp')}}</button>
|
2020-05-22 02:49:16 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col">
|
2020-07-16 20:21:28 +00:00
|
|
|
<form method="POST" action="{{route('updateApplicationStatus', ['application' => $application->id, 'newStatus' => 'interview'])}}">
|
2020-05-22 02:49:16 +00:00
|
|
|
@csrf
|
|
|
|
@method('PATCH')
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="submit" class="btn btn-success" {{($application->applicationStatus == 'DENIED') ? 'disabled' : ''}}><i class="fas fa-arrow-right" ></i> {{__('messages.view_app.nextstage')}}</button>
|
2020-05-22 02:49:16 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@if ($application->applicationStatus == 'STAGE_INTERVIEW' && Auth::user()->hasRole('hiringManager'))
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
2020-09-03 00:58:29 +00:00
|
|
|
<x-card id="appointmentCard" card-title="{{__('messages.reusable.schedule_action')}}" footer-style="text-center">
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
<x-slot name="cardHeader">
|
|
|
|
|
|
|
|
</x-slot>
|
|
|
|
|
2020-07-16 20:21:28 +00:00
|
|
|
<form id="scheduleAppointment" action="{{route('scheduleAppointment', ['application' => $application->id])}}" method="POST">
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
@csrf
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<label for="appointmentDescription">{{__('messages.view_app.appointment_desc')}}</label>
|
2020-05-22 02:49:16 +00:00
|
|
|
<input type="text" class="form-control" name="appointmentDescription">
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<label for="appointmentDateTime">{{__('messages.view_app.int_date_time')}}</label>
|
2020-05-22 02:49:16 +00:00
|
|
|
<input type="text" class="form-control" name="appointmentDateTime" id="appointmentDateTime">
|
2020-09-01 18:30:28 +00:00
|
|
|
<p class="text-muted text-sm">{{__('messages.view_app.choosedate')}}</p>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<label for="appointmentLocation">{{__('messages.view_app.appointment_loc')}}</label>
|
2020-05-22 02:49:16 +00:00
|
|
|
<select class="custom-select" id="appointmentLocation" name="appointmentLocation">
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<option value="nil" disabled>{{__('messages.view_app.pref_platform')}}</option>
|
2020-05-22 02:49:16 +00:00
|
|
|
<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>
|
|
|
|
|
|
|
|
</select>
|
2020-09-01 18:30:28 +00:00
|
|
|
<p class="text-muted text-sm">{{__('messages.view_app.coming_soon_int')}}</p>
|
2020-05-22 02:49:16 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<x-slot name="cardFooter">
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="button" class="btn btn-warning text-center" onclick="document.getElementById('scheduleAppointment').submit()"><i class="fas fa-clock"></i> {{__('messages.reusable.schedule')}}</button>
|
2020-05-22 02:49:16 +00:00
|
|
|
</x-slot>
|
|
|
|
|
|
|
|
</x-card>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($application->applicationStatus == 'STAGE_INTERVIEW_SCHEDULED')
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
2020-09-03 00:58:29 +00:00
|
|
|
<x-card id="scheduleInfo" card-title="{{__('messages.reusable.appointment_info')}}" footer-style="text-center">
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
<x-slot name="cardHeader"></x-slot>
|
|
|
|
|
|
|
|
<p class="text-muted">{{$application->appointment->appointmentDescription}}</p>
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<p><b>{{__('messages.view_app.scheduled_for')}}</b> <span class="badge badge-primary">{{$application->appointment->appointmentDate}}</span></p>
|
|
|
|
<p><b>{{__('messages.reusable.status')}}: </b> <span class="badge badge-primary">{{Str::ucfirst(Str::lower($application->appointment->appointmentStatus))}}</span></p>
|
|
|
|
<p><b>{{__('messages.reusable.platform')}}:</b> <span class="badge badge-primary">{{Str::ucfirst(Str::lower($application->appointment->appointmentLocation))}}</span></p>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
<x-slot name="cardFooter">
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@can('appointments.schedule.edit')
|
2020-07-16 20:21:28 +00:00
|
|
|
<form style="white-space: nowrap;display:inline-block" class="footer-button" action="{{route('updateAppointment', ['application' => $application->id, 'status' => 'concluded'])}}" method="POST">
|
2020-06-26 23:32:33 +00:00
|
|
|
@csrf
|
|
|
|
@method('PATCH')
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="submit" class="btn btn-success">{{__('messages.view_app.finish_meeting')}}</button>
|
2020-06-26 23:32:33 +00:00
|
|
|
</form>
|
|
|
|
@endcan
|
|
|
|
|
|
|
|
@can('applications.vote')
|
2020-09-01 18:30:28 +00:00
|
|
|
<button class="btn btn-warning mr-3" onclick="$('#notes').modal('show')">{{__('messages.view_app.view_notes')}}</button>
|
2020-06-26 23:32:33 +00:00
|
|
|
@endcan
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
</x-slot>
|
|
|
|
|
|
|
|
</x-card>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@if ($application->applicationStatus == 'STAGE_PEERAPPROVAL' && Auth::user()->can('applications.vote'))
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<x-card id="peerApproval" card-title="{{__('messages.view_app.vote_app')}}" footer-style="text-center">
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
<x-slot name="cardHeader"></x-slot>
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<p class="text-muted">{{__('messages.view_app.vote_explainer.line1')}}</p>
|
|
|
|
<p class="text-muted">{{__('messages.view_app.vote_explainer.line2')}}</p>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<p class="text-muted">{{__('messages.view_app.vote_explainer.line3')}}</p>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
<x-slot name="cardFooter">
|
|
|
|
|
2020-05-29 23:20:39 +00:00
|
|
|
@if($canVote)
|
|
|
|
|
2020-07-16 20:21:28 +00:00
|
|
|
<form class="d-inline-block" method="POST" action="{{route('voteApplication', ['application' => $application->id])}}">
|
2020-05-29 23:20:39 +00:00
|
|
|
@csrf
|
|
|
|
<input type="hidden" name="voteType" value="VOTE_APPROVE">
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="submit" class="btn btn-sm btn-warning">{{__('messages.view_app.vote_approve')}}</button>
|
2020-05-29 23:20:39 +00:00
|
|
|
</form>
|
2020-07-16 20:21:28 +00:00
|
|
|
<form class="d-inline-block" method="POST" action="{{route('voteApplication', ['application' => $application->id])}}">
|
2020-05-29 23:20:39 +00:00
|
|
|
@csrf
|
|
|
|
<input type="hidden" name="voteType" value="VOTE_DENY">
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="submit" class="btn btn-sm btn-warning">{{__('messages.view_app.vote_deny')}}</button>
|
2020-05-29 23:20:39 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
@endif
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="button" class="btn btn-sm btn-warning {{($canVote) ? 'ml-5' : ''}}" onclick="$('#notes').modal('show')">{{__('messages.view_app.m_notes')}}</button>
|
2020-05-22 02:49:16 +00:00
|
|
|
</x-slot>
|
|
|
|
|
|
|
|
</x-card>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@can('applications.view.all')
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="row">
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="col text-center">
|
|
|
|
|
2020-12-08 00:07:53 +00:00
|
|
|
<button type="button" class="btn btn-primary" onclick="window.location.href='{{route('allApplications')}}'">{{__('messages.view_app.view_more')}}</button>
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
</div>
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@endcan
|
2020-05-22 02:49:16 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@hasanyrole('reviewer|hiringManager|admin')
|
|
|
|
@if (!Auth::user()->is($application->user))
|
|
|
|
<div class="row mb-3 mt-2">
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<h3>{{__('messages.view_app.comments')}} ({{$comments->count()}})</h3>
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="col">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@if ($comments->isEmpty())
|
|
|
|
|
|
|
|
<div class="alert alert-warning">
|
2020-09-01 18:30:28 +00:00
|
|
|
<i class="fas fa-question"></i> <b></b>
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<p>{{__('messages.view_app.no_comments_exp')}}</p>
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@if (!$comments->isEmpty())
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@foreach($comments as $comment)
|
2020-07-15 05:48:49 +00:00
|
|
|
<div class="row mt-3 mb-3">
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="col-md-2">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="text-center">
|
|
|
|
@if($application->user->avatarPreference == 'gravatar')
|
|
|
|
<img class="profile-user-img img-fluid img-circle" src="https://gravatar.com/avatar/{{md5($comment->user->email)}}" alt="User profile picture">
|
|
|
|
@else
|
|
|
|
<img class="profile-user-img img-fluid img-circle" src="https://crafatar.com/avatars/{{$comment->user->uuid}}" alt="User profile picture">
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card comment">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="card-header comment-header">
|
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<!-- Carbon has to be set to translate diffs, can't do directly. -->
|
|
|
|
<h1 class="commenter">{{$comment->user->name}} ● {{Carbon\Carbon::parse($comment->created_at)->diffForHumans()}}</h1>
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="card-body">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
{{$comment->text}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if(Auth::user()->is($comment->user) || Auth::user()->hasRole('admin'))
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="card-footer comment-footer">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00: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 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="text-center">
|
|
|
|
@if($application->user->avatarPreference == 'gravatar')
|
|
|
|
<img class="profile-user-img img-fluid img-circle" src="https://gravatar.com/avatar/{{md5(Auth::user()->email)}}" alt="User profile picture">
|
|
|
|
@else
|
|
|
|
<img class="profile-user-img img-fluid img-circle" src="https://crafatar.com/avatars/{{Auth::user()->uuid}}" alt="User profile picture">
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
2020-07-15 05:48:49 +00:00
|
|
|
</div>
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
<div class="card border-top border-bottom">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="card-body">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<form id="newComment" method="POST" action="{{route('addApplicationComment', ['application' => $application->id])}}">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
@csrf
|
|
|
|
|
|
|
|
<textarea id="comment" name="comment" class="form-control" id="commentText"></textarea>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<div class="row">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
<div class="col text-left">
|
2020-09-01 18:30:28 +00:00
|
|
|
<p class="text-sm text-muted">{{__('messages.view_app.commenting_as', ['username' => Auth::user()->name ])}}</p>
|
2020-06-26 23:32:33 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col text-right">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<p class="text-sm text-muted"><span id="charcount">0</span>/600 {{__('messages.view_app.max_chars')}}</p>
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-footer text-right">
|
2020-07-15 05:48:49 +00:00
|
|
|
|
2020-09-01 18:30:28 +00:00
|
|
|
<button type="button" id="submitComment" class="btn btn-sm btn-secondary">{{__('messages.view_app.post')}}</button>
|
2020-06-26 23:32:33 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@endhasanyrole
|
2020-05-22 02:49:16 +00:00
|
|
|
|
2020-07-16 05:46:20 +00:00
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('footer')
|
|
|
|
@include('breadcrumbs.dashboard.footer')
|
|
|
|
@stop
|