form_basic_information.blade.php 10.7 KB
@extends('workers.cabinet_layout', ['title' => 'Основная информация - РекаМоре'])

@section('cabinet_content')
@php
    $worker = $user->workers[0]
@endphp
<form action="{{ route('worker.cabinet_save', ['worker' => $worker->id]) }}" enctype="multipart/form-data" method="POST">
    @csrf
    @include('messages_error')

    <div class="cabinet__body-item">
        <div class="cabinet__anketa">
            <h2 class="title cabinet__title">Основная информация</h2>
        </div>
    </div>

    <div class="cabinet__body-item">
        <div class="cabinet__inputs">
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Фамилия:</label>
                <div class="form-group__item">
                    <input type="text" name="surname" id="surmane" class="input" value="{{ $user->surname }}" placeholder="Филиппов" required>
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Имя:</label>
                <div class="form-group__item">
                    <input type="text" name="name_man" id="name_man" class="input" value="{{ $user->name_man }}" placeholder="Егор" required>
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Отчество:</label>
                <div class="form-group__item">
                    <input type="text" class="input" name="surname2" id="surmane2" value="{{ $user->surname2 }}" placeholder="Алексеевич">
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Возраст</label>
                <div class="form-group__item">
                    <input type="number" name="old_year" id="old_year" value="{{ $worker->old_year }}" class="input" placeholder="0" required>
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Статус</label>
                <div class="form-group__item">
                    <div class="select">
                        <select class="js-select2" name="status_work" id="status_work">
                            @foreach(App\Enums\WorkerStatuses::getWorkerStatuses() as $status_id => $status_label)
                                <option value="{{ $status_id }}" @if ($worker->status_work == $status_id) selected @endif> {{ $status_label }} </option>
                            @endforeach
                        </select>
                    </div>
                </div>
            </div>

            <div class="cabinet__inputs-item cabinet__inputs-item_max form-group cabinet__inputs-item-full-row">
                <label class="form-group__label">Желаемые вакансии:</label>
                <div class="form-group__item">
                    <div class="select">
                        <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple">
                            @if ($job_titles->count())
                                @foreach($job_titles as $job_title)
                                    <option value="{{ $job_title->id }}" @if (in_array($job_title->id, $worker->job_titles)) selected @endif>{{ $job_title->name }}</option>
                                @endforeach
                            @endif
                        </select>
                    </div>
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Пожелания к З/П:</label>
                <div class="form-group__item">
                    <input type="text" name="salary_expectations" id="salary_expectations" value="{{ $worker->salary_expectations }}" class="input" placeholder="От 150 000 руб">
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Опыт работы</label>
                <div class="form-group__item">
                    <div class="select">
                        <select class="js-select2" id="experience" name="experience">
                            <option value="Не указано" @if (empty($worker->experience)) selected @endif>Не указано</option>
                            <option value="меньше 1 года" @if ($worker->experience == 'меньше 1 года') selected @endif>меньше 1 года</option>
                            <option value="от 1 года до 3 лет" @if ($worker->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option>
                            <option value="от 3 до 5 лет" @if ($worker->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option>
                            <option value="от 5 до 10 лет" @if ($worker->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option>
                            <option value="Больше 10 лет" @if ($worker->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Уровень английского:</label>
                <div class="form-group__item">
                    <input type="text" name="english_level" id="english_level" value="{{ $worker->english_level }}" class="input" placeholder="Средний">
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Дата готовности к посадке:</label>
                <div class="form-group__item">
                    <input type="text" name="ready_boart_date" id="ready_boart_date" value="{{ $worker->ready_boart_date }}" class="input" placeholder="С 1 января {{ date('Y')}}">
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Предпочтение по типу судна:</label>
                <div class="form-group__item">
                    <input type="text" name="boart_type_preference" id="boart_type_preference" value="{{ $worker->boart_type_preference }}" class="input" placeholder="Балкер, сухогруз, контейнеровоз">
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Наличие визы:</label>
                <div class="form-group__item">
                    <input type="text" name="visa_available" id="visa_available" value="{{ $worker->visa_available }}" class="input" placeholder="Да">
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Наличие танкерных документов:</label>
                <div class="form-group__item">
                    <input type="text" name="tanker_documents_available" id="tanker_documents_available" value="{{ $worker->tanker_documents_available }}" class="input" placeholder="Нет">
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Наличие подтверждения для работы на ВВП:</label>
                <div class="form-group__item">
                    <input type="text" name="confirmation_work_for_vvp" id="confirmation_work_for_vvp" value="{{ $worker->confirmation_work_for_vvp }}" class="input" placeholder="Нет">
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Наличие военного билета / приписного свидетельства:</label>
                <div class="form-group__item">
                    <input type="text" name="military_id_available" id="military_id_available" value="{{ $worker->military_id_available }}" class="input" placeholder="Нет">
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Город проживания:</label>
                <div class="form-group__item">
                    <input type="text" name="city" id="city" value="{{ $worker->city }}" class="input" placeholder="Челябинск" required>
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Телефон:</label>
                <div class="form-group__item">
                    <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $worker->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required>
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">E-mail:</label>
                <div class="form-group__item">
                    <input type="email" name="email" id="email" value="{{ $worker->email }}" class="input" placeholder="name@rekamore.su" required>
                </div>
            </div>

            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Контакты родственников:</label>
                <div class="form-group__item">
                    <input type="text" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $worker->telephone2 ?? '' }}" class="input">
                </div>
            </div>
            <div class="cabinet__inputs-item form-group"></div>

            <div class="cabinet__body-item cabinet__inputs-item-full-row">
                <h4 class="cabinet__h4">О себе</h4>
                <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $worker->text }}</textarea>
            </div>

            <div class="cabinet__body-item cabinet__inputs-item-full-row">
                <div class="cabinet__buttons_flex">
                    <button type="submit" class="button">Сохранить</button>
                    <a href="{{ route('worker.cabinet') }}" class="button button_light active">Назад</a>
                </div>
            </div>
        </div>
    </div>
</form>
@endsection