Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2004cba7d7 | ||
|
|
90bca26a68 | ||
|
|
c74a0f15f5 |
6 changed files with 57 additions and 9 deletions
|
|
@ -44,3 +44,8 @@ LDC_STATUS_CHECKER_API_KEY="MY_KEY"
|
||||||
LDC_STATUS_CHECKER_UUID="UUID_PROJECT"
|
LDC_STATUS_CHECKER_UUID="UUID_PROJECT"
|
||||||
## LDC WEB ADMIN SECURE
|
## LDC WEB ADMIN SECURE
|
||||||
LDC_WEB_API_KEY="MY_KEY"
|
LDC_WEB_API_KEY="MY_KEY"
|
||||||
|
|
||||||
|
|
||||||
|
## GOOGLE
|
||||||
|
ANALYTICS_GOOGLE_ID=
|
||||||
|
GOOGLE_MAP_API_KEY=
|
||||||
|
|
|
||||||
26
README.md
26
README.md
|
|
@ -1,6 +1,7 @@
|
||||||
# BOGT / Tracabilité Loué
|
# BOGT / Tracabilité Loué
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```
|
```
|
||||||
composer install
|
composer install
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
|
@ -9,56 +10,71 @@ php artisan storage:link
|
||||||
```
|
```
|
||||||
|
|
||||||
Éditez le fichier .env puis :
|
Éditez le fichier .env puis :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan migrate
|
php artisan migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
Front :
|
Front :
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install && npm run prod
|
npm install && npm run prod
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour créer un compte admin :
|
Pour créer un compte admin :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan user:create
|
php artisan user:create
|
||||||
```
|
```
|
||||||
|
|
||||||
## Crons
|
## Crons
|
||||||
|
|
||||||
Put every min in PROD :
|
Put every min in PROD :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan schedule:run
|
php artisan schedule:run
|
||||||
```
|
```
|
||||||
|
|
||||||
## Données
|
## Données
|
||||||
|
|
||||||
Pour synchroniser les aliments :
|
Pour synchroniser les aliments :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan cafel:food
|
php artisan cafel:food
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour synchroniser les données BEA (volaille) :
|
Pour synchroniser les données BEA (volaille) :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan cafel:bea_vol
|
php artisan cafel:bea_vol
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour synchroniser les mises en place (oeuf) :
|
Pour synchroniser les mises en place (oeuf) :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan cafel:mep_egg
|
php artisan cafel:mep_egg
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour synchroniser les éleveurs (oeuf) :
|
Pour synchroniser les éleveurs (oeuf) :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan cafel:breeder_egg
|
php artisan cafel:breeder_egg
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour synchroniser les éleveurs (volaille) :
|
Pour synchroniser les éleveurs (volaille) :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan cafel:breeder_poultry
|
php artisan cafel:breeder_poultry
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour importer les XML (oeuf) :
|
Pour importer les XML (oeuf) :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan xml:egg
|
php artisan xml:egg
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour importer les XML (volaille) :
|
Pour importer les XML (volaille) :
|
||||||
|
|
||||||
```
|
```
|
||||||
php artisan xml:poultry
|
php artisan xml:poultry
|
||||||
```
|
```
|
||||||
|
|
||||||
## TODO
|
|
||||||
- Mettre analytics dans cookie notice
|
|
||||||
- Cacher la colonne Code EDE dans le cas du filtrage sur volaille (/bo/eleveurs)
|
|
||||||
- Dans la partie oeuf faire matcher les civility avec l'enum
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers\Fo;
|
namespace App\Http\Controllers\Fo;
|
||||||
|
|
||||||
|
use App\Enums\BreederCivilty;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\CafelEggBreeder;
|
use App\Models\CafelEggBreeder;
|
||||||
use App\Models\CafelEggMiseEnPlace;
|
use App\Models\CafelEggMiseEnPlace;
|
||||||
|
|
@ -143,16 +144,16 @@ class EggController extends Controller
|
||||||
}
|
}
|
||||||
if ($eleveur->vocation != null && !empty($eleveur->vocation)) {
|
if ($eleveur->vocation != null && !empty($eleveur->vocation)) {
|
||||||
switch ($eleveur->civilite) {
|
switch ($eleveur->civilite) {
|
||||||
case '0':
|
case BreederCivilty::elle():
|
||||||
array_push($questions, array('Tu as toujours été éleveuse ?', $eleveur->vocation));
|
array_push($questions, array('Tu as toujours été éleveuse ?', $eleveur->vocation));
|
||||||
break;
|
break;
|
||||||
case '1':
|
case BreederCivilty::il():
|
||||||
array_push($questions, array('Tu as toujours été éleveur ?', $eleveur->vocation));
|
array_push($questions, array('Tu as toujours été éleveur ?', $eleveur->vocation));
|
||||||
break;
|
break;
|
||||||
case '2':
|
case BreederCivilty::elles():
|
||||||
array_push($questions, array('Vous avez toujours été éleveuses ?', $eleveur->vocation));
|
array_push($questions, array('Vous avez toujours été éleveuses ?', $eleveur->vocation));
|
||||||
break;
|
break;
|
||||||
case '3':
|
case BreederCivilty::ils():
|
||||||
array_push($questions, array('Vous avez toujours été éleveurs ?', $eleveur->vocation));
|
array_push($questions, array('Vous avez toujours été éleveurs ?', $eleveur->vocation));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
5
config/google.php
Normal file
5
config/google.php
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'analyticsKey' => env('ANALYTICS_GOOGLE_ID')
|
||||||
|
];
|
||||||
|
|
@ -36,7 +36,9 @@
|
||||||
@if(count($breeders))
|
@if(count($breeders))
|
||||||
<table class="table table-striped table-hover table-borderless table-dark">
|
<table class="table table-striped table-hover table-borderless table-dark">
|
||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
|
@if(is_null(request()->type) or request()->type == App\Enums\BreederType::egg()->value)
|
||||||
<th>Code EDE</th>
|
<th>Code EDE</th>
|
||||||
|
@endif
|
||||||
<th>Code CAFEL</th>
|
<th>Code CAFEL</th>
|
||||||
<th>{{ __('Type') }}</th>
|
<th>{{ __('Type') }}</th>
|
||||||
<th>INUAV</th>
|
<th>INUAV</th>
|
||||||
|
|
@ -49,7 +51,9 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($breeders as $breeder)
|
@foreach ($breeders as $breeder)
|
||||||
<tr>
|
<tr>
|
||||||
|
@if(is_null(request()->type) or request()->type == App\Enums\BreederType::egg()->value)
|
||||||
<td>{{$breeder->ede_code}}</td>
|
<td>{{$breeder->ede_code}}</td>
|
||||||
|
@endif
|
||||||
<td>{{$breeder->cafel_code}}</td>
|
<td>{{$breeder->cafel_code}}</td>
|
||||||
@if(get_class($breeder) === \App\Models\CafelEggBreeder::class)
|
@if(get_class($breeder) === \App\Models\CafelEggBreeder::class)
|
||||||
<td><span class="badge bg-warning text-dark">{{ BreederType::egg()->label }}</span></td>
|
<td><span class="badge bg-warning text-dark">{{ BreederType::egg()->label }}</span></td>
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,23 @@
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script nonce="{{ $nonce }}">
|
<script nonce="{{ $nonce }}">
|
||||||
window._cookie_notice = {
|
window._cookie_notice = {
|
||||||
|
'analytics': {
|
||||||
|
'name': "Google Analytics",
|
||||||
|
'description': 'Service d\'analyse d\'audience',
|
||||||
|
'link': 'https://support.google.com/analytics/answer/6004245',
|
||||||
|
'cookies': ['_ga', '_gat_gtag_{{ str_replace('-','_', config('google.analyticsKey')) }}', '_gid'],
|
||||||
|
'script': function () {
|
||||||
|
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||||
|
g.src='https://www.googletagmanager.com/gtag/js?id={{ config('google.analyticsKey') }}';g.id='analytics';
|
||||||
|
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||||
|
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', '{{ config('google.analyticsKey') }}');
|
||||||
|
}
|
||||||
|
},
|
||||||
'youtube': {
|
'youtube': {
|
||||||
'name': "VIDEOS - Youtube",
|
'name': "VIDEOS - Youtube",
|
||||||
'description': '{{ __('Les cookies déposés via les services de partage de vidéo ont pour finalité de permettre à l’utilisateur de visionner directement sur le site le contenu multimédia.') }}',
|
'description': '{{ __('Les cookies déposés via les services de partage de vidéo ont pour finalité de permettre à l’utilisateur de visionner directement sur le site le contenu multimédia.') }}',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue