Egg tmp
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Fo;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\TraceaEgg;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class AjaxController extends Controller
|
||||
{
|
||||
public function findMyBox(Request $request)
|
||||
{
|
||||
$code = $request->code;
|
||||
$date = explode('/', $request->date);
|
||||
$day = $date[0];
|
||||
$month = $date[1];
|
||||
|
||||
$dateCarbon = Carbon::createFromDate(null, $month, $day)->toArray();
|
||||
$year = $dateCarbon['year'];
|
||||
$dcr = $year . '-' . $month . '-' . $day;
|
||||
|
||||
$moba = TraceaEgg::where(['code_ede' => $code, 'dcr' => $dcr])->orderBy('id', 'DESC')->first();
|
||||
|
||||
if (!$moba) {
|
||||
return redirect()->route('erreur404');
|
||||
}
|
||||
|
||||
return redirect()->route('FrontPage', ['id' => $moba->code_boite]);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,24 +4,44 @@ namespace App\Http\Controllers\Fo;
|
|||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\CafelEggBreeder;
|
||||
use App\Models\Aliment;
|
||||
use App\Models\CafelEggMiseEnPlace;
|
||||
use App\Models\CafelFood;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\TraceaEgg;
|
||||
use App\Models\VisuelLibelle;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class FrontController extends Controller
|
||||
class EggController extends Controller
|
||||
{
|
||||
public function findMyBox(Request $request)
|
||||
{
|
||||
$code = $request->code;
|
||||
$date = explode('/', $request->date);
|
||||
$day = $date[0];
|
||||
$month = $date[1];
|
||||
|
||||
$moba = TraceaEgg::where('ede_code', '=', $code)
|
||||
->whereDate('dcr', Carbon::createFromDate(null, $month, $day)->toDate())
|
||||
->orderBy('box_code', 'DESC')->first();
|
||||
|
||||
if (!$moba) {
|
||||
return view('front.egg.notFound');
|
||||
}
|
||||
|
||||
return redirect()->route('egg.FrontPage', ['id' => $moba->box_code]);
|
||||
}
|
||||
|
||||
public function indexId($id)
|
||||
{
|
||||
$multiple = false;
|
||||
$mobas = TraceaEgg::where('code_boite', $id)->orderBy('id', 'DESC')->first();
|
||||
/** @var \App\Models\TraceaEgg|null */
|
||||
$mobas = TraceaEgg::where('box_code', $id)->orderBy('box_code', 'DESC')->first();
|
||||
|
||||
if (!$mobas) {
|
||||
return redirect('/search');
|
||||
}
|
||||
|
||||
$edes = $mobas->code_edes;
|
||||
$edes = $mobas->ede_code;
|
||||
|
||||
// * check if Bio or not
|
||||
$code_ede = $mobas->code_ede;
|
||||
|
|
@ -33,17 +53,16 @@ class FrontController extends Controller
|
|||
session(['subColor' => 'blue']);
|
||||
}
|
||||
|
||||
$datePonte = $mobas->date_de_ponte;
|
||||
$dcr = $mobas->dcr;
|
||||
$datePonte = $mobas->laying_date;
|
||||
$date_emballage = $mobas->date_emballage;
|
||||
// * Compare DCR et Today
|
||||
$date_dcr = Carbon::createFromFormat('Y-m-d', $dcr);
|
||||
$date_dcr = $mobas->dcr;
|
||||
$date_today = Carbon::now();
|
||||
$dcrGood = $date_today < $date_dcr;
|
||||
|
||||
$eleveurs = CafelEggBreeder::whereIn('code_ede', $edes)->get();
|
||||
if (!$eleveurs) {
|
||||
return redirect()->route('erreur404');
|
||||
$eleveurs = CafelEggBreeder::whereEdeCode($edes)->get();
|
||||
if (!$eleveurs->count()) {
|
||||
return view('front.egg.notFound');
|
||||
}
|
||||
|
||||
$uniqueEleveurs = $eleveurs->unique('code_ede');
|
||||
|
|
@ -51,22 +70,25 @@ class FrontController extends Controller
|
|||
$multiple = true;
|
||||
}
|
||||
|
||||
$elevId = $eleveurs->pluck('id');
|
||||
$inuavs = $eleveurs->pluck('inuavs')->flatten(1);
|
||||
|
||||
$mep = CafelEggMiseEnPlace::whereIn('inuav_code', $inuavs)
|
||||
->where('transfert_date', '<', $datePonte)
|
||||
->orderBy('transfert_date', 'DESC')->first();
|
||||
|
||||
$mep = CafelEggMiseEnPlace::whereIn('eleveur_id', $elevId)->where('date_transfert_poulettes', '<', $datePonte)->orderBy('id', 'DESC')->first();
|
||||
if ($mep) {
|
||||
$aliment = Aliment::where('code_lot', $mep->code_lot_pondeuse)->orderBy('id', 'DESC')->first();
|
||||
$aliment = CafelFood::where('batch_code', $mep->batch_code)->orderBy('delivery_date', 'DESC')->first();
|
||||
} else {
|
||||
$mep = '';
|
||||
$aliment = "";
|
||||
}
|
||||
$dataVisuel = VisuelLibelle::where('ean_13', $mobas->ean_13)->first();
|
||||
|
||||
return view('themes.loue.index_id', [
|
||||
return view('front.egg.index_id', [
|
||||
'id' => $id,
|
||||
'multiple' => $multiple,
|
||||
'datePonte' => $datePonte,
|
||||
'dcr' => $dcr,
|
||||
'dcr' => $date_dcr,
|
||||
'dcrGood' => $dcrGood,
|
||||
'eleveurs' => $eleveurs,
|
||||
'mep' => $mep,
|
||||
|
|
@ -81,7 +103,7 @@ class FrontController extends Controller
|
|||
$dateToday = Carbon::now()->toArray();
|
||||
$currentYear = $dateToday['year'];
|
||||
|
||||
$eleveur = CafelEggBreeder::where('id', $eleveurId)->first();
|
||||
$eleveur = CafelEggBreeder::where('cafel_code', $eleveurId)->first();
|
||||
|
||||
if (isset($eleveur->naissance) && !empty($eleveur->naissance)) {
|
||||
$date_naissance = Carbon::createFromFormat('d/m/Y', $eleveur->naissance)->toArray();
|
||||
|
|
@ -128,6 +150,9 @@ class FrontController extends Controller
|
|||
array_push($questions, array('Si je te dis Loué, ça te fait penser à quoi ?', $eleveur->loue_means));
|
||||
}
|
||||
|
||||
return view('themes.loue.elevages.portrait', ['id' => $id, 'eleveur' => $eleveur, 'age' => $age, 'ageElevage' => $age_elevage, 'questions' => $questions]);
|
||||
return view('front.egg.elevages.portrait', [
|
||||
'id' => $id, 'eleveur' => $eleveur, 'age' => $age,
|
||||
'ageElevage' => $age_elevage, 'questions' => $questions
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class TraceaEgg extends Model
|
||||
{
|
||||
|
|
|
|||
BIN
public/assets/images/utilise/egg/LOGO_LOEUF.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/assets/images/utilise/egg/Photo-LOEUF.jpg
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
public/assets/images/utilise/egg/alimentation_bio.png
Normal file
|
After Width: | Height: | Size: 145 KiB |
BIN
public/assets/images/utilise/egg/alimentation_lr.png
Normal file
|
After Width: | Height: | Size: 384 KiB |
BIN
public/assets/images/utilise/egg/blue_block.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/assets/images/utilise/egg/blue_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/assets/images/utilise/egg/blue_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
public/assets/images/utilise/egg/brush_white.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
public/assets/images/utilise/egg/circuit_alimentation.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
public/assets/images/utilise/egg/elevage_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/assets/images/utilise/egg/elevage_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
public/assets/images/utilise/egg/emballage_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/assets/images/utilise/egg/emballage_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
public/assets/images/utilise/egg/generique.jpg
Normal file
|
After Width: | Height: | Size: 337 KiB |
BIN
public/assets/images/utilise/egg/generique_portrait.jpg
Normal file
|
After Width: | Height: | Size: 226 KiB |
BIN
public/assets/images/utilise/egg/green_block.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/assets/images/utilise/egg/green_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/assets/images/utilise/egg/green_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
public/assets/images/utilise/egg/magasin_more.png
Normal file
|
After Width: | Height: | Size: 8 KiB |
BIN
public/assets/images/utilise/egg/oeuf.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/assets/images/utilise/egg/picto_alimentation.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
public/assets/images/utilise/egg/picto_elevage.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
public/assets/images/utilise/egg/picto_emballage.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
public/assets/images/utilise/egg/picto_info_alimentation.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/assets/images/utilise/egg/picto_info_elevage.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/assets/images/utilise/egg/picto_magasin.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/assets/images/utilise/egg/yellow_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/assets/images/utilise/egg/yellow_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
public/assets/images/utilise/labels/fermiers.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 310 KiB After Width: | Height: | Size: 310 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 310 KiB |
BIN
resources/assets/images/utilise/egg/LOGO_LOEUF.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
resources/assets/images/utilise/egg/Photo-LOEUF.jpg
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
resources/assets/images/utilise/egg/alimentation_bio.png
Normal file
|
After Width: | Height: | Size: 145 KiB |
BIN
resources/assets/images/utilise/egg/alimentation_lr.png
Normal file
|
After Width: | Height: | Size: 384 KiB |
BIN
resources/assets/images/utilise/egg/blue_block.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
resources/assets/images/utilise/egg/blue_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/assets/images/utilise/egg/blue_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
resources/assets/images/utilise/egg/brush_white.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
resources/assets/images/utilise/egg/circuit_alimentation.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
resources/assets/images/utilise/egg/elevage_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/assets/images/utilise/egg/elevage_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
resources/assets/images/utilise/egg/emballage_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/assets/images/utilise/egg/emballage_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
resources/assets/images/utilise/egg/generique.jpg
Normal file
|
After Width: | Height: | Size: 337 KiB |
BIN
resources/assets/images/utilise/egg/generique_portrait.jpg
Normal file
|
After Width: | Height: | Size: 226 KiB |
BIN
resources/assets/images/utilise/egg/green_block.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
resources/assets/images/utilise/egg/green_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/assets/images/utilise/egg/green_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
resources/assets/images/utilise/egg/magasin_more.png
Normal file
|
After Width: | Height: | Size: 8 KiB |
BIN
resources/assets/images/utilise/egg/oeuf.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
resources/assets/images/utilise/egg/picto_alimentation.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
resources/assets/images/utilise/egg/picto_elevage.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
resources/assets/images/utilise/egg/picto_emballage.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
resources/assets/images/utilise/egg/picto_info_alimentation.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
resources/assets/images/utilise/egg/picto_info_elevage.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
resources/assets/images/utilise/egg/picto_magasin.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/assets/images/utilise/egg/yellow_header.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/assets/images/utilise/egg/yellow_more.png
Normal file
|
After Width: | Height: | Size: 5 KiB |
BIN
resources/assets/images/utilise/labels/fermiers.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
2
resources/sass/back.scss
vendored
|
|
@ -4,10 +4,10 @@
|
|||
// Variables
|
||||
@import 'variables';
|
||||
|
||||
|
||||
// Bootstrap
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
|
||||
|
|
|
|||
10
resources/sass/front/_common.scss
vendored
|
|
@ -1,7 +1,7 @@
|
|||
body {
|
||||
background: url('~@/images/utilise/layout/body_bg.jpg');
|
||||
|
||||
font-family: 'Myriad Pro';
|
||||
--bs-body-font-family: 'Myriad Pro';
|
||||
|
||||
& > header {
|
||||
& > img {
|
||||
|
|
@ -17,6 +17,11 @@ body {
|
|||
box-shadow: -0.5rem 0px 0.4rem -0.4rem transparentize($color: $black, $amount: 0.6) inset, 0.5rem 0px 0.4rem -0.4rem transparentize($color: $black, $amount: 0.6) inset;
|
||||
font-size: 1.2rem;
|
||||
|
||||
&.oldEgg {
|
||||
background-color:inherit;
|
||||
box-shadow:inherit;
|
||||
}
|
||||
|
||||
& > .header {
|
||||
background-image: url('~@/images/utilise/layout/header_matter_effet.png');
|
||||
background-repeat: no-repeat;
|
||||
|
|
@ -66,6 +71,9 @@ body {
|
|||
.text-arial {
|
||||
font-family: Arial, Helvetica, sans-serif !important;
|
||||
}
|
||||
.text-serif {
|
||||
font-family: Georgia, serif !important;
|
||||
}
|
||||
|
||||
.bg-loue-gray {
|
||||
background-color: $greyBG !important;
|
||||
|
|
|
|||
34
resources/sass/front/_fonts.scss
vendored
|
|
@ -60,12 +60,34 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
// * To Refactor with f*** egg part
|
||||
|
||||
@font-face {
|
||||
font-family: 'Albertsthal Typewriter';
|
||||
src: url('~@/fonts/AlbertsthalTypewriter.woff2') format('woff2'),
|
||||
url('~@/fonts/AlbertsthalTypewriter.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-family: 'MyriadProBlack';
|
||||
src: url('~@/fonts/MyriadPro-Black.woff2') format('woff2'),
|
||||
url('~@/fonts/MyriadPro-Black.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'MyriadProBold';
|
||||
src: url('~@/fonts/MyriadPro-Bold.woff2') format('woff2'),
|
||||
url('~@/fonts/MyriadPro-Bold.woff') format('woff');
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'MyriadProBoldIt';
|
||||
src: url('~@/fonts/MyriadPro-BoldIt.woff2') format('woff2'),
|
||||
url('~@/fonts/MyriadPro-BoldIt.woff') format('woff');
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'MyriadProSemiBoldIt';
|
||||
src: url('~@/fonts/MyriadPro-SemiboldIt.woff2') format('woff2'),
|
||||
url('~@/fonts/MyriadPro-SemiboldIt.woff') format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'MyriadProItalic';
|
||||
src: url('~@/fonts/MyriadPro-It.woff2') format('woff2'),
|
||||
url('~@/fonts/MyriadPro-It.woff') format('woff');
|
||||
}
|
||||
|
|
|
|||