@extends('layouts.admin_layout') @section('content') @auth()

Создать Направление

{{ Form::open(['url' => route('directions.update', $direction), 'method' => 'PATCH', 'class' => 'ffff']) }}
{{ Form::label('department_id', 'Кафедра') }}
{{ Form::select('department_id', $departments, $direction->department->id, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('department_id') }} @endif
{{ Form::label('education_level_id', 'Увовень образования') }}
{{ Form::select('education_level_id', $levels, $direction->educationLevel->id, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('education_level_id') }} @endif
{{ Form::label('education_form_id', 'Форма образования') }}
{{ Form::select('education_form_id', $forms, $direction->educationForm->id, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('education_form_id') }} @endif
{{ Form::label('position', 'Позиция') }}
{{ Form::number('position', $direction->position, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('position') }} @endif
{{ Form::label('code', 'Код') }}
{{ Form::text('code', $direction->code, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('code') }} @endif
{{ Form::label('slug', 'URL') }}
{{ Form::text('slug', $direction->slug, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('slug') }} @endif
{{ Form::label('name', 'Название') }}
{{ Form::text('name', $direction->name, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('name') }} @endif
{{ Form::label('description', 'Описание') }}
{{ Form::text('description', $direction->description, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('description') }} @endif
{{ Form::label('budget_places', 'Кол-во бюджетных мест') }}
{{ Form::number('budget_places', $direction->budget_places, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('budget_places') }} @endif
{{ Form::label('quota', 'Квота') }}
{{ Form::number('quota', $direction->quota, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('quota') }} @endif
{{ Form::label('paid_places', 'Кол-во мест по договорам') }}
{{ Form::number('paid_places', $direction->paid_places, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('paid_places') }} @endif
{{ Form::label('cost_paid_place', 'Стоимость обучения') }}
{{ Form::number('cost_paid_place', $direction->cost_paid_place, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('cost_paid_place') }} @endif
{{ Form::label('period', 'Период обучения') }}
{{ Form::text('period', $direction->period, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('period') }} @endif
{{ Form::label('direction_profile', 'Профиль подготовки') }}
{{ Form::select('direction_profiles[]', $directionProfiles, $direction->directionProfiles, ['class' => 'form-control rounded border-gray-300 w-1/3 h-32', 'multiple' => 'multiple']) }}
@if ($errors->any()) {{ $errors->first('direction_profile') }} @endif

Добавить вступительные испытания

@foreach($direction->entranceExaminations as $entranceExamination)
{{ Form::label("entrance-examination[{$entranceExamination->id}][examination_type_id]", 'Тип экзамена') }}
{{ Form::select("entrance-examination[{$entranceExamination->id}][examination_type_id]", $examination_types, $entranceExamination->examinationType->id, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first("entrance-examination[{$entranceExamination->id}][examination_type_id]") }} @endif
{{ Form::label("entrance-examination[{$entranceExamination->id}][subject_id]", 'Предмет') }}
{{ Form::select("entrance-examination[{$entranceExamination->id}][subject_id]", $subjects, $entranceExamination->subject->id, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first("entrance-examination[{$entranceExamination->id}][subject_id]") }} @endif
{{ Form::label("entrance-examination[{$entranceExamination->id}][subject_type_id]", 'Тип предмета') }}
{{ Form::select("entrance-examination[{$entranceExamination->id}][subject_type_id]", $subjectTypes, $entranceExamination->subjectType->id, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first("entrance-examination[{$entranceExamination->id}][subject_type_id]") }} @endif
{{ Form::label("entrance-examination[{$entranceExamination->id}][scores]", 'Кол-во баллов') }}
{{ Form::text("entrance-examination[{$entranceExamination->id}][scores]", $entranceExamination->scores, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first("entrance-examination[{$entranceExamination->id}][scores]") }} @endif
{{ Form::label("entrance-examination[{$entranceExamination->id}][position]", 'Позиция') }}
{{ Form::text("entrance-examination[{$entranceExamination->id}][position]", $entranceExamination->position, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first("entrance-examination[{$entranceExamination->id}][position]") }} @endif
{{ Form::label('btn', 'Действия') }}
@endforeach
{{ Form::submit('Изменить Направление', ['class' => 'btn btn-primary']) }}
{{ Form::close() }}
@include('admin.catalog.direction.edit_script') @endauth @endsection