70 lines
3.1 KiB
PHP
70 lines
3.1 KiB
PHP
@extends('layouts.bo')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<div class="card-header">
|
|
Réductions
|
|
<a href="{{ route('bo.reductions.update-br') }}" title="Mettre à jour" class="btn btn-sm btn-primary float-right">Mettre à jour</a>
|
|
</div>
|
|
<div class="card-body">
|
|
{{ $r->withQueryString()->links() }}
|
|
<table class="table table-sm text-center table-borderless">
|
|
<thead class="thead-dark">
|
|
<th scope="col">Visuel</th>
|
|
<th scope="col">Code</th>
|
|
<th scope="col">Libellé</th>
|
|
<th scope="col">Nombre à diffuser</th>
|
|
<th scope="col">Nombre diffusé</th>
|
|
<th scope="col">Valeur faciale</th>
|
|
<th scope="col">Fin de diffusion</th>
|
|
<th scope="col">Configuration</th>
|
|
</thead>
|
|
@foreach ($r as $reduction)
|
|
<tbody>
|
|
<tr class="top-row">
|
|
<td>
|
|
@if ($reduction->picture !== null)
|
|
<img src="{{$reduction->picture}}" style="max-height: 50px;">
|
|
@endif
|
|
</td>
|
|
<td>{{$reduction->code}}</td>
|
|
<td>{{$reduction->wording}}</td>
|
|
<td>{{$reduction->number_broadcast}}</td>
|
|
<td>{{$reduction->number_broadcasted}}</td>
|
|
<td>{{$reduction->face_value}}€</td>
|
|
<td>{{\Carbon\Carbon::parse($reduction->end_date_broadcast)->format('d/m/Y')}}</td>
|
|
<td>
|
|
<a class="text-decoration-none" data-toggle="collapse" href="#collapseReduction{{ $reduction->id }}" role="button" aria-expanded="false" aria-controls="collapseReduction{{ $reduction->id }}">
|
|
<i class="fas fa-cog"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr class="bottom-row">
|
|
<td colspan="9">
|
|
<div class="collapse" id="collapseReduction{{ $reduction->id }}">
|
|
<reduction-selector reductionid="{{ $reduction->id }}" dbnotification="{{ $reduction->notification }}" dbranges='@json($ranges)' dbproductsselected='@json($reduction->products()->pluck('product_id'))' dbrangesselected='@json($reduction->ranges()->pluck('range_id'))'></reduction-selector>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
@endforeach
|
|
</table>
|
|
{{ $r->withQueryString()->links() }}
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('styles')
|
|
<style>
|
|
.top-row {
|
|
border-left: solid 1px #dee2e6;
|
|
border-right: solid 1px #dee2e6;
|
|
}
|
|
|
|
.bottom-row {
|
|
border-left: solid 1px #dee2e6;
|
|
border-right: solid 1px #dee2e6;
|
|
border-bottom: solid 1px #dee2e6;
|
|
}
|
|
</style>
|
|
@endsection
|