forked from aslan/applicant-site
Compare commits
No commits in common. "5fc547803c0d966b5edf60219208e91dd20a7b75" and "f7b5773c4dbf6dbe9674ac753243d0737d317d4b" have entirely different histories.
5fc547803c
...
f7b5773c4d
|
@ -60,10 +60,4 @@ class PositionHelper
|
||||||
$maxPosition = EntranceExamination::max('position');
|
$maxPosition = EntranceExamination::max('position');
|
||||||
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
|
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function department()
|
|
||||||
{
|
|
||||||
$maxPosition = EntranceExamination::max('position');
|
|
||||||
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers\admin\Catalog;
|
namespace App\Http\Controllers\admin\Catalog;
|
||||||
|
|
||||||
use App\Helpers\SlugHelper;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\admin\Catalog\StoreDepartmentRequest;
|
use App\Http\Requests\admin\Catalog\StoreDepartmentRequest;
|
||||||
use App\Http\Requests\admin\Catalog\UpdateDepartmentRequest;
|
use App\Http\Requests\admin\Catalog\UpdateDepartmentRequest;
|
||||||
|
@ -12,8 +11,6 @@ use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
class DepartmentController extends Controller
|
class DepartmentController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -33,22 +30,14 @@ class DepartmentController extends Controller
|
||||||
{
|
{
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
|
|
||||||
$slug = SlugHelper::get($validated);
|
|
||||||
|
|
||||||
$department = new Department();
|
$department = new Department();
|
||||||
$department->name = $validated['name'];
|
$department->name = $validated['name'];
|
||||||
$department->description = $validated['description'];
|
$department->description = $validated['description'];
|
||||||
$department->position = $validated['position'];
|
$department->position = $validated['position'];
|
||||||
$department->faculty_id = $validated['faculty_id'];
|
$department->faculty_id = $validated['faculty_id'];
|
||||||
$department->slug = $slug;
|
$department->slug = $validated['slug'];
|
||||||
$department->save();
|
$department->save();
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->info(
|
|
||||||
'CREATE кафедра {department} - user {user}',
|
|
||||||
['user' => Auth::user()->name, 'department' => $department->name, 'data' => $validated]
|
|
||||||
);
|
|
||||||
|
|
||||||
return redirect()->route('departments.index');
|
return redirect()->route('departments.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,25 +57,12 @@ class DepartmentController extends Controller
|
||||||
public function update(UpdateDepartmentRequest $request, Department $department): RedirectResponse
|
public function update(UpdateDepartmentRequest $request, Department $department): RedirectResponse
|
||||||
{
|
{
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
$oldData = $department->toArray();
|
|
||||||
|
|
||||||
$department->name = $validated['name'];
|
$department->name = $validated['name'];
|
||||||
$department->description = $validated['description'];
|
$department->description = $validated['description'];
|
||||||
$department->position = $validated['position'];
|
$department->position = $validated['position'];
|
||||||
$department->faculty_id = $validated['faculty_id'];
|
$department->faculty_id = $validated['faculty_id'];
|
||||||
$department->slug = $validated['slug'];
|
$department->slug = $validated['slug'];
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->warning(
|
|
||||||
'UPDATE кафедра {department} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'department' => $department->name,
|
|
||||||
'oldData' => $oldData,
|
|
||||||
'newData' => $validated
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$department->save();
|
$department->save();
|
||||||
|
|
||||||
return redirect()->route('departments.index');
|
return redirect()->route('departments.index');
|
||||||
|
@ -95,26 +71,8 @@ class DepartmentController extends Controller
|
||||||
public function destroy(Department $department): RedirectResponse
|
public function destroy(Department $department): RedirectResponse
|
||||||
{
|
{
|
||||||
if ($department->directions()->exists()) {
|
if ($department->directions()->exists()) {
|
||||||
Log::channel('app')
|
|
||||||
->error(
|
|
||||||
'NOT DELETE кафедра {department} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'department' => $department->name,
|
|
||||||
'data' => $department->toArray(),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
Log::channel('app')
|
|
||||||
->critical(
|
|
||||||
'DELETE кафедра {department} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'department' => $department->name,
|
|
||||||
'data' => $department->toArray(),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$department->delete();
|
$department->delete();
|
||||||
return redirect()->route('departments.index');
|
return redirect()->route('departments.index');
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,15 +53,10 @@ class EntranceExaminationController extends Controller
|
||||||
$entranceExamination->subject_type_id = $validated['subject_type_id'];
|
$entranceExamination->subject_type_id = $validated['subject_type_id'];
|
||||||
$entranceExamination->save();
|
$entranceExamination->save();
|
||||||
|
|
||||||
|
|
||||||
Log::channel('app')
|
Log::channel('app')
|
||||||
->info(
|
->info(
|
||||||
'CREATE вступ. испытания {entranceExamination} - user {user}',
|
'CREATE вступ. испытания {entranceExamination} - user {user}',
|
||||||
[
|
['user' => Auth::user()->name, 'entranceExamination' => $entranceExamination->name, 'data' => $validated]
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'entranceExamination' => $entranceExamination->name,
|
|
||||||
'data' => $validated
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return redirect()->route('entrance_examinations.index');
|
return redirect()->route('entrance_examinations.index');
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
namespace App\Http\Controllers\admin\Catalog;
|
namespace App\Http\Controllers\admin\Catalog;
|
||||||
|
|
||||||
use App\Enums\ExaminationTypeEnum;
|
use App\Enums\ExaminationTypeEnum;
|
||||||
use App\Helpers\SlugHelper;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\admin\Catalog\StoreDirectionRequest;
|
use App\Http\Requests\admin\Catalog\StoreDirectionRequest;
|
||||||
use App\Http\Requests\admin\Catalog\UpdateDirectionRequest;
|
use App\Http\Requests\admin\Catalog\UpdateDirectionRequest;
|
||||||
|
@ -21,14 +20,12 @@ use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
class DirectionController extends Controller
|
class DirectionController extends Controller
|
||||||
{
|
{
|
||||||
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
|
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
|
||||||
{
|
{
|
||||||
$directions = Direction::all()->sortBy('created_at', SORT_REGULAR, true);
|
$directions = Direction::all();
|
||||||
return view('admin.catalog.direction.index', compact('directions'));
|
return view('admin.catalog.direction.index', compact('directions'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,14 +56,12 @@ class DirectionController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
$slug = SlugHelper::get($validated);
|
|
||||||
|
|
||||||
$direction = new Direction();
|
$direction = new Direction();
|
||||||
$direction->name = $validated['name'];
|
$direction->name = $validated['name'];
|
||||||
$direction->full_name = "{$validated['code']} {$validated['name']}";
|
$direction->full_name = "{$validated['code']} {$validated['name']}";
|
||||||
$direction->description = $validated['description'];
|
$direction->description = $validated['description'];
|
||||||
$direction->position = $validated['position'];
|
$direction->position = $validated['position'];
|
||||||
$direction->slug = $slug;
|
$direction->slug = $validated['slug'];
|
||||||
$direction->code = $validated['code'];
|
$direction->code = $validated['code'];
|
||||||
$direction->education_level_id = $validated['education_level_id'];
|
$direction->education_level_id = $validated['education_level_id'];
|
||||||
$direction->education_form_id = $validated['education_form_id'];
|
$direction->education_form_id = $validated['education_form_id'];
|
||||||
|
@ -97,15 +92,6 @@ class DirectionController extends Controller
|
||||||
$direction->directionProfiles()->attach($validated['direction_profiles']);
|
$direction->directionProfiles()->attach($validated['direction_profiles']);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->info(
|
|
||||||
'CREATE напр. подготовки {direction} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'direction' => $direction->name,
|
|
||||||
'data' => $validated
|
|
||||||
]
|
|
||||||
);
|
|
||||||
return redirect()->route('directions.index');
|
return redirect()->route('directions.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,9 +158,7 @@ class DirectionController extends Controller
|
||||||
|
|
||||||
public function update(UpdateDirectionRequest $request, Direction $direction): RedirectResponse
|
public function update(UpdateDirectionRequest $request, Direction $direction): RedirectResponse
|
||||||
{
|
{
|
||||||
$oldData = $direction->toArray();
|
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
|
|
||||||
$direction->name = $validated['name'];
|
$direction->name = $validated['name'];
|
||||||
$direction->full_name = "{$validated['code']} {$validated['name']}";
|
$direction->full_name = "{$validated['code']} {$validated['name']}";
|
||||||
$direction->description = $validated['description'];
|
$direction->description = $validated['description'];
|
||||||
|
@ -189,18 +173,6 @@ class DirectionController extends Controller
|
||||||
$direction->paid_places = $validated['paid_places'];
|
$direction->paid_places = $validated['paid_places'];
|
||||||
$direction->cost_paid_place = $validated['cost_paid_place'];
|
$direction->cost_paid_place = $validated['cost_paid_place'];
|
||||||
$direction->period = $validated['period'];
|
$direction->period = $validated['period'];
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->warning(
|
|
||||||
'UPDATE напр. подготовки {direction} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'direction' => $direction->name,
|
|
||||||
'oldData' => $oldData,
|
|
||||||
'newData' => $validated
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$direction->save();
|
$direction->save();
|
||||||
|
|
||||||
if (array_key_exists('entrance-examination', $validated)) {
|
if (array_key_exists('entrance-examination', $validated)) {
|
||||||
|
@ -216,7 +188,7 @@ class DirectionController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dd($validated);
|
||||||
if (array_key_exists('delete', $validated)) {
|
if (array_key_exists('delete', $validated)) {
|
||||||
foreach ($validated['delete'] as $id => $value) {
|
foreach ($validated['delete'] as $id => $value) {
|
||||||
$entranceExamination = EntranceExamination::firstOrNew(['id' => $id]);
|
$entranceExamination = EntranceExamination::firstOrNew(['id' => $id]);
|
||||||
|
@ -235,27 +207,8 @@ class DirectionController extends Controller
|
||||||
public function destroy(Direction $direction): RedirectResponse
|
public function destroy(Direction $direction): RedirectResponse
|
||||||
{
|
{
|
||||||
if ($direction->entranceExaminations()->exists()) {
|
if ($direction->entranceExaminations()->exists()) {
|
||||||
Log::channel('app')
|
|
||||||
->error(
|
|
||||||
'NOT DELETE напр. подготовки {direction} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'direction' => $direction->name,
|
|
||||||
'data' => $direction->toArray(),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->critical(
|
|
||||||
'DELETE напр. подготовки {direction} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'direction' => $direction->name,
|
|
||||||
'data' => $direction->toArray(),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$direction->directionProfiles()->detach();
|
$direction->directionProfiles()->detach();
|
||||||
$direction->delete();
|
$direction->delete();
|
||||||
return redirect()->route('directions.index');
|
return redirect()->route('directions.index');
|
||||||
|
@ -295,16 +248,6 @@ class DirectionController extends Controller
|
||||||
|
|
||||||
$newDirection->directionProfiles()->attach($direction->directionProfiles);
|
$newDirection->directionProfiles()->attach($direction->directionProfiles);
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->info(
|
|
||||||
'DUPLICATE напр. подготовки {direction} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'direction' => $direction->name,
|
|
||||||
'data' => $direction->toArray(),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
return redirect()->route('directions.index');
|
return redirect()->route('directions.index');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers\admin\Catalog;
|
namespace App\Http\Controllers\admin\Catalog;
|
||||||
|
|
||||||
use App\Helpers\SlugHelper;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\admin\Catalog\StoreEducationalInstitutionRequest;
|
use App\Http\Requests\admin\Catalog\StoreEducationalInstitutionRequest;
|
||||||
use App\Http\Requests\admin\Catalog\UpdateEducationalInstitutionRequest;
|
use App\Http\Requests\admin\Catalog\UpdateEducationalInstitutionRequest;
|
||||||
|
@ -10,8 +9,6 @@ use App\Models\EducationalInstitution;
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
class EducationalInstitutionController extends Controller
|
class EducationalInstitutionController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -30,25 +27,13 @@ class EducationalInstitutionController extends Controller
|
||||||
{
|
{
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
|
|
||||||
$slug = SlugHelper::get($validated);
|
|
||||||
|
|
||||||
$educationalInstitution = new EducationalInstitution();
|
$educationalInstitution = new EducationalInstitution();
|
||||||
$educationalInstitution->name = $validated['name'];
|
$educationalInstitution->name = $validated['name'];
|
||||||
$educationalInstitution->description = $validated['description'];
|
$educationalInstitution->description = $validated['description'];
|
||||||
$educationalInstitution->slug = $slug;
|
$educationalInstitution->slug = $validated['slug'];
|
||||||
$educationalInstitution->position = $validated['position'];
|
$educationalInstitution->position = $validated['position'];
|
||||||
$educationalInstitution->save();
|
$educationalInstitution->save();
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->info(
|
|
||||||
'CREATE учеб. заведение {educationalInstitution} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'educationalInstitution' => $educationalInstitution->name,
|
|
||||||
'data' => $validated
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
return redirect()->route('educational_institutions.index');
|
return redirect()->route('educational_institutions.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,24 +50,11 @@ class EducationalInstitutionController extends Controller
|
||||||
public function update(UpdateEducationalInstitutionRequest $request, EducationalInstitution $educationalInstitution)
|
public function update(UpdateEducationalInstitutionRequest $request, EducationalInstitution $educationalInstitution)
|
||||||
{
|
{
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
$oldData = $educationalInstitution->toArray();
|
|
||||||
|
|
||||||
$educationalInstitution->name = $validated['name'];
|
$educationalInstitution->name = $validated['name'];
|
||||||
$educationalInstitution->description = $validated['description'];
|
$educationalInstitution->description = $validated['description'];
|
||||||
$educationalInstitution->position = $validated['position'];
|
$educationalInstitution->position = $validated['position'];
|
||||||
$educationalInstitution->slug = $validated['slug'];
|
$educationalInstitution->slug = $validated['slug'];
|
||||||
|
|
||||||
Log::channel('app')
|
|
||||||
->warning(
|
|
||||||
'UPDATE учеб. заведение {educationalInstitution} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'faculty' => $educationalInstitution->name,
|
|
||||||
'oldData' => $oldData,
|
|
||||||
'newData' => $validated
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$educationalInstitution->save();
|
$educationalInstitution->save();
|
||||||
|
|
||||||
return redirect()->route('educational_institutions.index');
|
return redirect()->route('educational_institutions.index');
|
||||||
|
@ -91,26 +63,8 @@ class EducationalInstitutionController extends Controller
|
||||||
public function destroy(EducationalInstitution $educationalInstitution)
|
public function destroy(EducationalInstitution $educationalInstitution)
|
||||||
{
|
{
|
||||||
if ($educationalInstitution->faculties()->exists()) {
|
if ($educationalInstitution->faculties()->exists()) {
|
||||||
Log::channel('app')
|
|
||||||
->error(
|
|
||||||
'NOT DELETE учеб. заведение {educationalInstitution} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'educationalInstitution' => $educationalInstitution->name,
|
|
||||||
'data' => $educationalInstitution->toArray(),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
Log::channel('app')
|
|
||||||
->critical(
|
|
||||||
'DELETE учеб. заведение {educationalInstitution} - user {user}',
|
|
||||||
[
|
|
||||||
'user' => Auth::user()->name,
|
|
||||||
'educationalInstitution' => $educationalInstitution->name,
|
|
||||||
'data' => $educationalInstitution->toArray(),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$educationalInstitution->delete();
|
$educationalInstitution->delete();
|
||||||
|
|
||||||
return redirect()->route('educational_institutions.index');
|
return redirect()->route('educational_institutions.index');
|
||||||
|
|
|
@ -2,15 +2,16 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers\admin;
|
namespace App\Http\Controllers\admin;
|
||||||
|
|
||||||
use App\Enums\ExaminationTypeEnum;
|
use App\Enums\FacultyEnum;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Admission;
|
use App\Models\Admission;
|
||||||
use App\Models\EntranceExamination;
|
use App\Models\Direction;
|
||||||
use App\Models\Faculty;
|
use App\Models\Faculty;
|
||||||
use App\Models\Subject;
|
use App\Models\Subject;
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class PageController extends Controller
|
class PageController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -29,20 +30,7 @@ class PageController extends Controller
|
||||||
// ->groupBy('faculties.name')
|
// ->groupBy('faculties.name')
|
||||||
// ->get();
|
// ->get();
|
||||||
$faculties = Faculty::all();
|
$faculties = Faculty::all();
|
||||||
$subjects = EntranceExamination::all()
|
$subjects = Subject::pluck('name', 'id');
|
||||||
->select('subject_id', 'subject_type_id', 'examination_type_id')
|
|
||||||
->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value)
|
|
||||||
->groupBy('subject_type_id')->map(function ($examinate) {
|
|
||||||
return $examinate->reduce(function (?array $carry, $subject) {
|
|
||||||
$id = $subject['subject_id'];
|
|
||||||
$value = Subject::find($id)->name;
|
|
||||||
$carry[$id] = $value;
|
|
||||||
return $carry;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
->toArray();
|
|
||||||
|
|
||||||
// $subjects = EntranceExamination::pluck('name', 'id');
|
|
||||||
// $infBez = $faculties->find(FacultyEnum::InfBez->value);
|
// $infBez = $faculties->find(FacultyEnum::InfBez->value);
|
||||||
// $query = `select faculties.name, directions.name, directions.id
|
// $query = `select faculties.name, directions.name, directions.id
|
||||||
//FROM faculties
|
//FROM faculties
|
||||||
|
|
|
@ -17,30 +17,9 @@ class StoreDepartmentRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:departments,name',
|
'name' => 'required|string|max:255|unique:departments,name',
|
||||||
'description' => 'nullable|string',
|
'description' => 'string',
|
||||||
'slug' => 'nullable|string|max:255|unique:departments,slug',
|
'slug' => 'required|string|max:255|unique:departments,slug',
|
||||||
'faculty_id' => 'required|numeric|int|max:1000',
|
'faculty_id' => 'required|numeric|int|max:1000',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'position.required' => 'Поле позиция обязательно.',
|
|
||||||
'position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'name.required' => 'Поле название обязательно.',
|
|
||||||
'name.string' => 'Поле название должен быть строкой.',
|
|
||||||
'name.max' => 'Поле название не должен превышать :max символов.',
|
|
||||||
'name.unique' => 'Название уже занят.',
|
|
||||||
'description.string' => 'Поле описание должен быть строкой.',
|
|
||||||
'slug.string' => 'Поле URL должен быть строкой.',
|
|
||||||
'slug.max' => 'Поле URL не должен превышать :max символов.',
|
|
||||||
'faculty_id.required' => 'Поле учебное заведение обязательно.',
|
|
||||||
'faculty_id.int' => 'Учебное заведение должно быть целым числом.',
|
|
||||||
'faculty_id.numeric' => 'Учебное заведение должно быть числом.',
|
|
||||||
'faculty_id.max' => 'Поле учебное заведение не должен быть больше :max.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@ class StoreDirectionRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255',
|
'name' => 'required|string|max:255',
|
||||||
'description' => 'nullable|string',
|
'description' => 'string',
|
||||||
'slug' => 'nullable|string|max:255|unique:directions,slug',
|
'slug' => 'required|string|max:255|unique:directions,slug',
|
||||||
'code' => 'required|string|max:255',
|
'code' => 'required|string|max:255',
|
||||||
'education_level_id' => 'required|int|numeric|max:1000',
|
'education_level_id' => 'required|int|numeric|max:1000',
|
||||||
'education_form_id' => 'required|int|numeric|max:1000',
|
'education_form_id' => 'required|int|numeric|max:1000',
|
||||||
|
@ -30,92 +30,9 @@ class StoreDirectionRequest extends FormRequest
|
||||||
'budget_places' => 'required|int|numeric|max:255',
|
'budget_places' => 'required|int|numeric|max:255',
|
||||||
'paid_places' => 'required|int|numeric|max:255',
|
'paid_places' => 'required|int|numeric|max:255',
|
||||||
'quota' => 'required|int|numeric|max:255',
|
'quota' => 'required|int|numeric|max:255',
|
||||||
'cost_paid_place' => 'required|int|numeric|max:200000',
|
'cost_paid_place' => 'required|int|numeric|max:255',
|
||||||
'period' => 'required|numeric|max:255',
|
'period' => 'required|numeric|max:255',
|
||||||
'direction_profiles' => 'nullable|array'
|
'direction_profiles' => 'nullable|array'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'position.required' => 'Поле позиция обязательно.',
|
|
||||||
'position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'name.required' => 'Поле название обязательно.',
|
|
||||||
'name.string' => 'Поле название должен быть строкой.',
|
|
||||||
'name.max' => 'Поле название не должен превышать :max символов.',
|
|
||||||
'name.unique' => 'Название уже занят.',
|
|
||||||
'description.string' => 'Поле описание должен быть строкой.',
|
|
||||||
'slug.string' => 'Поле URL должен быть строкой.',
|
|
||||||
'slug.max' => 'Поле URL не должен превышать :max символов.',
|
|
||||||
'code.required' => 'Поле Код обязательно.',
|
|
||||||
'code.string' => 'Поле Код должен быть строкой.',
|
|
||||||
'code.max' => 'Код не должен быть длиннее :max',
|
|
||||||
'education_level_id.required' => 'Поле "уровень образования" обязательно.',
|
|
||||||
'education_level_id.int' => 'Поле "уровень образования" должно быть целым числом.',
|
|
||||||
'education_level_id.numeric' => 'Поле "уровень образования" должно быть числом.',
|
|
||||||
'education_level_id.max' => 'Поле "уровень образования" не должен быть больше :max',
|
|
||||||
'education_form_id.required' => 'Поле "форма образования" обязательно.',
|
|
||||||
'education_form_id.int' => 'Поле "форма образования" должно быть целым числом.',
|
|
||||||
'education_form_id.numeric' => 'Поле "форма образования" должно быть числом.',
|
|
||||||
'education_form_id.max' => 'Поле "форма образования" не должен быть больше :max',
|
|
||||||
'department_id.required' => 'Поле "Кафедра" обязательно.',
|
|
||||||
'department_id.int' => 'Поле "Кафедра" должно быть целым числом.',
|
|
||||||
'department_id.numeric' => 'Поле "Кафедра" должно быть числом.',
|
|
||||||
'department_id.max' => 'Поле "Кафедра" не должен быть больше :max',
|
|
||||||
|
|
||||||
'entrance-examination.*.position.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.direction_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.direction_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.direction_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.direction_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.examination_type_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.examination_type_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.examination_type_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.examination_type_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.subject_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.subject_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.subject_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.subject_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.subject_type_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.subject_type_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.subject_type_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.subject_type_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.scores.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.scores.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.scores.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.scores.max' => 'Позиция не должен быть больше :max',
|
|
||||||
|
|
||||||
'budget_places.required' => 'Поле Кол-во бюджетных мест обязательно.',
|
|
||||||
'budget_places.int' => 'Кол-во бюджетных мест должно быть целым числом.',
|
|
||||||
'budget_places.numeric' => 'Кол-во бюджетных мест должно быть числом.',
|
|
||||||
'budget_places.max' => 'Кол-во бюджетных мест не должен быть больше :max',
|
|
||||||
|
|
||||||
'paid_places.required' => 'Поле Кол-во мест по договорам обязательно.',
|
|
||||||
'paid_places.int' => 'Кол-во мест по договорам должно быть целым числом.',
|
|
||||||
'paid_places.numeric' => 'Кол-во мест по договорам должно быть числом.',
|
|
||||||
'paid_places.max' => 'Кол-во мест по договорам не должен быть больше :max',
|
|
||||||
|
|
||||||
'quota.required' => 'Поле Квота обязательно.',
|
|
||||||
'quota.int' => 'Квота должно быть целым числом.',
|
|
||||||
'quota.numeric' => 'Квота должно быть числом.',
|
|
||||||
'quota.max' => 'Квота не должен быть больше :max',
|
|
||||||
|
|
||||||
'cost_paid_place.required' => 'Поле Стоимость обучения обязательно.',
|
|
||||||
'cost_paid_place.int' => 'Стоимость обучения должно быть целым числом.',
|
|
||||||
'cost_paid_place.numeric' => 'Стоимость обучения должно быть числом.',
|
|
||||||
'cost_paid_place.max' => 'Стоимость обучения не должен быть больше :max',
|
|
||||||
|
|
||||||
'period.required' => 'Поле Период обучения обязательно.',
|
|
||||||
'period.int' => 'Период обучения должно быть целым числом.',
|
|
||||||
'period.numeric' => 'Период обучения должно быть числом.',
|
|
||||||
'period.max' => 'Период обучения не должен быть больше :max',
|
|
||||||
|
|
||||||
'direction_profiles.array' => 'Поле Профиль подготовки должно быть массивом.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,24 +16,8 @@ class StoreEducationalInstitutionRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
||||||
'description' => 'nullable|string',
|
'description' => 'string',
|
||||||
'slug' => 'nullable|string|max:255|unique:educational_institutions,slug',
|
'slug' => 'required|string|max:255|unique:educational_institutions,slug',
|
||||||
];
|
|
||||||
}
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'position.required' => 'Поле позиция обязательно.',
|
|
||||||
'position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'name.required' => 'Поле название обязательно.',
|
|
||||||
'name.string' => 'Поле название должен быть строкой.',
|
|
||||||
'name.max' => 'Поле название не должен превышать :max символов.',
|
|
||||||
'name.unique' => 'Название уже занят.',
|
|
||||||
'description.string' => 'Поле описание должен быть строкой.',
|
|
||||||
'slug.string' => 'Поле URL должен быть строкой.',
|
|
||||||
'slug.max' => 'Поле URL не должен превышать :max символов.',
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class UpdateDepartmentRequest extends FormRequest
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'description' => 'nullable|string',
|
'description' => 'string',
|
||||||
'slug' => [
|
'slug' => [
|
||||||
'string',
|
'string',
|
||||||
'required',
|
'required',
|
||||||
|
@ -30,25 +30,4 @@ class UpdateDepartmentRequest extends FormRequest
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'position.required' => 'Поле позиция обязательно.',
|
|
||||||
'position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'name.required' => 'Поле название обязательно.',
|
|
||||||
'name.string' => 'Поле название должен быть строкой.',
|
|
||||||
'name.max' => 'Поле название не должен превышать :max символов.',
|
|
||||||
'name.unique' => 'Название уже занят.',
|
|
||||||
'description.string' => 'Поле описание должен быть строкой.',
|
|
||||||
'slug.string' => 'Поле URL должен быть строкой.',
|
|
||||||
'slug.max' => 'Поле URL не должен превышать :max символов.',
|
|
||||||
'faculty_id.required' => 'Поле учебное заведение обязательно.',
|
|
||||||
'faculty_id.int' => 'Учебное заведение должно быть целым числом.',
|
|
||||||
'faculty_id.numeric' => 'Учебное заведение должно быть числом.',
|
|
||||||
'faculty_id.max' => 'Поле учебное заведение не должен быть больше :max.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class UpdateDirectionRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255',
|
'name' => 'required|string|max:255',
|
||||||
'description' => 'nullable|string',
|
'description' => 'string',
|
||||||
'slug' => "required|string|max:255|unique:directions,slug,{$this->direction->id}",
|
'slug' => "required|string|max:255|unique:directions,slug,{$this->direction->id}",
|
||||||
'code' => "required|string|max:255",
|
'code' => "required|string|max:255",
|
||||||
'education_level_id' => 'required|int|numeric|max:1000',
|
'education_level_id' => 'required|int|numeric|max:1000',
|
||||||
|
@ -30,94 +30,10 @@ class UpdateDirectionRequest extends FormRequest
|
||||||
'budget_places' => 'required|int|numeric|max:255',
|
'budget_places' => 'required|int|numeric|max:255',
|
||||||
'paid_places' => 'required|int|numeric|max:255',
|
'paid_places' => 'required|int|numeric|max:255',
|
||||||
'quota' => 'required|int|numeric|max:255',
|
'quota' => 'required|int|numeric|max:255',
|
||||||
'cost_paid_place' => 'required|int|numeric|max:200000',
|
'cost_paid_place' => 'required|int|numeric|max:255',
|
||||||
'period' => 'required|numeric|max:255',
|
'period' => 'required|numeric|max:255',
|
||||||
'direction_profiles' => 'nullable|array',
|
'direction_profiles' => 'nullable|array',
|
||||||
'delete.*' => 'nullable|array'
|
'delete.*' => 'nullable|array'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'position.required' => 'Поле позиция обязательно.',
|
|
||||||
'position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'name.required' => 'Поле название обязательно.',
|
|
||||||
'name.string' => 'Поле название должен быть строкой.',
|
|
||||||
'name.max' => 'Поле название не должен превышать :max символов.',
|
|
||||||
'name.unique' => 'Название уже занят.',
|
|
||||||
'description.string' => 'Поле описание должен быть строкой.',
|
|
||||||
'slug.string' => 'Поле URL должен быть строкой.',
|
|
||||||
'slug.max' => 'Поле URL не должен превышать :max символов.',
|
|
||||||
'code.required' => 'Поле Код обязательно.',
|
|
||||||
'code.string' => 'Поле Код должен быть строкой.',
|
|
||||||
'code.max' => 'Код не должен быть длиннее :max',
|
|
||||||
'education_level_id.required' => 'Поле "уровень образования" обязательно.',
|
|
||||||
'education_level_id.int' => 'Поле "уровень образования" должно быть целым числом.',
|
|
||||||
'education_level_id.numeric' => 'Поле "уровень образования" должно быть числом.',
|
|
||||||
'education_level_id.max' => 'Поле "уровень образования" не должен быть больше :max',
|
|
||||||
'education_form_id.required' => 'Поле "форма образования" обязательно.',
|
|
||||||
'education_form_id.int' => 'Поле "форма образования" должно быть целым числом.',
|
|
||||||
'education_form_id.numeric' => 'Поле "форма образования" должно быть числом.',
|
|
||||||
'education_form_id.max' => 'Поле "форма образования" не должен быть больше :max',
|
|
||||||
'department_id.required' => 'Поле "Кафедра" обязательно.',
|
|
||||||
'department_id.int' => 'Поле "Кафедра" должно быть целым числом.',
|
|
||||||
'department_id.numeric' => 'Поле "Кафедра" должно быть числом.',
|
|
||||||
'department_id.max' => 'Поле "Кафедра" не должен быть больше :max',
|
|
||||||
|
|
||||||
'entrance-examination.*.position.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.direction_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.direction_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.direction_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.direction_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.examination_type_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.examination_type_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.examination_type_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.examination_type_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.subject_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.subject_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.subject_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.subject_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.subject_type_id.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.subject_type_id.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.subject_type_id.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.subject_type_id.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'entrance-examination.*.scores.required' => 'Поле позиция обязательно.',
|
|
||||||
'entrance-examination.*.scores.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'entrance-examination.*.scores.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'entrance-examination.*.scores.max' => 'Позиция не должен быть больше :max',
|
|
||||||
|
|
||||||
'budget_places.required' => 'Поле Кол-во бюджетных мест обязательно.',
|
|
||||||
'budget_places.int' => 'Кол-во бюджетных мест должно быть целым числом.',
|
|
||||||
'budget_places.numeric' => 'Кол-во бюджетных мест должно быть числом.',
|
|
||||||
'budget_places.max' => 'Кол-во бюджетных мест не должен быть больше :max',
|
|
||||||
|
|
||||||
'paid_places.required' => 'Поле Кол-во мест по договорам обязательно.',
|
|
||||||
'paid_places.int' => 'Кол-во мест по договорам должно быть целым числом.',
|
|
||||||
'paid_places.numeric' => 'Кол-во мест по договорам должно быть числом.',
|
|
||||||
'paid_places.max' => 'Кол-во мест по договорам не должен быть больше :max',
|
|
||||||
|
|
||||||
'quota.required' => 'Поле Квота обязательно.',
|
|
||||||
'quota.int' => 'Квота должно быть целым числом.',
|
|
||||||
'quota.numeric' => 'Квота должно быть числом.',
|
|
||||||
'quota.max' => 'Квота не должен быть больше :max',
|
|
||||||
|
|
||||||
'cost_paid_place.required' => 'Поле Стоимость обучения обязательно.',
|
|
||||||
'cost_paid_place.int' => 'Стоимость обучения должно быть целым числом.',
|
|
||||||
'cost_paid_place.numeric' => 'Стоимость обучения должно быть числом.',
|
|
||||||
'cost_paid_place.max' => 'Стоимость обучения не должен быть больше :max',
|
|
||||||
|
|
||||||
'period.required' => 'Поле Период обучения обязательно.',
|
|
||||||
'period.int' => 'Период обучения должно быть целым числом.',
|
|
||||||
'period.numeric' => 'Период обучения должно быть числом.',
|
|
||||||
'period.max' => 'Период обучения не должен быть больше :max',
|
|
||||||
|
|
||||||
'direction_profiles.array' => 'Поле Профиль подготовки должно быть массивом.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class UpdateEducationalInstitutionRequest extends FormRequest
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'description' => 'nullable|string',
|
'description' => 'string',
|
||||||
'slug' => [
|
'slug' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
|
@ -31,21 +31,4 @@ class UpdateEducationalInstitutionRequest extends FormRequest
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'position.required' => 'Поле позиция обязательно.',
|
|
||||||
'position.int' => 'Позиция должно быть целым числом.',
|
|
||||||
'position.numeric' => 'Позиция должно быть числом.',
|
|
||||||
'position.max' => 'Позиция не должен быть больше :max',
|
|
||||||
'name.required' => 'Поле название обязательно.',
|
|
||||||
'name.string' => 'Поле название должен быть строкой.',
|
|
||||||
'name.max' => 'Поле название не должен превышать :max символов.',
|
|
||||||
'name.unique' => 'Название уже занят.',
|
|
||||||
'description.string' => 'Поле описание должен быть строкой.',
|
|
||||||
'slug.string' => 'Поле URL должен быть строкой.',
|
|
||||||
'slug.max' => 'Поле URL не должен превышать :max символов.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ return new class extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('directions', function (Blueprint $table) {
|
Schema::create('directions', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name', 255);
|
$table->string('name', 255)->unique();
|
||||||
$table->string('full_name', 255);
|
$table->string('full_name', 255);
|
||||||
$table->text('description')->nullable();
|
$table->text('description')->nullable();
|
||||||
$table->string('code', 255);
|
$table->string('code', 255);
|
||||||
|
@ -22,7 +22,7 @@ return new class extends Migration
|
||||||
$table->smallInteger('budget_places');
|
$table->smallInteger('budget_places');
|
||||||
$table->smallInteger('quota');
|
$table->smallInteger('quota');
|
||||||
$table->smallInteger('paid_places');
|
$table->smallInteger('paid_places');
|
||||||
$table->integer('cost_paid_place');
|
$table->smallInteger('cost_paid_place');
|
||||||
$table->float('period');
|
$table->float('period');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,7 @@ return [
|
||||||
'paid_places' => 'Поле "Платные места" указывает на количество платных мест в направлении',
|
'paid_places' => 'Поле "Платные места" указывает на количество платных мест в направлении',
|
||||||
'cost_paid_place' => 'Поле "Стоимость обучения" указывает на стоимость платных мест в направлении',
|
'cost_paid_place' => 'Поле "Стоимость обучения" указывает на стоимость платных мест в направлении',
|
||||||
'slug' => 'Поле "Учебное заведение" указывает на привязку к учебному заведению',
|
'slug' => 'Поле "Учебное заведение" указывает на привязку к учебному заведению',
|
||||||
'code' => 'Поле "Код" для идентификации направления',
|
'code' => 'Поле "URL" нужно для отображения в браузере',
|
||||||
'quota' => 'Поле "Квота" указывает на количество мест по квоте',
|
'quota' => 'Поле "Квота" указывает на количество мест по квоте',
|
||||||
'period' => 'Поле "Период обучения" указывает на период обучения',
|
'period' => 'Поле "Период обучения" указывает на период обучения',
|
||||||
'direction_profile' => 'Поле "Профиль подготовки" указывает на привязку направления к профилям подготовки',
|
'direction_profile' => 'Поле "Профиль подготовки" указывает на привязку направления к профилям подготовки',
|
||||||
|
@ -75,11 +75,4 @@ return [
|
||||||
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
|
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
|
||||||
'slug' => 'Поле "URL" нужно для отображения в браузере'
|
'slug' => 'Поле "URL" нужно для отображения в браузере'
|
||||||
],
|
],
|
||||||
'departments' => [
|
|
||||||
'position' => 'Поле "Позиция" нужно для упорядочивания отображения на сайте',
|
|
||||||
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
|
|
||||||
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
|
|
||||||
'faculty_id' => 'Поле "Факультет" указывает на привязку к факультету',
|
|
||||||
'slug' => 'Поле "URL" нужно для отображения в браузере'
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
@php use App\Helpers\PositionHelper; @endphp
|
|
||||||
@extends('layouts.admin_layout')
|
@extends('layouts.admin_layout')
|
||||||
@section('content')
|
@section('content')
|
||||||
@auth()
|
@auth()
|
||||||
|
@ -7,71 +6,60 @@
|
||||||
<h1 class=""> Создать кафедру</h1>
|
<h1 class=""> Создать кафедру</h1>
|
||||||
{{ Form::open(['url' => route('departments.store'), 'method' => 'POST', 'class' => '']) }}
|
{{ Form::open(['url' => route('departments.store'), 'method' => 'POST', 'class' => '']) }}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position')]) }}
|
{{ Form::label('position', 'Позиция') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('position', PositionHelper::department(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position'), 'required']) }}
|
{{ Form::text('position', '', ['class' => 'form-control']) }}
|
||||||
<div class="invalid-feedback">
|
|
||||||
Поле "Позиция" обязательно!
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('position') }}
|
{{ $errors->first('position') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name')]) }}
|
{{ Form::label('name', 'Название') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name'), 'required']) }}
|
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
||||||
<div class="invalid-feedback">
|
|
||||||
Поле "Название" обязательно!
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('name') }}
|
{{ $errors->first('name') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
{{ Form::label('description', 'Описание') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
{{ Form::text('description', '', ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('description') }}
|
{{ $errors->first('description') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('faculty_id', 'Факультет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
{{ Form::label('faculty_id', 'Факультет') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('faculty_id', $faculties, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
{{ Form::select('faculty_id', $faculties, null, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('faculty_id') }}
|
{{ $errors->first('faculty_id') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
{{ Form::label('slug', 'URL') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
{{ Form::text('slug', '', ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('slug') }}
|
{{ $errors->first('slug') }}
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -7,68 +7,59 @@
|
||||||
{{ Form::open(['url' => route('departments.update', $department), 'method' => 'PATCH', 'class' => '']) }}
|
{{ Form::open(['url' => route('departments.update', $department), 'method' => 'PATCH', 'class' => '']) }}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position')]) }}
|
{{ Form::label('position', 'Позиция') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('position', $department->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position'), 'required']) }}
|
{{ Form::text('position', $department->position, ['class' => 'form-control']) }}
|
||||||
<div class="invalid-feedback">
|
|
||||||
Поле "Позиция" обязательно!
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('position') }}
|
{{ $errors->first('position') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name')]) }}
|
{{ Form::label('name', 'Название') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('name', $department->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name'), 'required']) }}
|
{{ Form::text('name', $department->name, ['class' => 'form-control']) }}
|
||||||
<div class="invalid-feedback">
|
|
||||||
Поле "Название" обязательно!
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('name') }}
|
{{ $errors->first('name') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
{{ Form::label('description', 'Описание') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('description', $department->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
{{ Form::text('description', $department->description, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('description') }}
|
{{ $errors->first('description') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('faculty_id', 'Факультет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
{{ Form::label('educational_institution_id', 'Факультет') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('faculty_id', $faculties, $department->faculty->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
{{ Form::select('faculty_id', $faculties, $department->faculty->id, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('faculty_id') }}
|
{{ $errors->first('educational_institution_id') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
{{ Form::label('slug', 'URL') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('slug', $department->slug, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
{{ Form::text('slug', $department->slug, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('slug') }}
|
{{ $errors->first('slug') }}
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
Поле "Кафедра" обязательно!
|
Поле "Кафедра" обязательно!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('department_id') }}
|
{{ $errors->first('department_id') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('education_level_id', $levels, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_level_id'), 'required']) }}
|
{{ Form::select('education_level_id', $levels, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_level_id'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('education_level_id') }}
|
{{ $errors->first('education_level_id') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('education_form_id', $forms, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_form_id'), 'required']) }}
|
{{ Form::select('education_form_id', $forms, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_form_id'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('education_form_id') }}
|
{{ $errors->first('education_form_id') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('position', PositionHelper::direction(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.position'), 'required']) }}
|
{{ Form::number('position', PositionHelper::direction(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.position'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('position') }}
|
{{ $errors->first('position') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('code', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.code'), 'required']) }}
|
{{ Form::text('code', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.code'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('code') }}
|
{{ $errors->first('code') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.slug')]) }}
|
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.slug')]) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('slug') }}
|
{{ $errors->first('slug') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name'), 'required']) }}
|
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('name') }}
|
{{ $errors->first('name') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name')]) }}
|
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name')]) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('description') }}
|
{{ $errors->first('description') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('budget_places', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.budget_places'), 'required']) }}
|
{{ Form::number('budget_places', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.budget_places'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('budget_places') }}
|
{{ $errors->first('budget_places') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('quota', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.quota'), 'required']) }}
|
{{ Form::number('quota', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.quota'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('quota') }}
|
{{ $errors->first('quota') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('paid_places', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.paid_places'), 'required']) }}
|
{{ Form::number('paid_places', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.paid_places'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('paid_places') }}
|
{{ $errors->first('paid_places') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('cost_paid_place', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.cost_paid_place'), 'required']) }}
|
{{ Form::number('cost_paid_place', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.cost_paid_place'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('cost_paid_place') }}
|
{{ $errors->first('cost_paid_place') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('period', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.period'), 'required']) }}
|
{{ Form::text('period', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.period'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('period') }}
|
{{ $errors->first('period') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('direction_profiles[]', $directionProfiles, null, ['class' => 'form-control rounded border-gray-300 w-1/3 h-32', 'multiple' => 'multiple', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.direction_profile'), 'required']) }}
|
{{ Form::select('direction_profiles[]', $directionProfiles, null, ['class' => 'form-control rounded border-gray-300 w-1/3 h-32', 'multiple' => 'multiple', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.direction_profile'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('direction_profile') }}
|
{{ $errors->first('direction_profile') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('entrance-examination[0][examination_type_id]', $examination_types, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id'), 'required']) }}
|
{{ Form::select('entrance-examination[0][examination_type_id]', $examination_types, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('entrance-examination[0][examination_type_id]') }}
|
{{ $errors->first('entrance-examination[0][examination_type_id]') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::select('entrance-examination[0][subject_id]', $subjects, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
|
{{ Form::select('entrance-examination[0][subject_id]', $subjects, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('entrance-examination[0][subject_id]') }}
|
{{ $errors->first('entrance-examination[0][subject_id]') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::select('entrance-examination[0][subject_type_id]', $subjectTypes, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id'), 'required']) }}
|
{{ Form::select('entrance-examination[0][subject_type_id]', $subjectTypes, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('entrance-examination[0][subject_type_id]') }}
|
{{ $errors->first('entrance-examination[0][subject_type_id]') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::number('entrance-examination[0][scores]', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores'), 'required']) }}
|
{{ Form::number('entrance-examination[0][scores]', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('entrance-examination[0][scores]') }}
|
{{ $errors->first('entrance-examination[0][scores]') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -281,7 +281,7 @@
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::number('entrance-examination[0][position]', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position'), 'required']) }}
|
{{ Form::number('entrance-examination[0][position]', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position'), 'required']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('entrance-examination[0][position]') }}
|
{{ $errors->first('entrance-examination[0][position]') }}
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
@extends('layouts.admin_layout')
|
@extends('layouts.admin_layout')
|
||||||
@section('content')
|
@section('content')
|
||||||
@auth()
|
@auth()
|
||||||
<h1 class=""> Изменить Направление</h1>
|
<h1 class=""> Создать Направление</h1>
|
||||||
{{ Form::open(['url' => route('directions.update', $direction), 'method' => 'PATCH', 'class' => 'ffff needs-validation', 'novalidate']) }}
|
{{ Form::open(['url' => route('directions.update', $direction), 'method' => 'PATCH', 'class' => 'ffff']) }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('department_id', 'Кафедра', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.department_id')]) }}
|
{{ Form::label('department_id', 'Кафедра') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('department_id', $departments, $direction->department->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.department_id'), 'required']) }}
|
{{ Form::select('department_id', $departments, $direction->department->id, ['class' => 'form-select']) }}
|
||||||
<div class="invalid-feedback">
|
|
||||||
Поле "Кафедра" обязательно!
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('department_id') }}
|
{{ $errors->first('department_id') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -23,13 +19,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('education_level_id', 'Увовень образования', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_level_id')]) }}
|
{{ Form::label('education_level_id', 'Увовень образования') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('education_level_id', $levels, $direction->educationLevel->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_level_id'), 'required']) }}
|
{{ Form::select('education_level_id', $levels, $direction->educationLevel->id, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('education_level_id') }}
|
{{ $errors->first('education_level_id') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -37,13 +32,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('education_form_id', 'Форма образования', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_form_id')]) }}
|
{{ Form::label('education_form_id', 'Форма образования') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('education_form_id', $forms, $direction->educationForm->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_form_id'), 'required']) }}
|
{{ Form::select('education_form_id', $forms, $direction->educationForm->id, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('education_form_id') }}
|
{{ $errors->first('education_form_id') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -53,13 +47,12 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.position')]) }}
|
{{ Form::label('position', 'Позиция') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('position', $direction->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.position'), 'required']) }}
|
{{ Form::number('position', $direction->position, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('position') }}
|
{{ $errors->first('position') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -67,12 +60,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('code', 'Код', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.code')]) }}
|
{{ Form::label('code', 'Код') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('code', $direction->code, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.code'), 'required']) }}
|
{{ Form::text('code', $direction->code, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('code') }}
|
{{ $errors->first('code') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -80,12 +73,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.slug')]) }}
|
{{ Form::label('slug', 'URL') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('slug', $direction->slug, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.slug')]) }}
|
{{ Form::text('slug', $direction->slug, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('slug') }}
|
{{ $errors->first('slug') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -93,25 +86,24 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name')]) }}
|
{{ Form::label('name', 'Название') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('name', $direction->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name'), 'required']) }}
|
{{ Form::text('name', $direction->name, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('name') }}
|
{{ $errors->first('name') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.description')]) }}
|
{{ Form::label('description', 'Описание') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('description', $direction->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name')]) }}
|
{{ Form::text('description', $direction->description, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('description') }}
|
{{ $errors->first('description') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -121,13 +113,12 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('budget_places', 'Кол-во бюджетных мест', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.budget_places')]) }}
|
{{ Form::label('budget_places', 'Кол-во бюджетных мест') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('budget_places', $direction->budget_places, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.budget_places'), 'required']) }}
|
{{ Form::number('budget_places', $direction->budget_places, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('budget_places') }}
|
{{ $errors->first('budget_places') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -135,13 +126,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('quota', 'Квота', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.quota')]) }}
|
{{ Form::label('quota', 'Квота') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('quota', $direction->quota, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.quota'), 'required']) }}
|
{{ Form::number('quota', $direction->quota, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('quota') }}
|
{{ $errors->first('quota') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -149,13 +139,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('paid_places', 'Кол-во мест по договорам', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.paid_places')]) }}
|
{{ Form::label('paid_places', 'Кол-во мест по договорам') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('paid_places', $direction->paid_places, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.paid_places'), 'required']) }}
|
{{ Form::number('paid_places', $direction->paid_places, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('paid_places') }}
|
{{ $errors->first('paid_places') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -164,13 +153,12 @@
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('cost_paid_place', 'Стоимость обучения', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.cost_paid_place')]) }}
|
{{ Form::label('cost_paid_place', 'Стоимость обучения') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::number('cost_paid_place', $direction->cost_paid_place, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.cost_paid_place'), 'required']) }}
|
{{ Form::number('cost_paid_place', $direction->cost_paid_place, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('cost_paid_place') }}
|
{{ $errors->first('cost_paid_place') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -179,13 +167,12 @@
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('period', 'Период обучения', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.period')]) }}
|
{{ Form::label('period', 'Период обучения') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('period', $direction->period, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.period'), 'required']) }}
|
{{ Form::text('period', $direction->period, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('period') }}
|
{{ $errors->first('period') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -196,13 +183,12 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('direction_profile', 'Профиль подготовки', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.direction_profile')]) }}
|
{{ Form::label('direction_profile', 'Профиль подготовки') }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select('direction_profiles[]', $directionProfiles, $direction->directionProfiles, ['class' => 'form-control rounded border-gray-300 w-1/3 h-32', 'multiple' => 'multiple', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.direction_profile'), 'required']) }}
|
{{ Form::select('direction_profiles[]', $directionProfiles, $direction->directionProfiles, ['class' => 'form-control rounded border-gray-300 w-1/3 h-32', 'multiple' => 'multiple']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('direction_profile') }}
|
{{ $errors->first('direction_profile') }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -223,12 +209,12 @@
|
||||||
<div class="row field">
|
<div class="row field">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label("entrance-examination[{$entranceExamination->id}][examination_type_id]", 'Тип экзамена', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id')]) }}
|
{{ Form::label("entrance-examination[{$entranceExamination->id}][examination_type_id]", 'Тип экзамена') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::select("entrance-examination[{$entranceExamination->id}][examination_type_id]", $examination_types, $entranceExamination->examinationType->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id'), 'required']) }}
|
{{ Form::select("entrance-examination[{$entranceExamination->id}][examination_type_id]", $examination_types, $entranceExamination->examinationType->id, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first("entrance-examination[{$entranceExamination->id}][examination_type_id]") }}
|
{{ $errors->first("entrance-examination[{$entranceExamination->id}][examination_type_id]") }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -236,12 +222,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label("entrance-examination[{$entranceExamination->id}][subject_id]", 'Предмет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id')]) }}
|
{{ Form::label("entrance-examination[{$entranceExamination->id}][subject_id]", 'Предмет') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::select("entrance-examination[{$entranceExamination->id}][subject_id]", $subjects, $entranceExamination->subject->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
|
{{ Form::select("entrance-examination[{$entranceExamination->id}][subject_id]", $subjects, $entranceExamination->subject->id, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first("entrance-examination[{$entranceExamination->id}][subject_id]") }}
|
{{ $errors->first("entrance-examination[{$entranceExamination->id}][subject_id]") }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -249,12 +235,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label("entrance-examination[{$entranceExamination->id}][subject_type_id]", 'Тип предмета', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id')]) }}
|
{{ Form::label("entrance-examination[{$entranceExamination->id}][subject_type_id]", 'Тип предмета') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::select("entrance-examination[{$entranceExamination->id}][subject_type_id]", $subjectTypes, $entranceExamination->subjectType->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id'), 'required']) }}
|
{{ Form::select("entrance-examination[{$entranceExamination->id}][subject_type_id]", $subjectTypes, $entranceExamination->subjectType->id, ['class' => 'form-select']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first("entrance-examination[{$entranceExamination->id}][subject_type_id]") }}
|
{{ $errors->first("entrance-examination[{$entranceExamination->id}][subject_type_id]") }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -262,10 +248,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label("entrance-examination[{$entranceExamination->id}][scores]", 'Кол-во баллов', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores')]) }}
|
{{ Form::label("entrance-examination[{$entranceExamination->id}][scores]", 'Кол-во баллов') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::text("entrance-examination[{$entranceExamination->id}][scores]", $entranceExamination->scores, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores'), 'required']) }}
|
{{ Form::text("entrance-examination[{$entranceExamination->id}][scores]", $entranceExamination->scores, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
|
@ -275,12 +261,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label("entrance-examination[{$entranceExamination->id}][position]", 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position')]) }}
|
{{ Form::label("entrance-examination[{$entranceExamination->id}][position]", 'Позиция') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1 col">
|
<div class="mt-1 col">
|
||||||
{{ Form::text("entrance-examination[{$entranceExamination->id}][position]", $entranceExamination->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position'), 'required']) }}
|
{{ Form::text("entrance-examination[{$entranceExamination->id}][position]", $entranceExamination->position, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first("entrance-examination[{$entranceExamination->id}][position]") }}
|
{{ $errors->first("entrance-examination[{$entranceExamination->id}][position]") }}
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
{{ Form::number('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.name'), 'required']) }}
|
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.name'), 'required']) }}
|
||||||
<div class="invalid-feedback">
|
<div class="invalid-feedback">
|
||||||
Поле "Название" обязательно!
|
Поле "Название" обязательно!
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,58 +4,50 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h1 class="">Изменить учебное заведение</h1>
|
<h1 class="">Изменить учебное заведение</h1>
|
||||||
{{ Form::model($educationalInstitution, ['route' => ['educational_institutions.update', $educationalInstitution], 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
|
{{ Form::model($educationalInstitution, ['route' => ['educational_institutions.update', $educationalInstitution], 'method' => 'PATCH', 'class' => '']) }}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
<div>
|
||||||
|
{{ Form::label('position', 'Позиция') }}
|
||||||
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.position')]) }}
|
{{ Form::text('position', $educationalInstitution->position, ['class' => 'form-control']) }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div>
|
||||||
{{ Form::number('position', $educationalInstitution->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.position'), 'required']) }}
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
Поле "Позиция" обязательно!
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-danger">
|
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('position') }}
|
{{ $errors->first('position') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ Form::label('name', 'Название') }}
|
||||||
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.name')]) }}
|
{{ Form::text('name', $educationalInstitution->name, ['class' => 'form-control']) }}
|
||||||
<span class="text-danger">*</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div>
|
||||||
{{ Form::text('name', $educationalInstitution->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.name'), 'required']) }}
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
Поле "Название" обязательно!
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-danger">
|
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('name') }}
|
{{ $errors->first('name') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ Form::label('description', 'Описание') }}
|
||||||
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.description')]) }}
|
{{ Form::text('description', $educationalInstitution->description, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div>
|
||||||
{{ Form::text('description', $educationalInstitution->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.description')]) }}
|
|
||||||
</div>
|
|
||||||
<div class="text-danger">
|
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('description') }}
|
{{ $errors->first('description') }}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-3">
|
||||||
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.slug')]) }}
|
{{ Form::label('slug', 'URL') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{{ Form::text('slug', $educationalInstitution->slug, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.slug')]) }}
|
{{ Form::text('slug', $educationalInstitution->slug, ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger">
|
<div>
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('slug') }}
|
{{ $errors->first('slug') }}
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
<h1 class=""> Создать факультет</h1>
|
<h1 class=""> Создать факультет</h1>
|
||||||
{{ Form::open(['url' => route('faculties.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
|
{{ Form::open(['url' => route('faculties.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.position')]) }}
|
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.position')]) }}
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
|
|
|
@ -424,10 +424,10 @@
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
</label>
|
</label>
|
||||||
@endif
|
@endif
|
||||||
@endforeac1
|
@endforeach
|
||||||
<hr class="col-5">
|
<hr class="col-5">
|
||||||
@foreach($subjects as $id => $name)
|
@foreach($subjects as $id => $name)
|
||||||
@if($name !== "Русский язык" && $name !== "Математика" )
|
@if($name !== "Русский язык" && $name !== "математика" )
|
||||||
<label class="checkbox1"> {{$name }}
|
<label class="checkbox1"> {{$name }}
|
||||||
<input class="checkbox_input_clear" type="checkbox" value="{{ $id }}">
|
<input class="checkbox_input_clear" type="checkbox" value="{{ $id }}">
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
// use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class ExampleTest extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A basic test example.
|
||||||
|
*/
|
||||||
|
public function testTheApplicationReturnsASuccessfulResponse(): void
|
||||||
|
{
|
||||||
|
$response = $this->get('/');
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue