Починил кнопку "Назад"
This commit is contained in:
@@ -63,14 +63,15 @@ class StatementController extends Controller
|
||||
$typesResponse = $this->api->get("{$prefix}/types");
|
||||
$teachersResponse = $this->api->get("{$prefix}/teachers");
|
||||
$estimationsResponse = $this->api->get("{$prefix}/estimations");
|
||||
|
||||
$user = $this->api->get("{$prefix}/me");
|
||||
if (
|
||||
$statementResponse->successful() &&
|
||||
$groupsResponse->successful() &&
|
||||
$disciplinesResponse->successful() &&
|
||||
$typesResponse->successful() &&
|
||||
$teachersResponse->successful() &&
|
||||
$estimationsResponse->successful()
|
||||
$estimationsResponse->successful() &&
|
||||
$user->successful()
|
||||
) {
|
||||
return view('statements.form', [
|
||||
'statement' => $statementResponse->json(),
|
||||
@@ -79,7 +80,8 @@ class StatementController extends Controller
|
||||
'types' => $typesResponse->json(),
|
||||
'teachers' => $teachersResponse->json(),
|
||||
'isEdit' => true,
|
||||
'estimations' => $estimationsResponse->json()
|
||||
'estimations' => $estimationsResponse->json(),
|
||||
'user' => $user->json()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,9 +115,15 @@
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a href="/statements" class="px-4 py-2 bg-gray-300 text-gray-700 rounded hover:bg-gray-400">
|
||||
Назад
|
||||
</a>
|
||||
@if($user['roles_id'] == 2)
|
||||
<a href="/my/statements" class="px-4 py-2 bg-gray-300 text-gray-700 rounded hover:bg-gray-400">
|
||||
Назад
|
||||
</a>
|
||||
@elseif($user['roles_id'] == 3)
|
||||
<a href="/statements" class="px-4 py-2 bg-gray-300 text-gray-700 rounded hover:bg-gray-400">
|
||||
Назад
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Блок для ввода кода подтверждения (изначально скрыт) -->
|
||||
|
||||
Reference in New Issue
Block a user