Dashboard
Acceuil
@if(auth()->user()->email === "wissem@gmail.com") @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 = true; $disply2 = false; }else{ if ($clientType->all_products == 0) { $disply1 = false; $disply2 = true; }else{ $disply1 = true; $disply2 = true; } } } @endphp

{{$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