Merge branch 'develop' into trunk
This commit is contained in:
commit
0efe549f67
33 changed files with 2298 additions and 1881 deletions
|
|
@ -19,8 +19,8 @@ final class InvoicingUnit extends BaseEnum
|
|||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'pce' => 'PCE',
|
||||
'kgm' => 'KGM',
|
||||
'pce' => 'PCE',
|
||||
'kgm' => 'KGM',
|
||||
'colis' => 'COLIS',
|
||||
];
|
||||
}
|
||||
|
|
@ -33,8 +33,8 @@ final class InvoicingUnit extends BaseEnum
|
|||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'pce' => __('Pièce'),
|
||||
'kgm' => __('Kg'),
|
||||
'pce' => __('Pièce'),
|
||||
'kgm' => __('Kg'),
|
||||
'colis' => __('Colis'),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ final class OrderUnit extends BaseEnum
|
|||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'pce' => 'PCE',
|
||||
'kgm' => 'KGM',
|
||||
'pce' => 'PCE',
|
||||
'kgm' => 'KGM',
|
||||
'colis' => 'COLIS',
|
||||
];
|
||||
}
|
||||
|
|
@ -33,8 +33,8 @@ final class OrderUnit extends BaseEnum
|
|||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'pce' => __('Pièce'),
|
||||
'kgm' => __('Kg'),
|
||||
'pce' => __('Pièce'),
|
||||
'kgm' => __('Kg'),
|
||||
'colis' => __('Colis'),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class PriceShowingMode extends BaseEnumRoutable
|
|||
{
|
||||
return [
|
||||
'authenticated' => 'authenticated',
|
||||
'guest' => 'guest',
|
||||
'guest' => 'guest',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ class PriceShowingMode extends BaseEnumRoutable
|
|||
{
|
||||
return [
|
||||
'authenticated' => __('Client Connecté'),
|
||||
'guest' => __('Public'),
|
||||
'guest' => __('Public'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ class ProductBrand extends BaseEnumRoutable
|
|||
public static function labels()
|
||||
{
|
||||
return [
|
||||
'none' => 'Sans marque',
|
||||
'loue' => 'Loué',
|
||||
'legaulois' => 'Le Gaulois',
|
||||
'legauloispro' => 'Le Gaulois Professionnel',
|
||||
'marie' => 'Marie',
|
||||
'tregalette' => 'Trégalette',
|
||||
'none' => 'Sans marque',
|
||||
'loue' => 'Loué',
|
||||
'legaulois' => 'Le Gaulois',
|
||||
'legauloispro' => 'Le Gaulois Professionnel',
|
||||
'marie' => 'Marie',
|
||||
'tregalette' => 'Trégalette',
|
||||
'esprirestauration' => 'Espri Restauration',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,21 +34,21 @@ class SalarieSite extends BaseEnumRoutable
|
|||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'slhp' => 'SLHP',
|
||||
'ldcser' => 'LDCSER',
|
||||
'ldcvol' => 'LDCVOL',
|
||||
'ldcter' => 'LDCTER',
|
||||
'ldctra' => 'LDCTRA',
|
||||
'ldccav' => 'LDCCAV',
|
||||
'ldchol' => 'LDCHOL',
|
||||
'slhp' => 'SLHP',
|
||||
'ldcser' => 'LDCSER',
|
||||
'ldcvol' => 'LDCVOL',
|
||||
'ldcter' => 'LDCTER',
|
||||
'ldctra' => 'LDCTRA',
|
||||
'ldccav' => 'LDCCAV',
|
||||
'ldchol' => 'LDCHOL',
|
||||
'cepacpe' => 'CEPACP',
|
||||
'dde' => 'DDE',
|
||||
'dpe' => 'DPE',
|
||||
'sl' => 'SL',
|
||||
'gdfroi' => 'GDFROI',
|
||||
'ldcplb' => 'LDCPLB',
|
||||
'slela' => 'SLELA',
|
||||
'tpwiss' => 'TPWISS'
|
||||
'dde' => 'DDE',
|
||||
'dpe' => 'DPE',
|
||||
'sl' => 'SL',
|
||||
'gdfroi' => 'GDFROI',
|
||||
'ldcplb' => 'LDCPLB',
|
||||
'slela' => 'SLELA',
|
||||
'tpwiss' => 'TPWISS'
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -60,21 +60,21 @@ class SalarieSite extends BaseEnumRoutable
|
|||
public static function labels()
|
||||
{
|
||||
return [
|
||||
'slhp' => 'Holdings',
|
||||
'ldcser' => 'LDC Services',
|
||||
'ldcvol' => 'LDC Sablé',
|
||||
'ldcter' => 'LDC Intenational',
|
||||
'ldctra' => 'LDC Traiteur',
|
||||
'ldccav' => 'Cavol',
|
||||
'ldchol' => 'LDC Holding',
|
||||
'slhp' => 'Holdings',
|
||||
'ldcser' => 'LDC Services',
|
||||
'ldcvol' => 'LDC Sablé',
|
||||
'ldcter' => 'LDC Intenational',
|
||||
'ldctra' => 'LDC Traiteur',
|
||||
'ldccav' => 'Cavol',
|
||||
'ldchol' => 'LDC Holding',
|
||||
'cepacpe' => 'CPE-CEPA',
|
||||
'dde' => 'Unité Dinde',
|
||||
'dpe' => 'DPE',
|
||||
'sl' => 'Saint-Laurent',
|
||||
'gdfroi' => 'Grand Froid',
|
||||
'ldcplb' => 'LDC PLB',
|
||||
'slela' => 'SLELA',
|
||||
'tpwiss' => 'TPWISS'
|
||||
'dde' => 'Unité Dinde',
|
||||
'dpe' => 'DPE',
|
||||
'sl' => 'Saint-Laurent',
|
||||
'gdfroi' => 'Grand Froid',
|
||||
'ldcplb' => 'LDC PLB',
|
||||
'slela' => 'SLELA',
|
||||
'tpwiss' => 'TPWISS'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ final class SellUnit extends BaseEnum
|
|||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'pce' => 'PCE',
|
||||
'kgm' => 'KGM',
|
||||
'pce' => 'PCE',
|
||||
'kgm' => 'KGM',
|
||||
'colis' => 'COLIS',
|
||||
];
|
||||
}
|
||||
|
|
@ -33,8 +33,8 @@ final class SellUnit extends BaseEnum
|
|||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'pce' => __('Pièce'),
|
||||
'kgm' => __('Kg'),
|
||||
'pce' => __('Pièce'),
|
||||
'kgm' => __('Kg'),
|
||||
'colis' => __('Colis'),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ final class SettingRegisterMode extends BaseEnum
|
|||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'public' => 'public',
|
||||
'public' => 'public',
|
||||
'salaries' => 'salaries',
|
||||
];
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ final class SettingRegisterMode extends BaseEnum
|
|||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'public' => __('Public'),
|
||||
'public' => __('Public'),
|
||||
'salaries' => __('Salaries'),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
41
app/Enums/StatsCustomerType.php
Normal file
41
app/Enums/StatsCustomerType.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self nbSalarie()
|
||||
* @method static self nbSalarieWithAccount()
|
||||
* @method static self membershipRate()
|
||||
*
|
||||
*/
|
||||
class StatsCustomerType extends BaseEnum
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'nbSalarie' => 1,
|
||||
'nbSalarieWithAccount' => 2,
|
||||
'membershipRate' => 3,
|
||||
];
|
||||
}
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'nbSalarie' => trans('Nombre de salariés'),
|
||||
'nbSalarieWithAccount' => trans('Nombre de salariés ayant créé un compte'),
|
||||
'membershipRate' => trans('Taux d\'adhésion à la :appName', ['appName' => config('app.name')]),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -5,21 +5,22 @@ namespace App\Enums;
|
|||
use Kwaadpepper\Enum\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self nbActiveClients()
|
||||
* @method static self nbValidateCmd()
|
||||
* @method static self nbWaitingCmd()
|
||||
* @method static self nbCanceledCmd()
|
||||
* @method static self canceledRate()
|
||||
* @method static self orderFrequency()
|
||||
* @method static self nbActiveClients()
|
||||
* @method static self nbCmdWith7DayDelay()
|
||||
* @method static self nbCmdWith14DayDelay()
|
||||
* @method static self nbCmdWithMoreThan14DayDelay()
|
||||
* @method static self caHt()
|
||||
* @method static self canceledRate()
|
||||
* @method static self orderFrequency()
|
||||
* @method static self purchaseFrequency()
|
||||
* @method static self averageBasketHt()
|
||||
* @method static self averageProductCountPerOrder()
|
||||
* @method static self caHt()
|
||||
* @method static self caTtc()
|
||||
*
|
||||
*/
|
||||
class StatsType extends BaseEnum
|
||||
class StatsShopType extends BaseEnum
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
|
|
@ -29,18 +30,19 @@ class StatsType extends BaseEnum
|
|||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'nbValidateCmd' => 1,
|
||||
'nbWaitingCmd' => 2,
|
||||
'nbCanceledCmd' => 3,
|
||||
'canceledRate' => 4,
|
||||
'orderFrequency' => 5,
|
||||
'nbActiveClients' => 6,
|
||||
'nbCmdWith7DayDelay' => 7,
|
||||
'nbCmdWith14DayDelay' => 8,
|
||||
'nbCmdWithMoreThan14DayDelay' => 9,
|
||||
'caHt' => 10,
|
||||
'averageBasketHt' => 11,
|
||||
'averageProductCountPerOrder' => 12
|
||||
'nbActiveClients' => 1,
|
||||
'nbValidateCmd' => 2,
|
||||
'nbWaitingCmd' => 3,
|
||||
'nbCanceledCmd' => 4,
|
||||
'nbCmdWith7DayDelay' => 5,
|
||||
'nbCmdWith14DayDelay' => 6,
|
||||
'canceledRate' => 7,
|
||||
'orderFrequency' => 8,
|
||||
'purchaseFrequency' => 9,
|
||||
'averageBasketHt' => 10,
|
||||
'averageProductCountPerOrder' => 11,
|
||||
'caHt' => 12,
|
||||
'caTtc' => 13,
|
||||
];
|
||||
}
|
||||
/**
|
||||
|
|
@ -51,18 +53,19 @@ class StatsType extends BaseEnum
|
|||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'nbValidateCmd' => trans('Nombre de commandes validées'),
|
||||
'nbWaitingCmd' => trans('Nombre de commandes en attente'),
|
||||
'nbCanceledCmd' => trans('Nombre de commandes annulées'),
|
||||
'canceledRate' => trans('Taux d\'abandon (en pourcentage)'),
|
||||
'orderFrequency' => trans('Fréquence d\'achat (en jours)'),
|
||||
'nbActiveClients' => trans('Nombre de clients actifs'),
|
||||
'nbValidateCmd' => trans('Commandes validées'),
|
||||
'nbWaitingCmd' => trans('Commandes en attente'),
|
||||
'nbCanceledCmd' => trans('Commandes annulées'),
|
||||
'nbCmdWith7DayDelay' => trans('Nombre de commandes à J+7'),
|
||||
'nbCmdWith14DayDelay' => trans('Nombre de commandes à J+14'),
|
||||
'nbCmdWithMoreThan14DayDelay' => trans('Nombre de commandes à J+15 et plus'),
|
||||
'caHt' => trans('Montant total HT'),
|
||||
'canceledRate' => trans('Taux d\'abandon'),
|
||||
'orderFrequency' => trans('Fréquence de commande'),
|
||||
'purchaseFrequency' => trans('Fréquence d\'achat'),
|
||||
'averageBasketHt' => trans('Prix du panier moyen'),
|
||||
'averageProductCountPerOrder' => trans('Nombre d\'article moyen par commande')
|
||||
'averageProductCountPerOrder' => trans('Nombre d\'article moyen par commande'),
|
||||
'caHt' => trans('Montant total HT'),
|
||||
'caTtc' => trans('Montant total TTC'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -19,8 +19,8 @@ final class WeightUnit extends BaseEnum
|
|||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'g' => 'G',
|
||||
'kg' => 'KG',
|
||||
'g' => 'G',
|
||||
'kg' => 'KG',
|
||||
'ton' => 'T',
|
||||
];
|
||||
}
|
||||
|
|
@ -33,8 +33,8 @@ final class WeightUnit extends BaseEnum
|
|||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'g' => __('Gramme'),
|
||||
'kg' => __('Kg'),
|
||||
'g' => __('Gramme'),
|
||||
'kg' => __('Kg'),
|
||||
'ton' => __('Tonne'),
|
||||
];
|
||||
}
|
||||
|
|
@ -48,9 +48,9 @@ final class WeightUnit extends BaseEnum
|
|||
public static function convert(): array
|
||||
{
|
||||
return [
|
||||
'G' => 0.001,
|
||||
'G' => 0.001,
|
||||
'KG' => 1,
|
||||
'T' => 1000,
|
||||
'T' => 1000,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace App\Http\Controllers\Bo;
|
||||
|
||||
use App\Enums\StatsCustomerType;
|
||||
use App\Enums\StatsShopType;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Carbon\Carbon;
|
||||
use App\Http\Requests\Bo\DashboardRequest;
|
||||
|
|
@ -17,16 +19,22 @@ class DashboardController extends Controller
|
|||
*/
|
||||
public function index(DashboardRequest $request)
|
||||
{
|
||||
$stats = [];
|
||||
$adhesion = StatsHelper::getMembershipPercentage();
|
||||
$previousDates = [];
|
||||
$statsShop = [];
|
||||
$statsCustomer = [];
|
||||
$prevDates = [];
|
||||
|
||||
if ($request->has('start') && $request->has('end')) {
|
||||
$start = new Carbon($request->start);
|
||||
$end = new Carbon($request->end);
|
||||
$previousDates = StatsHelper::getPreviousPeriod($start, $end);
|
||||
$stats = StatsHelper::getStats($start, $end);
|
||||
$start = new Carbon($request->start);
|
||||
$end = new Carbon($request->end);
|
||||
|
||||
$prevDates = StatsHelper::getPreviousPeriod($start, $end);
|
||||
$statsShop = StatsHelper::getStats(StatsShopType::toArray(), $start, $end);
|
||||
$statsCustomer = StatsHelper::getStats(StatsCustomerType::toArray(), $start, $end);
|
||||
}
|
||||
return view('bo.dashboard', compact('stats', 'adhesion', 'previousDates'));
|
||||
return view('bo.dashboard', compact(
|
||||
'prevDates',
|
||||
'statsShop',
|
||||
'statsCustomer',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use App\Models\TaxRate;
|
|||
use App\Models\XmlInco;
|
||||
use App\Traits\Controllers\ChangesModelOrder;
|
||||
use App\Traits\Controllers\UpdateModelStatus;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
|
@ -35,12 +36,18 @@ class ProductsController extends Controller
|
|||
{
|
||||
$ranges = Range::all();
|
||||
|
||||
$filter_range = $request->query('filter_range');
|
||||
$filter_brand = $request->query('filter_brand');
|
||||
$filter_name = $request->query('filter_name');
|
||||
$filter_range = $request->query('filter_range');
|
||||
$filter_brand = $request->query('filter_brand');
|
||||
$filter_name = $request->query('filter_name');
|
||||
$filter_code_product = $request->query('filter_code_product');
|
||||
|
||||
$products = new Product();
|
||||
$products = (new Product())::query();
|
||||
|
||||
if (!empty($filter_code_product)) {
|
||||
$products = $products->whereHas('foodProduct', function (Builder $q) use ($filter_code_product) {
|
||||
$q->where('no_art', 'like', $filter_code_product);
|
||||
});
|
||||
}
|
||||
if (!empty($filter_name)) {
|
||||
$products = $products->where('name', 'like', '%' . $filter_name . '%');
|
||||
}
|
||||
|
|
@ -65,7 +72,14 @@ class ProductsController extends Controller
|
|||
}
|
||||
}
|
||||
unset($product);
|
||||
return view('bo.products.index', compact('products', 'ranges', 'filter_name', 'filter_range', 'filter_brand'));
|
||||
return view('bo.products.index', compact(
|
||||
'products',
|
||||
'ranges',
|
||||
'filter_name',
|
||||
'filter_range',
|
||||
'filter_brand',
|
||||
'filter_code_product'
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -217,7 +217,9 @@ class OrderTunnelController extends Controller
|
|||
* On utilise les méthodes de Carbon pour la comparaison de date, parce que c'est fait pour...
|
||||
*/
|
||||
if (
|
||||
$current->addHours($currentTime->format('H'))->addMinutes($currentTime->format('i'))->lessThan($now->add($delaiPrepa))
|
||||
$current->addHours($currentTime->format('H'))
|
||||
->addMinutes($currentTime->format('i'))
|
||||
->lessThan($now->add($delaiPrepa))
|
||||
) {
|
||||
$isDispo = false;
|
||||
}
|
||||
|
|
@ -258,7 +260,8 @@ class OrderTunnelController extends Controller
|
|||
);
|
||||
}
|
||||
// Génération des plages.
|
||||
// On commence le calcul à aujourd'hui + 1 car on ne va pas afficher de créaneaux pour aujourd'hui dans l'interface...
|
||||
// On commence le calcul à aujourd'hui + 1
|
||||
// car on ne va pas afficher de créaneaux pour aujourd'hui dans l'interface...
|
||||
$today = CarbonImmutable::now()->addDay()->startOfDay();
|
||||
$weekDay = $today->weekday();
|
||||
// Final boundary (permet de limiter la liste des jours d'exception).
|
||||
|
|
@ -275,7 +278,7 @@ class OrderTunnelController extends Controller
|
|||
$availCreneaux = array();
|
||||
|
||||
for ($i = 0; $i < $plage_days; $i++) {
|
||||
$current = $today->add($i, 'day');
|
||||
$current = $today->add($i, 'day');
|
||||
/**
|
||||
* On gère le décalage par rapport au tableau de settings...
|
||||
* Dans le tableau lundi = 0
|
||||
|
|
@ -349,7 +352,14 @@ class OrderTunnelController extends Controller
|
|||
return $availCreneaux;
|
||||
}
|
||||
|
||||
private function hasCreneauAvailableTime($creneaux)
|
||||
/**
|
||||
* hasCreneauAvailableTime
|
||||
*
|
||||
* @param array $creneaux
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function hasCreneauAvailableTime(array $creneaux): bool
|
||||
{
|
||||
foreach ($creneaux as $creneau) {
|
||||
if ($creneau[1]) {
|
||||
|
|
|
|||
|
|
@ -9,25 +9,25 @@ use App\Models\Salarie;
|
|||
use Carbon\Carbon;
|
||||
use Carbon\CarbonPeriod;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Enums\StatsType;
|
||||
|
||||
final class StatsHelper
|
||||
{
|
||||
/**
|
||||
* getStats
|
||||
*
|
||||
* @param array $statsType
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return array
|
||||
*/
|
||||
public static function getStats(Carbon $start, Carbon $end)
|
||||
public static function getStats(array $statsType, Carbon $start, Carbon $end)
|
||||
{
|
||||
$stats = [];
|
||||
foreach (StatsType::toArray() as $type) {
|
||||
foreach ($statsType as $type) {
|
||||
$stats[$type->value] = [
|
||||
'previous' => self::getPrevious(sprintf('get%s', ucfirst($type->getDefinition())), $start, $end),
|
||||
'current' => self::{sprintf('get%s', ucfirst($type->getDefinition()))}($start, $end),
|
||||
'diff' => self::getDiff(sprintf('get%s', ucfirst($type->getDefinition())), $start, $end),
|
||||
'current' => self::{sprintf('get%s', ucfirst($type->getDefinition()))}($start, $end),
|
||||
'diff' => self::getDiff(sprintf('get%s', ucfirst($type->getDefinition())), $start, $end),
|
||||
];
|
||||
}
|
||||
return $stats;
|
||||
|
|
@ -60,16 +60,72 @@ final class StatsHelper
|
|||
return self::{$method}($start, $end) - self::getPrevious($method, $start, $end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all validated orders.
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return mixed
|
||||
*/
|
||||
private function getNbSalarie(Carbon $start, Carbon $end)
|
||||
{
|
||||
return self::getNumberCustomers($start, $end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all validated orders.
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return mixed
|
||||
*/
|
||||
private function getNbSalarieWithAccount(Carbon $start, Carbon $end)
|
||||
{
|
||||
return self::getNumberSalaries($start, $end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the percentage of registered people / people with a generated code
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return integer
|
||||
*/
|
||||
public static function getNumberCustomers(Carbon $start, Carbon $end): int
|
||||
{
|
||||
return Customers::query()
|
||||
->whereDate('created_at', '>=', $start)
|
||||
->whereDate('created_at', '<=', $end)
|
||||
->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the percentage of registered people / people with a generated code
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return integer
|
||||
*/
|
||||
public static function getNumberSalaries(Carbon $start, Carbon $end): int
|
||||
{
|
||||
return Customers::query()
|
||||
->has('salarie')
|
||||
->whereDate('created_at', '>=', $start)
|
||||
->whereDate('created_at', '<=', $end)
|
||||
->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the percentage of registered people / people with a generated code
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return integer|float
|
||||
*/
|
||||
public static function getMembershipPercentage()
|
||||
public static function getMembershipRate(Carbon $start, Carbon $end): int
|
||||
{
|
||||
$employee = Salarie::count();
|
||||
$registered = Customers::has('salarie')->count();
|
||||
return round($registered / $employee * 100, 2);
|
||||
$registered = self::getNumberSalaries($start, $end);
|
||||
return round($registered / Salarie::count() * 100, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -164,6 +220,23 @@ final class StatsHelper
|
|||
return round($nbValidateCmd / $period, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the order frequency.
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return mixed
|
||||
*/
|
||||
private function getPurchaseFrequency(Carbon $start, Carbon $end)
|
||||
{
|
||||
$activeClients = self::getNbActiveClients($start, $end);
|
||||
if (!$activeClients) {
|
||||
return 0;
|
||||
}
|
||||
$nbValidateCmd = self::getNbValidateCmd($start, $end);
|
||||
return round($nbValidateCmd / $activeClients, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of active clients (ordered in the period).
|
||||
*
|
||||
|
|
@ -214,23 +287,6 @@ final class StatsHelper
|
|||
})->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number command where the collect day is > 14 days after the order.
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return mixed
|
||||
*/
|
||||
private function getNbCmdWithMoreThan14DayDelay(Carbon $start, Carbon $end)
|
||||
{
|
||||
return Order::with('timeslot')->whereHas('status', function (Builder $query) {
|
||||
$query->whereIn('id', [3, 4, 5, 6]);
|
||||
})->whereBetween('date', [$start, $end])->get()->filter(function (Order $order) {
|
||||
return Carbon::create($order->timeslot->day)
|
||||
->greaterThan(Carbon::create($order->date)->modify('+14 day'));
|
||||
})->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the CA HT.
|
||||
*
|
||||
|
|
@ -254,6 +310,30 @@ final class StatsHelper
|
|||
return $totalCaHt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the CA TTC.
|
||||
*
|
||||
* @param \Carbon\Carbon $start
|
||||
* @param \Carbon\Carbon $end
|
||||
* @return mixed
|
||||
*/
|
||||
private function getCaTtc(Carbon $start, Carbon $end)
|
||||
{
|
||||
$orderedProducts = OrderLine::whereHas('order', function (Builder $query) use ($start, $end) {
|
||||
$query->whereHas('status', function (Builder $query) {
|
||||
$query->whereIn('id', [3, 4, 5, 6]);
|
||||
})->whereBetween('date', [$start->toDateString(), $end->toDateString()]);
|
||||
})->get();
|
||||
|
||||
$totalCaTtc = 0;
|
||||
$orderedProducts->map(function ($item) use (&$totalCaTtc) {
|
||||
$totalCaTtc += $item->total_ttc;
|
||||
});
|
||||
|
||||
return $totalCaTtc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the average basket HT.
|
||||
*
|
||||
|
|
@ -312,7 +392,7 @@ final class StatsHelper
|
|||
$diffDays = $start->copy()->diffInDays($end);
|
||||
return (object)[
|
||||
'start' => $start->copy()->subDays($diffDays + 1),
|
||||
'end' => $start->copy()->subDay()
|
||||
'end' => $start->copy()->subDay()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,17 +98,17 @@ class Customers extends Authenticatable
|
|||
parent::toArray(),
|
||||
(array)$this->apiData
|
||||
))->intersectByKeys([
|
||||
'email' => '',
|
||||
'firstname' => '',
|
||||
'lastname' => '',
|
||||
'address' => '',
|
||||
'address2' => '',
|
||||
'postcode' => '',
|
||||
'email' => '',
|
||||
'firstname' => '',
|
||||
'lastname' => '',
|
||||
'address' => '',
|
||||
'address2' => '',
|
||||
'postcode' => '',
|
||||
'birth_date' => '',
|
||||
'city' => '',
|
||||
'country' => '',
|
||||
'opt_in' => '',
|
||||
'phone' => ''
|
||||
'city' => '',
|
||||
'country' => '',
|
||||
'opt_in' => '',
|
||||
'phone' => ''
|
||||
])->toArray();
|
||||
} else {
|
||||
return parent::toArray();
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ class Product extends Model implements Buyable
|
|||
*/
|
||||
protected $casts = [
|
||||
'orderable_start' => 'datetime',
|
||||
'orderable_end' => 'datetime',
|
||||
'price' => 'float'
|
||||
'orderable_end' => 'datetime',
|
||||
'price' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -155,12 +155,12 @@ class Product extends Model implements Buyable
|
|||
public function getCalcPrices()
|
||||
{
|
||||
$prices = array(
|
||||
'priceHt' => $this->priceHt,
|
||||
'priceKgTtc' => $this->priceKgTtc,
|
||||
'discountAmount' => $this->discountAmount,
|
||||
'discountRate' => $this->discountRate,
|
||||
'discountedPriceHt' => $this->discountedPriceHt,
|
||||
'priceTtc' => $this->priceTtc,
|
||||
'priceHt' => $this->priceHt,
|
||||
'priceKgTtc' => $this->priceKgTtc,
|
||||
'discountAmount' => $this->discountAmount,
|
||||
'discountRate' => $this->discountRate,
|
||||
'discountedPriceHt' => $this->discountedPriceHt,
|
||||
'priceTtc' => $this->priceTtc,
|
||||
'discountedPriceTtc' => $this->discountedPriceTtc,
|
||||
);
|
||||
return $prices;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Policies;
|
||||
|
||||
use App\Models\Product;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
|
@ -19,7 +18,7 @@ class ProductPolicy
|
|||
* @return \Illuminate\Auth\Access\Response
|
||||
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
|
||||
*/
|
||||
public function addtocart(?User $user, Product $product)
|
||||
public function addtocart($user, Product $product)
|
||||
{
|
||||
// phpcs:enable
|
||||
$now = Carbon::now();
|
||||
|
|
|
|||
2346
package-lock.json
generated
2346
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -12,7 +12,7 @@
|
|||
"devDependencies": {
|
||||
"@fancyapps/fancybox": "^3.5.7",
|
||||
"@fortawesome/fontawesome-free": "^6.2.0",
|
||||
"@ldc-web/cookie-notice": "^3.1.2",
|
||||
"@ldc-web/cookie-notice": "^6.1.0",
|
||||
"@types/bootstrap": "^5.2.1",
|
||||
"@voerro/vue-tagsinput": "^2.7.1",
|
||||
"axios": "^0.21.1",
|
||||
|
|
|
|||
|
|
@ -1,37 +1,31 @@
|
|||
<?php
|
||||
|
||||
// * Version 3.1.2
|
||||
// * Version 6.0.3
|
||||
// phpcs:disable
|
||||
return [
|
||||
'button_customize_cookies' => 'Customize cookies',
|
||||
'button_close_cookies' => 'Close cookie window',
|
||||
'button_forbid' => 'Prohibit',
|
||||
'button_allow' => 'Allow',
|
||||
'button_forbid_all' => 'Reject all',
|
||||
'button_toggle_cookie' => 'Accept or refuse',
|
||||
'button_forbid_all' => 'Refuse all',
|
||||
'button_allow_all' => 'Accept all',
|
||||
'button_forbid_all_title' => 'Refuse all cookies and close the cookies panel',
|
||||
'button_allow_all_title' => 'Accept all cookies and close the cookies panel',
|
||||
'button_customize' => 'Customize',
|
||||
'button_back' => 'Back',
|
||||
'button_validate_and_close' => 'Confirm and close',
|
||||
'button_title_open_new_tab' => 'Open link in new tab',
|
||||
'banner_title' => 'The :site_name website uses cookies!',
|
||||
'banner_text' => 'We use cookies to ensure the proper functioning of our site and for analytical purposes.
|
||||
You can change your mind at any time by clicking on the icon on any page of our site.
|
||||
By authorizing these third-party services, you agree to the deposit and reading of cookies and the use of tracking technologies necessary for their proper operation.',
|
||||
'panel_title' => 'Cookie management panel',
|
||||
'modal_title' => 'Cookie management window',
|
||||
'panel_content' => 'Cookie management panel content',
|
||||
'panel_subtitle' => 'Your privacy is our priority',
|
||||
'panel_details' => 'The functionalities of this site are based on services provided by third parties. If you accept, these third parties will deposit cookies that will enable you to view content on the site hosted by these third parties. Through these cookies, these third parties will collect and use your browsing data for their own purposes, in accordance with their privacy policy (link below). This page allows you to give or withdraw your consent, either globally or service by service.',
|
||||
'picture_cookie_title' => 'Image of a nice big cookie',
|
||||
'navigation_title' => 'Cookies panel navigation',
|
||||
'custom' => [
|
||||
'matomo' => [
|
||||
'title' => 'Matomo',
|
||||
'description' => 'Audience measurement services are used to generate traffic statistics, which are useful for improving the site.',
|
||||
'labelLink' => 'Learn more',
|
||||
],
|
||||
'recaptcha' => [
|
||||
'title' => 'reCAPTCHA',
|
||||
'description' => 'The purpose of the cookies placed on forms via the recaptcha is to prevent them from being submitted by robots.',
|
||||
'labelLink' => 'Learn more',
|
||||
'warning' => 'You must accept cookies to send the form',
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,37 +1,32 @@
|
|||
<?php
|
||||
|
||||
// * Version 3.1.2
|
||||
// * Version 6.0.3
|
||||
// phpcs:disable
|
||||
return [
|
||||
'button_customize_cookies' => 'Personnaliser les cookies',
|
||||
'button_close_cookies' => 'Fermer la fenêtre des cookies',
|
||||
'button_forbid' => 'Interdire',
|
||||
'button_allow' => 'Autoriser',
|
||||
'button_toggle_cookie' => 'Autoriser ou refuser',
|
||||
'button_forbid_all' => 'Tout refuser',
|
||||
'button_allow_all' => 'Tout accepter',
|
||||
'button_forbid_all_title' => 'Refuser tous les cookies et fermer le panneau des cookies',
|
||||
'button_allow_all_title' => 'Accepter tous les cookies et fermer le panneau des cookies',
|
||||
'button_customize' => 'Personnaliser',
|
||||
'button_back' => 'Retour',
|
||||
'button_validate_and_close' => 'Valider et fermer',
|
||||
'button_title_open_new_tab' => 'Ouvrir le lien dans un nouvel onglet',
|
||||
'banner_title' => 'Le site internet :site_name utilise des cookies !',
|
||||
'banner_text' => 'Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques.
|
||||
Vous pouvez changer d\'avis à tout moment en cliquant sur l\'icône présente sur chaque page de notre site.
|
||||
En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l\'utilisation de technologies de suivi nécessaires à leur bon fonctionnement.',
|
||||
'panel_title' => 'Panneau de gestion des cookies',
|
||||
'banner_text' =>
|
||||
'Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques.
|
||||
Vous pouvez changer d’avis à tout moment en cliquant sur l’icône présente sur chaque page de notre site.
|
||||
En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l’utilisation de technologies de suivi nécessaires à leur bon fonctionnement.',
|
||||
'modal_title' => 'Fenêtre de gestion de cookies',
|
||||
'panel_content' => 'Contenu du panneau des cookies',
|
||||
'panel_subtitle' => 'Le respect de votre vie privée est notre priorité',
|
||||
'panel_details' => 'Les fonctionnalités de ce site s’appuient sur des services proposés par des tiers. Si vous acceptez, ces tiers déposeront des cookies qui vous permettront de visualiser sur le site du contenu hébergé par ces tiers. Via ces cookies, ces tiers collecteront et utiliseront vos données de navigation pour des finalités qui leur sont propres, conformément à leur politique de confidentialité (lien ci-dessous). Cette page vous permet de donner ou de retirer votre consentement, soit globalement soit service par service.',
|
||||
'picture_cookie_title' => 'Image d’un bon gros cookie',
|
||||
'navigation_title' => 'Navigation du panneau des cookies',
|
||||
'custom' => [
|
||||
'matomo' => [
|
||||
'title' => 'Matomo',
|
||||
'description' => 'Les services de mesure d\'audience permettent de générer des statistiques de fréquentation utiles à l\'amélioration du site.',
|
||||
'description' => 'Les services de mesure d’audience permettent de générer des statistiques de fréquentation utiles à l’amélioration du site.',
|
||||
'labelLink' => 'En apprendre plus',
|
||||
],
|
||||
'recaptcha' => [
|
||||
'title' => 'reCAPTCHA',
|
||||
'description' => 'Les cookies qui sont déposés via le recaptcha sur les formulaires ont pour finalité d\'empêcher que ceux-ci ne soient soumis par des robots.',
|
||||
'labelLink' => 'En apprendre plus',
|
||||
'warning' => 'Vous devez accepter les cookies pour envoyer le formulaire',
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,40 +5,24 @@
|
|||
<h1 class="h2">Dashboard</h1>
|
||||
</div>
|
||||
<div class="container">
|
||||
<table class="table table-responsive table-bordered">
|
||||
<thead>
|
||||
<tr class="text-center table-secondary">
|
||||
<th scope="col">{{ __('Nombre de salariés') }}</th>
|
||||
<th scope="col">{{ __('Nombre de salariés inscrits') }}</th>
|
||||
<th scope="col">{{ __('Taux d\'adhésion') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="text-center table-light text-bold fw-semibold">
|
||||
<td>{{ number_format(App\Models\Salarie::count(), 0, ",", " ") }}</td>
|
||||
<td>{{ number_format(App\Models\Customers::has('salarie')->count(), 0, ",", " ") }}</td>
|
||||
<td>{{ number_format($adhesion, 2, ",", " ") }} %</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
{{-- DATES --}}
|
||||
<form action="{{ route('bo.dashboard') }}">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label for="start">{{ __('Date de début') }}:</label>
|
||||
<input class="form-control" type="date" id="start" name="start" value="{{ request()->start }}" required/>
|
||||
@if (!empty($stats))
|
||||
<label for="previousStart">{{ __('Date de début de la période précédente') }}:</label>
|
||||
<input class="form-control" type="date" id="previousStart" name="previousStart" value="{{ $previousDates->start->toDateString() }}" aria-label="disabled input" disabled>
|
||||
@if (!empty($statsShop))
|
||||
<label for="previousStart">{{ __('Date de début de la période précédente') }}:</label>
|
||||
<input class="form-control" type="date" id="previousStart" name="previousStart" value="{{ $prevDates->start->toDateString() }}" aria-label="disabled input" disabled>
|
||||
@endif
|
||||
<br>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label for="end">{{ __('Date de fin') }}:</label>
|
||||
<input class="form-control" type="date" id="end" name="end" value="{{ request()->end }}" required/>
|
||||
@if (!empty($stats))
|
||||
<label for="previousEnd">{{ __('Date de fin de la période précédente') }}:</label>
|
||||
<input class="form-control" type="date" id="previousEnd" name="previousEnd" value="{{ $previousDates->end->toDateString() }}" aria-label="disabled input" disabled>
|
||||
@if (!empty($statsShop))
|
||||
<label for="previousEnd">{{ __('Date de fin de la période précédente') }}:</label>
|
||||
<input class="form-control" type="date" id="previousEnd" name="previousEnd" value="{{ $prevDates->end->toDateString() }}" aria-label="disabled input" disabled>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col d-inline-flex align-items-center">
|
||||
|
|
@ -46,99 +30,154 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table table-responsive table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center bg-secondary bg-gradient bg-opacity-25">
|
||||
<th scope="col"></th>
|
||||
<th scope="col">{{ __('Période précédente') }}</th>
|
||||
<th scope="col">{{ __('Période actuelle') }}</th>
|
||||
<th scope="col">{{ __('Différence') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@if(!empty($stats))
|
||||
<tbody>
|
||||
@foreach ($stats as $k => $stat)
|
||||
<tr class="text-center">
|
||||
@if (
|
||||
$k === App\Enums\StatsType::nbWaitingCmd()->value ||
|
||||
$k === App\Enums\StatsType::nbCanceledCmd()->value ||
|
||||
$k === App\Enums\StatsType::canceledRate()->value ||
|
||||
$k === App\Enums\StatsType::orderFrequency()->value
|
||||
)
|
||||
<th @if ($stat['diff'] < 0) class="table-success" @else class="table-danger"@endif>{{ App\Enums\StatsType::make($k)->label }}</th>
|
||||
<td @if ($stat['diff'] < 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsType::canceledRate()->value)
|
||||
{{ number_format($stat['previous'], 2, ",", " ") }} %
|
||||
@break
|
||||
@case(App\Enums\StatsType::orderFrequency()->value)
|
||||
{{ number_format($stat['previous'], 2, ",", " ") }} {{ __('jours') }}
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['previous']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] < 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsType::canceledRate()->value)
|
||||
{{ number_format($stat['current'], 2, ",", " ") }} %
|
||||
@break
|
||||
@case(App\Enums\StatsType::orderFrequency()->value)
|
||||
{{ number_format($stat['current'], 2, ",", " ") }} {{ __('jours') }}
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['current']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] < 0) class="text-success table-success" @else class="text-danger table-danger" @endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsType::canceledRate()->value)
|
||||
<b>{{ number_format($stat['diff'], 2, ",", " ") }} %</b>
|
||||
@break
|
||||
@case(App\Enums\StatsType::orderFrequency()->value)
|
||||
<b>{{ number_format($stat['diff'], 2, ",", " ") }} {{ __('jours') }}</b>
|
||||
@break
|
||||
@default
|
||||
<b>{{ str_replace(".", ",", $stat['diff']) }}</b>
|
||||
@endswitch
|
||||
</td>
|
||||
@else
|
||||
<th @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>{{ App\Enums\StatsType::make($k)->label }}</th>
|
||||
<td @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsType::caHt()->value)
|
||||
@case(App\Enums\StatsType::averageBasketHt()->value)
|
||||
{{ number_format($stat['previous'], 2, ",", " ") }} €
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['previous']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsType::caHt()->value)
|
||||
@case(App\Enums\StatsType::averageBasketHt()->value)
|
||||
{{ number_format($stat['current'], 2, ",", " ") }} €
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['current']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] > 0) class="text-success table-success" @else class="text-danger table-danger" @endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsType::caHt()->value)
|
||||
@case(App\Enums\StatsType::averageBasketHt()->value)
|
||||
<b>{{ number_format($stat['diff'], 2, ",", " ") }} €</b>
|
||||
@break
|
||||
@default
|
||||
<b>{{ str_replace(".", ",", $stat['diff']) }}</b>
|
||||
@endswitch
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endif
|
||||
</table>
|
||||
{{-- CUSTOMERS DATA --}}
|
||||
@if(!empty($statsCustomer))
|
||||
<table class="table table-responsive table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center bg-secondary bg-gradient bg-opacity-25">
|
||||
<th scope="col">{{-- keep empty --}}</th>
|
||||
<th scope="col">{{ __('Période précédente') }}</th>
|
||||
<th scope="col">{{ __('Période actuelle') }}</th>
|
||||
<th scope="col">{{ __('Différence') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($statsCustomer as $k => $stat)
|
||||
<tr class="text-center">
|
||||
<th @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>
|
||||
{{ App\Enums\StatsCustomerType::make($k)->label }}
|
||||
</th>
|
||||
<td @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsCustomerType::membershipRate()->value)
|
||||
{{ number_format($stat['previous'], 2, ",", " ") }} %
|
||||
@break
|
||||
@default
|
||||
{{ $stat['previous'] }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsCustomerType::membershipRate()->value)
|
||||
{{ number_format($stat['current'], 2, ",", " ") }} %
|
||||
@break
|
||||
@default
|
||||
{{ $stat['current'] }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] > 0) class="text-success table-success" @else class="text-danger table-danger" @endif>
|
||||
<b>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsCustomerType::membershipRate()->value)
|
||||
{{ number_format($stat['diff'], 2, ",", " ") }} %
|
||||
@break
|
||||
@default
|
||||
{{ $stat['diff'] }}
|
||||
@endswitch
|
||||
</b>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
@if(!empty($statsShop))
|
||||
<table class="table table-responsive table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center bg-secondary bg-gradient bg-opacity-25">
|
||||
<th scope="col">{{-- keep empty --}}</th>
|
||||
<th scope="col">{{ __('Période précédente') }}</th>
|
||||
<th scope="col">{{ __('Période actuelle') }}</th>
|
||||
<th scope="col">{{ __('Différence') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($statsShop as $k => $stat)
|
||||
<tr class="text-center">
|
||||
@if (
|
||||
$k === App\Enums\StatsShopType::nbWaitingCmd()->value ||
|
||||
$k === App\Enums\StatsShopType::nbCanceledCmd()->value ||
|
||||
$k === App\Enums\StatsShopType::canceledRate()->value
|
||||
)
|
||||
<th @if ($stat['diff'] < 0) class="table-success" @else class="table-danger"@endif>{{ App\Enums\StatsShopType::make($k)->label }}</th>
|
||||
<td @if ($stat['diff'] < 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsShopType::canceledRate()->value)
|
||||
{{ number_format($stat['previous'], 2, ",", " ") }} %
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['previous']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] < 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsShopType::canceledRate()->value)
|
||||
{{ number_format($stat['current'], 2, ",", " ") }} %
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['current']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] < 0) class="text-success table-success" @else class="text-danger table-danger" @endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsShopType::canceledRate()->value)
|
||||
<b>{{ number_format($stat['diff'], 2, ",", " ") }} %</b>
|
||||
@break
|
||||
@default
|
||||
<b>{{ str_replace(".", ",", $stat['diff']) }}</b>
|
||||
@endswitch
|
||||
</td>
|
||||
@else
|
||||
<th @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>{{ App\Enums\StatsShopType::make($k)->label }}</th>
|
||||
<td @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsShopType::caHt()->value)
|
||||
@case(App\Enums\StatsShopType::caTtc()->value)
|
||||
@case(App\Enums\StatsShopType::averageBasketHt()->value)
|
||||
{{ number_format($stat['previous'], 2, ",", " ") }} €
|
||||
@break
|
||||
@case(App\Enums\StatsShopType::orderFrequency()->value)
|
||||
{{ number_format($stat['previous'], 2, ",", " ") }} {{ __('jours') }}
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['previous']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] > 0) class="table-success" @else class="table-danger"@endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsShopType::caHt()->value)
|
||||
@case(App\Enums\StatsShopType::caTtc()->value)
|
||||
@case(App\Enums\StatsShopType::averageBasketHt()->value)
|
||||
{{ number_format($stat['current'], 2, ",", " ") }} €
|
||||
@break
|
||||
@case(App\Enums\StatsShopType::orderFrequency()->value)
|
||||
{{ number_format($stat['current'], 2, ",", " ") }} {{ __('jours') }}
|
||||
@break
|
||||
@default
|
||||
{{ str_replace(".", ",", $stat['current']) }}
|
||||
@endswitch
|
||||
</td>
|
||||
<td @if ($stat['diff'] > 0) class="text-success table-success" @else class="text-danger table-danger" @endif>
|
||||
@switch($k)
|
||||
@case(App\Enums\StatsShopType::caHt()->value)
|
||||
@case(App\Enums\StatsShopType::caTtc()->value)
|
||||
@case(App\Enums\StatsShopType::averageBasketHt()->value)
|
||||
<b>{{ number_format($stat['diff'], 2, ",", " ") }} €</b>
|
||||
@break
|
||||
@case(App\Enums\StatsShopType::orderFrequency()->value)
|
||||
<b>{{ number_format($stat['diff'], 2, ",", " ") }} {{ __('jours') }}</b>
|
||||
@break
|
||||
@default
|
||||
<b>{{ str_replace(".", ",", $stat['diff']) }}</b>
|
||||
@endswitch
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<p>{{ __('Veuillez renseigner une période afin de visualiser les statistiques') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1,65 +1,70 @@
|
|||
@extends('layouts.bo-layout')
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||
<h1 class="h2">Produits <small class="text-muted">Liste</small></h1>
|
||||
|
||||
<form method="GET">
|
||||
<div class="row">
|
||||
<label for="filter_range" class="col-form-label">Gamme</label>
|
||||
<div class="col">
|
||||
<select class="form-control" id="filter_range" name="filter_range">
|
||||
<option value="" @if ($filter_range == '') selected @endif>Toutes</option>
|
||||
@foreach($ranges as $range)
|
||||
<option value="{{$range->id}}" @if ($range->id == $filter_range) selected @endif>{{$range->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="pt-3 pb-2 mb-3 border-bottom">
|
||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center ">
|
||||
<h1 class="h2">Produits <small class="text-muted">Liste</small></h1>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary float-right dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Ajouter un produit
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
@foreach (Config::get('theme.enum_product_types') as $productType => $label)
|
||||
<a class="dropdown-item" href="{{route('bo.products.create', $productType)}}">{{ __($label) }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
<label for="filter_range" class="col-form-label">Marque</label>
|
||||
<div class="col">
|
||||
<select class="form-control" id="filter_brand" name="filter_brand">
|
||||
<option value="" @if ($filter_brand == '') selected @endif>Toutes</option>
|
||||
@foreach (ProductBrand::toArray() as $productbrand)
|
||||
<option value="{{ $productbrand->value }}" @if ($productbrand->value == $filter_brand) selected @endif>{{ $productbrand->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<label for="filter_name" class="col-form-label">Nom</label>
|
||||
<div class="col">
|
||||
<input class="form-control" type="text"
|
||||
placeholder="Recherchez un produit"
|
||||
id="filter_name" name="filter_name"
|
||||
value="{{ $filter_name ?? ''}}">
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-primary">Filtrer</button>
|
||||
<a class="btn btn-info" href="{{ route('bo.products.index') }}">Effacer le filtre</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary float-right dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Ajouter un produit
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
@foreach (Config::get('theme.enum_product_types') as $productType=>$label)
|
||||
<a class="dropdown-item" href="{{route('bo.products.create', $productType)}}">{{ __($label) }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<form class="row" method="GET">
|
||||
<div class="col-12 col-md-6">
|
||||
<label for="filter_name" class="col-form-label">Nom</label>
|
||||
<input class="form-control" type="text"
|
||||
placeholder="Recherchez un produit"
|
||||
id="filter_name" name="filter_name"
|
||||
value="{{ $filter_name ?? ''}}">
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<label for="filter_range" class="col-form-label">Gamme</label>
|
||||
<select class="form-control" id="filter_range" name="filter_range">
|
||||
<option value="" @if ($filter_range == '') selected @endif>Toutes</option>
|
||||
@foreach($ranges as $range)
|
||||
<option value="{{$range->id}}" @if ($range->id == $filter_range) selected @endif>{{$range->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<label for="filter_code_product" class="col-form-label">Code produit</label>
|
||||
<input class="form-control" type="number"
|
||||
placeholder="Recherchez un code produit"
|
||||
id="filter_code_product" name="filter_code_product"
|
||||
value="{{ $filter_code_product ?? ''}}">
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<label for="filter_range" class="col-form-label">Marque</label>
|
||||
<select class="form-control" id="filter_brand" name="filter_brand">
|
||||
<option value="" @if ($filter_brand == '') selected @endif>Toutes</option>
|
||||
@foreach (ProductBrand::toArray() as $productbrand)
|
||||
<option value="{{ $productbrand->value }}" @if ($productbrand->value == $filter_brand) selected @endif>{{ $productbrand->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 text-center mt-3 mb-2">
|
||||
<button class="btn btn-primary">Filtrer</button>
|
||||
<a class="btn btn-info" href="{{ route('bo.products.index') }}">Effacer le filtre</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
@if(count(Config::get('theme.enum_product_types'))>1)
|
||||
<th scope="col">Type</th>
|
||||
@if(count(Config::get('theme.enum_product_types')) > 1)
|
||||
<th scope="col">Type</th>
|
||||
@endif
|
||||
<th scope="col">Ref Externe</th>
|
||||
<th scope="col">Code produit</th>
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Nom</th>
|
||||
<th scope="col">Marque</th>
|
||||
<th scope="col">Prix en €</th>
|
||||
<th scope="col">Stock</th>
|
||||
<th scope="col">Référence</th>
|
||||
<th scope="col">Gamme</th>
|
||||
<th scope="col">Publié</th>
|
||||
<th scope="col">Ordre</th>
|
||||
|
|
@ -69,13 +74,13 @@
|
|||
@foreach ($products as $product)
|
||||
<tr>
|
||||
@if(count(Config::get('theme.enum_product_types'))>1)
|
||||
<td>
|
||||
{{ Config::get('theme.enum_product_types')[$product->product_type] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Config::get('theme.enum_product_types')[$product->product_type] }}
|
||||
</td>
|
||||
@endif
|
||||
<td>
|
||||
@if($product->product_type == "foodProduct")
|
||||
{{ $product->foodProduct->no_art }}
|
||||
{{ $product->foodProduct->no_art }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
|
|
@ -89,7 +94,6 @@
|
|||
<td>{{ $product->brand->label ?? '' }}</td>
|
||||
<td>{{ number_format($product->price, 2, ',', ' ') }}€</td>
|
||||
<td>{{ number_format($product->stock, 0, ',', ' ') }}</td>
|
||||
<td>{{ $product->reference }}</td>
|
||||
<td>{{ $product->range->name }}</td>
|
||||
<td>
|
||||
<form action="{{ route('bo.products.change-published', $product) }}" method="POST">
|
||||
|
|
|
|||
|
|
@ -4,206 +4,184 @@
|
|||
@section('description', 'Procédure d\inscription à la boutique.')
|
||||
|
||||
@section('content')
|
||||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">{{ __('Inscription') }}</h1>
|
||||
@if (session('success'))
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<p class="m-0 me-2">{{ __('Félicitations') }}</p>
|
||||
<p class="m-0">{{ __('Votre compte a bien été créé !') }}</p>
|
||||
<p class="m-0">{{ __('Vous allez recevoir un mail de confirmation sur l\'adresse') }} {{ $mail }}</p>
|
||||
</div>
|
||||
<div class="text-center mt-2">
|
||||
<a class="btn btn-product rounded-4" href="{{ route('auth.connexion') }}">{{ __('Connectez-vous') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<form action="{{ route('auth.register.post') }}" method="POST" id="stdinscription">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div>
|
||||
<ul class="list-group">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li class="list-group-item bg-transparent text-red border-0 text-center">{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<main class="auth-login d-flex justify-content-center align-items-center container">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">{{ __('Inscription') }}</h1>
|
||||
@if (session('success'))
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<p class="m-0 me-2">{{ __('Félicitations') }}</p>
|
||||
<p class="m-0">{{ __('Votre compte a bien été créé !') }}</p>
|
||||
<p class="m-0">{{ __('Vous allez recevoir un mail de confirmation sur l\'adresse') }} {{ $mail }}</p>
|
||||
</div>
|
||||
<div class="mt-2 text-center">
|
||||
<a class="btn btn-product rounded-4" href="{{ route('auth.connexion') }}">{{ __('Connectez-vous') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<form id="stdinscription" action="{{ route('auth.register.post') }}" method="POST">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div>
|
||||
<ul class="list-group">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li class="list-group-item text-red border-0 bg-transparent text-center">{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if (config('bosettings.register_salaries') && config('bosettings.register_public'))
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button class="btn btn-product rounded-4 no-after mb-2" id="codebutton" type="button"
|
||||
onclick="visibility2()">{{ __('J\'ai un code d\'inscription') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2" id="codeinscription" style="display: none;">
|
||||
<div class="col d-flex justify-content-center align-items-center p-0 text-center">
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="matricule" type="text"
|
||||
value="{{ old('matricule') }}" placeholder="Matricule*" />
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="code" type="text"
|
||||
value="{{ old('code') }}" placeholder="Code d'inscription*" />
|
||||
</div>
|
||||
</div>
|
||||
@elseif (config('bosettings.register_salaries') && !config('bosettings.register_public'))
|
||||
<div class="row mb-2" id="codeinscription">
|
||||
<div class="col d-flex justify-content-center align-items-center p-0 text-center">
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="matricule" type="text"
|
||||
value="{{ old('matricule') }}" placeholder="Matricule*" required />
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="code" type="text"
|
||||
value="{{ old('code') }}" placeholder="Code d'inscription*" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col">
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('Merci de renseigner votre matricule (disponible sur votre bulletin de salaire), sur 7 caractères (ex : v00115590 --> 0115590).') }}
|
||||
</p>
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('Merci de vous rapprocher de votre service RH pour connaître votre code d\'inscription à usage unique.') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col d-flex justify-content-center align-items-center p-0 text-center">
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="lastname" type="text"
|
||||
value="{{ old('lastname') }}" placeholder="Nom*" required />
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="firstname" type="text"
|
||||
value="{{ old('firstname') }}" placeholder="Prénom*" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center p-0 text-center">
|
||||
<p class="w-50 m-0">{{ __('Date de naissance *') }}</p>
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="birth_date" type="date"
|
||||
value="{{ old('birth_date') }}" placeholder="Date de naissance*" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<input class="w-100 form-control rounded-4 border-dark" name="email" type="email" value="{{ old('email') }}"
|
||||
placeholder="Votre adresse email *" autocomplete="email" pattern="[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,4}$"
|
||||
required>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center p-0 text-center">
|
||||
<input class="w-50 form-control rounded-4 border-dark" id="password" name="password" type="password"
|
||||
value="{{ old('password') }}" placeholder="Mot de passe*" required />
|
||||
<span class="input-group-btn" id="eyeSlash">
|
||||
<button class="btn no-after reveal" type="button" onclick="visibility3()">
|
||||
<i class="fas fa-eye-slash" aria-hidden="true"></i>
|
||||
</button>
|
||||
</span>
|
||||
<span class="input-group-btn" id="eyeShow" style="display: none;">
|
||||
<button class="btn no-after reveal" type="button" onclick="visibility3()">
|
||||
<i class="fas fa-eye" aria-hidden="true"></i>
|
||||
</button>
|
||||
</span>
|
||||
<input class="w-50 form-control rounded-4 border-dark" id="password_confirmation"
|
||||
name="password_confirmation" type="password" value="{{ old('password_confirmation') }}"
|
||||
placeholder="Confirmer mot de passe*" autocomplete="new-password" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('Le mot de passe doit contenir :') }}
|
||||
</p>
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('- minimum 8 caractères') }}
|
||||
</p>
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('- au moins une majuscule') }}
|
||||
</p>
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('- au moins une minuscule') }}
|
||||
</p>
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('- au moins un chiffre') }}
|
||||
</p>
|
||||
<p class="text-danger m-0 text-center">
|
||||
{{ __('- au moins un caractère spécial.') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<input class="w-100 form-control rounded-4 border-dark" id="phone" name="phone" type="number"
|
||||
value="{{ old('phone') }}" autocomplete="tel" placeholder="Téléphone" pattern="[0-9]{10}">
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center p-0 text-center">
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="address" type="text"
|
||||
value="{{ old('address') }}" placeholder="Adresse postale*" autocomplete="street-address" required />
|
||||
<input class="w-50 form-control rounded-4 border-dark" name="postal_code" type="number"
|
||||
value="{{ old('postal_code') }}" placeholder="Code postal*" autocomplete="postal-code" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<input class="w-100 form-control rounded-4 border-dark" id="town" name="town" type="text"
|
||||
value="{{ old('town') }}" autocomplete="tel" placeholder="Ville*">
|
||||
</div>
|
||||
<div class="form-check d-flex justify-content-center align-items-center rounded-2 p-lg-0 mb-0 mt-2 flex-row px-3 py-2">
|
||||
<input class="form-check-input m-0" id="ok_cgv" name="ok_cgv" type="checkbox" role="button">
|
||||
<label class="w-75 form-check-label ps-2" for="ok_cgv" role="button">
|
||||
{{ __('J\'ai lu et accepte les') }} <a href="{{ route('terms') }}"
|
||||
target="mentions">{{ __('conditions générales') }}</a> et la <a href="{{ route('privacy') }}"
|
||||
target="mentions">{{ __('politique de gestion des données personnelles') }}</a>.
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check d-flex justify-content-center align-items-center rounded-2 p-lg-0 mb-0 mt-2 flex-row px-3 py-2">
|
||||
<input class="form-check-input m-0" id="optin" name="remember" type="checkbox" role="button">
|
||||
<label class="w-75 form-check-label ps-2" for="optin" role="button">
|
||||
{{ __('Je souhaite m\'inscrire à la newsletter') }} {{ Config::get('theme.site_name') }}.
|
||||
</label>
|
||||
</div>
|
||||
<div class="fst-italic my-2 text-center">{{ __('*Champs obligatoires') }}</div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button class="btn btn-product rounded-4" type="submit">{{ __('S\'inscrire') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center">
|
||||
<p class="m-0 me-2">{{ __('Déjà inscrit ?') }}</p>
|
||||
<a class="btn btn-product rounded-4" href="{{ route('auth.connexion') }}">{{ __('Connectez-vous') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if (config('bosettings.register_salaries') && config('bosettings.register_public'))
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button class="btn btn-product rounded-4 mb-2 no-after" onclick="visibility2()" type="button" id="codebutton">{{ __('J\'ai un code d\'inscription') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2" id="codeinscription" style="display: none;">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="matricule"
|
||||
placeholder="Matricule*"
|
||||
value="{{ old('matricule') }}"/>
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="code"
|
||||
placeholder="Code d'inscription*"
|
||||
value="{{ old('code') }}"/>
|
||||
</div>
|
||||
</div>
|
||||
@elseif (config('bosettings.register_salaries') && !config('bosettings.register_public'))
|
||||
<div class="row mb-2" id="codeinscription">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="matricule"
|
||||
placeholder="Matricule*"
|
||||
value="{{ old('matricule') }}" required/>
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="code"
|
||||
placeholder="Code d'inscription*"
|
||||
value="{{ old('code') }}" required/>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="lastname"
|
||||
placeholder="Nom*"
|
||||
value="{{ old('lastname') }}" required/>
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="firstname"
|
||||
placeholder="Prénom*"
|
||||
value="{{ old('firstname') }}" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<p class="w-50 m-0">{{ __('Date de naissance *') }}</p>
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="date"
|
||||
name="birth_date"
|
||||
placeholder="Date de naissance*"
|
||||
value="{{ old('birth_date') }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<input class="w-100 form-control rounded-4 border-dark"
|
||||
name="email"
|
||||
type="email"
|
||||
placeholder="Votre adresse email *"
|
||||
autocomplete="email"
|
||||
pattern="[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,4}$"
|
||||
value="{{ old('email') }}" required>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="password"
|
||||
name="password"
|
||||
id="password"
|
||||
placeholder="Mot de passe*"
|
||||
value="{{ old('password') }}" required/>
|
||||
<span class="input-group-btn" id="eyeSlash">
|
||||
<button class="btn no-after reveal" onclick="visibility3()" type="button">
|
||||
<i class="fas fa-eye-slash" aria-hidden="true"></i>
|
||||
</button>
|
||||
</span>
|
||||
<span class="input-group-btn" id="eyeShow" style="display: none;">
|
||||
<button class="btn no-after reveal" onclick="visibility3()" type="button">
|
||||
<i class="fas fa-eye" aria-hidden="true"></i>
|
||||
</button>
|
||||
</span>
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="password"
|
||||
name="password_confirmation"
|
||||
id="password_confirmation"
|
||||
placeholder="Confirmer mot de passe*"
|
||||
autocomplete="new-password"
|
||||
value="{{ old('password_confirmation') }}" required/>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-center text-muted m-0">
|
||||
{{ __('Le mot de passe doit avoir une longueur minimale de 8 caractères et doit contenir majuscule, minuscule, chiffre et caractère spécial.') }}
|
||||
</p>
|
||||
<div class="row mt-2">
|
||||
<input class="w-100 form-control rounded-4 border-dark"
|
||||
type="number"
|
||||
name="phone"
|
||||
id="phone"
|
||||
autocomplete="tel"
|
||||
placeholder="Téléphone"
|
||||
pattern="[0-9]{10}"
|
||||
value="{{ old('phone') }}">
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="address"
|
||||
placeholder="Adresse postale*"
|
||||
autocomplete="street-address"
|
||||
value="{{ old('address') }}" required/>
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="number"
|
||||
name="postal_code"
|
||||
placeholder="Code postal*"
|
||||
autocomplete="postal-code"
|
||||
value="{{ old('postal_code') }}" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<input class="w-100 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="town"
|
||||
id="town"
|
||||
autocomplete="tel"
|
||||
placeholder="Ville*"
|
||||
value="{{ old('town') }}">
|
||||
</div>
|
||||
<div class="form-check d-flex flex-row justify-content-center align-items-center rounded-2 px-3 py-2 p-lg-0 mt-2 mb-0">
|
||||
<input class="form-check-input m-0" type="checkbox" name="ok_cgv" role="button" id="ok_cgv">
|
||||
<label class="w-75 form-check-label ps-2" role="button" for="ok_cgv">
|
||||
{{ __('J\'ai lu et accepte les') }} <a href="{{ route('terms') }}" target="mentions">{{ __('conditions générales') }}</a> et la <a href="{{ route('privacy') }}" target="mentions">{{ __('politique de gestion des données personnelles') }}</a>.
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check d-flex flex-row justify-content-center align-items-center rounded-2 px-3 py-2 p-lg-0 mt-2 mb-0">
|
||||
<input class="form-check-input m-0" type="checkbox" name="remember" role="button" id="optin">
|
||||
<label class="w-75 form-check-label ps-2" role="button" for="optin">
|
||||
{{ __('Je souhaite m\'inscrire à la newsletter') }} {{ Config::get('theme.site_name') }}.
|
||||
</label>
|
||||
</div>
|
||||
<div class="text-center fst-italic my-2">{{ __('*Champs obligatoires') }}</div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button class="btn btn-product rounded-4" type="submit">{{ __('S\'inscrire') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center">
|
||||
<p class="m-0 me-2">{{ __('Déjà inscrit ?') }}</p>
|
||||
<a class="btn btn-product rounded-4" href="{{ route('auth.connexion') }}">{{ __('Connectez-vous') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
||||
@endsection
|
||||
|
||||
<script>
|
||||
function visibility2() {
|
||||
if($('#codebutton').text() == 'Je n\'ai pas de code') {
|
||||
if ($('#codebutton').text() == 'Je n\'ai pas de code') {
|
||||
//vider les champs
|
||||
$('[name=matricule]').val('').attr("required", false);
|
||||
$('[name=code]').val('').attr("required", false);
|
||||
$('#codebutton').text('J\'ai un code d\'inscription');
|
||||
} else if($('#codebutton').text() == 'J\'ai un code d\'inscription') {
|
||||
} else if ($('#codebutton').text() == 'J\'ai un code d\'inscription') {
|
||||
//rendre obligatoire
|
||||
$('[name=matricule]').attr("required", true);
|
||||
$('[name=code]').attr("required", true);
|
||||
|
|
@ -211,6 +189,7 @@
|
|||
}
|
||||
$('#codeinscription').toggle();
|
||||
}
|
||||
|
||||
function visibility3() {
|
||||
var x = document.getElementById('password');
|
||||
var y = document.getElementById('password_confirmation');
|
||||
|
|
|
|||
1
resources/views/front/sable/js/app.js
vendored
1
resources/views/front/sable/js/app.js
vendored
|
|
@ -58,6 +58,7 @@ Vue.component(
|
|||
"basket-buttons",
|
||||
require("./components/BasketButtons.vue").default
|
||||
);
|
||||
Vue.component("basket-recap", require("./components/BasketRecap.vue").default);
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
|
|
|
|||
230
resources/views/front/sable/js/components/BasketRecap.vue
Normal file
230
resources/views/front/sable/js/components/BasketRecap.vue
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
<template>
|
||||
<section id="basket-recap">
|
||||
<div v-if="!emptybasket" class="d-flex flex-column-reverse flex-lg-column">
|
||||
<table class="table m-0">
|
||||
<thead class="d-none d-lg-table-header-group border-bottom border-dark">
|
||||
<tr>
|
||||
<td scope="col"></td>
|
||||
<td scope="col" class="text-center align-middle">Quantité</td>
|
||||
<td scope="col" class="text-center align-middle">Prix au KG TTC</td>
|
||||
<td scope="col" class="text-center align-middle">Prix TTC</td>
|
||||
<td scope="col" class="text-center align-middle">Sous-total TTC</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-bottom border-dark">
|
||||
<tr v-for="item in panier" class="position-relative">
|
||||
<!-- CARD -->
|
||||
<td class="card position-relative border-0 p-2 px-lg-0 py-lg-3">
|
||||
<div class="d-flex flex-row justify-content-center justify-content-lg-start align-items-center p-0 w-100 m-0">
|
||||
<div class="position-relative w-25">
|
||||
<p class="position-absolute top-50 start-50 translate-middle font-Barlow-bold title-small text-uppercase d-none text-center m-0">bientôt disponible</p>
|
||||
<img v-if="item.product.picture"
|
||||
:src="'/images/produits/'+item.product.picture"
|
||||
:alt="item.cartItem.name"
|
||||
:title="item.cartItem.name"
|
||||
class="img-fluid"
|
||||
>
|
||||
<img v-else
|
||||
src="/img/pl_nophoto.png"
|
||||
:alt="item.cartItem.name"
|
||||
:title="item.cartItem.name"
|
||||
class="img-fluid"
|
||||
>
|
||||
</div>
|
||||
<div class="card-body d-flex flex-column justify-content-between justify-content-lg-center align-items-start w-75 h-100 ps-2">
|
||||
<a :href="'/produit/'+item.product.slug"
|
||||
class="text-decoration-none"
|
||||
:title="item.product.name" target="_self">
|
||||
<p class="title-small font-Barlow-bold stretched-link text-dark m-0">
|
||||
{{ item.product.name }}
|
||||
</p>
|
||||
</a>
|
||||
<div v-if="item.product.description" class="card-text" v-html="item.product.description"></div>
|
||||
<p v-if="item.product.weight_variable" class="fst-italic text-muted">
|
||||
*Produit vendu au kilo : {{ currencyFormatter(item.product.calculatedPrices.priceKgTtc) }}/kg
|
||||
</p>
|
||||
<p v-else class="fst-italic text-muted">
|
||||
Prix au kilo : {{ currencyFormatter(item.product.calculatedPrices.priceKgTtc) }}/kg
|
||||
</p>
|
||||
<div class="card-action d-flex justify-content-between align-items-center w-100">
|
||||
<div class="card-price d-flex flex-row justify-content-center align-items-center">
|
||||
<span class="card-price-new d-block d-lg-none ms-1">
|
||||
{{ currencyFormatter(item.product.calculatedPrices.discountedPriceTtc * item.cartItem.qty) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filtre position-absolute bottom-0 start-0 w-100 h-100 rounded-4"></div>
|
||||
</td>
|
||||
<!-- END CARD -->
|
||||
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">
|
||||
<BasketButtons :productId="item.product.id" />
|
||||
</td>
|
||||
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">
|
||||
<template v-if="item.product.weight_variable">
|
||||
{{ currencyFormatter(item.product.calculatedPrices.priceKgTtc) }}
|
||||
</template>
|
||||
</td>
|
||||
<td class="position-relative d-none d-lg-table-cell title-small border-0 text-center align-middle">
|
||||
<template v-if="item.product.weight_variable">
|
||||
<span class="position-absolute top-0 start-50 translate-middle-x mt-4 pt-3 fs-7 text-muted">Environ*</span>
|
||||
</template>
|
||||
<span class="font-Barlow-extra-bold">{{ currencyFormatter(item.product.calculatedPrices.discountedPriceTtc) }}</span>
|
||||
</td>
|
||||
<td class="position-relative d-none d-lg-table-cell title-small border-0 text-center align-middle">
|
||||
<template v-if="item.product.weight_variable">
|
||||
<span class="position-absolute top-0 start-50 translate-middle-x mt-4 pt-3 fs-7 text-muted">Environ*</span>
|
||||
</template>
|
||||
<span class="font-Barlow-extra-bold">{{ currencyFormatter(item.product.calculatedPrices.discountedPriceTtc * item.cartItem.qty) }}</span>
|
||||
</td>
|
||||
<td class="w-0 p-0">
|
||||
<button class="btn btn-cross position-absolute icon-medium icon-cross" @click="removeItem(item.cartItem.rowId)" :disabled="(disableBtn) ? true : false"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table-total table m-0 rounded-4">
|
||||
<tr>
|
||||
<td class="d-none d-lg-table-cell border-0"></td>
|
||||
<td class="d-none d-lg-table-cell border-0"></td>
|
||||
<td class="border-0 text-center align-middle p-0 p-lg-2">Total estimé TTC</td>
|
||||
<td class="title-small border-0 text-center align-middle p-0 p-lg-2 font-Barlow-extra-bold">{{ currencyFormatter(cartTotals.totalTTC) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p v-else class="alert alert-danger text-center w-100 m-0">Votre panier est vide</p>
|
||||
<div class="recap-actions d-flex flex-row justify-content-between align-items-center w-100 my-5">
|
||||
<a class="btn" :href="routeProducts">⟵ Continuer mes achats</a>
|
||||
<template v-if="emptybasket">
|
||||
<a class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" :href="routeOrders">Terminer une commande en attente ?</a>
|
||||
</template>
|
||||
<form v-else :action="propRouteSales" method="POST">
|
||||
<input type="hidden" name="_token" :value="csrf">
|
||||
<input type="submit" class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" value="Suivant >">
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BasketButtons from './BasketButtons.vue';
|
||||
export default {
|
||||
components: { BasketButtons },
|
||||
props: ['propRouteProducts', 'propRouteSales', 'propRouteOrders'],
|
||||
data() {
|
||||
return {
|
||||
success:false,
|
||||
errors:false,
|
||||
response: '',
|
||||
promotion_slide: -1,
|
||||
disableBtn: false,
|
||||
routeProducts: this.propRouteProducts,
|
||||
routeSales: this.propRouteSales,
|
||||
routeOrders: this.propRouteOrders,
|
||||
csrf: document.querySelector('meta[name="csrf-token"]').getAttribute('content'),
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
emptybasket() { return _.isEmpty(this.$store.state.panier); },
|
||||
panier() { return this.$store.state.panier; },
|
||||
cartTotals() { return this.$store.state.cartTotals; }
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
console.log(this.propRouteProducts);
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
axios.post('/ajax/get-cart', {
|
||||
instance: 'panier',
|
||||
}).then(response => {
|
||||
let result = response.data;
|
||||
this.updateStore(result);
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
},
|
||||
addtocart(product_id,qtty) {
|
||||
let breaker = false;
|
||||
this.panier.forEach(element => {
|
||||
if(element.cartItem.id == product_id) {
|
||||
element.cartItem.qty += qtty;
|
||||
}
|
||||
if(element.cartItem.qty <= 0) {
|
||||
this.removeItem(element.cartItem.rowId);
|
||||
breaker = true;
|
||||
}
|
||||
});
|
||||
if(!breaker) {
|
||||
axios.post('/ajax/add-to-cart', {
|
||||
id: product_id,
|
||||
qty: qtty,
|
||||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
this.updateStore(response.data);
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
this.response = "Erreur lors de la modification du panier.";
|
||||
});
|
||||
}
|
||||
},
|
||||
removeItem(rowId) {
|
||||
this.disableBtn = true;
|
||||
axios.post('/ajax/remove-from-cart', {
|
||||
rowId: rowId,
|
||||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
this.updateStore(response.data);
|
||||
this.disableBtn = false;
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
this.response = "Erreur lors de la modification du panier.";
|
||||
this.disableBtn = false;
|
||||
});
|
||||
},
|
||||
emptyCart() {
|
||||
axios.post('/ajax/empty-cart', {
|
||||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
this.updateStore(response.data);
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
this.response = "Erreur lors de la modification du panier.";
|
||||
});
|
||||
},
|
||||
updateStore(result) {
|
||||
if (result[0].length != this.panier.length) {
|
||||
this.$store.commit({
|
||||
type: 'updatePanier',
|
||||
panier: result[0]
|
||||
});
|
||||
}
|
||||
this.$store.commit({
|
||||
type: 'updatePanier',
|
||||
panier: result[0]
|
||||
});
|
||||
this.$store.commit({
|
||||
type: 'updateCartTotals',
|
||||
cartTotals: result[1]
|
||||
});
|
||||
},
|
||||
// General purpose.
|
||||
currencyFormatter(num) {
|
||||
if (isNaN(num)) {
|
||||
return num;
|
||||
}
|
||||
return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(num);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,24 +1,21 @@
|
|||
<article class="order col-lg-3 position-fixed start-0 position-lg-relative p-0 p-lg-5">
|
||||
<div class="row">
|
||||
<div class="col-2 d-flex d-lg-none justify-content-start align-items-center p-0">
|
||||
<a class="btn" href="{{ url()->previous() }}">⟵</a>
|
||||
</div>
|
||||
<div class="col-8 col-lg-12 p-0 p-lg-1 {{ $activestep == 1 ? "active" : ($activestep > 1 ? "step-done" : "") }}">
|
||||
<div class="col-10 col-lg-12 {{ $activestep == 1 ? "active" : ($activestep > 1 ? "step-done" : "") }}">
|
||||
<div class="row">
|
||||
<span class="col-2 col-xl-1 d-none d-lg-block overflow-hidden font-Barlow-bold p-0">1-</span>
|
||||
<p class="col p-0 m-0">Récapitulatif</p>
|
||||
<p class="text-start col p-0 m-0">Récapitulatif</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 col-lg-12 p-0 p-lg-1 {{ $activestep == 2 ? "active" : ($activestep > 2 ? "step-done" : "") }}">
|
||||
<div class="col-10 col-lg-12 {{ $activestep == 2 ? "active" : ($activestep > 2 ? "step-done" : "") }}">
|
||||
<div class="row">
|
||||
<span class="col-2 col-xl-1 d-none d-lg-block overflow-hidden font-Barlow-bold p-0">2-</span>
|
||||
<p class="col p-0 m-0">Réservation</p>
|
||||
<p class="text-start col p-0 m-0">Réservation</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 col-lg-12 p-0 p-lg-1 {{ $activestep == 3 ? "active" : ($activestep > 3 ? "step-done" : "") }}">
|
||||
<div class="col-10 col-lg-12 {{ $activestep == 3 ? "active" : ($activestep > 3 ? "step-done" : "") }}">
|
||||
<div class="row">
|
||||
<span class="col-2 col-xl-1 d-none d-lg-block overflow-hidden font-Barlow-bold p-0">3-</span>
|
||||
<p class="col p-0 m-0">Confirmation</p>
|
||||
<p class="text-start col p-0 m-0">Confirmation</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="col-2 d-flex d-lg-none justify-content-end align-items-center">{{ $activestep }}/3</span>
|
||||
|
|
|
|||
|
|
@ -15,107 +15,11 @@
|
|||
@endif
|
||||
@include('partials.tunnel-stepper')
|
||||
<article class="col mt-6 m-lg-0">
|
||||
<p class="d-none d-lg-block title-regular text-center text-lg-end text-uppercase font-Barlow-extra-bold m-3">Récapitulatif de votre panier</p>
|
||||
<div class="d-flex flex-column-reverse flex-lg-column">
|
||||
<table class="table m-0">
|
||||
<thead class="d-none d-lg-table-header-group border-bottom border-dark">
|
||||
<tr>
|
||||
<td scope="col"></td>
|
||||
<td scope="col" class="text-center align-middle">Quantité</td>
|
||||
<td scope="col" class="text-center align-middle">Prix au KG TTC</td>
|
||||
<td scope="col" class="text-center align-middle">Prix TTC</td>
|
||||
<td scope="col" class="text-center align-middle">Sous-total TTC</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-bottom border-dark">
|
||||
@foreach ($cart as $cartItem)
|
||||
<tr class="position-relative">
|
||||
<!-- CARD -->
|
||||
<td class="card position-relative border-0 p-2 px-lg-0 py-lg-3">
|
||||
<div class="d-flex flex-row justify-content-center justify-content-lg-start align-items-center p-0 w-100 m-0">
|
||||
<div class="position-relative w-25">
|
||||
<p class="position-absolute top-50 start-50 translate-middle font-Barlow-bold title-small text-uppercase d-none text-center m-0">bientôt disponible</p>
|
||||
@if (isset($cartItem->model->picture))
|
||||
<img src="{{ asset('/images/produits/' . $cartItem->model->picture) }}"
|
||||
alt="{{ $cartItem->name }}" class="img-fluid">
|
||||
@else
|
||||
<img src="{{ asset(config('app.theme') . '/img/pl_nophoto.png') }}"
|
||||
alt="{{ $cartItem->name }}" class="img-fluid">
|
||||
@endif
|
||||
</div>
|
||||
<div class="card-body d-flex flex-column justify-content-between justify-content-lg-center align-items-start w-75 h-100 ps-2">
|
||||
<a href="{{ route('product', ['productSlug' => $cartItem->model->slug]) }}"
|
||||
class="text-decoration-none"
|
||||
title="{{ $cartItem->name }}" target="_self">
|
||||
<p class="title-small font-Barlow-bold stretched-link text-dark m-0">
|
||||
{{ $cartItem->name }}
|
||||
</p>
|
||||
</a>
|
||||
@if($cartItem->model->description) <div class="card-text">{!! $cartItem->model->description !!}</div> @endif
|
||||
@if ($cartItem->model->weight_variable)
|
||||
<p class="fst-italic text-muted">*Produit vendu au kilo : @fmt_currency($cartItem->model->priceKgTtc)/kg</p>
|
||||
@else
|
||||
<p class="fst-italic text-muted">Prix au kilo : @fmt_currency($cartItem->model->priceKgTtc)/kg</p>
|
||||
@endif
|
||||
|
||||
<div class="card-action d-flex justify-content-between align-items-center w-100">
|
||||
<div class="card-price d-flex flex-row justify-content-center align-items-center">
|
||||
{{-- @if ($cartItem->model->promotions->count())
|
||||
<span class="card-price-original position-relative">@fmt_currency($cartItem->model->priceTtc)</span>
|
||||
@endif --}}
|
||||
<span class="card-price-new d-block d-lg-none {{-- @if ($cartItem->model->promotions->count()) text-red @endif --}} ms-1">
|
||||
{{ sprintf('%s €', number_format($cartItem->model->discountedPriceTtc * $cartItem->qty, 2, ',', ' ')) }}
|
||||
</span>
|
||||
</div>
|
||||
{{--<div class="d-block d-lg-none">
|
||||
<basket-buttons :product-id='{{ $cartItem->model->id }}'></basket-buttons>
|
||||
</div>--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filtre position-absolute bottom-0 start-0 w-100 h-100 rounded-4"></div>
|
||||
</td>
|
||||
<!-- END CARD -->
|
||||
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">{{ $cartItem->qty }}</td>
|
||||
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">
|
||||
@if ($cartItem->model->weight_variable) @fmt_currency($cartItem->model->priceKgTtc) @endif
|
||||
</td>
|
||||
<td class="position-relative d-none d-lg-table-cell title-small border-0 text-center align-middle">
|
||||
@if ($cartItem->model->weight_variable) <span class="position-absolute top-0 start-50 translate-middle-x mt-4 pt-3 fs-7 text-muted">Environ*</span> @endif
|
||||
<span class="font-Barlow-extra-bold">@fmt_currency($cartItem->model->discountedPriceTtc)</span>
|
||||
</td>
|
||||
<td class="position-relative d-none d-lg-table-cell title-small border-0 text-center align-middle">
|
||||
@if ($cartItem->model->weight_variable) <span class="position-absolute top-0 start-50 translate-middle-x mt-4 pt-3 fs-7 text-muted">Environ*</span> @endif
|
||||
<span class="font-Barlow-extra-bold">{{ sprintf('%s €', number_format($cartItem->model->discountedPriceTtc * $cartItem->qty, 2, ',', ' ')) }}</span>
|
||||
</td>
|
||||
<td class="w-0 p-0">
|
||||
<button class="btn btn-cross position-absolute icon-medium icon-cross" type="button" value="{{ $cartItem->rowId }}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table-total table m-0 rounded-4">
|
||||
<tr>
|
||||
<td class="d-none d-lg-table-cell border-0"></td>
|
||||
<td class="d-none d-lg-table-cell border-0"></td>
|
||||
<td class="border-0 text-center align-middle p-0 p-lg-2">Total estimé TTC</td>
|
||||
<td class="title-small border-0 text-center align-middle p-0 p-lg-2 font-Barlow-extra-bold">{{ sprintf('%s €', number_format($cartInfos['totalTTC'], 2, ',', ' ')) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="recap-actions d-flex flex-row justify-content-between align-items-center w-100 my-5">
|
||||
<a class="btn d-none d-lg-block" href="{{ route('products') }}">⟵ Continuer mes achats</a>
|
||||
@if (count($cart) > 0)
|
||||
<form action="{{ route('sales.order-init') }}" method="POST">
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" value="Suivant >">
|
||||
</form>
|
||||
@else
|
||||
<div class="alert alert-danger">Votre commande est vide.</div>
|
||||
<a class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" href="{{ route('account.my-orders') }}">Terminer une commande en attente ?</a>
|
||||
@endif
|
||||
</div>
|
||||
<h1 class="d-none d-lg-block title-regular text-center text-lg-end text-uppercase font-Barlow-extra-bold m-3">
|
||||
Récapitulatif de votre panier
|
||||
</h1>
|
||||
<basket-recap :prop-route-products="'{{ route('products') }}'" :prop-route-sales="'{{ route('sales.order-init') }}'"
|
||||
:prop-route-orders="'{{ route('account.my-orders') }}'"></basket-recap>
|
||||
</article>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
background-color: $medium-grey;
|
||||
z-index: 1;
|
||||
|
||||
.col-8:not(.active) {
|
||||
.col-10:not(.active) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
@ -34,6 +34,8 @@
|
|||
font-size: 1.5em;
|
||||
font-family: 'Barlow_Extra_Bold';
|
||||
background-color: $white;
|
||||
position: sticky;
|
||||
top: 8rem;
|
||||
}
|
||||
|
||||
.btn-cross {
|
||||
|
|
@ -47,45 +49,6 @@
|
|||
z-index: $zindex-fixed;
|
||||
}
|
||||
}
|
||||
|
||||
// SSSSSSSSSSSSSSS MMMMMMMM MMMMMMMM
|
||||
// SS:::::::::::::::SM:::::::M M:::::::M
|
||||
// S:::::SSSSSS::::::SM::::::::M M::::::::M
|
||||
// S:::::S SSSSSSSM:::::::::M M:::::::::M
|
||||
// S:::::S M::::::::::M M::::::::::M
|
||||
// S:::::S M:::::::::::M M:::::::::::M
|
||||
// S::::SSSS M:::::::M::::M M::::M:::::::M
|
||||
// SS::::::SSSSS M::::::M M::::M M::::M M::::::M
|
||||
// SSS::::::::SS M::::::M M::::M::::M M::::::M
|
||||
// SSSSSS::::S M::::::M M:::::::M M::::::M
|
||||
// S:::::SM::::::M M:::::M M::::::M
|
||||
// S:::::SM::::::M MMMMM M::::::M
|
||||
// SSSSSSS S:::::SM::::::M M::::::M
|
||||
// S::::::SSSSSS:::::SM::::::M M::::::M
|
||||
// S:::::::::::::::SS M::::::M M::::::M
|
||||
// SSSSSSSSSSSSSSS MMMMMMMM MMMMMMMM
|
||||
@include media-breakpoint-up(sm) { //576px
|
||||
//
|
||||
}
|
||||
// MMMMMMMM MMMMMMMMDDDDDDDDDDDDD
|
||||
// M:::::::M M:::::::MD::::::::::::DDD
|
||||
// M::::::::M M::::::::MD:::::::::::::::DD
|
||||
// M:::::::::M M:::::::::MDDD:::::DDDDD:::::D
|
||||
// M::::::::::M M::::::::::M D:::::D D:::::D
|
||||
// M:::::::::::M M:::::::::::M D:::::D D:::::D
|
||||
// M:::::::M::::M M::::M:::::::M D:::::D D:::::D
|
||||
// M::::::M M::::M M::::M M::::::M D:::::D D:::::D
|
||||
// M::::::M M::::M::::M M::::::M D:::::D D:::::D
|
||||
// M::::::M M:::::::M M::::::M D:::::D D:::::D
|
||||
// M::::::M M:::::M M::::::M D:::::D D:::::D
|
||||
// M::::::M MMMMM M::::::M D:::::D D:::::D
|
||||
// M::::::M M::::::MDDD:::::DDDDD:::::D
|
||||
// M::::::M M::::::MD:::::::::::::::DD
|
||||
// M::::::M M::::::MD::::::::::::DDD
|
||||
// MMMMMMMM MMMMMMMMDDDDDDDDDDDDD
|
||||
@include media-breakpoint-up(md) { //768px
|
||||
//
|
||||
}
|
||||
// LLLLLLLLLLL GGGGGGGGGGGGG
|
||||
// L:::::::::L GGG::::::::::::G
|
||||
// L:::::::::L GG:::::::::::::::G
|
||||
|
|
@ -107,7 +70,7 @@
|
|||
.order {
|
||||
background-color: transparent;
|
||||
|
||||
.col-8:not(.active) {
|
||||
.col-10:not(.active) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
@ -148,6 +111,7 @@
|
|||
|
||||
&-total {
|
||||
font-size: 1em;
|
||||
position: initial;
|
||||
td:not(.font-Barlow-extra-bold) {
|
||||
font-family: 'Barlow_Regular';
|
||||
}
|
||||
|
|
@ -159,41 +123,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
// XXXXXXX XXXXXXXLLLLLLLLLLL
|
||||
// X:::::X X:::::XL:::::::::L
|
||||
// X:::::X X:::::XL:::::::::L
|
||||
// X::::::X X::::::XLL:::::::LL
|
||||
// XXX:::::X X:::::XXX L:::::L
|
||||
// X:::::X X:::::X L:::::L
|
||||
// X:::::X:::::X L:::::L
|
||||
// X:::::::::X L:::::L
|
||||
// X:::::::::X L:::::L
|
||||
// X:::::X:::::X L:::::L
|
||||
// X:::::X X:::::X L:::::L
|
||||
// XXX:::::X X:::::XXX L:::::L LLLLLL
|
||||
// X::::::X X::::::XLL:::::::LLLLLLLLL:::::L
|
||||
// X:::::X X:::::XL::::::::::::::::::::::L
|
||||
// X:::::X X:::::XL::::::::::::::::::::::L
|
||||
// XXXXXXX XXXXXXXLLLLLLLLLLLLLLLLLLLLLLLL
|
||||
@include media-breakpoint-up(xl) { //1200px
|
||||
//
|
||||
}
|
||||
// XXXXXXX XXXXXXXXXXXXXX XXXXXXXLLLLLLLLLLL
|
||||
// X:::::X X:::::XX:::::X X:::::XL:::::::::L
|
||||
// X:::::X X:::::XX:::::X X:::::XL:::::::::L
|
||||
// X::::::X X::::::XX::::::X X::::::XLL:::::::LL
|
||||
// XXX:::::X X:::::XXXXXX:::::X X:::::XXX L:::::L
|
||||
// X:::::X X:::::X X:::::X X:::::X L:::::L
|
||||
// X:::::X:::::X X:::::X:::::X L:::::L
|
||||
// X:::::::::X X:::::::::X L:::::L
|
||||
// X:::::::::X X:::::::::X L:::::L
|
||||
// X:::::X:::::X X:::::X:::::X L:::::L
|
||||
// X:::::X X:::::X X:::::X X:::::X L:::::L
|
||||
// XXX:::::X X:::::XXXXXX:::::X X:::::XXX L:::::L LLLLLL
|
||||
// X::::::X X::::::XX::::::X X::::::XLL:::::::LLLLLLLLL:::::L
|
||||
// X:::::X X:::::XX:::::X X:::::XL::::::::::::::::::::::L
|
||||
// X:::::X X:::::XX:::::X X:::::XL::::::::::::::::::::::L
|
||||
// XXXXXXX XXXXXXXXXXXXXX XXXXXXXLLLLLLLLLLLLLLLLLLLLLLLL
|
||||
@include media-breakpoint-up(xxl) { //1400px
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,45 @@
|
|||
@import "~@ldc-web/cookie-notice/dist/browser/cookie-cn.css";
|
||||
@import './../utilities/variables';
|
||||
|
||||
#cn-wrapper {
|
||||
p:not(.cn-modal-title),
|
||||
.cn-cookie-description {
|
||||
color: $dark !important;
|
||||
}
|
||||
|
||||
.cn-nav #cn-deny-banner,
|
||||
.cn-nav #cn-accept-banner,
|
||||
.cn-nav #cn-settings-banner {
|
||||
font-weight: bolder;
|
||||
background-color: $dark !important;
|
||||
color: $white !important;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $orange !important;
|
||||
color: $dark !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cn-content {
|
||||
.cn-switch input {
|
||||
&:checked + span {
|
||||
background: $orange !important;
|
||||
|
||||
&::before {
|
||||
left: 2rem !important;
|
||||
}
|
||||
}
|
||||
+ span::before {
|
||||
left: 0.4rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cn-modal-container .cn-cookie-name,
|
||||
.cn-banner-content .cn-banner-text .cn-banner-title {
|
||||
color: $orange !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ __('Tableau de bord') }}</title>
|
||||
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/b-o/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -25,14 +22,16 @@
|
|||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
|
||||
<div class="position-sticky pt-3">
|
||||
<ul class="nav flex-column mb-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{route('home')}}" target="_front">{{ __('Voir le site') }}</a>
|
||||
<a class="nav-link" href="{{ route('home') }}" target="_front">{{ __('Voir le site') }}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('bo.dashboard') }}">{{ __('Dashboard') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="accordion" id="accordionMenu">
|
||||
|
|
@ -76,7 +75,6 @@
|
|||
<i class="fas fa-warehouse"></i> {{ __('Catalogue') }}
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="collapseProduits" class="accordion-collapse collapse {{ ( request()->routeIs('bo.products*') || request()->routeIs('bo.ranges*') || request()->routeIs('bo.tags*') ) ? 'show' : '' }}" aria-labelledby="headingProduits" data-bs-parent="#accordionMenu">
|
||||
<div class="accordion-body">
|
||||
<ul class="nav flex-column mb-2">
|
||||
|
|
@ -95,7 +93,6 @@
|
|||
<i class="fas fa-cart-arrow-down"></i> {{ __('Merchandising') }}
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="collapseMerchandising" class="accordion-collapse collapse {{ ( request()->routeIs('bo.promotions*') || request()->routeIs('bo.products.starred') ) ? 'show' : '' }}" aria-labelledby="headingMerchandising" data-bs-parent="#accordionMenu">
|
||||
<div class="accordion-body">
|
||||
<ul class="nav flex-column mb-2">
|
||||
|
|
@ -114,7 +111,6 @@
|
|||
<i class="fas fa-cash-register"></i> {{ __('Commandes') }}
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="collapseOrders" class="accordion-collapse collapse {{ ( request()->routeIs('bo.orders*') ) ? 'show' : '' }}" aria-labelledby="headingOrders" data-bs-parent="#accordionMenu">
|
||||
<div class="accordion-body">
|
||||
<ul class="nav flex-column mb-2">
|
||||
|
|
@ -149,7 +145,6 @@
|
|||
<i class="fas fa-cog"></i> Règlages
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="collapseSettings" class="accordion-collapse collapse {{ ( request()->routeIs('bo.settings*') ) ? 'show' : '' }}" aria-labelledby="headingSettings" data-bs-parent="#accordionMenu">
|
||||
<div class="accordion-body">
|
||||
<ul class="nav flex-column mb-2">
|
||||
|
|
@ -167,7 +162,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
|
|
|||
51
resources/views/vendor/cn-cookies.blade.php
vendored
51
resources/views/vendor/cn-cookies.blade.php
vendored
|
|
@ -7,28 +7,57 @@ $logo_title_text = __('Logo du site :name', ['name' => $site_name]);
|
|||
$logo_alt_text = __('Logo :name', ['name' => $site_name]);
|
||||
|
||||
$strings = (object)[
|
||||
'modal_title' => __('Fenêtre de gestion de cookies'),
|
||||
'modal_title' => __('cookie-notice.modal_title'),
|
||||
'button_customize_cookies' => __('cookie-notice.button_customize_cookies'),
|
||||
'button_close_cookies' => __('cookie-notice.button_close_cookies'),
|
||||
'button_title_open_new_tab' => __('Ouvrir le lien dans un nouvel onglet'),
|
||||
'button_forbid' => __('cookie-notice.button_forbid'),
|
||||
'button_allow' => __('cookie-notice.button_allow'),
|
||||
'button_forbid_all' => Str::upper(__('cookie-notice.button_forbid_all')),
|
||||
'button_allow_all' => Str::upper(__('cookie-notice.button_allow_all')),
|
||||
'button_customize' => Str::upper(__('cookie-notice.button_customize')),
|
||||
'button_title_open_new_tab' => __('cookie-notice.button_title_open_new_tab'),
|
||||
'button_toggle_cookie' => __('cookie-notice.button_toggle_cookie'),
|
||||
'button_forbid_all' => Str::of(__('cookie-notice.button_forbid_all'))->upper(),
|
||||
'button_allow_all' => Str::of(__('cookie-notice.button_allow_all'))->upper(),
|
||||
'button_customize' => Str::of(__('cookie-notice.button_customize'))->upper(),
|
||||
'button_forbid_all_title' => __('cookie-notice.button_forbid_all_title'),
|
||||
'button_allow_all_title' => __('cookie-notice.button_allow_all_title'),
|
||||
'button_back' => Str::upper(__('cookie-notice.button_back')),
|
||||
'button_validate_and_close' => Str::of(__('cookie-notice.button_validate_and_close'))->upper(),
|
||||
'banner_title' => __('cookie-notice.banner_title', ['site_name' => $site_name]),
|
||||
'banner_text' => __('cookie-notice.banner_text'),
|
||||
'banner_text' => sprintf(
|
||||
"%s<br><br>%s",
|
||||
"Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques. Vous pouvez changer d'avis à tout moment en cliquant sur l'icône présente sur chaque page de notre site. En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l'utilisation de technologies de suivi nécessaires à leur bon fonctionnement.",
|
||||
"<a href='/charte-de-confidentialite'>Charte de confidentialité</a>"
|
||||
),
|
||||
'panel_title' => __('cookie-notice.panel_title'),
|
||||
'panel_content' => __('cookie-notice.panel_content'),
|
||||
'panel_subtitle' => __('cookie-notice.panel_subtitle'),
|
||||
'panel_details' => __('cookie-notice.panel_details'),
|
||||
'picture_cookie_title' => __('Image d\'un bon gros cookie'),
|
||||
'navigation_title' => __('Navigation du panneau des cookie'),
|
||||
'picture_cookie_title' => __('cookie-notice.picture_cookie_title'),
|
||||
'navigation_title' => __('cookie-notice.navigation_title'),
|
||||
];
|
||||
|
||||
$cookieInline = function ($cookieName, $text, $subtext = '') {
|
||||
return <<<SCRIPT
|
||||
(() => {
|
||||
const cookieActivate = document.createElement("span");
|
||||
cookieActivate.classList.add("cn-cookie-activate");
|
||||
cookieActivate.dataset.cookieName = '{$cookieName}';
|
||||
|
||||
const childSpan = document.createElement("span");
|
||||
const childSpanSpan = document.createElement("span");
|
||||
const childSpanSmall = document.createElement("span");
|
||||
childSpanSpan.textContent = '{$text}';
|
||||
childSpanSmall.textContent = '{$subtext}';
|
||||
childSpan.appendChild(childSpanSpan);
|
||||
childSpan.appendChild(childSpanSmall);
|
||||
|
||||
const childBtn = document.createElement("button");
|
||||
childBtn.classList.add('btn','btn-red');
|
||||
childBtn.textContent = 'Autoriser';
|
||||
|
||||
cookieActivate.appendChild(childSpan);
|
||||
cookieActivate.appendChild(childBtn);
|
||||
return cookieActivate;
|
||||
})
|
||||
SCRIPT;
|
||||
};
|
||||
|
||||
$cookies = [];
|
||||
|
||||
// MATOMO
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<div class="position-relative" id="cn-wrapper" title="{{ $strings->modal_title }}" role="alertdialog" tabindex="-1">
|
||||
<div id="cn-wrapper" title="{{ $strings->modal_title }}" role="alertdialog" tabindex="-1">
|
||||
<button id="cn-cookie-btn" title="{{ $strings->button_customize_cookies }}">
|
||||
{{-- COOKIE SVG --}}
|
||||
<svg viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>{{ $strings->picture_cookie_title }}</title>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M14.0001 2.93383C14.0001 4.16622 14.6159 5.25477 15.5567 5.90849C15.3526 6.46423 15.2412 7.06473 15.2412 7.69126C15.2412 10.5472 17.5564 12.8624 20.4123 12.8624C21.0807 12.8624 21.7195 12.7356 22.3059 12.5047C22.9456 13.527 24.0817 14.2069 25.3766 14.2069C26.1872 14.2069 26.9357 13.9404 27.539 13.4903C27.5453 13.6594 27.5484 13.8294 27.5484 14C27.5484 21.4826 21.4826 27.5484 14 27.5484C6.51748 27.5484 0.45166 21.4826 0.45166 14C0.45166 6.51748 6.51748 0.45166 14 0.45166C14.3209 0.45166 14.6391 0.462811 14.9543 0.484747C14.3618 1.12929 14.0001 1.98931 14.0001 2.93383ZM21.2176 2.53212C21.2195 2.54914 21.2213 2.56619 21.2229 2.58328C21.2569 2.58864 21.2909 2.59433 21.3247 2.60035C21.2891 2.57745 21.2534 2.5547 21.2176 2.53212ZM25.5171 6.86104C25.523 6.89745 25.5285 6.93399 25.5336 6.97066C25.5512 6.97141 25.5687 6.97228 25.5861 6.97328C25.5633 6.93574 25.5403 6.89833 25.5171 6.86104ZM12.5247 2.09283C12.4748 2.38291 12.4487 2.68118 12.4487 2.98553C12.4487 4.33316 12.9591 5.56158 13.7972 6.48802C13.7266 6.87842 13.6898 7.28054 13.6898 7.69126C13.6898 11.404 16.6996 14.4137 20.4123 14.4137C20.8725 14.4137 21.3219 14.3675 21.7562 14.2794C22.689 15.1941 23.9669 15.7582 25.3766 15.7582C25.5439 15.7582 25.7094 15.7503 25.8726 15.7347C25.0321 21.5385 20.0368 25.9971 14.0001 25.9971C7.37431 25.9971 2.00305 20.6258 2.00305 14.0001C2.00305 7.87378 6.59498 2.82 12.5247 2.09283Z"
|
||||
fill="#f6c500" />
|
||||
<circle cx="7.58784" cy="12.8624" r="1.96503" fill="#f6c500" />
|
||||
<circle cx="8.82887" cy="19.2745" r="1.3445" fill="#f6c500" />
|
||||
<circle cx="13.6897" cy="14.5171" r="1.03423" fill="#f6c500" />
|
||||
<circle cx="11.4144" cy="7.48439" r="0.930805" fill="#f6c500" />
|
||||
<circle cx="17.5164" cy="20.3089" r="1.86161" fill="#f6c500" />
|
||||
<circle cx="21.3432" cy="6.7604" r="0.930805" fill="#f6c500" />
|
||||
<circle cx="22.1706" cy="1.89958" r="1.44792" fill="#f6c500" />
|
||||
<circle cx="26.8245" cy="8.31185" r="0.72396" fill="#f6c500" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.0001 2.93383C14.0001 4.16622 14.6159 5.25477 15.5567 5.90849C15.3526 6.46423 15.2412 7.06473 15.2412 7.69126C15.2412 10.5472 17.5564 12.8624 20.4123 12.8624C21.0807 12.8624 21.7195 12.7356 22.3059 12.5047C22.9456 13.527 24.0817 14.2069 25.3766 14.2069C26.1872 14.2069 26.9357 13.9404 27.539 13.4903C27.5453 13.6594 27.5484 13.8294 27.5484 14C27.5484 21.4826 21.4826 27.5484 14 27.5484C6.51748 27.5484 0.45166 21.4826 0.45166 14C0.45166 6.51748 6.51748 0.45166 14 0.45166C14.3209 0.45166 14.6391 0.462811 14.9543 0.484747C14.3618 1.12929 14.0001 1.98931 14.0001 2.93383ZM21.2176 2.53212C21.2195 2.54914 21.2213 2.56619 21.2229 2.58328C21.2569 2.58864 21.2909 2.59433 21.3247 2.60035C21.2891 2.57745 21.2534 2.5547 21.2176 2.53212ZM25.5171 6.86104C25.523 6.89745 25.5285 6.93399 25.5336 6.97066C25.5512 6.97141 25.5687 6.97228 25.5861 6.97328C25.5633 6.93574 25.5403 6.89833 25.5171 6.86104ZM12.5247 2.09283C12.4748 2.38291 12.4487 2.68118 12.4487 2.98553C12.4487 4.33316 12.9591 5.56158 13.7972 6.48802C13.7266 6.87842 13.6898 7.28054 13.6898 7.69126C13.6898 11.404 16.6996 14.4137 20.4123 14.4137C20.8725 14.4137 21.3219 14.3675 21.7562 14.2794C22.689 15.1941 23.9669 15.7582 25.3766 15.7582C25.5439 15.7582 25.7094 15.7503 25.8726 15.7347C25.0321 21.5385 20.0368 25.9971 14.0001 25.9971C7.37431 25.9971 2.00305 20.6258 2.00305 14.0001C2.00305 7.87378 6.59498 2.82 12.5247 2.09283Z" fill="#F6C500" />
|
||||
<circle cx="7.58784" cy="12.8624" r="1.96503" fill="#F6C500" />
|
||||
<circle cx="8.82887" cy="19.2745" r="1.3445" fill="#F6C500" />
|
||||
<circle cx="13.6897" cy="14.5171" r="1.03423" fill="#F6C500" />
|
||||
<circle cx="11.4144" cy="7.48439" r="0.930805" fill="#F6C500" />
|
||||
<circle cx="17.5164" cy="20.3089" r="1.86161" fill="#F6C500" />
|
||||
<circle cx="21.3432" cy="6.7604" r="0.930805" fill="#F6C500" />
|
||||
<circle cx="22.1706" cy="1.89958" r="1.44792" fill="#F6C500" />
|
||||
<circle cx="26.8245" cy="8.31185" r="0.72396" fill="#F6C500" />
|
||||
</svg>
|
||||
</button>
|
||||
{{-- BANNER --}}
|
||||
|
|
@ -30,32 +28,24 @@
|
|||
</div>
|
||||
<div class="cn-banner-text">
|
||||
<div class="cn-banner-title">
|
||||
<span class="fw-normal">{!! nl2br(e($strings->banner_title)) !!}</span>
|
||||
<span>{!! nl2br(e($strings->banner_title)) !!}</span>
|
||||
</div>
|
||||
<div class="cn-banner-para-p">
|
||||
<p>{!! nl2br(e($strings->banner_text)) !!}</p>
|
||||
<p>{!! clean($strings->banner_text) !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 2ND PAGE CUSTOMIZE PANEL --}}
|
||||
<div class="cn-modal-container d-none">
|
||||
<p class="cn-modal-title" aria-level="h2">{{ $strings->panel_title }}</p>
|
||||
<p class="cn-modal-subtitle">{!! nl2br(e($strings->panel_subtitle)) !!}</p>
|
||||
<p class="cn-modal-description">{!! nl2br(e($strings->panel_details)) !!}</p>
|
||||
<div class="cn-modal-wrapper">
|
||||
{{-- COOKIES LIST --}}
|
||||
<ul id="cn-modal-list"></ul>
|
||||
</div>
|
||||
{{-- COOKIES LIST --}}
|
||||
<ul id="cn-modal-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
{{-- NAV BAR --}}
|
||||
<div class="cn-nav" title="{{ $strings->navigation_title }}" role="navigation">
|
||||
<button class="cn-banner-btn cn-deny" id="cn-deny-banner"
|
||||
title="{{ $strings->button_forbid_all_title }}">{{ $strings->button_forbid_all }}</button>
|
||||
<button class="cn-banner-btn cn-accept" id="cn-accept-banner"
|
||||
title="{{ $strings->button_allow_all_title }}">{{ $strings->button_allow_all }}</button>
|
||||
<button class="cn-banner-btn cn-custom" id="cn-settings-banner" data-open-modal="{{ $strings->button_back }}"
|
||||
data-close-modal="{{ $strings->button_customize }}">{{ $strings->button_customize }}</button>
|
||||
<button class="cn-banner-btn cn-deny" id="cn-deny-banner" title="{{ $strings->button_forbid_all_title }}">{{ $strings->button_forbid_all }}</button>
|
||||
<button class="cn-banner-btn cn-accept" id="cn-accept-banner" title="{{ $strings->button_allow_all_title }}">{{ $strings->button_allow_all }}</button>
|
||||
<button class="cn-banner-btn cn-custom" id="cn-settings-banner" data-open-modal="{{ $strings->button_validate_and_close }}" data-close-modal="{{ $strings->button_customize }}">{{ $strings->button_customize }}</button>
|
||||
</div>
|
||||
|
||||
{{-- COOKIE LIST LI TEMPLATE --}}
|
||||
|
|
@ -67,14 +57,11 @@
|
|||
<a class="cn-cookie-link" title="{{ $strings->button_title_open_new_tab }}" target="blank">#link</a>
|
||||
</div>
|
||||
<div class="cn-cookie-buttons">
|
||||
<div class="deny">
|
||||
<input id="" name="" data-name="" data-status="false" type="radio">
|
||||
<label for="" role="button" tabindex="0">{{ $strings->button_forbid }}</label>
|
||||
</div>
|
||||
<div class="accept">
|
||||
<input id="" name="" data-name="" data-status="true" type="radio">
|
||||
<label for="" role="button" tabindex="0">{{ $strings->button_allow }}</label>
|
||||
</div>
|
||||
<label class="cn-switch" role="checkbox" aria-label="{{ $strings->button_toggle_cookie }}" title="{{ $strings->button_toggle_cookie }}" aria-checked="undefined"
|
||||
tabindex="0">
|
||||
<input type="checkbox" tabindex="-1" />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue