ldc-jeusselin/resources/views/bo/objectives/index.blade.php

86 lines
3.9 KiB
PHP

@extends('layouts.bo')
@section('content')
<div class="card">
<div class="card-header">
Objectifs
<form method="GET">
<div class="form-row">
<label for="filter_name" class="col-form-label">TC</label>
<div class="col col-md-2">
<input class="form-control" type="number"
placeholder="Identifiant Technico Commercial"
title="Identifiant Technico Commercial"
id="filter_tc_id" name="filter_tc_id"
maxlength="3"
max="999"
value="{{ $filter_tc_id ?? ''}}">
</div>
<div class="col">
<button class="btn btn-primary">Filtrer</button>
<a class="btn btn-info" href="{{ route(Route::currentRouteName(), ['unfilter' => 1]) }}">Effacer le filtre</a>
</div>
</div>
</form>
</div>
<div class="card-body">
<table class="table table-striped table-sm no-wrap-header">
<thead class="thead-light">
<tr>
<th scope="col" title="Produit">Prod.<br/>
@include('bo.modules.sorter', ['colname' => 'produit', 'list' => 'objectives'])
</th>
<th scope="col">Qualité<br/>
@include('bo.modules.sorter', ['colname' => 'qualite', 'list' => 'objectives'])
</th>
<th scope="col" title="Campagne">Camp.<br/>
@include('bo.modules.sorter', ['colname' => 'campagne', 'list' => 'objectives'])
</th>
<th scope="col">Qté<br/>
@include('bo.modules.sorter', ['colname' => 'quantite', 'list' => 'objectives'])
</th>
<th scope="col">Prix<br/>
@include('bo.modules.sorter', ['colname' => 'prix', 'list' => 'objectives'])
</th>
<th scope="col">Echeance<br/>
@include('bo.modules.sorter', ['colname' => 'echeance', 'list' => 'objectives'])
</th>
<th scope="col">Client<br/>
@include('bo.modules.sorter', ['colname' => 'user_id', 'list' => 'objectives'])
</th>
<th scope="col" title="Technico-Commercial">TC<br/>
@include('bo.modules.sorter', ['colname' => 'tc_id', 'list' => 'objectives'])
</th>
<th scope="col">Status<br/>
@include('bo.modules.sorter', ['colname' => 'status_id', 'list' => 'objectives'])
</th>
<th><a href="{{ route(Route::currentRouteName(), ['rst' => 1]) }}" class="float-end btn btn-sm btn-dark">Réinitialiser le tri</a></th>
</tr>
</thead>
<tbody>
@foreach($objectives as $objectif)
<tr>
<td>{{$objectif->produit}}</td>
<td>{{$objectif->qualite}}</td>
<td>{{$objectif->campagne}}</td>
<td>{{$objectif->quantite}}</td>
<td>{{$objectif->prix}}</td>
<td>{{$objectif->echeance}}</td>
<td><a href="{{route('bo.customers.edit', $objectif->customer)}}">{{$objectif->customer->lastname}}</a></td>
<td>{{$objectif->customer->tc_id}}</td>
<td>
{{$objectif->status->label}}
@if(!empty($objectif->goal_at))
<br/>{{$objectif->goal_at}}
@endif
</td>
<td><a href="{{route('bo.objectives.show', $objectif->id)}}" class="btn btn-sm btn-primary">Detail</a></td>
</tr>
@endforeach
</tbody>
</table>
{!! $objectives->links() !!}
</div>
</div>
@endsection