project select ready

This commit is contained in:
Александр Бабкин
2022-07-01 11:46:04 +03:00
parent 09bd73710f
commit b82bf121cf
9 changed files with 314 additions and 21 deletions

View File

@@ -17,6 +17,9 @@ $projects = Project::all()->sortBy('id');
<div align="center" class="pt-4">
<table class="table table-sm border-b border-gray-200">
<tr class="border border-gray-200">
<th class="p-2 border border-gray-200">
&nbsp;
</th>
<th class="p-2 border border-gray-200">
{{ __('Title') }}
</th>
@@ -29,7 +32,27 @@ $projects = Project::all()->sortBy('id');
</tr>
@forelse ($projects as $project)
<tr class="border border-gray-200">
<td class="p-2 border border-gray-200"><a href="{{ route('mmc.index',$project->id) }}" class="underline">{{ $project->name }}</a></td>
<td class="p-2 border border-gray-200">
<form action="{{ route('project.select', $project->id) }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@if (session()->get('project_id') !== null)
@if (session()->get('project_id') == $project->id)
<button
class="fa fa-square-check text-green-500 hover:text-green-700 px-2 text-lg"
type="submit"></button>
@else
<button
class="far fa-square text-gray-500 hover:text-gray-700 px-2 text-lg"
type="submit"></button>
@endif
@else
<button
class="far fa-square text-gray-500 hover:text-gray-700 px-2 text-lg"
type="submit"></button>
@endif
</form>
</td>
<td class="p-2 border border-gray-200">{{ $project->name }}</td>
<td class="p-2 border border-gray-200">{{ $project->description }}</td>
<td class="p-2 border border-gray-200">{{ $project->mmc_path }}</td>
</tr>