Merge branch 'trunk'
This commit is contained in:
commit
1f34c77256
80 changed files with 712 additions and 97 deletions
|
|
@ -16,7 +16,6 @@ use App\Jobs\DeleteOldNotifications;
|
|||
use App\Jobs\DeleteOrders;
|
||||
use App\Jobs\PurgeNotifications as JobsPurgeNotifications;
|
||||
use App\Jobs\PurgeOldResetPasswords;
|
||||
use App\Jobs\SendOcbMissingBreederReminder;
|
||||
use App\Jobs\UpdateReductions as JobsUpdateReductions;
|
||||
use App\Jobs\XmlEleveursReader as JobsXmlEleveursReader;
|
||||
use App\Jobs\XmlIncoReader as JobsXmlIncoReader;
|
||||
|
|
@ -52,7 +51,7 @@ class Kernel extends ConsoleKernel
|
|||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
//$schedule->job(SendOcbMissingBreederReminder::class)->dailyAt('07:30');
|
||||
// $schedule->job(SendOcbMissingBreederReminder::class)->dailyAt('07:30');
|
||||
$schedule->job(DeleteOrders::class)->dailyAt('14:00');
|
||||
$schedule->job(DeleteOldMessages::class)->dailyAt('14:15');
|
||||
$schedule->job(DeleteOldNotifications::class)->dailyAt('14:30');
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class ArticleCategory extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class BreedingBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -17,6 +22,11 @@ final class BreedingBlocType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class ContactFormCivility extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class ContactFormCivility extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -26,6 +36,11 @@ final class ContactFormCivility extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ final class ContactFormType extends BaseEnumRoutable
|
|||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class Days extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -30,6 +35,11 @@ final class Days extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -44,6 +54,11 @@ final class Days extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
|
||||
abstract class Departaimant extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class DepartaimantCollectionType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class DepartaimantCollectionType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -26,6 +36,11 @@ final class DepartaimantCollectionType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Json serialize implementation.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -107,6 +107,11 @@ namespace App\Enums;
|
|||
*/
|
||||
final class DepartaimantCurrent extends Departaimant
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -214,6 +219,11 @@ final class DepartaimantCurrent extends Departaimant
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class DepartaimantStatus extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -22,6 +27,11 @@ final class DepartaimantStatus extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -32,11 +42,21 @@ final class DepartaimantStatus extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* To Array
|
||||
*
|
||||
* @return \Kwaadpepper\Enum\BaseEnum[]
|
||||
*/
|
||||
public static function toArray(): array
|
||||
{
|
||||
$array = [];
|
||||
|
|
@ -49,6 +69,11 @@ final class DepartaimantStatus extends BaseEnumRoutable
|
|||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Json serialize implementation.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -105,6 +105,11 @@ namespace App\Enums;
|
|||
*/
|
||||
final class DepartaimantVintage extends Departaimant
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -210,6 +215,11 @@ final class DepartaimantVintage extends Departaimant
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class EleveurOcbStatus extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -21,6 +26,12 @@ final class EleveurOcbStatus extends BaseEnumRoutable
|
|||
'yes' => 3
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -31,6 +42,11 @@ final class EleveurOcbStatus extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class EngagementBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -24,6 +29,11 @@ final class EngagementBlocType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class EngagementType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class EngagementType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class GMapDataType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class GeneralConfigType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -22,6 +27,11 @@ final class GeneralConfigType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class GeoType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class GeoType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class InputType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class NotificationType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -24,6 +29,11 @@ final class NotificationType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class NutritionBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -29,6 +34,11 @@ final class NutritionBlocType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class NutritionPageType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class NutritionPageType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -5,25 +5,32 @@ namespace App\Enums;
|
|||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self egg()
|
||||
* @method static self rabbit()
|
||||
* @method static self poultry()
|
||||
*/
|
||||
final class OCBType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'egg' => 0,
|
||||
'rabbit' => 1,
|
||||
'poultry' => 2
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'egg' => __('Oeuf'),
|
||||
'rabbit' => __('Lapin'),
|
||||
'poultry' => __('Volaille')
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class OrderStatus extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -24,6 +29,11 @@ final class OrderStatus extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class OrderType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class OrderType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class PoultryBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -20,6 +25,11 @@ final class PoultryBlocType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class PoultryPageType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class PoultryPageType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class PresentationType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class PresentationType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class RangeColor extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -35,6 +40,12 @@ final class RangeColor extends BaseEnumRoutable
|
|||
'color11' => 'color-11'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class RecipeDifficulty extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -22,6 +27,11 @@ final class RecipeDifficulty extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -32,6 +42,11 @@ final class RecipeDifficulty extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class RecipeFilter extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
$labels = self::labels();
|
||||
|
|
@ -24,6 +29,11 @@ final class RecipeFilter extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class RecipeFilterTimes extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
$labels = self::labels();
|
||||
|
|
@ -22,6 +27,11 @@ final class RecipeFilterTimes extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class RecipeType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
@ -18,6 +23,11 @@ final class RecipeType extends BaseEnumRoutable
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Exception;
|
|||
/**
|
||||
* This class Exception is used to skip a row import from
|
||||
* database migration (2016 -> 2020)
|
||||
*
|
||||
* @author Jérémy Munsch <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class AbortContactMailer extends Exception
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Exception;
|
|||
/**
|
||||
* This class Exception is used to skip a row import from
|
||||
* database migration (2016 -> 2020)
|
||||
*
|
||||
* @author Jérémy Munsch <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class AbortRowImportException extends Exception
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Exception;
|
|||
/**
|
||||
* This class Exception is used in CB payement process
|
||||
* database migration (2016 -> 2020)
|
||||
*
|
||||
* @author Jérémy Munsch <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class CBPayementError extends Exception
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Exception;
|
|||
/**
|
||||
* This class Exception is used to skip a row import from
|
||||
* database migration (2016 -> 2020)
|
||||
*
|
||||
* @author Jérémy Munsch <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class RedirectTo extends Exception
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class AuthController extends Controller
|
|||
|
||||
/**
|
||||
* Enregistre le customer dans la base de données
|
||||
*
|
||||
* @param \App\Http\Requests\CustomerRegisterRequest $request
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
|
|
@ -142,6 +143,7 @@ class AuthController extends Controller
|
|||
|
||||
/**
|
||||
* Retourne la page de connexion
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
|
||||
*/
|
||||
|
|
@ -251,6 +253,7 @@ class AuthController extends Controller
|
|||
|
||||
/**
|
||||
* Handle Api error exception
|
||||
*
|
||||
* @param \LDC\LDCCRM\Exceptions\ApiErrorException $e
|
||||
* @param \App\Http\Requests\LoginRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
|
|
@ -326,6 +329,7 @@ class AuthController extends Controller
|
|||
|
||||
/**
|
||||
* Login a customer
|
||||
*
|
||||
* @param \App\Models\Customers $customer
|
||||
* @param boolean $remember
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
|
|
@ -361,6 +365,7 @@ class AuthController extends Controller
|
|||
|
||||
/**
|
||||
* Fomulaire reset mot de passe sur la page login
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\RedirectResponse|void
|
||||
* @throws \Exception Exception.
|
||||
|
|
@ -455,6 +460,7 @@ class AuthController extends Controller
|
|||
|
||||
/**
|
||||
* Modification du mot de passe par lien via le formulaire reset mot de passe
|
||||
*
|
||||
* @param \App\Http\Requests\ResetCustomerPassword $request
|
||||
* @param string $token
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse
|
||||
|
|
@ -504,6 +510,7 @@ class AuthController extends Controller
|
|||
|
||||
/**
|
||||
* Mettre à jour le mot de passe lorsque l'on est connecté
|
||||
*
|
||||
* @param \App\Http\Requests\CustomerUpdatePassword $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException.
|
||||
|
|
|
|||
|
|
@ -444,6 +444,7 @@ class MomentsController extends Controller
|
|||
|
||||
/**
|
||||
* Passe un moment en moment star. Si il y avait déjà un moment star, il ne l'est plus et le nouveau le remplace
|
||||
*
|
||||
* @param id L'id du moment qui doit devenir moment star
|
||||
*/
|
||||
public function setStar($id)
|
||||
|
|
|
|||
|
|
@ -406,6 +406,7 @@ class BoutiqueController extends Controller
|
|||
|
||||
/**
|
||||
* Get Mercanet ref and responseCode for request
|
||||
*
|
||||
* @return array['ref' => 'value', 'responseCode' => 'value']
|
||||
*/
|
||||
private function getMercanetData(Request $request): array
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ class BreedingPageController extends Controller
|
|||
*/
|
||||
public function list(BreedingPageType $pageType)
|
||||
{
|
||||
$pages = BreedingPage::where('type', $pageType)->whereStatus(true)->get();
|
||||
$bannerUrl = $this->getBannerUrlFromGeneralConfig($pageType);
|
||||
$pages = BreedingPage::where('type', $pageType)->whereStatus(true)->get();
|
||||
$bannerUrl = $this->getBannerUrlFromGeneralConfig($pageType);
|
||||
$headerText = $this->getTextHeaderFromGeneralConfig($pageType);
|
||||
|
||||
return view('front.breeding-page.list', compact('pages', 'pageType', 'bannerUrl', 'headerText'));
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* Index
|
||||
*
|
||||
* @param \App\Enums\ArticleCategory|null $tag
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException.
|
||||
|
|
@ -152,6 +153,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* missingCrmInfosSubmit
|
||||
*
|
||||
* @param \App\Http\Requests\UpdateInfosRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException.
|
||||
|
|
@ -174,6 +176,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* Updates user info
|
||||
*
|
||||
* @param \App\Http\Requests\UpdateInfosRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse|string|boolean return strictly true if success,
|
||||
* false il failed, could be a string with message error if failed
|
||||
|
|
@ -311,6 +314,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* reductionsGet
|
||||
*
|
||||
* @param \App\Http\Requests\DownloadBRFileRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response
|
||||
* @throws \Exception Exception.
|
||||
|
|
@ -351,6 +355,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* Call the article page with a slug for the article to print
|
||||
*
|
||||
* @param \App\Enums\ArticleCategory $tag
|
||||
* @param \App\Models\Articles $publishedArticle
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
|
||||
|
|
@ -387,6 +392,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* Handle the request of a customer that answered a survey
|
||||
*
|
||||
* @param \App\Http\Requests\SurveyAnswersRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException.
|
||||
|
|
@ -442,6 +448,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* Send a message to a user
|
||||
*
|
||||
* @param \App\Http\Requests\SendMessageRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException.
|
||||
|
|
@ -492,6 +499,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* Destroy a message
|
||||
*
|
||||
* @param \App\Http\Requests\DeleteMessagesRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @throws \LogicException LogicException.
|
||||
|
|
@ -529,6 +537,7 @@ class ClubController extends Controller
|
|||
|
||||
/**
|
||||
* Block a customer to prevent him sending messages
|
||||
*
|
||||
* @param \App\Http\Requests\BlockCustomerRequest $request
|
||||
* @param boolean $status
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ class ContactController extends Controller
|
|||
|
||||
/**
|
||||
* Propose meal recipe
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ class CustomerController extends Controller
|
|||
|
||||
/**
|
||||
* setFavoriteRecipe
|
||||
*
|
||||
* @param \App\Models\Recipes $recipe
|
||||
* @param boolean $status
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class HomeController extends Controller
|
|||
|
||||
/**
|
||||
* Call the CRM to add a single optin
|
||||
*
|
||||
* @param \App\Http\Requests\SingleOptinRequest $request
|
||||
* @return string|array|null|\Illuminate\Contracts\Translation\Translator
|
||||
* @throws \LDC\LDCCRM\Exceptions\ValidationException ValidationException.
|
||||
|
|
|
|||
|
|
@ -77,17 +77,4 @@ class OCBController extends Controller
|
|||
->inRandomOrder()->first();
|
||||
return view('front.ocb.poultry', compact('breeder', 'ocbContents'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show ocb egg content
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
|
||||
*/
|
||||
public function egg()
|
||||
{
|
||||
$ocbContents = OCBContent::where('type', OCBType::egg())
|
||||
->orderBy('order')
|
||||
->where('status', true)->get();
|
||||
return view('front.ocb.egg', compact('ocbContents'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ class EnterCodeController extends Controller
|
|||
|
||||
/**
|
||||
* Participate Method
|
||||
*
|
||||
* @param \App\Http\Requests\OpBrCharcut\ParticipateRequest $request
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException.
|
||||
|
|
@ -33,6 +34,7 @@ class EnterCodeController extends Controller
|
|||
|
||||
/**
|
||||
* Détermine si un BR doit être servi, renvoi la vue de gain BR
|
||||
*
|
||||
* @param mixed $code
|
||||
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException.
|
||||
|
|
@ -64,6 +66,7 @@ class EnterCodeController extends Controller
|
|||
|
||||
/**
|
||||
* Update a coupon
|
||||
*
|
||||
* @param mixed $id_coupon
|
||||
* @param mixed $qtty
|
||||
* @return mixed
|
||||
|
|
@ -108,6 +111,7 @@ class EnterCodeController extends Controller
|
|||
|
||||
/**
|
||||
* updateCustomer
|
||||
*
|
||||
* @param mixed $hascode
|
||||
* @param mixed $email
|
||||
* @param mixed $country
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class SendArchadiaMail implements ShouldQueue
|
|||
|
||||
/**
|
||||
* To be serialized by jobs system
|
||||
*
|
||||
* @var MailContactData
|
||||
* */
|
||||
private $data;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class SendNLMail implements ShouldQueue
|
|||
|
||||
/**
|
||||
* To be serialized by jobs system
|
||||
*
|
||||
* @var MailContactData
|
||||
* */
|
||||
private $data;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class SendOrderToArchadia implements ShouldQueue
|
|||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\Order $order
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class SendPasserelleMail implements ShouldQueue
|
|||
|
||||
/**
|
||||
* To be serialized by jobs system
|
||||
*
|
||||
* @var MailContactData
|
||||
* */
|
||||
private $data;
|
||||
|
|
|
|||
|
|
@ -469,7 +469,6 @@ class XmlIncoReader extends XmlJobs
|
|||
* <TYP_PORTION><![CDATA[Approximatif]]></TYP_PORTION>
|
||||
* extracted as "TYP_PORTION" => "Approximatif"
|
||||
*
|
||||
*
|
||||
* @param \SimpleXMLElement|false $sxe
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -484,15 +483,18 @@ class XmlIncoReader extends XmlJobs
|
|||
if ($value->count()) {
|
||||
$extraction = $this->extract($value);
|
||||
|
||||
if(count($extraction)
|
||||
&& array_key_exists("code",$extraction)
|
||||
&& array_key_exists("libelle",$extraction)) {
|
||||
$val = strval($extraction['libelle']);
|
||||
if (
|
||||
count($extraction)
|
||||
&& array_key_exists("code", $extraction)
|
||||
&& array_key_exists("libelle", $extraction)
|
||||
) {
|
||||
$val = strval($extraction['libelle']);
|
||||
$extract[$key] = strlen($val) ? $val : null;
|
||||
continue;
|
||||
}
|
||||
|
||||
$extract[$key][] = $extraction; //$this->extract($value);
|
||||
$extract[$key][] = $extraction;
|
||||
// $this->extract($value);
|
||||
continue;
|
||||
}
|
||||
$value = strval($value);
|
||||
|
|
@ -501,7 +503,7 @@ class XmlIncoReader extends XmlJobs
|
|||
} else {
|
||||
$extract[$key] = strlen($value) ? $value : null;
|
||||
}
|
||||
}
|
||||
}//end foreach
|
||||
return $extract;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -558,6 +558,7 @@ class Mercanet
|
|||
|
||||
/**
|
||||
* Filter http request parameters
|
||||
*
|
||||
* @param array $requestParameters
|
||||
*/
|
||||
private function filterRequestParameters(array $httpRequest)
|
||||
|
|
@ -595,6 +596,7 @@ class Mercanet
|
|||
|
||||
/**
|
||||
* Checks if the response is valid
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isValid()
|
||||
|
|
@ -658,6 +660,7 @@ class Mercanet
|
|||
|
||||
/**
|
||||
* Retrieves a response parameter
|
||||
*
|
||||
* @param string $param
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ namespace App\Lib;
|
|||
class MesBR
|
||||
{
|
||||
private $endpoint;
|
||||
|
||||
private $refCamp;
|
||||
|
||||
public function __construct($endpoint, $refCamp)
|
||||
|
|
|
|||
|
|
@ -9,20 +9,23 @@ namespace App\Lib;
|
|||
class MesBROld
|
||||
{
|
||||
private $endpoint;
|
||||
|
||||
private $refSite;
|
||||
|
||||
private $refCamp;
|
||||
|
||||
public function __construct($endpoint, $refSite, $refCamp)
|
||||
{
|
||||
$this->endpoint = $endpoint;
|
||||
$this->refSite = $refSite;
|
||||
$this->refCamp = $refCamp;
|
||||
$this->refSite = $refSite;
|
||||
$this->refCamp = $refCamp;
|
||||
}
|
||||
|
||||
/** Update contact *
|
||||
* NOT USED - SHOULD BE DELETED
|
||||
*
|
||||
* @param $oCrmUser
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function updateContact($oCrmUser)
|
||||
{
|
||||
|
|
@ -46,9 +49,10 @@ class MesBROld
|
|||
}
|
||||
|
||||
/** Update panier *
|
||||
*
|
||||
* @param $oCrmUser
|
||||
* @param $couponId
|
||||
* @param int $quantity
|
||||
* @param integer $quantity
|
||||
* @return array
|
||||
*/
|
||||
public function updatePanier($oCrmUser, $refid, $couponId, $quantity = 1)
|
||||
|
|
@ -56,7 +60,7 @@ class MesBROld
|
|||
$datas = [
|
||||
'refsite' => $this->refSite,
|
||||
'refcamp' => $this->refCamp,
|
||||
//TODO : ici il faut une id qui est ajoutée au code barre du coupon donc un hascode c'est trop long
|
||||
// TODO : ici il faut une id qui est ajoutée au code barre du coupon donc un hascode c'est trop long
|
||||
'refadherent' => $refid,
|
||||
'nom' => $oCrmUser->lastname,
|
||||
'prenom' => $oCrmUser->firstname,
|
||||
|
|
@ -66,7 +70,7 @@ class MesBROld
|
|||
'pays' => $this->getCountry($oCrmUser->country),
|
||||
'panier' => "($quantity)$couponId"
|
||||
];
|
||||
$res = $this->callAPI("GET", "/updatebasket", $datas);
|
||||
$res = $this->callAPI("GET", "/updatebasket", $datas);
|
||||
if (!$res) {
|
||||
error_log("MESBR - CODE : 999 - MESSAGE : Cannot read API Response (non json)");
|
||||
return ['status' => 'KO', 'code' => 999, 'message' => 'Cannot read API Response (non json)'];
|
||||
|
|
@ -76,7 +80,7 @@ class MesBROld
|
|||
return ['status' => 'KO', 'code' => $res->Code, 'message' => $res->Message];
|
||||
}
|
||||
$panierVerification = $this->endpoint . '/showbasket?basketid=' . $res->Panier->Panier;
|
||||
$panier_link = $this->endpoint . '/?basketid=' . $res->Panier->Panier;
|
||||
$panier_link = $this->endpoint . '/?basketid=' . $res->Panier->Panier;
|
||||
return ['status' => 'OK', 'link' => $panier_link, 'verif' => $panierVerification, 'basketId' => $res->Panier->Panier];
|
||||
}
|
||||
/** Génère le lien vers le mur (ou panier préprogrammé) **/
|
||||
|
|
@ -94,7 +98,8 @@ class MesBROld
|
|||
return 442;
|
||||
break;
|
||||
default:
|
||||
return 250; //France
|
||||
return 250;
|
||||
// France
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -104,20 +109,23 @@ class MesBROld
|
|||
switch ($method) {
|
||||
case "POST":
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
if ($data)
|
||||
if ($data) {
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
}
|
||||
break;
|
||||
case "PUT":
|
||||
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
|
||||
if ($data)
|
||||
if ($data) {
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ($data)
|
||||
if ($data) {
|
||||
$url = sprintf("%s?%s", $url, http_build_query($data));
|
||||
}
|
||||
}
|
||||
curl_setopt($curl, CURLOPT_URL, $this->endpoint . $url);
|
||||
curl_setopt($curl, CURLOPT_COOKIESESSION, TRUE);
|
||||
curl_setopt($curl, CURLOPT_COOKIESESSION, true);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
$result = curl_exec($curl);
|
||||
if (!$result) {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class Utils
|
|||
* Replace stange accents
|
||||
*
|
||||
* https://stackoverflow.com/questions/3371697/replacing-accented-characters-php
|
||||
*
|
||||
* @author Jérémy Munsch <jeremy.munsch@jeremydev.ovh>
|
||||
* @param string $subject
|
||||
* @return string
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ class ReductionWon extends Mailable implements ShouldQueue
|
|||
*/
|
||||
public function __construct($user, $linkpanier)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->linkpanier = $linkpanier;
|
||||
$this->user = $user;
|
||||
$this->linkpanier = $linkpanier;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ class Contact extends Model
|
|||
|
||||
/**
|
||||
* Get Counter skeleton
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function counterSkeleton(): array
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ namespace App\Models;
|
|||
|
||||
use App\Enums\DepartaimantCollectionType;
|
||||
use App\Http\Resources\CustomerCrmResource;
|
||||
use App\Lib\Utils;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
|
|
|
|||
|
|
@ -34,22 +34,52 @@ class DepartaimantsCollection extends Model
|
|||
protected $table = 'departaimants';
|
||||
|
||||
private static $columnTableNamePrefix = 'col';
|
||||
// Le prefix d'un table departaimant
|
||||
|
||||
/**
|
||||
* Le prefix d'un table departaimant
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private static $tableFields = 4;
|
||||
// Le nombre de colonnes des departaimants
|
||||
|
||||
/**
|
||||
* Le nombre de colonnes des departaimants
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private static $departementWidth = 2;
|
||||
// La largeur en bits d'un départaimant
|
||||
|
||||
/**
|
||||
* La largeur en bits d'un départaimant
|
||||
* * to be set in construct
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $attributes = [
|
||||
'type' => 'current'
|
||||
// to be set in construct
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $fillable = [
|
||||
'collection'
|
||||
];
|
||||
|
||||
/**
|
||||
* Handle dynamic static method calls into the model.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
* @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing
|
||||
* @phpcs:disable Squiz.Commenting.FunctionComment.ScalarTypeHintMissing
|
||||
*/
|
||||
public static function __callStatic($name, $arguments)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($name === 'defaultType') {
|
||||
return DepartaimantCollectionType::current();
|
||||
}
|
||||
|
|
@ -59,8 +89,8 @@ class DepartaimantsCollection extends Model
|
|||
|
||||
/**
|
||||
* @param array $attributes
|
||||
* @throws TypeError
|
||||
* @throws BadMethodCallException
|
||||
* @throws \TypeError
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,16 +11,25 @@ use Illuminate\Support\Facades\Storage;
|
|||
use Illuminate\Support\Str;
|
||||
use Kwaadpepper\Enum\Traits\CastsEnums;
|
||||
|
||||
// old Breeders
|
||||
class OCBBreeder extends BreederForGmap
|
||||
{
|
||||
use CastsEnums;
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'display' => 'boolean',
|
||||
'inuavs' => 'array'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to Enums.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $enumCasts = [
|
||||
'presentation_type' => PresentationType::class,
|
||||
'ocbStatus' => EleveurOcbStatus::class,
|
||||
|
|
@ -28,8 +37,18 @@ class OCBBreeder extends BreederForGmap
|
|||
'geo_type' => GeoType::class
|
||||
];
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'ocb_breeders';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'breeder_code',
|
||||
'first_name',
|
||||
|
|
@ -51,6 +70,11 @@ class OCBBreeder extends BreederForGmap
|
|||
'inuavs',
|
||||
];
|
||||
|
||||
/**
|
||||
* Perform any actions required after the model boots.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function booted()
|
||||
{
|
||||
static::creating(function ($breeder) {
|
||||
|
|
@ -96,11 +120,18 @@ class OCBBreeder extends BreederForGmap
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the route key for the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRouteKeyName()
|
||||
{
|
||||
return "slug";
|
||||
}
|
||||
|
||||
// * METHODS
|
||||
|
||||
/**
|
||||
* Get ocb validated breeders query
|
||||
*
|
||||
|
|
@ -111,28 +142,55 @@ class OCBBreeder extends BreederForGmap
|
|||
return static::where('ocbStatus', EleveurOcbStatus::yes());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter picture attribute
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getPictureAttribute()
|
||||
{
|
||||
return $this->pictureAttribute('picture');
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter picture_1 attribute
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getPicture1Attribute()
|
||||
{
|
||||
return $this->pictureAttribute('picture1');
|
||||
}
|
||||
/**
|
||||
* Getter picture_2 attribute
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getPicture2Attribute()
|
||||
{
|
||||
return $this->pictureAttribute('picture2');
|
||||
}
|
||||
/**
|
||||
* Getter picture_3 attribute
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getPicture3Attribute()
|
||||
{
|
||||
return $this->pictureAttribute('picture3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Refactored picture attribute
|
||||
*
|
||||
* @param string $prop
|
||||
* @return mixed
|
||||
*/
|
||||
private function pictureAttribute(string $prop)
|
||||
{
|
||||
$p = $this->attributes[$prop];
|
||||
// For migrated urls from 2016
|
||||
// For migrated urls from 2016.
|
||||
if (
|
||||
is_null($p) or
|
||||
!strlen($p) or
|
||||
|
|
|
|||
|
|
@ -10,12 +10,27 @@ class OCBContent extends Model
|
|||
{
|
||||
use CastsEnums;
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to Enums.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $enumCasts = [
|
||||
'type' => OCBType::class
|
||||
];
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'ocb_content';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'picture',
|
||||
'content',
|
||||
|
|
@ -24,6 +39,11 @@ class OCBContent extends Model
|
|||
'status'
|
||||
];
|
||||
|
||||
/**
|
||||
* Perform any actions required after the model boots.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function booted()
|
||||
{
|
||||
static::creating(function ($ocbContent) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use Kwaadpepper\Serial\Exceptions\SerialCasterException;
|
|||
class Code extends Model
|
||||
{
|
||||
protected $table = 'opbrcharcut_codes';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
|
@ -29,7 +30,6 @@ class Code extends Model
|
|||
public $timestamps = false;
|
||||
|
||||
// * RELATIONS
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customers::class);
|
||||
|
|
@ -83,7 +83,7 @@ class Code extends Model
|
|||
);
|
||||
} catch (SerialCasterException $e) {
|
||||
Log::error($e->getMessage() . " code utilisé : " . $serial);
|
||||
//return 0 invalid value for code
|
||||
// return 0 invalid value for code
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
class CodeEan extends Model
|
||||
{
|
||||
protected $table = 'opbrcharcut_codes_eans';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ class Recipes extends Model
|
|||
|
||||
/**
|
||||
* Get Associated Recipes
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection<Recipes>
|
||||
*/
|
||||
public function associatedRecipes()
|
||||
|
|
@ -137,6 +138,7 @@ class Recipes extends Model
|
|||
|
||||
/**
|
||||
* Check if recipe has been rated by the user (in session also if not Auth)
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasBeenRatedByUser()
|
||||
|
|
@ -152,6 +154,7 @@ class Recipes extends Model
|
|||
|
||||
/**
|
||||
* Check if recipe has been rated by the user (in session also if not Auth)
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getUserRating()
|
||||
|
|
@ -167,6 +170,7 @@ class Recipes extends Model
|
|||
|
||||
/**
|
||||
* Set the recipes rating and memorize in session, or user
|
||||
*
|
||||
* @param string $rating
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,9 +27,6 @@ trait GoogleMapSerialize
|
|||
case OCBType::poultry()->value:
|
||||
$ocbType = trans('Éleveur de volaille');
|
||||
break;
|
||||
case OCBType::egg()->value:
|
||||
$ocbType = trans('Producteur d\'oeufs');
|
||||
break;
|
||||
case OCBType::rabbit()->value:
|
||||
$ocbType = trans('Éleveur de lapins');
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -269,8 +269,6 @@ class MigrateOldDataBase extends LeGaulois2016Migration
|
|||
case 'lapin':
|
||||
$model->ocbType = OCBType::rabbit();
|
||||
break;
|
||||
case 'oeuf':
|
||||
$model->ocbType = OCBType::egg();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$model->ocbType = OCBType::poultry();
|
||||
|
|
@ -408,8 +406,6 @@ class MigrateOldDataBase extends LeGaulois2016Migration
|
|||
return OCBType::poultry();
|
||||
case 'LAPIN':
|
||||
return OCBType::rabbit();
|
||||
case 'OEUF':
|
||||
return OCBType::egg();
|
||||
}
|
||||
},
|
||||
'name' => 'ocb_type',
|
||||
|
|
|
|||
|
|
@ -84,8 +84,6 @@ class RemigrateOcbBreeders extends LeGaulois2016Migration
|
|||
case 'lapin':
|
||||
$model->ocbType = OCBType::rabbit();
|
||||
break;
|
||||
case 'oeuf':
|
||||
$model->ocbType = OCBType::egg();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$model->ocbType = OCBType::poultry();
|
||||
|
|
|
|||
|
|
@ -78,8 +78,6 @@ class RemigrateOcbBreeders2 extends LeGaulois2016Migration
|
|||
case 'lapin':
|
||||
$model->ocbType = OCBType::rabbit();
|
||||
break;
|
||||
case 'oeuf':
|
||||
$model->ocbType = OCBType::egg();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$model->ocbType = OCBType::poultry();
|
||||
|
|
|
|||
30
database/migrations/2023_06_26_152754_remove_ocb_egg.php
Normal file
30
database/migrations/2023_06_26_152754_remove_ocb_egg.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
use App\Models\OCBBreeder;
|
||||
use App\Models\OCBContent;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RemoveOcbEgg extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// * 0 OCB type EGG.
|
||||
OCBContent::query()->where('ocbType', 0)->delete();
|
||||
OCBBreeder::query()->where('ocbType', 0)->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// * Wont undo this.
|
||||
}
|
||||
}
|
||||
|
|
@ -30,8 +30,6 @@ use Symfony\Component\Console\Terminal;
|
|||
* return OCBType::poultry();
|
||||
* case 'LAPIN':
|
||||
* return OCBType::rabbit();
|
||||
* case 'OEUF':
|
||||
* return OCBType::egg();
|
||||
* }
|
||||
* },
|
||||
* 'name' => 'ocb_type',
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
<file>database/factories</file>
|
||||
<file>database/seeders</file>
|
||||
<file>routes/</file>
|
||||
<file>tests/</file>
|
||||
<rule ref="PSR1" />
|
||||
<rule ref="PSR12" />
|
||||
|
||||
|
|
@ -22,6 +21,7 @@
|
|||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
||||
<rule ref="Generic.Commenting.DocComment.SpacingBeforeTags"/>
|
||||
<rule ref="Generic.Commenting.Todo"/>
|
||||
<rule ref="Generic.Commenting.Fixme"/>
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
||||
|
|
@ -35,6 +35,7 @@
|
|||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity"/>
|
||||
<rule ref="Generic.Metrics.NestingLevel"/>
|
||||
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
||||
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
|
||||
<rule ref="Generic.NamingConventions.CamelCapsFunctionName"/>
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 408 KiB |
48
resources/lang/en/cookie-notice.php
Normal file
48
resources/lang/en/cookie-notice.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
// * Version 3.0.8
|
||||
// phpcs:disable
|
||||
return [
|
||||
'button_customize_cookies' => 'Customize cookies',
|
||||
'button_forbid' => 'Deny',
|
||||
'button_allow' => 'Accept',
|
||||
'button_forbid_all' => 'Deny all',
|
||||
'button_allow_all' => 'Accept all',
|
||||
'button_customize' => 'Customize',
|
||||
'button_back' => 'Back',
|
||||
'banner_title' => 'The website :site_name uses cookies!',
|
||||
'banner_text_open' =>
|
||||
'This website stores cookies on your computer. :site_name uses this information to improve and personalize your browsing experience, as well as for analysis and metrics about our visitors both on this website and elsewhere. You can click on "Accept" if you consent to the use of these cookies.',
|
||||
'banner_text' => 'We use cookies to ensure the proper functioning of our site and for analytical purposes. By continuing to browse this site or by closing this banner, you consent to the use of these cookies.',
|
||||
'banner_details' => 'If you refuse the use of cookies, your information will not be tracked. during your visit to this site. A cookie will be used in your browser to remember not to track your preferences. Some features will not be accessible. You can change your mind and modify your consent at any time by returning to this site.',
|
||||
'banner_details_link' => 'To find out more about the cookies we use, see our privacy policy.',
|
||||
'banner_details_link_title' => 'Privacy Policy',
|
||||
'banner_more_details' => 'More details...',
|
||||
'banner_less_details' => 'Less details...',
|
||||
'Panel_title' => 'Cookie management panel',
|
||||
'Panel_subtitle' => 'Your privacy is our priority',
|
||||
'Panel_details' => 'The functionalities of this site rely on services offered by third parties. If you agree, these third parties will place cookies that will allow you to view on the site of the content hosted by these third parties. Through these cookies, these third parties will collect and will use your browsing data for their own purposes, in accordance with to their privacy policy (link below). This page allows you to give or withdraw your consent, either globally or on a service-by-service basis.',
|
||||
|
||||
'custom' => [
|
||||
'frame' => 'You must autorize :type cookies to view this element',
|
||||
'recaptcha' => [
|
||||
'name' => 'API - reCAPTACHA',
|
||||
'description' => 'The cookies that are deposited via the recaptcha on the forms are intended to prevent them from being submitted by robots.',
|
||||
'warning' => 'To use the form you must accept Recaptcha cookies'
|
||||
],
|
||||
'matomo' => [
|
||||
'name' => 'AUDIENCE MEASUREMENTS - MATOMO',
|
||||
'description' => 'Audience analysis service.'
|
||||
],
|
||||
'youtube' => [
|
||||
'name' => 'VIDEOS - Youtube',
|
||||
'description' => 'Cookies placed via video sharing services are intended to allow the user to view multimedia content directly on the site.',
|
||||
'labelLink' => 'Learn more'
|
||||
],
|
||||
'vimeo' => [
|
||||
'name' => 'VIDEOS - Vimeo',
|
||||
'description' => 'Cookies placed via video sharing services are intended to allow the user to view multimedia content directly on the site.',
|
||||
'labelLink' => 'Learn more'
|
||||
],
|
||||
]
|
||||
];
|
||||
48
resources/lang/fr/cookie-notice.php
Normal file
48
resources/lang/fr/cookie-notice.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
// * Version 3.0.8
|
||||
// phpcs:disable
|
||||
return [
|
||||
'button_customize_cookies' => 'Personnaliser les cookies',
|
||||
'button_forbid' => 'Interdire',
|
||||
'button_allow' => 'Autoriser',
|
||||
'button_forbid_all' => 'Tout refuser',
|
||||
'button_allow_all' => 'Tout accepter',
|
||||
'button_customize' => 'Personnaliser',
|
||||
'button_back' => 'Retour',
|
||||
'banner_title' => 'Le site internet :site_name utilise des cookies !',
|
||||
'banner_text_open' => 'Ce site web stocke les cookies sur votre ordinateur. :site_name utilise ces informations afin d’améliorer et de personnaliser votre expérience de navigation, ainsi que pour l’analyse et les indicateurs concernant nos visiteurs à la fois sur ce site web et sur d’autres supports. Vous pouvez cliquer sur « Accepter » si vous consentez à l’utilisation de ces cookies.',
|
||||
'banner_text' => 'Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques. En poursuivant votre navigation sur ce site ou en fermant ce bandeau, vous consentez à l’utilisationde ces cookies.',
|
||||
'banner_details' => 'Si vous refusez l’utilisation des cookies, vos informations ne seront pas suivies lors de votre visite sur ce site. Un cookie sera utilisé dans votre navigateur afin de se souvenir de ne pas suivre vos préférences. Certaines fonctionnalités ne seront pas accessibles. Vous pouvez changer d’avis et modifier votre consentement à tout moment en revenant sur ce site.',
|
||||
'banner_details_link' =>
|
||||
'Pour en savoir plus sur les cookies que nous utilisons, consultez notre charte de confidentialité.',
|
||||
'banner_details_link_title' => 'Charte de confidentialité',
|
||||
'banner_more_details' => 'Plus de détails...',
|
||||
'banner_less_details' => 'Moins de détails...',
|
||||
'Panel_title' => 'Panneau de gestion 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.',
|
||||
|
||||
'custom' => [
|
||||
'frame' => 'Vous devez autoriser les cookies :type pour voir cet élément',
|
||||
'recaptcha' => [
|
||||
'name' => 'API - reCAPTACHA',
|
||||
'description' => 'Les cookies qui sont déposés via le recaptcha sur les formulaires ont pour but d\'empêcher la soumission des formulaires par des robots.',
|
||||
'warning' => 'Vous devez accepter les cookies recaptcha pour utiliser les formulaires.'
|
||||
],
|
||||
'matomo' => [
|
||||
'name' => 'Mesure d\'audience - MATOMO',
|
||||
'description' => 'Service d\'analyse d\'audience.'
|
||||
],
|
||||
'youtube' => [
|
||||
'name' => 'VIDEOS - Youtube',
|
||||
'description' => 'Les cookies placés par des services de partages de vidéos ont pour but d\'autoriser les utilisateurs à voir le contenu directement depuis ce site.',
|
||||
'labelLink' => 'En savoir plus'
|
||||
],
|
||||
'vimeo' => [
|
||||
'name' => 'VIDEOS - Vimeo',
|
||||
'description' => 'Les cookies placés par des services de partages de vidéos ont pour but d\'autoriser les utilisateurs à voir le contenu directement depuis ce site.',
|
||||
'labelLink' => 'En savoir plus'
|
||||
],
|
||||
]
|
||||
];
|
||||
|
|
@ -24,11 +24,6 @@
|
|||
<p>Poulets<br>& Dindes</p>
|
||||
<a href="{{ route('ocb.poultry') }}">En savoir +</a>
|
||||
</div>
|
||||
<div>
|
||||
<img src="{{ asset('assets/images/ocb/ocb_oeuf_x2.png') }}" alt="Oeuf - Le Gaulois" class="right">
|
||||
<p>Oeufs</p>
|
||||
<a href="{{ route('ocb.egg') }}">En savoir +</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="description">
|
||||
<p class="ocb-green inline-with-image">
|
||||
|
|
|
|||
|
|
@ -21,10 +21,6 @@
|
|||
'ocbContents' => $ocbContents
|
||||
])
|
||||
<section class="poultry-infos">
|
||||
<a href="{{ route('ocb.egg') }}" class="next">
|
||||
<span></span>
|
||||
<p class="button-text">{{ __('Découvrez les oeufs Oui C\'est Bon!') }}</p>
|
||||
</a>
|
||||
<div class="breeder-info">
|
||||
@if ($breeder !== null && $breeder->picture !== null)
|
||||
<figure>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ $cookies = [];
|
|||
// YOUTUBE
|
||||
$cookies['youtube'] = [
|
||||
'name' => __('cookie-notice.custom.youtube.name'),
|
||||
'description' => __('cookie-notice.custom.youtube.name'),
|
||||
'description' => __('cookie-notice.custom.youtube.description'),
|
||||
'labelLink' => __('cookie-notice.custom.youtube.labelLink'),
|
||||
'link' => 'https://policies.google.com/technologies/cookies?hl=fr&utm_source=ucb',
|
||||
'cookies' => ['NID', 'VISITOR_INFO1_LIVE', 'YSC']
|
||||
|
|
@ -52,12 +52,35 @@ $cookies['youtube']['script'] = <<<SCRIPT
|
|||
function () {
|
||||
window.__CN_VIDEO = window.__CN_VIDEO ?? {};
|
||||
window.__CN_VIDEO.youtube = true;
|
||||
let frames = document.querySelectorAll('.video.youtube');
|
||||
for (let frame of frames) {
|
||||
frame.dataset.authorize = 1;
|
||||
let iframe = frame.querySelector('iframe') ?? frame;
|
||||
if (iframe) {
|
||||
iframe.src = iframe.dataset.src;
|
||||
}
|
||||
}
|
||||
}
|
||||
SCRIPT;
|
||||
$cookies['youtube']['fallback'] = <<<FALLBACK
|
||||
function () {
|
||||
window.__CN_VIDEO = window.__CN_VIDEO ?? {};
|
||||
window.__CN_VIDEO.youtube = false;
|
||||
let youtubeVids = document.getElementsByClassName('.video.youtube');
|
||||
for (let item of youtubeVids) {
|
||||
let a = document.createElement('a');
|
||||
a.innerText = 'Autoriser';
|
||||
a.classList.add('cn-cookie-link');
|
||||
a.classList.add('btn-autorize');
|
||||
a.onclick = function () {
|
||||
CookieNotice.openModal();
|
||||
};
|
||||
let e = document.createElement('p');
|
||||
e.innerHTML = 'Youtube est désactivé. ';
|
||||
item.innerHTML = "";
|
||||
e.appendChild(a);
|
||||
item.appendChild(e);
|
||||
}
|
||||
}
|
||||
FALLBACK;
|
||||
|
||||
|
|
@ -75,12 +98,38 @@ $cookies['vimeo']['script'] = <<<SCRIPT
|
|||
function () {
|
||||
window.__CN_VIDEO = window.__CN_VIDEO ?? {};
|
||||
window.__CN_VIDEO.vimeo = true;
|
||||
setTimeout(() => {
|
||||
let frames = document.querySelectorAll('.video.vimeo');
|
||||
for (let frame of frames) {
|
||||
frame.dataset.authorize = 1;
|
||||
let iframe = frame.querySelector('iframe');
|
||||
iframe = iframe ? iframe : frame;
|
||||
if (iframe) {
|
||||
iframe.src = iframe.dataset.src;
|
||||
}
|
||||
}
|
||||
}, 200)
|
||||
}
|
||||
SCRIPT;
|
||||
$cookies['vimeo']['fallback'] = <<<FALLBACK
|
||||
function () {
|
||||
window.__CN_VIDEO = window.__CN_VIDEO ?? {};
|
||||
window.__CN_VIDEO.vimeo = false;
|
||||
let vimeoVids = document.getElementsByClassName('.video.vimeo');
|
||||
for (let item of vimeoVids) {
|
||||
let a = document.createElement('a');
|
||||
a.innerText = 'Autoriser';
|
||||
a.classList.add('cn-cookie-link');
|
||||
a.classList.add('btn-autorize');
|
||||
a.onclick = function () {
|
||||
CookieNotice.openModal();
|
||||
};
|
||||
let e = document.createElement('p');
|
||||
e.innerHTML = 'Vimeo est désactivé. ';
|
||||
item.innerHTML = "";
|
||||
e.appendChild(a);
|
||||
item.appendChild(e);
|
||||
}
|
||||
}
|
||||
FALLBACK;
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,6 @@
|
|||
<li class="nav-item dropdown btn btn-sm btn-dark mb-1">
|
||||
<a class="nav-link dropdown-toggle text-white" data-toggle="dropdown" href="#" role="button">{{ __('Oui c\'est Bon!') }}</a>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{{route('bo.ocb.content', OCBType::egg())}}">{{ __('Contenus Oeuf') }}</a>
|
||||
<a class="dropdown-item" href="{{route('bo.ocb.content', OCBType::rabbit())}}">{{ __('Contenus Lapin') }}</a>
|
||||
<a class="dropdown-item" href="{{route('bo.ocb.content', OCBType::poultry())}}">{{ __('Contenus Volaille') }}</a>
|
||||
<a class="dropdown-item" href="{{route('bo.ocb.create')}}">{{ __('Ajouter') }}</a>
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ use App\Models\Recipes;
|
|||
use Diglactic\Breadcrumbs\Breadcrumbs;
|
||||
use Diglactic\Breadcrumbs\Generator;
|
||||
|
||||
// Root
|
||||
// * Root
|
||||
Breadcrumbs::for('home', function (Generator $trail) {
|
||||
$trail->push(__('Accueil'), route('home'));
|
||||
});
|
||||
|
||||
// First Level
|
||||
// * First Level
|
||||
Breadcrumbs::for('contact-us', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Contact'), route('contact-us'));
|
||||
|
|
@ -42,8 +42,8 @@ Breadcrumbs::for('legal-notice', function (Generator $trail) {
|
|||
$trail->push(__('Mentions légales'), route('legal-notice'));
|
||||
});
|
||||
|
||||
// Second level
|
||||
// Products
|
||||
// * Second level
|
||||
// * Products
|
||||
Breadcrumbs::for('products.index', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Produits'), route('products.index'));
|
||||
|
|
@ -77,12 +77,12 @@ Breadcrumbs::for('product.show', function (Generator $trail, Products $published
|
|||
$trail->push($publishedProduct->name, route('product.show', compact('publishedProduct')));
|
||||
});
|
||||
|
||||
// Kitchen side
|
||||
// * Kitchen side
|
||||
Breadcrumbs::for('kitchen-side.index', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Coté Cuisine'), route('kitchen-side.index'));
|
||||
});
|
||||
// Recipes
|
||||
// * Recipes
|
||||
Breadcrumbs::for('recipes.index', function (Generator $trail) {
|
||||
$trail->parent('kitchen-side.index');
|
||||
$trail->push(__('Liste des Recettes'), route('recipes.index'));
|
||||
|
|
@ -95,7 +95,7 @@ Breadcrumbs::for('recipes.show', function (Generator $trail, Recipes $recipe) {
|
|||
['image' => asset($recipe->picture)]
|
||||
);
|
||||
});
|
||||
// Health and nutrition
|
||||
// * Health and nutrition
|
||||
Breadcrumbs::for('kitchen-side.health-nutrition.index', function (Generator $trail) {
|
||||
$trail->parent('kitchen-side.index');
|
||||
$trail->push(__('Santé et Nutrition'));
|
||||
|
|
@ -115,7 +115,7 @@ Breadcrumbs::for('kitchen-side.health-nutrition.nutrition-quality', function (Ge
|
|||
);
|
||||
});
|
||||
|
||||
// Kitchen side
|
||||
// * Kitchen side
|
||||
Breadcrumbs::for('brand.index', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('La marque'), route('brand.index'));
|
||||
|
|
@ -142,7 +142,7 @@ Breadcrumbs::for('brand.our-quality-commitments', function (Generator $trail) {
|
|||
$trail->push(__('Nos Engagements Qualité'), route('brand.our-quality-commitments'));
|
||||
});
|
||||
|
||||
// OCB
|
||||
// * OCB
|
||||
Breadcrumbs::for('ocb.index', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Oui c\'est Bon !'), route('ocb.index'));
|
||||
|
|
@ -151,10 +151,6 @@ Breadcrumbs::for('ocb.poultry', function (Generator $trail) {
|
|||
$trail->parent('ocb.index');
|
||||
$trail->push(__('Volaille'), route('ocb.poultry'));
|
||||
});
|
||||
Breadcrumbs::for('ocb.egg', function (Generator $trail) {
|
||||
$trail->parent('ocb.index');
|
||||
$trail->push(__('Oeuf'), route('ocb.egg'));
|
||||
});
|
||||
Breadcrumbs::for('ocb.testimonials', function (Generator $trail) {
|
||||
$trail->parent('ocb.index');
|
||||
$trail->push(__('Témoignages des Éleveurs'), route('ocb.testimonials'));
|
||||
|
|
@ -204,14 +200,14 @@ Breadcrumbs::for('onsengage.marqueengage.vivreensemble', function (Generator $tr
|
|||
);
|
||||
});
|
||||
|
||||
// En ce moment
|
||||
// * En ce moment
|
||||
Breadcrumbs::for('moment', function (Generator $trail, Moments $moment) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('En ce moment'));
|
||||
$trail->push($moment->description, route('moment', compact('moment')));
|
||||
});
|
||||
|
||||
// Élevage
|
||||
// * Élevage
|
||||
Breadcrumbs::for('breeding-page.index', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Élevage et alimentation des volailles'), route('breeding-page.index'));
|
||||
|
|
@ -225,13 +221,13 @@ Breadcrumbs::for('breeding-page.show', function (Generator $trail, BreedingPageT
|
|||
$trail->push($publishedBreedingPage->title, route('breeding-page.show', [$breedingPageType, $publishedBreedingPage]));
|
||||
});
|
||||
|
||||
// Nous rejoindre
|
||||
// * Nous rejoindre
|
||||
Breadcrumbs::for('joinus', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Nous rejoindre'), route('joinus'));
|
||||
});
|
||||
|
||||
// Club
|
||||
// * Club
|
||||
Breadcrumbs::for('club.index', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Le Club des Gaulois'), route('club.index'));
|
||||
|
|
@ -290,8 +286,8 @@ Breadcrumbs::for('account.favs-recipes', function (Generator $trail) {
|
|||
$trail->push(__('Mes recettes favorites'), route('account.favs-recipes'));
|
||||
});
|
||||
|
||||
// Dans les prés
|
||||
// OCB
|
||||
// * Dans les prés
|
||||
// * OCB
|
||||
Breadcrumbs::for('danslespres.index', function (Generator $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push(__('Sortant à l’Extérieur Dans Les Prés'), route('danslespres.index'));
|
||||
|
|
|
|||
|
|
@ -159,7 +159,6 @@ Route::prefix('/oui-cest-bon')
|
|||
Route::get('/temoignages-eleveurs', [OCBController::class, 'testimonials'])->name('testimonials');
|
||||
Route::get('/volaille', [OCBController::class, 'poultry'])->name('poultry');
|
||||
Route::get('/volaille', [OCBController::class, 'poultry'])->name('poultry');
|
||||
Route::get('/oeuf', [OCBController::class, 'egg'])->name('egg');
|
||||
Route::view('/', 'front.ocb.index')->name('index');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue