@extends('hr_main') @section('title', '| ' . $data['pageTitle']) @section('content')
{{-- Center-align the entire form --}}
{!! $data['pageTitle'] !!}
{!! Form::open([ 'files' => false, 'id' => 'formId', 'role' => 'form', 'class' => 'form-horizontal form-groups text-center', ]) !!}
{!! Form::label('project_id', 'Project:', ['class' => 'control-label']) !!} {!! Form::select('project_id', ['' => 'Select Project'] + $data['project_id'], null, [ 'class' => 'form-control', 'id' => 'project_id', ]) !!}

{{ $errors->first('project_id') }}

{!! Form::label('emp_id', 'Employee:', ['class' => 'control-label']) !!} {!! Form::select('emp_id', ['' => 'Select Employee'], null, [ 'class' => 'form-control', 'id' => 'emp_id', ]) !!}

{{ $errors->first('emp_id') }}

{{-- Supervisor Dropdowns --}}
@php function ordinal($number) { $ends = [ 'th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th', ]; if ($number % 100 >= 11 && $number % 100 <= 13) { return $number . 'th'; } else { return $number . $ends[$number % 10]; } } @endphp @for ($i = 1; $i <= $data['noOfBosses']; $i++)
{!! Form::label("boss_emp_id_$i", ordinal($i) . ' Supervisor:', [ 'class' => 'control-label', 'style' => 'margin-bottom: 5px;', ]) !!} {!! Form::select("boss_emp_id_$i", ['' => 'Select Supervisor'], null, [ 'class' => 'form-control boss_emp_id', 'id' => "boss_emp_id_$i", ]) !!}

{{ $errors->first("boss_emp_id_$i") }}

@endfor
{!! Form::text('effectiveDate', null, [ 'class' => 'form-control datepicker', 'id' => 'effectiveDate', 'autocomplete' => 'off', 'placeholder' => 'Select a date', ]) !!}

{!! Form::submit('Submit', ['id' => 'add', 'class' => 'btn btn-info submitButton']) !!} Close
{!! Form::close() !!}
@endsection @section('footerAssets') @endsection