new-design changes
This commit is contained in:
parent
471d02aac5
commit
b372f14c37
|
@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
|
||||||
use App\Models\Admission;
|
use App\Models\Admission;
|
||||||
use App\Models\Direction;
|
use App\Models\Direction;
|
||||||
use App\Models\Faculty;
|
use App\Models\Faculty;
|
||||||
|
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;
|
||||||
|
@ -22,13 +23,14 @@ class PageController extends Controller
|
||||||
|
|
||||||
public function directions()
|
public function directions()
|
||||||
{
|
{
|
||||||
$directions = DB::table('faculties')
|
// $directions = DB::table('faculties')
|
||||||
->join('departments', 'faculties.id', '=', 'departments.faculty_id')
|
// ->join('departments', 'faculties.id', '=', 'departments.faculty_id')
|
||||||
->join('directions', 'departments.id', '=', 'directions.department_id')
|
// ->join('directions', 'departments.id', '=', 'directions.department_id')
|
||||||
->select('faculties.name as faculties.name', 'directions.name', 'directions.id')
|
// ->select('faculties.name as faculties.name', 'directions.name', 'directions.id')
|
||||||
->groupBy('faculties.name')
|
// ->groupBy('faculties.name')
|
||||||
->get();
|
// ->get();
|
||||||
$faculties = Faculty::all();
|
$faculties = Faculty::all();
|
||||||
|
$subjects = Subject::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
|
||||||
|
@ -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)
|
public function calculator($request)
|
||||||
{
|
{
|
||||||
return response()->json($request);
|
return response()->json($request);
|
||||||
|
|
|
@ -7,18 +7,7 @@ if(isset($_POST['ajx'])) {
|
||||||
}
|
}
|
||||||
if($_POST['ajx']=='get_napr') {
|
if($_POST['ajx']=='get_napr') {
|
||||||
if(isset($_POST['format'])&&$_POST['format']=='html'){
|
if(isset($_POST['format'])&&$_POST['format']=='html'){
|
||||||
$out['html'] = '
|
$out['html'] = $_POST['predmets'];
|
||||||
<tr class="border-bottom border-white">
|
|
||||||
<td> Технологический факультет 1</td>
|
|
||||||
<td> Строительство </td>
|
|
||||||
<td class="text-end"> 4 года</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="border-bottom border-white">
|
|
||||||
<td> Технологический факультет 2</td>
|
|
||||||
<td> Строительство </td>
|
|
||||||
<td class="text-end"> 4 года</td>
|
|
||||||
</tr>
|
|
||||||
';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
|
@ -572,49 +572,16 @@
|
||||||
|
|
||||||
<div class="text-white display-6" > Выберите предметы ЕГЭ</div>
|
<div class="text-white display-6" > Выберите предметы ЕГЭ</div>
|
||||||
<form class="text-white mt-4 fs-4 calcul" style=" font-family: Geologica-ExtraLight">
|
<form class="text-white mt-4 fs-4 calcul" style=" font-family: Geologica-ExtraLight">
|
||||||
<label class="checkbox1"> Русский язык
|
@foreach($subjects as $id => $name)
|
||||||
<input type="checkbox" checked="checked" value="5">
|
|
||||||
<span class="checkmark"></span>
|
<label class="checkbox1"> {{$name }}
|
||||||
</label>
|
<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" name="subject[]" value="10">
|
|
||||||
<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>
|
|
||||||
<label class="checkbox1">Информатика / ИКТ
|
|
||||||
<input type="checkbox">
|
|
||||||
<span class="checkmark"></span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<div class="row d-md-block d-flex ms-md-3 justify-content-center">
|
<div class="row d-md-block d-flex ms-md-3 justify-content-center">
|
||||||
|
@ -630,7 +597,7 @@
|
||||||
console.log(selected);
|
console.log(selected);
|
||||||
|
|
||||||
$(".calcul_rez").html('<tr><td>обрабатываем</td></tr>');
|
$(".calcul_rez").html('<tr><td>обрабатываем</td></tr>');
|
||||||
$.ajax({ url: "json.php", dataType: 'json', cache:false,type: "POST",data: 'ajx=get_napr&format=html&predmets='+predmets,
|
$.ajax({ url: "json.php", dataType: 'json', cache:false,type: "POST",data: 'ajx=get_napr&format=html&predmets='+selected,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$(".calcul_rez").html(data.html);
|
$(".calcul_rez").html(data.html);
|
||||||
}});
|
}});
|
||||||
|
@ -644,26 +611,7 @@
|
||||||
|
|
||||||
<div class="d-md-flex d-none border border-white py-5 justify-content-center" style="border-radius: 50px;">
|
<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 calcul_rez" style="width: 90%; font-family: Geologica-ExtraLight;">
|
<table class="table1 text-white mx-0 p-2 calcul_rez" 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>
|
</table>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue