@extends('layouts.app')

@section('content')

<div class="container">
    <div class="row justify-content-start mt-5">
        <div class="col col-md">
            <h1>{{ __('Additional Shift for Users')}}</h1>
        </div>
    </div>
	<form method="POST" action="{{ route('admin.additionalShift.view') }}">
	@csrf
		<div class="row justify-content-start">
			<div class="col-md-8">
				<div class="form-group row">
					<label for="user_id" class="col-md-4 col-form-label text-md-right">{{ __('Select User') }}</label>
					<div class="form-group col-md-6">
						<select id="user_id" class="form-control" name="user_id" required>
							<option value="">Choose...</option>
							@foreach($users as $user)
								<option value="{{ $user->id }}">
								@isset($selectedUser)
									{{ $user->id == $selectedUser->id ? 'selected' : '' }}
								@endisset
								{{ $user->name }}
								</option>
							@endforeach
						</select>
					</div>
					<button type="submit" class="btn btn-primary">
						{{ __('Submit') }}
					</button>
				</div>
			</div>
		</div>
	</form>
</div>

@endsection
