Aff filter condition on bo.breeders : hide ede code column only if showing poultry breeders only

This commit is contained in:
Jérémy Munsch 2022-08-10 13:10:18 +02:00
parent 3ee5da13eb
commit c74a0f15f5
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
2 changed files with 27 additions and 3 deletions

View file

@ -1,6 +1,7 @@
# BOGT / Tracabilité Loué
## Installation
```
composer install
cp .env.example .env
@ -9,56 +10,75 @@ php artisan storage:link
```
Éditez le fichier .env puis :
```
php artisan migrate
```
Front :
```
npm install && npm run prod
```
Pour créer un compte admin :
```
php artisan user:create
```
## Crons
Put every min in PROD :
```
php artisan schedule:run
```
## Données
Pour synchroniser les aliments :
```
php artisan cafel:food
```
Pour synchroniser les données BEA (volaille) :
```
php artisan cafel:bea_vol
```
Pour synchroniser les mises en place (oeuf) :
```
php artisan cafel:mep_egg
```
Pour synchroniser les éleveurs (oeuf) :
```
php artisan cafel:breeder_egg
```
Pour synchroniser les éleveurs (volaille) :
```
php artisan cafel:breeder_poultry
```
Pour importer les XML (oeuf) :
```
php artisan xml:egg
```
Pour importer les XML (volaille) :
```
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
- Mettre analytics dans cookie notice
- Cacher la colonne Code EDE dans le cas du filtrage sur volaille (/bo/eleveurs)

View file

@ -36,7 +36,9 @@
@if(count($breeders))
<table class="table table-striped table-hover table-borderless table-dark">
<thead class="thead-dark">
@if(is_null(request()->type) or request()->type == App\Enums\BreederType::egg()->value)
<th>Code EDE</th>
@endif
<th>Code CAFEL</th>
<th>{{ __('Type') }}</th>
<th>INUAV</th>
@ -49,7 +51,9 @@
<tbody>
@foreach ($breeders as $breeder)
<tr>
@if(is_null(request()->type) or request()->type == App\Enums\BreederType::egg()->value)
<td>{{$breeder->ede_code}}</td>
@endif
<td>{{$breeder->cafel_code}}</td>
@if(get_class($breeder) === \App\Models\CafelEggBreeder::class)
<td><span class="badge bg-warning text-dark">{{ BreederType::egg()->label }}</span></td>