Dashboard @php $bg = $backgroundColor ?? '#28a745'; $hex = ltrim($bg, '#'); $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); $bgLight = "rgba({$r},{$g},{$b},0.10)"; $bgMedium = "rgba({$r},{$g},{$b},0.65)"; $bgText = "rgb({$r},{$g},{$b})"; @endphp
Accueil
@if($showVosReservation) @endif @php $titre1 = \App\Models\Configuration::query()->where('label', 'titre_1')->value('value'); $titre2 = \App\Models\Configuration::query()->where('label', 'titre_2')->value('value'); $titre3 = \App\Models\Configuration::query()->where('label', 'titre_3')->value('value'); $user = auth()->user(); $clientType = \App\Models\Client::query()->where('id','=',$user->client_id)->first(); $configuration = \App\Models\Configuration::query()->where("label", "Configuration modules")->first(); $configValues = json_decode($configuration->value); $para = $configValues->para ?? false; $onlyPara = $configValues->onlypara ?? false; $disply1 = false; //produit pharmaceutique $disply2 = false; // produit para if ($para == false){ $disply1 = true; $disply2 = false; }else{ if ($onlyPara == true ) { $disply1 = false; $disply2 = true; }else{ if ($clientType->all_products == 0) { $disply1 = false; $disply2 = true; }else{ $disply1 = true; $disply2 = true; } } } @endphp
@for($widgetIndex = 1; $widgetIndex <= 3; $widgetIndex++)
@if($widgetIndex === 1) {{ ($onlyPara || $clientType->all_products == 0) ? 'Produits en promotions' : 'Produits en répartition' }} @elseif($widgetIndex === 2) Nouveaux produits @else Produits en arrivage @endif
@if($widgetIndex === 1 && $onlyPara) @endif
Code DésignationPromoPanier
Chargement...
@endfor

{{$titre1}}



@if(count($listOfSection1)>0) @endif {{-- section 1--}}


@if($disply1)
{{-- section 2--}}




{{$titre2}}


@if(count($listOfSection2)>0) @foreach($listOfSection2 as $item)
...

Pack de {{$item->designation}} produit
@if($item->display_promotion == 1) Pack de {{$item->promotion_quantity.'/'.$item->quantity}} produit @endif
@endforeach @else
Pas de produit disponible pour cette section
@endif


@endif @if($disply2)
{{-- section 3--}}




{{$titre3}}


@if(count($listOfSection3)>0) @foreach($listOfSection3 as $item)
...

Pack de {{$item->designation}} produit
Pack de {{$item->promotion_quantity.'/'.$item->quantity}} produit
@endforeach @else
Pas de produit disponible pour cette section
@endif


@endif
@php $paraModule = json_decode(\App\Models\Configuration::query()->where('label', 'Configuration modules')->first()->value)->para; @endphp @if ($paraModule) @php $clientAccess = auth()->user()->client->all_products; @endphp @if ($clientAccess) @endif @endif