@php use Illuminate\Support\Carbon; use App\Services\School\Teacher\AuthenticationService; $authentication_at = Carbon::parse($entry->teacher_authentication_at); $removed_at = AuthenticationService::getAuthenticationExpireDate($authentication_at); $allow_confirm = backpack_user()->can("authentication", $entry); @endphp
@if($entry->teacher_authentication_status == \App\Models\School\Teacher\Teacher::TEACHER_AUTHENTICATION_STATUS_WAITING && !empty($entry->teacher_authentication_file) && $allow_confirm)
{{ trans("backpack::teacher.authentication.button") }}
{{ trans("backpack::teacher.authentication.reject") }}
@endif @if($entry->teacher_authentication_status == \App\Models\School\Teacher\Teacher::TEACHER_AUTHENTICATION_STATUS_CONFIRM) {{ trans("backpack::teacher.authentication.confirm_message") }}: {{ $entry->teacher_authentication_name }} @ {{ $entry->teacher_authentication_at }} @endif @if($entry->teacher_authentication_status == \App\Models\School\Teacher\Teacher::TEACHER_AUTHENTICATION_STATUS_REJECT) {{ trans("backpack::teacher.authentication.reject_message") }}: {{ $entry->teacher_authentication_name }} @ {{ $entry->teacher_authentication_at }} @endif @if(!empty($entry->teacher_authentication_at && !empty($entry->teacher_authentication_file)) && $entry->teacher_authentication_status == \App\Models\School\Teacher\Teacher::TEACHER_AUTHENTICATION_STATUS_CONFIRM) {{ trans("backpack::teacher.authentication.remove_message", ['confirm_at' => $removed_at->format("Y-m-d")]) }} @endif
{{-- HINT --}} @if (isset($field['hint']))

{!! $field['hint'] !!}

@endif
@push('after_scripts') @php $config = [ 'button_id' => "#btn-authentication-confirm", 'title' => trans('backpack::teacher.authentication.confirm_message_popup'), 'buttons_confirm_label' => __('backpack::teacher.authentication.button'), 'buttons_cancel_label' => __('backpack::crud.cancel'), 'action_url' => route('admin.teacher.authentication', ['teacher_id' => $entry->getKey()]), 'method' => "PUT", 'action_type' => "api", 'bootbox_type' => "confirm" ]; $reject_config = [ 'button_id' => "#btn-authentication-reject", 'title' => trans('backpack::teacher.authentication.reject_message_popup'), 'buttons_confirm_label' => __('backpack::teacher.authentication.reject'), 'buttons_cancel_label' => __('backpack::crud.cancel'), 'action_url' => route('admin.teacher.authentication.reject', ['teacher_id' => $entry->getKey()]), 'method' => "PUT", 'action_type' => "api", 'bootbox_type' => "confirm" ]; @endphp @endpush