forked from aslan/applicant-site
prodV1 #2
|
@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
|
|||
use App\Models\Admission;
|
||||
use App\Models\Direction;
|
||||
use App\Models\Faculty;
|
||||
use App\Models\Subject;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Foundation\Application;
|
||||
|
@ -22,13 +23,14 @@ class PageController extends Controller
|
|||
|
||||
public function directions()
|
||||
{
|
||||
$directions = DB::table('faculties')
|
||||
->join('departments', 'faculties.id', '=', 'departments.faculty_id')
|
||||
->join('directions', 'departments.id', '=', 'directions.department_id')
|
||||
->select('faculties.name as faculties.name', 'directions.name', 'directions.id')
|
||||
->groupBy('faculties.name')
|
||||
->get();
|
||||
// $directions = DB::table('faculties')
|
||||
// ->join('departments', 'faculties.id', '=', 'departments.faculty_id')
|
||||
// ->join('directions', 'departments.id', '=', 'directions.department_id')
|
||||
// ->select('faculties.name as faculties.name', 'directions.name', 'directions.id')
|
||||
// ->groupBy('faculties.name')
|
||||
// ->get();
|
||||
$faculties = Faculty::all();
|
||||
$subjects = Subject::pluck('name', 'id');
|
||||
// $infBez = $faculties->find(FacultyEnum::InfBez->value);
|
||||
// $query = `select faculties.name, directions.name, directions.id
|
||||
//FROM faculties
|
||||
|
@ -43,9 +45,10 @@ class PageController extends Controller
|
|||
// }
|
||||
//
|
||||
// }
|
||||
return view('new-design.bakalavr-special', compact('faculties'));
|
||||
return view('new-design.bakalavr-special', compact('faculties', 'subjects'));
|
||||
}
|
||||
|
||||
|
||||
public function calculator($request)
|
||||
{
|
||||
return response()->json($request);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
if(isset($_POST['ajx'])) {
|
||||
if($_POST['ajx']=='get_fak_info') {
|
||||
|
||||
}
|
||||
if($_POST['ajx']=='get_napr') {
|
||||
if(isset($_POST['format'])&&$_POST['format']=='html'){
|
||||
$out['html'] = $_POST['predmets'];
|
||||
|
||||
}
|
||||
;
|
||||
}
|
||||
echo json_encode($out);
|
||||
}
|
||||
//echo '<table><tr><td>1</td><td>2</td></tr></table>';
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap.css') }}">
|
||||
<link rel="stylesheet" type="js" href="{{ asset('js/bootstrap-bundle.js') }}">
|
||||
<script src="{{ asset('js/jquery-3.7.1.min.js') }}"></script>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -318,8 +318,8 @@ overflow-x: hidden;
|
|||
</div>
|
||||
|
||||
<div class="row d-flex justify-content-md-start justify-content-center">
|
||||
@foreach($faculties as $faculty)
|
||||
|
||||
@foreach($faculties as $faculty)
|
||||
<div class="mt-xl-5 col-xxl-4 col-md-6 col-10 ">
|
||||
|
||||
<!-- Button trigger modal -->
|
||||
|
@ -331,7 +331,7 @@ overflow-x: hidden;
|
|||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModal-{{ $faculty->id }}" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" >
|
||||
<div class="modal-content" style="border-radius: 30px;">
|
||||
<div class="modal-content" > <!--style="border-radius: 30px;"-->
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
<img class="" style="width: 108px; height: auto " src="{{ URL::to('img/faculties/5.png') }}" alt="">
|
||||
|
||||
|
@ -352,11 +352,65 @@ overflow-x: hidden;
|
|||
<th> Уровень образования </th>
|
||||
<th> Форма обучения </th>
|
||||
</tr>
|
||||
|
||||
@foreach($faculty->departments as $department)
|
||||
@foreach($department->directions as $direction)
|
||||
|
||||
<tr>
|
||||
<td> {{ $direction->name }} </td>
|
||||
<td>
|
||||
<a class="" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling-{{ $direction->id }}" aria-controls="offcanvasScrolling" role="button">{{ $direction->name }}</a>
|
||||
<div class="offcanvas offcanvas-bottom" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasScrolling-{{ $direction->id }}" aria-labelledby="offcanvasScrollingLabel-{{ $direction->id }}" style="height: 100%; font-family: Geologica-Medium;overflow-y: auto ;">
|
||||
<div class="mx-5">
|
||||
<div class="col-12 d-flex justify-content-end mt-4">
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-3 col-12">
|
||||
<div class="display-5 " style="font-family: Geologica-Light">{{ $direction->code }} </div>
|
||||
<div class="display-5 " > {{ $direction->name }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-3 col-12">
|
||||
<br>
|
||||
<br>
|
||||
<div class=" "> Уровень образования: <span style="font-family: Geologica-Light">{{ $direction->educationLevel->name }} </span> </div>
|
||||
<div class=" "> Форма обучения: <span style="font-family: Geologica-Light">{{ $direction->educationForm->name }} </span></div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-12">
|
||||
<br>
|
||||
<br>
|
||||
<div class=" "> Бюджетные места: <span style="font-family: Geologica-Light">{{ $direction->budget_places }} </span> </div>
|
||||
<div class=" "> Квота: <span style="font-family: Geologica-Light">{{ $direction->quota }} </span></div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-12">
|
||||
<br>
|
||||
<br>
|
||||
<div class=" "> Места на контракт: <span style="font-family: Geologica-Light">{{ $direction->paid_places }} </span> </div>
|
||||
<div class=" "> Стоимость платного обучения: <span style="font-family: Geologica-Light">{{ $direction->cost_paid_place }} </span></div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-12">
|
||||
<br>
|
||||
<br>
|
||||
<div class=" "> Период обучения (в годах): <span style="font-family: Geologica-Light">{{ $direction->period }} </span> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{-- <p class="display-5 " style="font-family: Geologica-Light">{{ $direction->code }} </p>--}}
|
||||
{{-- <p class="display-5 " > {{ $direction->name }}</p>--}}
|
||||
<div class="offcanvas-body mt-2" style="font-family: Geologica-ExtraLight">
|
||||
<p style="text-align: justify;">{{ $direction->description }}</p>
|
||||
|
||||
<p style="text-align: justify;">{{ $direction->description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td> {{ $direction->code }} </td>
|
||||
<td> {{ $direction->educationLevel->name }} </td>
|
||||
<td> {{ $direction->educationForm->name }} </td>
|
||||
|
@ -517,82 +571,47 @@ overflow-x: hidden;
|
|||
<div class="row">
|
||||
|
||||
<div class="text-white display-6" > Выберите предметы ЕГЭ</div>
|
||||
<form class="text-white mt-4 fs-4" style=" font-family: Geologica-ExtraLight">
|
||||
<label class="checkbox1"> Русский язык
|
||||
<input type="checkbox" checked="checked">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<form class="text-white mt-4 fs-4 calcul" style=" font-family: Geologica-ExtraLight">
|
||||
@foreach($subjects as $id => $name)
|
||||
|
||||
<label class="checkbox1">Математика
|
||||
<input type="checkbox">
|
||||
<label class="checkbox1"> {{$name }}
|
||||
<input type="checkbox" @if($id == '2' || $id == '3') checked="checked" @endif value="{{ $id }}">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
@endforeach
|
||||
|
||||
|
||||
<label class="checkbox1">Физика
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
|
||||
<label class="checkbox1">Химия
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<label class="checkbox1">Биология
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<label class="checkbox1">Иностранный язык
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<label class="checkbox1">История
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<label class="checkbox1">Обществознание
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<label class="checkbox1">Литература
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<label class="checkbox1">Информатика / ИКТ
|
||||
<input type="checkbox">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
|
||||
</form>
|
||||
<div class="row d-md-block d-flex ms-md-3 justify-content-center">
|
||||
<div style="border-radius: 11px; font-family: Geologica-ExtraLight" class="mt-4 col-5 text-white p-2 border border-white d-inline-flex justify-content-center shadow"> Сбросить фильтр </div>
|
||||
</div>
|
||||
<script>window.onload = function() {
|
||||
$(".calcul input").click(function(){
|
||||
var selected = []; let predmets='';
|
||||
$('.calcul input:checked').each(function() {
|
||||
selected.push($(this).val());
|
||||
predmets += $(this).val()+',';
|
||||
});
|
||||
console.log(selected);
|
||||
|
||||
$(".calcul_rez").html('<tr><td>обрабатываем</td></tr>');
|
||||
$.ajax({ url: "json.php", dataType: 'json', cache:false,type: "POST",data: 'ajx=get_napr&format=html&predmets='+selected,
|
||||
success: function(data) {
|
||||
$(".calcul_rez").html(data.html);
|
||||
}});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-md-0 mt-5 col-12">
|
||||
|
||||
<div class="d-md-flex d-none border border-white py-5 justify-content-center" style="border-radius: 50px;">
|
||||
<table class="table1 text-white mx-0 p-2 " style="width: 90%; font-family: Geologica-ExtraLight;">
|
||||
<tr class="border-bottom border-white">
|
||||
<td> Технологический факультет </td>
|
||||
<td> Строительство </td>
|
||||
<td class="text-end"> 4 года</td>
|
||||
</tr>
|
||||
<tr class=" border-bottom border-white">
|
||||
<td> Технологический факультет </td>
|
||||
<td> Строительство </td>
|
||||
<td class="text-end"> 4 года</td>
|
||||
</tr>
|
||||
<tr class="border-bottom border-white">
|
||||
<td> Технологический факультет </td>
|
||||
<td> Строительство </td>
|
||||
<td class="text-end"> 4 года</td>
|
||||
</tr>
|
||||
<tr class="border-bottom border-white">
|
||||
<td> Технологический факультет </td>
|
||||
<td> Строительство </td>
|
||||
<td class="text-end"> 4 года</td>
|
||||
</tr>
|
||||
<table class="table1 text-white mx-0 p-2 calcul_rez" style="width: 90%; font-family: Geologica-ExtraLight;">
|
||||
Выберите предметы
|
||||
|
||||
</table>
|
||||
|
||||
|
|
Loading…
Reference in New Issue