Ajout setting de display prix
This commit is contained in:
parent
b4c2321206
commit
0efd3c9cf8
3 changed files with 63 additions and 0 deletions
32
app/Enums/PriceShowingMode.php
Normal file
32
app/Enums/PriceShowingMode.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* This is an enumeration class,
|
||||
* the following methods are its possible values
|
||||
*
|
||||
* @method static self authenticated()
|
||||
* @method static self guest()
|
||||
*
|
||||
*/
|
||||
class PriceShowingMode extends BaseEnumRoutable
|
||||
{
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'authenticated' => 'authenticated',
|
||||
'guest' => 'guest',
|
||||
];
|
||||
}
|
||||
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'authenticated' => __('Client Connecté'),
|
||||
'guest' => __('Public'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -246,6 +246,7 @@ return [
|
|||
'OrderUnit' => \App\Enums\OrderUnit::class,
|
||||
'InvoicingUnit' => \App\Enums\InvoicingUnit::class,
|
||||
'WeightUnit' => \App\Enums\WeightUnit::class,
|
||||
'PriceShowingMode' => \App\Enums\PriceShowingMode::class,
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -101,6 +101,36 @@
|
|||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="form-group">
|
||||
Affichage des prix
|
||||
<span class="tipped"
|
||||
data-tippy-content="Affichage des prix sous certaines conditions :
|
||||
<ul>
|
||||
@foreach(PriceShowingMode::toArray() as $usercurrentstatus)
|
||||
<li>
|
||||
{{ $usercurrentstatus->label }}
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>">
|
||||
<i class="fas fa-question-circle"></i>
|
||||
</span>
|
||||
@foreach(PriceShowingMode::toArray() as $usercurrentstatus)
|
||||
@if ($loop->first)
|
||||
<div class="form-row">
|
||||
@endif
|
||||
<label class="col-form-label">
|
||||
<input type="checkbox" name="show_prices_{{ $usercurrentstatus->value }}" value="{{ $usercurrentstatus->value }}" @if(($settingsToPrint['show_prices_'.$usercurrentstatus->value]??'')==$usercurrentstatus->value)checked @endif>
|
||||
{{ $usercurrentstatus->label }}
|
||||
<small class="text-muted"></small>
|
||||
</label>
|
||||
@if($loop->last)
|
||||
</div>
|
||||
@else
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="form-group">
|
||||
Envoi des commandes à Regate
|
||||
<span class="tipped"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue