Compare commits
No commits in common. "18c703f93113923cea93e5dbb69f99cb641fcf04" and "1155f2c34aed7abd088eb8ee763b5483458cd1c8" have entirely different histories.
18c703f931
...
1155f2c34a
|
@ -4,23 +4,21 @@ namespace App\Services;
|
|||
|
||||
use App\Models\Direction;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use PhpParser\Node\Expr\Array_;
|
||||
|
||||
class DirectonHtmlBuilder
|
||||
{
|
||||
private array $direction;
|
||||
private Direction $direction;
|
||||
public function __construct($direction)
|
||||
{
|
||||
$this->direction = $direction;
|
||||
}
|
||||
public function getHTML()
|
||||
{
|
||||
|
||||
// phpcs:disable
|
||||
|
||||
$direction = $this->direction;
|
||||
$fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png');
|
||||
$educationForm = implode(", ", $direction['educationForm']);
|
||||
return "<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 ; background-image: url({$fon_3}); color: #004329\">
|
||||
return "<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 ; background-image: url({$fon_3}); color: #004329\">
|
||||
|
||||
|
||||
<div class=\"mx-5 \">
|
||||
|
@ -34,11 +32,11 @@ class DirectonHtmlBuilder
|
|||
<div class='col-md-6 col-12 d-block'>
|
||||
|
||||
<div class=\"\">
|
||||
<div class=\"display-6 \" style=\"font-family: Geologica-Light\"> {$direction['code']} </div>
|
||||
<div class=\"display-5 \" > {$direction['name']}</div>
|
||||
<div class=\"display-6 \" style=\"font-family: Geologica-Light\"> {$direction->code} </div>
|
||||
<div class=\"display-5 \" > {$direction->name}</div>
|
||||
</div>
|
||||
<div class=\"mt-4\">
|
||||
<p style=\"text-align: justify;\">{$direction['description']}</p>
|
||||
<p style=\"text-align: justify;\">{$direction->description}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -48,32 +46,31 @@ class DirectonHtmlBuilder
|
|||
|
||||
<div class=\"p-3 px-5 border-success fs-4\" style='border-radius: 50px; border: 2px solid;'>
|
||||
<div > Уровень образования:
|
||||
<strong>{$direction['educationLevel']} </strong>
|
||||
<strong>{$direction->educationLevel->name} </strong>
|
||||
</div>
|
||||
<hr class='d-block d-md-none'><br>
|
||||
<div > Форма обучения:
|
||||
<strong> {$educationForm}
|
||||
</strong>
|
||||
<strong>{$direction->educationForm->name} </strong>
|
||||
</div>
|
||||
<hr class='d-block d-md-none'><br>
|
||||
<div > Бюджетные места:
|
||||
<strong >{$direction['budget_places']} </strong>
|
||||
<strong >{$direction->budget_places} </strong>
|
||||
</div>
|
||||
<hr class='d-block d-md-none'><br>
|
||||
<div > Квота:
|
||||
<strong >{$direction['quota']} </strong>
|
||||
<strong >{$direction->quota} </strong>
|
||||
</div>
|
||||
<hr class='d-block d-md-none'><br>
|
||||
<div > Места на контракт:
|
||||
<strong >{$direction['paid_places']} </strong>
|
||||
<strong >{$direction->paid_places} </strong>
|
||||
</div>
|
||||
<hr class='d-block d-md-none'><br>
|
||||
<div > Стоимость платного обучения:
|
||||
<strong >{$direction['cost_paid_place']} </strong>
|
||||
<strong >{$direction->cost_paid_place} </strong>
|
||||
</div>
|
||||
<hr class='d-block d-md-none'><br>
|
||||
<div > Период обучения (в годах):
|
||||
<strong>{$direction['period']} </span>
|
||||
<strong>{$direction->period} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -359,40 +359,20 @@
|
|||
</tr>
|
||||
|
||||
@foreach($faculty->departments as $department)
|
||||
@php
|
||||
$napr = array();
|
||||
foreach ($department->directions as $direction){
|
||||
$napr[$direction->name]['educationForm'][$direction->name . ' ' . $direction->id] = $direction->educationForm->name;
|
||||
$napr[$direction->name]['id'] = $direction->id;
|
||||
$napr[$direction->name]['code'] = $direction->code;
|
||||
$napr[$direction->name]['educationLevel'] = $direction->educationLevel->name;
|
||||
$napr[$direction->name]['name'] = $direction->name;
|
||||
$napr[$direction->name]['budget_places'] = $direction->budget_places;
|
||||
$napr[$direction->name]['quota'] = $direction->quota;
|
||||
$napr[$direction->name]['paid_places'] = $direction->paid_places;
|
||||
$napr[$direction->name]['cost_paid_place'] = $direction->cost_paid_place;
|
||||
$napr[$direction->name]['period'] = $direction->period;
|
||||
$napr[$direction->name]['description'] = $direction->description;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
@foreach($napr as $el)
|
||||
@foreach($department->directions as $direction)
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a class=" border border-dark rounded-3 p-2 hover1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling-{{ $el['id'] }}" aria-controls="offcanvasScrolling" role="button">{{ $el['name'] }}</a>
|
||||
<a class=" border border-dark rounded-3 p-2 hover1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling-{{ $direction->id }}" aria-controls="offcanvasScrolling" role="button">{{ $direction->name }}</a>
|
||||
@php
|
||||
$DirectonHtmlBuilder = new DirectonHtmlBuilder($el);
|
||||
$DirectonHtmlBuilder = new DirectonHtmlBuilder($direction);
|
||||
echo $DirectonHtmlBuilder->getHTML();
|
||||
@endphp
|
||||
</td>
|
||||
|
||||
<td> {{ $el['code'] }} </td>
|
||||
<td> {{ $el['educationLevel'] }} </td>
|
||||
<td> <?php foreach($el['educationForm'] as $form) { echo $form . '<br>'; } ?> </td>
|
||||
<td> {{ $direction->code }} </td>
|
||||
<td> {{ $direction->educationLevel->name }} </td>
|
||||
<td> {{ $direction->educationForm->name }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
|
Loading…
Reference in New Issue