export intl

This commit is contained in:
Vincent BRIDIER 2021-10-10 10:23:56 +02:00
parent 0da20547a9
commit 91cedeed97
2 changed files with 23 additions and 24 deletions

View file

@ -1,29 +1,28 @@
@extends('layouts.main')
@section('content')
<h2><i class="fas fa-file-export"></i> Export des données coupons</h2>
<h2>
<i class="fas fa-file-export"></i>
{{ __('Export des données coupons') }}
</h2>
<div class="selector-export">
<h4>Période :</h4>
<h4>{{ __('Période') }} :</h4>
<input type="date" name="startdate" id="startdate" value="{{ $startdate }}">
<input type="date" name="enddate" id="enddate" value="{{ $enddate }}">
<input type="hidden" name="csrf" id="csrf" value="<?php echo csrf_token(); ?>">
<a href="#" class="add-button export-data"><i class="fas fa-file-export"></i> Exporter les données</a>
<input type="hidden" name="csrf" id="csrf" value="<?= csrf_token(); ?>">
<a href="#" class="add-button export-data"><i class="fas fa-file-export"></i> {{ __('Exporter les données') }}</a>
</div>
@foreach ($sites as $site)
<h4>{{ $site->site_nom }} ({{ $site->site_id }})</h4>
@if (isset($site->coupons) && $site->coupons->count()>0)
@foreach ($site->coupons as $coupon)
@foreach ($site->coupons as $coupon)
<div class="inputGroup-export">
<input id="coupon[{{$coupon->coupon_id}}]" name="coupon[{{$coupon->coupon_id}}]" type="checkbox" value="{{$coupon->coupon_id}}"/>
<label for="coupon[{{$coupon->coupon_id}}]">{{$coupon->coupon_name}}</label>
</div>
@endforeach
@endif
@endforeach
@endforeach
<div class="export-btn">
<a href="#" class="add-button export-data"><i class="fas fa-file-export"></i> Exporter les données</a>
<a href="#" class="add-button export-data"><i class="fas fa-file-export"></i> {{ __('Exporter les données') }}</a>
<a href="" download class="dl-pdf"></a>
</div>
@ -41,7 +40,7 @@
});
if (ids.length === 0) {
alert('Vous devez sélectionner au moins un coupon.');
alert('{{ __('Vous devez sélectionner au moins un coupon.') }}');
return;
}
$.ajaxSetup({

View file

@ -10,17 +10,17 @@
<div class="wrapper">
<h1 style="text-align:center; margin-bottom:5px;">MesBR.eu</h1>
<h2 style="text-align:center; margin:5px;">{{ $coupon->coupon_name }}</h2>
<h3 style="margin-bottom:80px; margin-top:5px; text-align:center;">Diffusions du {{ date('d/m/Y', strtotime($startdate)) }} au {{ date('d/m/Y', strtotime($enddate)) }}</h3>
<h3 style="margin-bottom:80px; margin-top:5px; text-align:center;">{{ __('Diffusions du') }} {{ date('d/m/Y', strtotime($startdate)) }} {{ __('au') }} {{ date('d/m/Y', strtotime($enddate)) }}</h3>
<img style="width:80%; margin-left:10%; margin-bottom:20px;" src="{{ $coupon->coupon_image }}" alt="">
<h3 style="margin:0; margin-bottom:10px;">Détail du coupon</h3>
<h3 style="margin:0; margin-bottom:10px;">{{ __('Détail du coupon') }}</h3>
<table style="font-size:12px;">
<tr style="background-color:#2d2d2d; color:#FFF; text-align:center;">
<th style="width:25%">Nom</th>
<th style="width:15%">Code</th>
<th style="width:10%">Quantité totale</th>
<th style="width:10%">Qté totale diffusée</th>
<th style="width:15%">Date de début de diffusion</th>
<th style="width:15%">Date de fin de diffusion</th>
<th style="width:25%">{{ __('Nom') }}</th>
<th style="width:15%">{{ __('Code') }}</th>
<th style="width:10%">{{ __('Quantité totale') }}</th>
<th style="width:10%">{{ __('Qté totale diffusée') }}</th>
<th style="width:15%">{{ __('Date de début de diffusion') }}</th>
<th style="width:15%">{{ __('Date de fin de diffusion') }}</th>
</tr>
<tr style="background-color:#adb5bd; color:#000; text-align:center;">
<td style="padding:5px 0;">{{ $coupon->coupon_name }}</td>
@ -30,17 +30,17 @@
@if($coupon->coupon_mindatediffusion != null)
<td>{{ date('d/m/Y', strtotime($coupon->coupon_mindatediffusion)) }}</td>
@else
<td>n/c</td>
<td>{{ __('n/c') }}</td>
@endif
@if($coupon->coupon_maxdatediffusion != null)
<td>{{ date('d/m/Y', strtotime($coupon->coupon_maxdatediffusion)) }}</td>
@else
<td>n/c</td>
<td>{{ __('n/c') }}</td>
@endif
</tr>
</table>
<h3>Graphique de diffusion sur la période du {{ date('d/m/Y', strtotime($startdate)) }} au {{ date('d/m/Y', strtotime($enddate)) }}</h3>
<p style="margin-bottom:20px;">Nombre de coupons diffusés : {{ $coupon->couponPrinted }}</p>
<h3>{{ __('Graphique de diffusion sur la période du') }} {{ date('d/m/Y', strtotime($startdate)) }} {{ __('au') }} {{ date('d/m/Y', strtotime($enddate)) }}</h3>
<p style="margin-bottom:20px;">{{ __('Nombre de coupons diffusés') }} : {{ $coupon->couponPrinted }}</p>
<img src="{{ $src }}" alt="">
</div>
</body>