Compare commits

..

No commits in common. "f482d036e1d2fca12cbde6ae40fd0b6bcd2d8b0b" and "4ed8dabb19994f64796d1b8e36545942c25a7ccf" have entirely different histories.

32 changed files with 83 additions and 378 deletions

View File

@ -4,7 +4,9 @@ namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreCostRequest;
use App\Http\Requests\admin\Catalog\Direction\StorePlaceRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateCostRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdatePlaceRequest;
use App\Models\Cost;
use App\Models\Direction;
use App\Models\EducationForm;

View File

@ -23,7 +23,7 @@ class EntranceExaminationController extends Controller
public function create(): View
{
$directions = Direction::pluck('full_name', 'id');
$directions = Direction::pluck('name', 'id');
$examination_types = ExaminationType::pluck('name', 'id');
$subjects = Subject::pluck('name', 'id');
$subjectTypes = SubjectType::pluck('name', 'id');
@ -64,7 +64,7 @@ class EntranceExaminationController extends Controller
public function edit(EntranceExamination $entranceExamination): View
{
$directions = Direction::pluck('full_name', 'id');
$directions = Direction::pluck('name', 'id');
$examination_types = ExaminationType::pluck('name', 'id');
$subjects = Subject::pluck('name', 'id');
$subjectTypes = SubjectType::pluck('name', 'id');

View File

@ -6,7 +6,9 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreExaminationTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateExaminationTypeRequest;
use App\Models\ExaminationType;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Http\RedirectResponse;
class ExaminationTypeController extends Controller

View File

@ -3,7 +3,9 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreCostRequest;
use App\Http\Requests\admin\Catalog\Direction\StorePeriodRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateCostRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdatePeriodRequest;
use App\Models\Direction;
use App\Models\EducationForm;

View File

@ -43,7 +43,6 @@ class PlaceController extends Controller
$place->position = $validated['position'];
$place->description = $validated['description'];
$place->amount = $validated['amount'];
$place->quota = $validated['quota'];
$place->education_form_id = $validated['education_form_id'];
$place->place_type_id = $validated['place_type_id'];
$place->direction_id = $validated['direction_id'];
@ -80,7 +79,6 @@ class PlaceController extends Controller
$place->position = $validated['position'];
$place->description = $validated['description'];
$place->amount = $validated['amount'];
$place->quota = $validated['quota'];
$place->education_form_id = $validated['education_form_id'];
$place->place_type_id = $validated['place_type_id'];
$place->direction_id = $validated['direction_id'];

View File

@ -3,7 +3,9 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreExaminationTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\StorePlaceTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateExaminationTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdatePlaceTypeRequest;
use App\Models\PlaceType;
use Illuminate\Contracts\View\View;

View File

@ -3,7 +3,9 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreExaminationTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\StoreSubjectRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateExaminationTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateSubjectRequest;
use App\Models\Subject;
use Illuminate\Contracts\View\View;

View File

@ -9,11 +9,7 @@ use App\Models\Department;
use App\Models\Direction;
use App\Models\EducationForm;
use App\Models\EducationLevel;
use App\Models\EntranceExamination;
use App\Models\ExaminationType;
use App\Models\Faculty;
use App\Models\Subject;
use App\Models\SubjectType;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
@ -32,19 +28,15 @@ class DirectionController extends Controller
$levels = EducationLevel::pluck('name', 'id');
$forms = EducationForm::pluck('name', 'id');
$departments = Department::pluck('name', 'id');
$examination_types = ExaminationType::pluck('name', 'id');
$subjects = Subject::pluck('name', 'id');
$subjectTypes = SubjectType::pluck('name', 'id');
return view('admin.catalog.direction.create',
compact('departments', 'levels', 'forms', 'examination_types', 'subjectTypes', 'subjects'));
return view('admin.catalog.direction.create', compact('departments', 'levels', 'forms'));
}
public function store(StoreDirectionRequest $request): RedirectResponse
{
$validated = $request->validated();
$direction = new Direction();
$direction->name = $validated['name'];
$direction->full_name = "{$validated['code']} {$validated['name']}";
$direction->description = $validated['description'];
$direction->position = $validated['position'];
$direction->slug = $validated['slug'];
@ -54,19 +46,6 @@ class DirectionController extends Controller
$direction->department_id = $validated['department_id'];
$direction->save();
if(array_key_exists('entrance-examination', $validated)) {
foreach ($validated['entrance-examination'] as $data) {
$entranceExamination = new EntranceExamination();
$entranceExamination->examination_type_id = $data['examination_type_id'];
$entranceExamination->direction_id = $direction->id;
$entranceExamination->subject_id = $data['subject_id'];
$entranceExamination->scores = $data['scores'];
$entranceExamination->position = $data['position'];
$entranceExamination->subject_type_id = $data['subject_type_id'];
$entranceExamination->save();
}
}
return redirect()->route('directions.index');
}
@ -76,38 +55,17 @@ class DirectionController extends Controller
$faculty = Faculty::find($department->faculty->id);
$educationalInstitution = $faculty->educationalInstitution;
$ege = $direction
->entranceExaminations
->where('examination_type_id', '=', '1')
->sortBy('position')
->pluck('scores', 'subject_id');
$spo = $direction
->entranceExaminations->where('examination_type_id', '=', '2')
->sortBy('position')
->pluck('scores', 'subject_id');
$ege = $direction->entranceExaminations->where('examination_type_id', '=', '1')->pluck('scores', 'subject_id');
$spo = $direction->entranceExaminations->where('examination_type_id', '=', '2')->pluck('scores', 'subject_id');
$magistracy = $direction
->entranceExaminations
->where('examination_type_id', '=', '3')
->pluck('scores', 'subject_id');
$budget = $direction
->places
->where('place_type_id', '=', '1')
->sortBy('position')
->pluck('amount', 'education_form_id');
$budget = $direction->places->where('place_type_id', '=', '1')->pluck('amount', 'education_form_id');
$paid = $direction->places->where('place_type_id', '=', '2')->pluck('amount', 'education_form_id');
$paid = $direction
->places
->where('place_type_id', '=', '2')
->sortBy('position')
->pluck('amount', 'education_form_id');
$costs = $direction
->costs
->sortBy('position')
->pluck('cost', 'education_form_id');
$costs = $direction->costs->pluck('cost', 'education_form_id');
return view(
'admin.catalog.direction.show',
@ -138,8 +96,8 @@ class DirectionController extends Controller
{
$validated = $request->validated();
$direction = new Direction();
$direction->name = $validated['name'];
$direction->full_name = "{$validated['code']} {$validated['name']}";
$direction->description = $validated['description'];
$direction->position = $validated['position'];
$direction->slug = $validated['slug'];

View File

@ -16,7 +16,6 @@ class StorePlaceRequest extends FormRequest
'position' => 'required|int|numeric|max:255',
'description' => 'string',
'amount' => 'required|int|numeric|max:255',
'quota' => 'required|int|numeric|max:255',
'education_form_id' => 'required|int|numeric|max:255',
'place_type_id' => 'required|int|numeric|max:255',
'direction_id' => 'required|int|numeric|max:255',

View File

@ -16,7 +16,6 @@ class UpdatePlaceRequest extends FormRequest
'position' => 'required|int|numeric|max:255',
'description' => 'string',
'amount' => 'required|int|numeric|max:255',
'quota' => 'required|int|numeric|max:255',
'education_form_id' => 'required|int|numeric|max:255',
'place_type_id' => 'required|int|numeric|max:255',
'direction_id' => 'required|int|numeric|max:255',

View File

@ -15,18 +15,13 @@ class StoreDirectionRequest extends FormRequest
{
return [
'position' => 'required|int|numeric|max:255',
'name' => 'required|string|max:255',
'name' => 'required|string|max:255|unique:directions,name',
'description' => 'string',
'slug' => 'required|string|max:255|unique:directions,slug',
'code' => 'required|string|max:255|unique:directions,code',
'code' => 'required|string|max:255',
'education_level_id' => 'required|int|numeric|max:1000',
'education_form_id' => 'required|int|numeric|max:1000',
'department_id' => 'required|numeric|int|max:1000',
'entrance-examination.*.examination_type_id' => 'required|numeric|int|max:1000',
'entrance-examination.*.subject_id' => 'required|numeric|int|max:1000',
'entrance-examination.*.subject_type_id' => 'required|numeric|int|max:1000',
'entrance-examination.*.scores' => 'required|numeric|int|max:1000',
'entrance-examination.*.position' => 'required|numeric|int|max:1000',
'department_id' => 'required|numeric|int|max:1000'
];
}
}

View File

@ -24,14 +24,14 @@ class UpdateDirectionRequest extends FormRequest
'max:255',
"unique:directions,slug,{$this->direction->id}",
],
'name' => 'required|string|max:255',
'code' => 'required|string|max:255',
'education_level_id' => 'required|int|numeric|max:1000',
'education_form_id' => 'required|int|numeric|max:1000',
'code' => [
'name' => [
'required',
'string',
'max:255',
"unique:directions,code,{$this->direction->id}",
"unique:directions,name,{$this->direction->id}",
],
];
}

View File

@ -14,7 +14,6 @@ class Direction extends Model
protected $fillable = [
'id',
'name',
'full_name',
'description',
'position',
'slug',

View File

@ -15,7 +15,6 @@ class Place extends Model
'position',
'description',
'amount',
'quota',
'education_form_id',
'place_type_id',
'direction_id',

View File

@ -8,14 +8,11 @@ class DirectionFactory extends Factory
{
public function definition(): array
{
$name = fake()->name();
$code = fake()->text(10);
return [
'name' => $name,
'full_name' => "{$code} {$name}",
'name' => fake()->name(),
'description' => fake()->text(),
'slug' => fake()->slug(),
'code' => $code,
'code' => fake()->text(50),
'position' => fake()->randomDigit(),
'department_id' => 1,
'education_level_id' => 1,

View File

@ -12,7 +12,6 @@ class PlaceFactory extends Factory
'position' => 1,
'description' => fake()->text(),
'amount' => fake()->randomDigit(),
'quota' => fake()->randomDigit(),
'education_form_id' => 1,
'place_type_id' => 1,
'direction_id' => 1,

View File

@ -11,7 +11,6 @@ return new class extends Migration
Schema::create('directions', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('full_name');
$table->text('description')->nullable();
$table->string('code');
$table->integer('position');

View File

@ -15,7 +15,6 @@ return new class extends Migration
$table->id();
$table->integer('position');
$table->integer('amount');
$table->integer('quota');
$table->foreignId('education_form_id')->constrained('education_forms');
$table->foreignId('place_type_id')->constrained('place_types');
$table->foreignId('direction_id')->constrained('directions');

View File

@ -13,7 +13,6 @@ class DirectionSeeder extends Seeder
DB::table('directions')->insert([
[
'name' => 'Юриспруденция',
'full_name' => '40.03.01 Юриспруденция',
'description' => 'Юриспруденция',
'slug' => 'jurisprudence',
'code' => '40.03.01',
@ -24,7 +23,6 @@ class DirectionSeeder extends Seeder
],
[
'name' => 'фармация',
'full_name' => '33.05.01 фармация',
'description' => 'фармация',
'slug' => 'pharmacy',
'code' => '33.05.01',
@ -35,7 +33,6 @@ class DirectionSeeder extends Seeder
],
[
'name' => 'строительство',
'full_name' => '08.04.01 строительство',
'description' => 'строительство',
'slug' => 'construction',
'code' => '08.04.01',

View File

@ -14,7 +14,6 @@ class PlaceSeeder extends Seeder
[
'position' => 1,
'amount' => 25,
'quota' => 4,
'education_form_id' => 1,
'place_type_id' => 1,
'direction_id' => 1,
@ -23,7 +22,6 @@ class PlaceSeeder extends Seeder
[
'position' => 2,
'amount' => 30,
'quota' => 8,
'education_form_id' => 2,
'place_type_id' => 2,
'direction_id' => 1,

8
package-lock.json generated
View File

@ -6,8 +6,7 @@
"": {
"dependencies": {
"@rails/ujs": "^7.1.2",
"bootstrap-icons": "^1.11.3",
"jquery": "^3.7.1"
"bootstrap-icons": "^1.11.3"
},
"devDependencies": {
"@popperjs/core": "^2.11.6",
@ -1422,11 +1421,6 @@
"jiti": "bin/jiti.js"
}
},
"node_modules/jquery": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
},
"node_modules/laravel-vite-plugin": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-1.0.1.tgz",

View File

@ -21,7 +21,6 @@
},
"dependencies": {
"@rails/ujs": "^7.1.2",
"bootstrap-icons": "^1.11.3",
"jquery": "^3.7.1"
"bootstrap-icons": "^1.11.3"
}
}

View File

@ -2,9 +2,8 @@
import Alpine from 'alpinejs';
import ujs from '@rails/ujs';
import jQuery from 'jquery';
window.Alpine = Alpine;
Alpine.start();
ujs.start();
window.$ = jQuery;

View File

@ -1,74 +1,46 @@
@extends('layouts.admin_layout')
@section('content')
@auth()
<h1 class=""> Создать Направление</h1>
{{ Form::open(['url' => route('directions.store'), 'method' => 'POST', 'class' => '']) }}
<div class="row">
<div class="col">
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::number('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('code', 'Код') }}
</div>
<div class="mt-1">
{{ Form::text('code', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('code') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
</div>
<div class="mt-3">
{{ Form::label('name', 'Название') }}
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="row">
<h1 class=""> Создать Направление</h1>
{{ Form::open(['url' => route('directions.store'), 'method' => 'POST', 'class' => '']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('code', 'Название') }}
</div>
<div class="mt-1">
{{ Form::text('code', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('code') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('department_id', 'Кафедра') }}
</div>
@ -80,8 +52,7 @@
{{ $errors->first('department_id') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('education_level_id', 'Увовень образования') }}
</div>
@ -93,10 +64,9 @@
{{ $errors->first('education_level_id') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('education_form_id', 'Форма образования') }}
{{ Form::label('education_form_id', 'Увовень образования') }}
</div>
<div class="mt-1">
{{ Form::select('education_form_id', $forms, null, ['class' => 'form-select']) }}
@ -106,95 +76,24 @@
{{ $errors->first('education_form_id') }}
@endif
</div>
</div>
</div>
<h4 class="mt-3">Добавить вступительные испытания</h4>
<div class="text-center align-items-center entrance-examination" id="entrance-examination"
name="entrance-examination">
<div class="row">
<div class="col">
<div class="mt-3">
{{ Form::label('entrance-examination[0][examination_type_id]', 'Тип экзамена') }}
</div>
<div class="mt-1">
{{ Form::select('entrance-examination[0][examination_type_id]', $examination_types, null, ['class' => 'form-select']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('entrance-examination[0][examination_type_id]') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('entrance-examination[0][subject_id]', 'Предмет') }}
</div>
<div class="mt-1 col">
{{ Form::select('entrance-examination[0][subject_id]', $subjects, null, ['class' => 'form-select']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('entrance-examination[0][subject_id]') }}
@endif
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('entrance-examination[0][subject_type_id]', 'Тип предмета') }}
</div>
<div class="mt-1 col">
{{ Form::select('entrance-examination[0][subject_type_id]', $subjectTypes, null, ['class' => 'form-select']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('entrance-examination[0][subject_type_id]') }}
@endif
</div>
<div>
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('entrance-examination[0][scores]', 'Кол-во баллов') }}
</div>
<div class="mt-1 col">
{{ Form::text('entrance-examination[0][scores]', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('entrance-examination[0][scores]') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
{{ Form::label('entrance-examination[0][position]', 'Позиция') }}
</div>
<div class="mt-1 col">
{{ Form::text('entrance-examination[0][position]', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('entrance-examination[0][position]') }}
@endif
</div>
</div>
<div class="col align-items-end">
<div class="mt-3">
{{ Form::label('btn', 'Действия') }}
</div>
<button type="button" class="btn btn-success col" name="add" id="add">Добавить</button>
<div class="mt-3">
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
</div>
</div>
{{ Form::close() }}
</div>
<div class="mt-3 mb-3">
{{ Form::submit('Создать Направление', ['class' => 'btn btn-primary']) }}
</div>
{{ Form::close() }}
</div>
@include('admin.catalog.direction.script')
@endauth
@endsection

View File

@ -5,7 +5,7 @@
<div class="row">
<div class="col">
<h1 class="">Изменить направление</h1>
{{ Form::open(['url' => route('directions.update', $direction), 'method' => 'PATCH', 'class' => '']) }}
{{ Form::open(['url' => route('departments.update', $direction), 'method' => 'PATCH', 'class' => '']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
@ -19,18 +19,6 @@
@endif
</div>
<div class="mt-3">
{{ Form::label('code', 'Код') }}
</div>
<div class="mt-1">
{{ Form::text('code', $direction->code, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('code') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название') }}
</div>

View File

@ -43,18 +43,6 @@
@endif
</div>
<div class="mt-3">
{{ Form::label('quota', 'Квота') }}
</div>
<div class="mt-1">
{{ Form::text('quota', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('quota') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('direction_id', 'Направление подготовки') }}
</div>

View File

@ -43,18 +43,6 @@
@endif
</div>
<div class="mt-3">
{{ Form::label('quota', 'Квота') }}
</div>
<div class="mt-1">
{{ Form::text('quota', $place->amount, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('quota') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('direction_id', 'Направление подготовки') }}
</div>

View File

@ -15,7 +15,6 @@
<th scope="col">Тип места</th>
<th scope="col">направление</th>
<th scope="col">Кол-во</th>
<th scope="col">Квота</th>
<th scope="col">действия</th>
<th scope="col"></th>
</tr>
@ -29,7 +28,6 @@
<td><a href="{{ route('place_types.show', $place->placeType) }}">{{ $place->placeType->name }}</a></td>
<td><a href="{{ route('directions.show', $place->direction) }}">{{ $place->direction->name }}</a></td>
<td>{{ $place->amount }}</td>
<td>{{ $place->quota }}</td>
<td>
<a href="{{ route("places.show", $place) }}"
class="btn btn-info">посмотреть</a>

View File

@ -14,8 +14,6 @@
<p>{{ $place->direction->name }}</p>
<h2>Кол-во</h2>
<p>{{ $place->amount }}</p>
<h2>Квота</h2>
<p>{{ $place->quota }}</p>
</div>
@endauth
@endsection

View File

@ -1,86 +0,0 @@
<script type="module">
let i = 0;
$('#add').click(function () {
++i;
$('#entrance-examination').append(
`<div class="row field">
<div class="col">
<div class="mt-3">
<label for="entrance-examination[${i}][examination_type_id]">Тип экзамена</label>
</div>
<div class="mt-1">
<select class="form-select" id="entrance-examination[${i}][examination_type_id]"
name="entrance-examination[${i}][examination_type_id]">
@foreach($examination_types as $value => $type)
<option value="{{ $value }}">{{ $type }}</option>
@endforeach
</select>
</div>
<div>
</div>
</div>
<div class="col">
<div class="mt-3">
<label for="entrance-examination[${i}][subject_id]">Предмет</label>
</div>
<div class="mt-1 col">
<select class="form-select" id="entrance-examination[${i}][subject_id]"
name="entrance-examination[${i}][subject_id]">
@foreach($subjects as $value => $subject)
<option value="{{ $value }}">{{ $subject }}</option>
@endforeach
</select>
</div>
<div>
</div>
</div>
<div class="col">
<div class="mt-3">
<label for="entrance-examination[${i}][subject_type_id]">Тип предмета</label>
</div>
<div class="mt-1 col">
<select class="form-select" id="entrance-examination[${i}][subject_type_id]"
name="entrance-examination[${i}][subject_type_id]">
@foreach($subjectTypes as $value => $subjectType)
<option value="{{ $value }}">{{ $subjectType }}</option>
@endforeach
</select>
</div>
<div>
</div>
</div>
<div class="col">
<div class="mt-3">
<label for="entrance-examination[${i}][scores]">Кол-во баллов</label>
</div>
<div class="mt-1 col">
<input class="form-control" name="entrance-examination[${i}][scores]" type="text" value=""
id="entrance-examination[${i}][scores]">
</div>
<div>
</div>
</div>
<div class="col">
<div class="mt-3">
<label for="entrance-examination[${i}][position]">Позиция</label>
</div>
<div class="mt-1 col">
<input class="form-control" name="entrance-examination[${i}][position]" type="text" value=""
id="entrance-examination[${i}][position]">
</div>
<div>
</div>
</div>
<div class="col align-items-end">
<div class="mt-3">
<label for="btn">Действия</label>
</div>
<button type="button" class="btn btn-danger col remove-examination-row">Удалить</button>
</div>
</div>`
);
});
$(document).on('click', '.remove-examination-row', function () {
$(this).parents('.field').remove();
});
</script>

View File

@ -36,7 +36,6 @@ class PlaceTest extends TestCase
'position',
'description',
'amount',
'quota',
'education_form_id',
'place_type_id',
'direction_id',

View File

@ -12,9 +12,4 @@ export default defineConfig({
refresh: true,
}),
],
resolve: {
alias: {
'$': 'jQuery'
},
},
});