Merge branch 'develop' into trunk

This commit is contained in:
Noah Lancien 2024-10-09 17:30:50 +02:00
commit 6120e178ce
80 changed files with 614 additions and 362 deletions

View file

@ -10,6 +10,7 @@ use App\Traits\Controllers\ChangesModelOrder;
use App\Traits\Controllers\UpdateModelPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class BrandAdvantageController extends Controller
{
@ -47,11 +48,11 @@ class BrandAdvantageController extends Controller
'text',
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans('validation.attributes.title'),
trans('validation.custom.sustitle'),
trans('validation.attributes.text'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($brandAdvantageModels);
@ -100,12 +101,12 @@ class BrandAdvantageController extends Controller
if ($brandAdvantage->saveOrFail()) {
return redirect()->route('bo.brand_advantages.edit', $brandAdvantage)
->with('success', trans('crud.messages.has_been_created', [
'model' => str(trans_choice('models.classes.brand_advantage', 1))->ucfirst()
'model' => Str::ucfirst(trans_choice('models.classes.brand_advantage', 1))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_created', [
'model' => str(trans_choice('models.classes.brand_advantage', 1))->ucfirst()
'model' => Str::ucFirst(trans_choice('models.classes.brand_advantage', 1))
]));
});
}
@ -138,12 +139,12 @@ class BrandAdvantageController extends Controller
if ($brandAdvantage->saveOrFail()) {
return redirect()->route('bo.brand_advantages.edit', $brandAdvantage)
->with('success', trans('crud.messages.has_been_updated', [
'model' => str(trans_choice('models.classes.brand_advantage', 1))->ucfirst()
'model' => Str::ucFirst(trans_choice('models.classes.brand_advantage', 1))
]));
}
return redirect()->route('bo.brand_advantages.edit', $brandAdvantage)
->with('error', trans('crud.messages.cannot_be_updated', [
'model' => str(trans_choice('models.classes.brand_advantage', 1))->ucfirst()
'model' => Str::ucFirst(trans_choice('models.classes.brand_advantage', 1))
]));
});
}
@ -162,12 +163,12 @@ class BrandAdvantageController extends Controller
if ($brandAdvantage->deleteOrFail()) {
return redirect()->route('bo.brand_advantages.index', $previousQueries)
->with('success', trans('crud.messages.has_been_deleted', [
'model' => str(trans_choice('models.classes.brand_advantage', 1))->ucfirst()
'model' => Str::ucFirst(trans_choice('models.classes.brand_advantage', 1))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_deleted', [
'model' => str(trans('models.classebrand_advantage'))->ucfirst()
'model' => Str::ucFirst(trans('models.classebrand_advantage'))
]));
}

View file

@ -12,6 +12,7 @@ use App\Traits\Controllers\ChangesModelOrder;
use App\Traits\Controllers\UpdateModelPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class MeatController extends Controller
{
@ -49,11 +50,11 @@ class MeatController extends Controller
'description',
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans('validation.custom.label'),
trans('validation.custom.subtitle'),
trans('validation.attributes.description'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($meatModels);
@ -102,12 +103,12 @@ class MeatController extends Controller
if ($meat->saveOrFail()) {
return redirect()->route('bo.meats.edit', $meat)
->with('success', trans('crud.messages.has_been_created', [
'model' => str(trans('models.classes.meat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.meat'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_created', [
'model' => str(trans('models.classes.meat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.meat'))
]));
});
}
@ -140,12 +141,12 @@ class MeatController extends Controller
if ($meat->saveOrFail()) {
return redirect()->route('bo.meats.edit', $meat)
->with('success', trans('crud.messages.has_been_updated', [
'model' => str(trans('models.classes.meat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.meat'))
]));
}
return redirect()->route('bo.meats.edit', $meat)
->with('error', trans('crud.messages.cannot_be_updated', [
'model' => str(trans('models.classes.meat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.meat'))
]));
});
}
@ -173,12 +174,12 @@ class MeatController extends Controller
if ($meat->deleteOrFail()) {
return redirect()->route('bo.meats.index', $previousQueries)
->with('success', trans('crud.messages.has_been_deleted', [
'model' => str(trans('models.classes.meat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.meat'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_deleted', [
'model' => str(trans('models.classes.meat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.meat'))
]));
}
@ -239,8 +240,8 @@ class MeatController extends Controller
return redirect()->route('bo.meats.edit-submeats-order', $request->meat)
->with('success', trans('crud.messages.submodels_have_been_reordered', [
'submodelName' => str(trans('models.classes.submeat'))->plural(),
'modelLabel' => $meat->label,
'submodelName' => Str::plural(trans('models.classes.submeat')),
'modelLabel' => $meat->label,
]));
});
}

View file

@ -62,11 +62,11 @@ class NewsBreedingController extends Controller
'associated_page'
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans('validation.attributes.title'),
trans('validation.custom.subtitle'),
trans('validation.attributes.content'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($newsBreedingModels);

View file

@ -12,6 +12,7 @@ use App\Traits\Controllers\ChangesModelOrder;
use App\Traits\Controllers\UpdateModelPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class RangeController extends Controller
{
@ -49,11 +50,11 @@ class RangeController extends Controller
'description',
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans('validation.custom.label'),
trans('validation.custom.subtitle'),
trans('validation.attributes.description'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($rangeModels);
@ -102,12 +103,12 @@ class RangeController extends Controller
if ($range->saveOrFail()) {
return redirect()->route('bo.ranges.edit', $range)
->with('success', trans('crud.messages.has_been_created', [
'model' => str(trans('models.classes.range'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.range'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_created', [
'model' => str(trans('models.classes.range'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.range'))
]));
});
}
@ -140,12 +141,12 @@ class RangeController extends Controller
if ($range->saveOrFail()) {
return redirect()->route('bo.ranges.edit', $range)
->with('success', trans('crud.messages.has_been_updated', [
'model' => str(trans('models.classes.range'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.range'))
]));
}
return redirect()->route('bo.ranges.edit', $range)
->with('error', trans('crud.messages.cannot_be_updated', [
'model' => str(trans('models.classes.range'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.range'))
]));
});
}
@ -173,12 +174,12 @@ class RangeController extends Controller
if ($range->deleteOrFail()) {
return redirect()->route('bo.ranges.index', $previousQueries)
->with('success', trans('crud.messages.has_been_deleted', [
'model' => str(trans('models.classes.range'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.range'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_deleted', [
'model' => str(trans('models.classes.range'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.range'))
]));
}
@ -238,8 +239,8 @@ class RangeController extends Controller
return redirect()->route('bo.ranges.edit-subranges-order', $request->range)
->with('success', trans('crud.messages.submodels_have_been_reordered', [
'submodelName' => str(trans('models.classes.subrange'))->plural(),
'modelLabel' => $range->label,
'submodelName' => Str::plural(trans('models.classes.subrange')),
'modelLabel' => $range->label,
]));
});
}

View file

@ -10,6 +10,7 @@ use App\Models\Submeat;
use App\Traits\Controllers\UpdateModelPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class SubmeatController extends Controller
{
@ -46,11 +47,11 @@ class SubmeatController extends Controller
'description',
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans('validation.custom.label'),
trans('validation.custom.subtitle'),
trans('validation.attributes.description'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($submeatModels);
@ -104,12 +105,12 @@ class SubmeatController extends Controller
if ($submeat->saveOrFail()) {
return redirect()->route('bo.submeats.edit', $submeat)
->with('success', trans('crud.messages.has_been_created', [
'model' => str(trans('models.classes.submeat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.submeat'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_created', [
'model' => str(trans('models.classes.submeat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.submeat'))
]));
});
}
@ -147,12 +148,12 @@ class SubmeatController extends Controller
if ($submeat->saveOrFail()) {
return redirect()->route('bo.submeats.edit', $submeat)
->with('success', trans('crud.messages.has_been_updated', [
'model' => str(trans('models.classes.submeat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.submeat'))
]));
}
return redirect()->route('bo.submeats.edit', $submeat)
->with('error', trans('crud.messages.cannot_be_updated', [
'model' => str(trans('models.classes.submeat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.submeat'))
]));
});
}
@ -171,12 +172,12 @@ class SubmeatController extends Controller
if ($submeat->deleteOrFail()) {
return redirect()->route('bo.submeats.index', $previousQueries)
->with('success', trans('crud.messages.has_been_deleted', [
'model' => str(trans('models.classes.submeat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.submeat'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_deleted', [
'model' => str(trans('models.classes.submeat'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.submeat'))
]));
}

View file

@ -10,6 +10,7 @@ use App\Models\Subrange;
use App\Traits\Controllers\UpdateModelPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class SubrangeController extends Controller
{
@ -46,11 +47,11 @@ class SubrangeController extends Controller
'description',
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans('validation.custom.label'),
trans('validation.custom.subtitle'),
trans('validation.attributes.description'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($subrangeModels);
@ -85,7 +86,7 @@ class SubrangeController extends Controller
return view('bo.pages.subranges.create', [
'subrangeModel' => $subrange,
'rangeModels' => $rangeModels,
'rangeModels' => $rangeModels,
]);
}
@ -104,12 +105,12 @@ class SubrangeController extends Controller
if ($subrange->saveOrFail()) {
return redirect()->route('bo.subranges.edit', $subrange)
->with('success', trans('crud.messages.has_been_created', [
'model' => str(trans('models.classes.subrange'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.subrange'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_created', [
'model' => str(trans('models.classes.subrange'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.subrange'))
]));
});
}
@ -126,7 +127,7 @@ class SubrangeController extends Controller
return view('bo.pages.subranges.edit', [
'subrangeModel' => $subrange,
'rangeModels' => $rangeModels,
'rangeModels' => $rangeModels,
]);
}
@ -147,12 +148,12 @@ class SubrangeController extends Controller
if ($subrange->saveOrFail()) {
return redirect()->route('bo.subranges.edit', $subrange)
->with('success', trans('crud.messages.has_been_updated', [
'model' => str(trans('models.classes.subrange'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.subrange'))
]));
}
return redirect()->route('bo.subranges.edit', $subrange)
->with('error', trans('crud.messages.cannot_be_updated', [
'model' => str(trans('models.classes.subrange'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.subrange'))
]));
});
}
@ -171,12 +172,12 @@ class SubrangeController extends Controller
if ($subrange->deleteOrFail()) {
return redirect()->route('bo.subranges.index', $previousQueries)
->with('success', trans('crud.messages.has_been_deleted', [
'model' => str(trans('models.classes.subrange'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.subrange'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_deleted', [
'model' => str(trans('models.classes.subrange'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.subrange'))
]));
}

View file

@ -10,6 +10,7 @@ use App\Models\Testimonial;
use App\Traits\Controllers\UpdateModelPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class TestimonialController extends Controller
{
@ -47,12 +48,12 @@ class TestimonialController extends Controller
'job',
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans_choice('validation.custom.catchline', 1),
trans('validation.attributes.content'),
trans('validation.custom.testimonial_identity'),
trans('validation.custom.job'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($testimonialModels);
@ -87,7 +88,7 @@ class TestimonialController extends Controller
return view('bo.pages.testimonials.create', [
'testimonialModel' => $testimonial,
'meatModels' => $meatModels,
'meatModels' => $meatModels,
]);
}
@ -106,12 +107,12 @@ class TestimonialController extends Controller
if ($testimonial->saveOrFail()) {
return redirect()->route('bo.testimonials.edit', $testimonial)
->with('success', trans('crud.messages.has_been_created', [
'model' => str(trans('models.classes.testimonial'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.testimonial'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_created', [
'model' => str(trans('models.classes.testimonial'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.testimonial'))
]));
});
}
@ -128,7 +129,7 @@ class TestimonialController extends Controller
return view('bo.pages.testimonials.edit', [
'testimonialModel' => $testimonial,
'meatModels' => $meatModels,
'meatModels' => $meatModels,
]);
}
@ -149,12 +150,12 @@ class TestimonialController extends Controller
if ($testimonial->saveOrFail()) {
return redirect()->route('bo.testimonials.edit', $testimonial)
->with('success', trans('crud.messages.has_been_updated', [
'model' => str(trans('models.classes.testimonial'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.testimonial'))
]));
}
return redirect()->route('bo.testimonials.edit', $testimonial)
->with('error', trans('crud.messages.cannot_be_updated', [
'model' => str(trans('models.classes.testimonial'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.testimonial'))
]));
});
}
@ -173,12 +174,12 @@ class TestimonialController extends Controller
if ($testimonial->deleteOrFail()) {
return redirect()->route('bo.testimonials.index', $previousQueries)
->with('success', trans('crud.messages.has_been_deleted', [
'model' => str(trans('models.classes.testimonial'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.testimonial'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_deleted', [
'model' => str(trans('models.classes.testimonial'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.testimonial'))
]));
}

View file

@ -11,6 +11,7 @@ use App\Traits\Controllers\ChangesModelOrder;
use App\Traits\Controllers\UpdateModelPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class VideoController extends Controller
{
@ -46,9 +47,9 @@ class VideoController extends Controller
'title',
);
}
$searchFields = str(\implode(', ', [
$searchFields = Str::ucFirst(\implode(', ', [
trans('validation.attributes.title'),
]))->ucfirst();
]));
/** Sort columns with a query */
$this->sortQuery($videoModels);
@ -99,12 +100,12 @@ class VideoController extends Controller
if ($video->saveOrFail()) {
return redirect()->route('bo.videos.edit', $video)
->with('success', trans('crud.messages.has_been_created', [
'model' => str(trans('models.classes.video'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.video'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_created', [
'model' => str(trans('models.classes.video'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.video'))
]));
});
}
@ -139,12 +140,12 @@ class VideoController extends Controller
if ($video->saveOrFail()) {
return redirect()->route('bo.videos.edit', $video)
->with('success', trans('crud.messages.has_been_updated', [
'model' => str(trans('models.classes.video'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.video'))
]));
}
return redirect()->route('bo.videos.edit', $video)
->with('error', trans('crud.messages.cannot_be_updated', [
'model' => str(trans('models.classes.video'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.video'))
]));
});
}
@ -163,12 +164,12 @@ class VideoController extends Controller
if ($video->deleteOrFail()) {
return redirect()->route('bo.videos.index', $previousQueries)
->with('success', trans('crud.messages.has_been_deleted', [
'model' => str(trans('models.classes.video'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.video'))
]));
}
return redirect()->back()
->with('error', trans('crud.messages.cannot_be_deleted', [
'model' => str(trans('models.classes.video'))->ucfirst()
'model' => Str::ucFirst(trans('models.classes.video'))
]));
}

View file

@ -7,6 +7,7 @@ use App\Http\Requests\Club\MesBr\PrintCouponsRequest;
use App\Models\Customer;
use App\Models\Discount;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Cache;
class DiscountController extends Controller
{
@ -140,6 +141,9 @@ class DiscountController extends Controller
return null;
}
// Update customer discounts count.
Cache::set("discountsCustomerCount", Discount::getCustomerDiscountsCount($customer->hashcode));
// * Tout est OK
return \base64_decode(Arr::get($result, 'pdf')) ?: null;
} catch (\RuntimeException $e) {

View file

@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use App\Enums\Pagination\ItemsPerPaginationEnum;
use App\Enums\Theme\BootstrapThemeEnum;
use App\Lib\Helpers\ToolboxHelper;
use App\Models\Discount;
use App\Models\Message;
use App\Models\Notification;
use Illuminate\Database\Eloquent\Builder;
@ -49,6 +50,10 @@ class Controller extends BaseController
!is_null($notificationModel->customer_id);
})
->count());
$result = Cache::get("discountsCustomerCount")
?: Discount::getCustomerDiscountsCount($customerModel->hashcode);
View::share('discountsCustomerCount', $result);
}
return $next($request);
});
@ -310,20 +315,21 @@ class Controller extends BaseController
string|null $search = null
): \Illuminate\Pagination\LengthAwarePaginator {
$modelsTitles = [];
$query->when(!is_null($search), function (Builder $q) use ($search, $searchField) {
$q->where($searchField, 'like', "%{$search}%");
$searchLower = Str::lower($search);
$query->when(!is_null($search), function (Builder $q) use ($searchLower, $searchField) {
$q->where($searchField, 'like', "%{$searchLower}%");
})
->where('published', true)
->inRandomOrder()
->pluck($searchField)
->each(function (string $title) use (&$modelsTitles, $search) {
->each(function (string $title) use (&$modelsTitles, $searchLower) {
if (count($modelsTitles) < 5) {
foreach (explode(" ", $title) as $word) {
$word = Str::lower($word);
if (
strlen($word) > 3
&& !in_array($word, $modelsTitles)
&& ((!is_null($search)) ? str_contains($word, $search) : true)
&& ((!is_null($searchLower)) ? str_contains($word, $searchLower) : true)
) {
$modelsTitles[] = $word;
}

View file

@ -105,7 +105,7 @@ class SecureHeaders
'Content-Security-Policy',
implode(' ', $cspPolicies) . $reportUri
);
$response->headers->set('Feature-Policy', 'fullscreen \'self\';');
$response->headers->set('Feature-Policy', 'fullscreen=(self \'https://www.youtube.com\');');
return $response;
}

View file

@ -2,10 +2,11 @@
namespace App\Http\Requests\Bo\MenuNodeData;
use App\Rules\Hex;
use App\Traits\Requests\HasPicture;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
use App\Rules\Hex;
use Illuminate\Support\Str;
class UpdateMenuNodeDataRequest extends FormRequest
{
@ -29,10 +30,10 @@ class UpdateMenuNodeDataRequest extends FormRequest
public function prepareForValidation(): void
{
if ($this->has('text')) {
$this->merge(['text' => str($this->input('text'))->value()]);
$this->merge(['text' => Str::ucFirst($this->input('text'))]);
}
if ($this->has('text_color')) {
$this->merge(['text_color' => str($this->input('text_color'))->value()]);
$this->merge(['text_color' => Str::ucFirst($this->input('text_color'))]);
}
if ($this->has('link_target')) {
$this->merge(['link_target' => $this->boolean('link_target')]);

View file

@ -7,6 +7,16 @@ use Illuminate\Support\Facades\Gate;
class UpdateNewsClubRequest extends StoreNewsClubRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize(): bool
{
return Gate::check('update', $this->route('news_club'));
}
/**
* Prepare the data for validation.
*
@ -26,14 +36,4 @@ class UpdateNewsClubRequest extends StoreNewsClubRequest
]);
$this->mergePicture('picture');
}
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize(): bool
{
return Gate::check('update', $this->route('news_club'));
}
}

View file

@ -73,7 +73,7 @@ class StoreCustomerRequest extends FormRequest
'required',
'email:rfc,dns,spoof',
'max:255',
// * Does email already exists in CRM ?
// Does email already exists in CRM ?
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
function (string $attribute, $value, \Closure $fail) {
if (CrmCustomer::findWithEmail(\strval($value))) {
@ -113,8 +113,8 @@ class StoreCustomerRequest extends FormRequest
'email' => trans('validation.attributes.email'),
'password' => trans('validation.attributes.password'),
'password_confirmation' => trans('validation.attributes.password_confirmation'),
'ok_cgv' => trans('conditions d\'utilisation'),
'opt_in' => trans('newsletter'),
'ok_cgv' => trans('validation.custom.terms'),
'opt_in' => trans('validation.custom.newsletter'),
];
}
}

View file

@ -33,8 +33,10 @@ class UpdatePasswordRequest extends FormRequest
new CrmCustomerPassword($crmCustomer)
],
'password' => [
'required', 'string', 'max:255', 'confirmed',
Password::min(8)->mixedCase()->letters()->numbers()->uncompromised()
'required',
'string',
'confirmed',
Password::min(8)->max(255)->mixedCase()->letters()->numbers()->uncompromised()
]
];
}
@ -51,4 +53,22 @@ class UpdatePasswordRequest extends FormRequest
'password' => trans('validation.attributes.password'),
];
}
/**
* Get custom messages for validator errors.
*
* @return array
*/
public function messages(): array
{
return [
'password.max' => trans('255 caractères maximum'),
'password.min' => trans('8 caractères minimum'),
'password.letters' => trans('Au moins une lettre'),
'password.numbers' => trans('Au moins un chiffre'),
'password.mixed' => trans('Au moins une lettre majuscule et une lettre minuscule'),
'password.uncompromised' => trans('Ne doît pas être compromis'),
'password.confirmed' => trans('La confirmation doît correspondre au nouveau'),
];
}
}

View file

@ -87,7 +87,7 @@ class FetchDigitalRecruiterOffers
$offerModel->picture_alt = $offer->title ?? "";
$offerModel->picture_title = sprintf("Image de l'offre %s", $offer->title ?? "");
$offerModel->link = $offer->apply_url ?? "";
$offerModel->description = strip_tags(clean($offer->description ?? ""));
$offerModel->description = strip_tags(clean($offer->profile ?? ""));
$offerModel->published = true;
$offerModel->publish_at = $offer->published_at;
$offerModel->saveOrFail();

View file

@ -6,10 +6,11 @@ use App\Enums\Settings\MenuNodeType;
use App\Lib\Link;
/**
* @property-read \App\Enums\Settings\MenuNodeType $type The node menu type.
* @property-read string $title The node menu title.
* @property-read \App\Lib\Link $link The node menu link.
* @property-read boolean $published The node menu publish status.
* @property-read integer $id The node menu id.
* @property-read \App\Enums\Settings\MenuNodeType $type The node menu type.
* @property-read string $title The node menu title.
* @property-read \App\Lib\Link $link The node menu link.
* @property-read boolean $published The node menu publish status.
* @package App\Lib\Definitions
*/
class MenuNode extends \stdClass
@ -23,7 +24,7 @@ class MenuNode extends \stdClass
*/
public function __get(string $name): mixed
{
if (in_array($name, ['type', 'title', 'link', 'published'])) {
if (in_array($name, ['id', 'type', 'title', 'link', 'published'])) {
return $this->{$name};
}
throw new \TypeError("undefined property {$name}");
@ -32,6 +33,7 @@ class MenuNode extends \stdClass
/**
* Make and instance
*
* @param integer $id The node menu id.
* @param integer $type The node menu type.
* @param boolean $published The node menu published.
* @param string $title The node menu title.
@ -39,12 +41,14 @@ class MenuNode extends \stdClass
* @return \App\Lib\Definitions\MenuNode
* @throws \RuntimeException If $type or $data is wrong.
*/
public static function make(int $type, bool $published, string $title, array $link): self
public static function make(int $id, int $type, bool $published, string $title, array $link): self
{
self::assertTypeIsCorrect($type);
$menuNode = new self();
// @phpstan-ignore-next-line
$menuNode->id = $id;
// @phpstan-ignore-next-line
$menuNode->type = MenuNodeType::make($type);
// @phpstan-ignore-next-line
$menuNode->published = $published;

View file

@ -4,6 +4,7 @@ namespace App\Lib;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Support\Str;
use Stringable;
/**
@ -46,8 +47,8 @@ class Link implements Jsonable, Arrayable, Stringable
$router = app('router');
return (bool)collect($router->getRoutes()->getRoutes())
->filter(fn ($route) => str($route->getName())->startsWith('fo.'))
->filter(fn ($route) => str($route->getName())->exactly($routeName))->count();
->filter(fn ($route) => Str::of($route->getName())->startsWith('fo.'))
->filter(fn ($route) => Str::of($route->getName())->exactly($routeName))->count();
}
// * METHODS

View file

@ -8,6 +8,7 @@ use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Str;
/**
* @property string $title Consumption moment title.
@ -48,7 +49,7 @@ class ConsumptionMoment extends Model
{
static::creating(function (self $model) {
self::assertTitleIsUnique($model->title);
$model->slug = str($model->title)->slug();
$model->slug = Str::slug($model->title);
$model->picture = FileStorageHelper::storeFile($model, $model->picture, true);
});
static::created(function () {
@ -56,7 +57,7 @@ class ConsumptionMoment extends Model
});
static::updating(function (self $model) {
self::assertTitleIsUnique($model->title, $model->getKey());
$model->slug = str($model->title)->slug();
$model->slug = Str::slug($model->title);
$model->picture = FileStorageHelper::storeFile($model, $model->picture, true);
});
static::updated(function (self $model) {
@ -83,7 +84,7 @@ class ConsumptionMoment extends Model
{
$table = (new self())->getTable();
ToolboxHelper::assertFieldIsUnique($table, 'title', $title, $id);
ToolboxHelper::assertFieldIsUnique($table, 'slug', str($title)->slug(), $id);
ToolboxHelper::assertFieldIsUnique($table, 'slug', Str::slug($title), $id);
}
/**

View file

@ -22,6 +22,7 @@ use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
use LDC\LDCCRM\Exceptions\CrmException;
@ -166,7 +167,7 @@ class Customer extends Authenticatable implements MustVerifyEmail
'id' => $last->id,
'date' => $last->created_at,
'dateRaw' => $last->getRawOriginal('created_at'),
'preview' => str($last->message)->limit(15),
'preview' => Str::limit($last->message, 15),
'messages' => $responses->values()->all()
])];
}
@ -183,7 +184,7 @@ class Customer extends Authenticatable implements MustVerifyEmail
'id' => $last->id,
'date' => $last->created_at,
'dateRaw' => $last->getRawOriginal('created_at'),
'preview' => str($last->message)->limit(15),
'preview' => Str::limit($last->message, 15),
'messages' => $sent->values()->all()
])];
})->toBase();

View file

@ -149,6 +149,22 @@ class Discount extends Model
} //end try
}
/**
* Get customer discounts count.
*
* @param string $hashcode
* @return integer
*/
public static function getCustomerDiscountsCount(string $hashcode): int
{
/** @var \LDC\MESBR\MesBr */
$mesBr = app('mesBrAPI');
return collect($mesBr->getMurCustomer($hashcode)->coupons)->filter(function ($discount) {
return !$discount->used;
})->count();
}
/**
* Replace coupons picture host.
*

View file

@ -142,7 +142,8 @@ class GeneralSetting extends Model
return match ($type) {
SettingsType::mainMenu => collect(MenuNodeType::all())
->filter(fn(MenuNodeType $menuNodeType) => $menuNodeType !== MenuNodeType::link)
->map(fn(MenuNodeType $nodeType) => MenuNode::make(
->map(fn(MenuNodeType $nodeType, int $key) => MenuNode::make(
$key + 1,
$nodeType->value(),
true,
$nodeType->label(),

View file

@ -197,7 +197,7 @@ class News extends Model
private static function manageFields(self $model): void
{
self::assertTitleIsUnique($model->title, $model->getKey());
$model->slug = str($model->title)->slug();
$model->slug = Str::slug($model->title);
$model->thumbnail = FileStorageHelper::storeFile($model, $model->thumbnail, true);
$model->picture = FileStorageHelper::storeFile($model, $model->picture, true);
}
@ -214,7 +214,7 @@ class News extends Model
{
$table = (new self())->getTable();
ToolboxHelper::assertFieldIsUnique($table, 'title', $title, $id);
ToolboxHelper::assertFieldIsUnique($table, 'slug', str($title)->slug(), $id);
ToolboxHelper::assertFieldIsUnique($table, 'slug', Str::slug($title), $id);
}
/**

View file

@ -156,7 +156,7 @@ class NewsBreeding extends Model
{
$table = (new self())->getTable();
ToolboxHelper::assertFieldIsUnique($table, 'title', $title, $id);
ToolboxHelper::assertFieldIsUnique($table, 'slug', str($title)->slug(), $id);
ToolboxHelper::assertFieldIsUnique($table, 'slug', Str::slug($title), $id);
}

View file

@ -166,11 +166,18 @@ class Product extends Model implements SeoInterface
public static function getProductsViewsByRange(string|null $slug = null): array
{
$rangeModel = !is_null($slug) ?
Range::query()->where('slug', $slug)->first() :
Range::query()->orderBy('slug', 'ASC')->where('published', true)->first();
return Product::query()->whereHas('range', function (Builder $q) use ($rangeModel) {
$q->where('id', $rangeModel->getKey());
})->inRandomOrder()
Range::query()->where([['slug', $slug], ['published', true]])->first() :
Range::query()->where('published', true)->orderBy('slug', 'ASC')->first();
return Product::query()->where('published', true)
->whereHas('subrange', function (Builder $q) use ($rangeModel) {
$q->where('published', true)->whereHas('range', function (Builder $q) use ($rangeModel) {
$q->where('id', $rangeModel->getKey());
});
})
->orWhereHas('range', function (Builder $q) use ($rangeModel) {
$q->where('id', $rangeModel->getKey());
})
->inRandomOrder()
->limit(6)
->get()
->map(function ($productModel) {

View file

@ -213,9 +213,7 @@ class Recipe extends Model implements SeoInterface
*/
public static function getFirstHighlighted(): \App\Models\Recipe|null
{
return Cache::rememberForever('publishedFirstHighlightedRecipe', function () {
return self::query()->where('published', true)->where('highlight', true)->first();
});
return self::query()->where('published', true)->where('highlight', true)->first();
}
/**

View file

@ -74,7 +74,7 @@ class StaticPage extends Model
static::updating(function (self $model) {
self::assertSeoTitleIsUnique($model->seo_title, $model->getKey());
self::assertTitleIsUnique($model->title, $model->getKey());
$model->slug = Str::slug($model->title ?? $model->seo_title ?? str()->random(20));
$model->slug = Str::slug($model->title ?? $model->seo_title ?? Str::random(20));
if (!is_null($model->picture)) {
$model->picture = FileStorageHelper::storeFile($model, $model->picture, true);
}

View file

@ -125,8 +125,8 @@ class Testimonial extends Model
),
], [
'published.prohibited' => trans('Il ne peut y avoir que :max :model:plural publié:plural en même temps.', [
'max' => $max,
'model' => str(trans('models.classes.testimonial')),
'max' => $max,
'model' => trans('models.classes.testimonial'),
'plural' => $max > 1 ? 's' : '',
])
])->validate();

View file

@ -10,6 +10,7 @@ use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Blade;
use Money\Currencies\ISOCurrencies;
use Money\Currency;
use Money\Formatter\IntlMoneyFormatter;
@ -45,16 +46,21 @@ class AppServiceProvider extends ServiceProvider
Carbon::setLocale(config('app.locale'));
// * SETTINGS
App::singleton('settings', fn () => GeneralSetting::getCached());
App::singleton('settings', fn() => GeneralSetting::getCached());
// * Menu
App::singleton('menuNodeList', fn () => App::get('settings')
App::singleton('menuNodeList', fn() => App::get('settings')
->where('type', SettingsType::mainMenu)->firstOrFail());
App::singleton('menuNodeDataList', fn () => MenuNodeData::getCached());
App::singleton('menuNodeDataList', fn() => MenuNodeData::getCached());
// * Censor
App::singleton('censor', fn () => new CensorWords());
App::singleton('censor', fn() => new CensorWords());
$this->setPaymentCurrency();
// * BLADE DIRECTIVES
Blade::if('isExport', function () {
return request()->routeIs('fo.*.export');
});
}
/**

View file

@ -5,6 +5,7 @@ use App\Models\Breeder;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
return new class extends Migration
{
@ -32,7 +33,7 @@ return new class extends Migration
$breederModels = Breeder::query()->get();
foreach ($breederModels as $breederModel) {
$breederModel->department = Department::make(str($breederModel->postal_code)->take(2));
$breederModel->department = Department::make(Str::take($breederModel->postal_code, 2));
$breederModel->picture_alt = trans('Photo de :first_name :last_name', [
'first_name' => $breederModel->first_name,
'last_name' => $breederModel->last_name,

View file

@ -5,6 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
return new class extends Migration
{
@ -36,7 +37,7 @@ return new class extends Migration
$messages = DB::table('messages')->get();
$messages->each(function (object $message) {
DB::table('messages')->where('id', $message->id)->update([
'message' => str(Crypt::decryptString($message->message))->limit(255)
'message' => Str::limit(Crypt::decryptString($message->message), 255)
]);
});
Schema::table('messages', function (Blueprint $table) {

View file

@ -0,0 +1,68 @@
<?php
use App\Enums\Settings\MenuNodeType;
use App\Enums\Settings\SettingsType;
use App\Lib\Link;
use App\Models\GeneralSetting;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
* @throws \Exception In general settings menu is missing.
*/
public function up(): void
{
/** @var \App\Models\GeneralSetting|null */
$generalSettingModel = GeneralSetting::query()->where('type', SettingsType::mainMenu)->first();
if (!$generalSettingModel) {
throw new \Exception('Missing generalSettings ' . SettingsType::mainMenu->label());
}
$generalSettingModel->value = collect($generalSettingModel->value)->map(function (\stdClass $item, int $key) {
if ($item->type->equals(MenuNodeType::ourCommitments)) {
$item->link = (new Link(routeName: MenuNodeType::ourCommitments->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::siteLogo)) {
$item->link = (new Link(routeName: MenuNodeType::siteLogo->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::breedings)) {
$item->link = (new Link(routeName: MenuNodeType::breedings->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::ourBrand)) {
$item->link = (new Link(routeName: MenuNodeType::ourBrand->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::news)) {
$item->link = (new Link(routeName: MenuNodeType::news->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::ourProducts)) {
$item->link = (new Link(routeName: MenuNodeType::ourProducts->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::ourRecipes)) {
$item->link = (new Link(routeName: MenuNodeType::ourRecipes->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::recruitment)) {
$item->link = (new Link(routeName: MenuNodeType::recruitment->routeName()))->toArray();
} elseif ($item->type->equals(MenuNodeType::link)) {
$item->link = (new Link(url: ""))->toArray();
}
$item->id = $key + 1;
return $item;
});
$generalSettingModel->saveQuietly();
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
/** @var \App\Models\GeneralSetting|null */
$generalSettingModel = GeneralSetting::query()->where('type', SettingsType::mainMenu)->first();
if (!$generalSettingModel) {
throw new \Exception('Missing generalSettings ' . SettingsType::mainMenu->label());
}
$generalSettingModel->value = collect($generalSettingModel->value)->map(function (\stdClass $item) {
$item = collect($item)->except(['id']);
return $item;
});
$generalSettingModel->saveQuietly();
}
};

View file

@ -277,6 +277,7 @@ return [
'multiple_answers' => 'multiple answers',
'nb_guests' => 'number of reference persons for the list of ingredients',
'new' => 'new',
'newsletter' => 'newsletter',
'on_homepage' => 'on homepage',
'order' => 'order',
'packaging' => 'packaging',

View file

@ -282,6 +282,7 @@ return [
'multiple_answers' => 'multiple réponses',
'nb_guests' => 'nombre de personnes de référence pour la liste des ingrédients',
'new' => 'nouveau',
'newsletter' => 'newsletter',
'old_password' => 'ancien mot de passe',
'on_homepage' => 'sur la page d\'accueil',
'order' => 'ordre',

View file

@ -14,7 +14,7 @@ body {
margin-top: $bo-header-height;
.sidebar {
position: fixed;
position: sticky;
z-index: 2;
top: $bo-header-height;
left: 0;

View file

@ -30,8 +30,10 @@
}
.left-part {
position: sticky;
top: 2rem;
height: fit-content;
@include media-breakpoint-up(lg) {
position: sticky;
top: 2rem;
height: fit-content;
}
}
}

View file

@ -219,6 +219,15 @@ body {
}
}
}
// * Adapt header in export pages because all links are hidden
.header-export {
min-height: 62px;
.menu-logo {
position: inherit;
}
}
}
#input-group-search {
@ -300,7 +309,7 @@ body {
flex-grow: 0;
flex-shrink: 1;
.col-logo{
.col-logo {
height: calc(fit-content - 3rem);
}

View file

@ -20,6 +20,11 @@
height: auto !important;
}
}
// .swiper-pagination-bullet-active {
// background-color: $color-light !important;
// transform: scale(1.1);
// }
}
&-jobs {

View file

@ -29,7 +29,7 @@
<div class="list-group">
<Draggable
:list="nodeList"
item-key="type"
item-key="id"
>
<!-- LIST ITEM -->
<template #item="{ element, index } : {element: MenuNodeInterface, index: number}">
@ -168,6 +168,7 @@ onMounted(() => {
/** Add a new link node to the menu */
function addLinkNode(): void {
const newNode = {
id: Math.max(...nodeList.value.map(o => o.id)) + 1,
type: MenuNodeTypeEnum.link,
title: trans.methods.__("Lien"),
published: false,

View file

@ -11,6 +11,7 @@ import {
faArrowRightFromBracket,
faArrowsAltH,
faArrowsAltV,
faArrowTurnUp,
faArrowUp,
faArrowUpRightFromSquare,
faArrowUpWideShort,
@ -173,5 +174,6 @@ library.add(faChartSimple);
library.add(faComments);
library.add(faRug);
library.add(faBasketShopping);
library.add(faArrowTurnUp);
dom.watch();

View file

@ -4,12 +4,12 @@
<div class="col-sm-12 col-md-6 col-lg-8">
<div
v-if="sellItems.length"
class="row"
:class="['row', {'justify-content-end': sellItems.length <= 1}]"
>
<div
v-for="sellItem in sellItems"
:key="sellItem.id"
class="col-sm-12 col-md-12 col-lg-6 pb-3 pb-lg-0"
class="col-sm-12 col-lg-6 py-3 pb-lg-0"
>
<div class="card bg-light text-bg-light border-0 rounded-4">
<img
@ -45,8 +45,8 @@
</p>
</div>
<!-- COMMAND -->
<div class="col-sm-12 col-md-6 col-lg-4">
<div class="bg-light text-bg-light rounded-4 w-100 mx-auto p-4">
<div class="col-sm-12 col-md-6 col-lg-4 pt-3">
<div class="recap-command bg-light position-sticky text-bg-light rounded-4 w-100 mx-auto p-4">
<h2 class="f-bourton-base">
{{ trans.methods.__('Ma commande') }}
</h2>
@ -123,7 +123,7 @@
</ul>
<div class="d-flex justify-content-between align-items-start">
<p class="f-bourton-base mt-2 mb-0">
{{ trans.methods.__('Montant Total') }}&nbsp;:
{{ trans.methods.__('Montant Total (TTC)') }}&nbsp;:
</p>
<p class="d-flex flex-column justify-content-center align-items-center">
<span class="fs-1 f-bourton-base text-warning">{{ formatPrice(currentShop.total) }}</span><br>
@ -267,4 +267,7 @@ function formatPrice(number: number): string {
.fade-leave-to {
opacity: 0;
}
.recap-command {
top: 1.5rem;
}
</style>

View file

@ -236,7 +236,7 @@
colspan="4"
>
<div class="d-flex flex-column flex-md-row justify-content-end align-items-end align-items-md-start">
<label class="f-bourton-base pt-2 mt-1">{{ trans.methods.__('Montant Total') }} :</label>
<label class="f-bourton-base pt-2 mt-1">{{ trans.methods.__('Montant Total (TTC)') }} :</label>
<p class="d-flex flex-column justify-content-center align-items-center ms-md-3 m-0">
<span class="fs-1 f-bourton-base text-warning">{{ formatPrice(currentShop.total) }}</span>
<span>{{ trans.methods.__('Frais de port inclus') }}</span>

View file

@ -170,10 +170,12 @@ document.addEventListener("DOMContentLoaded", function () {
768: {
slidesPerView: 2,
spaceBetween: 35,
slidesPerGroup: 2,
},
992: {
slidesPerView: 2,
spaceBetween: 55,
slidesPerGroup: 2,
},
},
},

View file

@ -233,7 +233,7 @@
<!-- INFORMATION -->
<p
v-if="paginationParameters.page === paginationParameters.lastPage"
class="text-center"
class="text-center mt-5"
>
{{ trans.methods.__('Tous les éléments ont été chargés') }}
</p>

View file

@ -1,8 +1,8 @@
import type { MenuNodeTypeEnum } from "resources/ts";
import type { LinkInterface } from "resources/ts/types/models/Link";
export interface MenuNodeInterface {
id: number,
type: MenuNodeTypeEnum,
published: boolean,
title: string,

View file

@ -280,7 +280,9 @@
$recruitmentStaticPageModel->type->value()) ||
request()->routeIs('bo.professions.*') ||
request()->routeIs('bo.brand_advantages.*') ||
request()->routeIs('bo.offers.*'),
request()->routeIs('bo.offers.*') ||
request()->routeIs('bo.testimonials.*') ||
request()->routeIs('bo.news_corporates.*'),
])>
<i @class([
'fa-solid fa-briefcase fa-fw',
@ -1018,10 +1020,10 @@
{{ str(trans_choice('models.classes.sell_item', \INF))->ucFirst() }}
</a>
</li>
<li>
<hr class="dropdown-divider">
</li>
@endcan
<li>
<hr class="dropdown-divider">
</li>
{{-- NEWS CLUB --}}
<li>
<a href="{{ route('bo.news_clubs.index', [
@ -1061,11 +1063,11 @@
{{-- SURVEYS ANSWERS --}}
<li>
<a href="{{ route('bo.surveys_answers.index') }}" @class([
'dropdown-item px-3 py-2',
'dropdown-item ps-5 pe-3 py-2',
'fw-bold text-bg-secondary' => request()->routeIs('bo.surveys_answers.*'),
])>
<i @class([
'fa-solid fa-comments fa-fw',
"fa-solid fa-arrow-turn-up fa-fw rotate-90",
'fa-lg' => request()->routeIs('bo.surveys_answers.*'),
])></i>
{{ str(trans_choice('models.classes.surveys_answer', \INF))->ucFirst() }}

View file

@ -8,7 +8,7 @@
<div class="row">
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => Str::slug($input['label']),
'id' => str($input['label'])->slug(),
'label' => $input['label'],
'hasWordCounter' => true,
'name' => 'data[' . $k . '][value]',
@ -68,7 +68,7 @@
<div class="row mb-3">
<div class="col-12">
@include('bo.partials.inputs.text-html', [
'id' => Str::slug($input['label']),
'id' => str($input['label'])->slug(),
'name' => "data[{$k}][value]",
'value' => old("data.{$k}.value", $input['value'] ?? null),
'model' => $model ?? null,
@ -96,15 +96,15 @@
<div class="row mb-3">
<div class="col-12">
<label class="col-form-label"
for="{{ Str::slug($input['label']) }}"><b>{{ __('crud.minicrud.visibility_label') }}</b></label>
for="{{ str($input['label'])->slug() }}"><b>{{ __('crud.minicrud.visibility_label') }}</b></label>
<div class="form-check form-switch ms-2">
<input class="form-check-input ml-2" id="{{ Str::slug($input['label']) }}" name="data[{{ $k }}][value]"
type="checkbox" value="1" aria-describedby="{{ Str::slug($input['label']) }}Help"
<input class="form-check-input ml-2" id="{{ str($input['label'])->slug() }}" name="data[{{ $k }}][value]"
type="checkbox" value="1" aria-describedby="{{ str($input['label'])->slug() }}Help"
@if (old("data.{$k}.value", old('_token') ? false : $input['value'] ?? (null ?? false))) checked @endif>
</div>
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
'helperId' => Str::slug($input['label']) . 'Help',
'helperId' => str($input['label'])->slug() . 'Help',
'helper' => __('crud.minicrud.visibility_helper'),
])
</div>
@ -121,7 +121,7 @@
{{-- PICTURE_ALT --}}
<div class="col-12 col-md-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => Str::slug($input['label']) . '-alt',
'id' => str($input['label'])->slug() . '-alt',
'label' => __('crud.minicrud.picture_alt_label'),
'hasWordCounter' => true,
'name' => 'data[' . $k . '][alt]',
@ -143,7 +143,7 @@
{{-- PICTURE_TITLE --}}
<div class="col-12 col-md-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => Str::slug($input['label']) . '-title',
'id' => str($input['label'])->slug() . '-title',
'label' => __('crud.minicrud.picture_title_label'),
'hasWordCounter' => true,
'name' => 'data[' . $k . '][title]',
@ -165,7 +165,7 @@
{{-- PICTURE --}}
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar-picture', [
'id' => Str::slug($input['label']),
'id' => str($input['label'])->slug(),
'name' => "data[{$k}][value]",
'width' => $input['dimensions']['width'],
'height' => $input['dimensions']['height'],
@ -221,7 +221,7 @@
<div class="row">
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => Str::slug($input['label']),
'id' => str($input['label'])->slug(),
'label' => $input['label'],
'hasWordCounter' => true,
'name' => 'data[' . $k . '][value]',

View file

@ -14,10 +14,10 @@
<tbody>
@foreach ($discountModels as $discountModel)
<tr class="border-bottom">
<td class="text-center align-middle">{{ $discountModel->code }}</td>
<td class="text-center align-middle"><span class="badge text-bg-info">{{ $discountModel->code }}</span></td>
<td class="text-center align-middle">{{ $discountModel->name }}</td>
<td class="text-center align-middle">
<img data-unavailable="{{ $discountModel->mobile_image_unavailable ?? $discountModel->desktop_image_unavailable }}"
<img class="image-preview" data-unavailable="{{ $discountModel->mobile_image_unavailable ?? $discountModel->desktop_image_unavailable }}"
src="{{ $discountModel->mobile_image_available ?? $discountModel->desktop_image_available }}"
alt="{{ __('Bon de réduction :name', ['name' => $discountModel->name]) }}">
</td>

View file

@ -2,7 +2,7 @@
{{-- YEAR --}}
<div class="col-12 col-md-6 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.attributes.year')) }}</legend>
<legend>{{ str(__('validation.attributes.year'))->ucFirst() }}</legend>
<div class="row mb-3">
<div class="col-12 mb-3">
@include('bo.partials.inputs.int-number', [

View file

@ -154,7 +154,7 @@
<legend>{{ str(__('validation.attributes.image'))->ucFirst() }}</legend>
<div class="row mb-3">
{{-- PICTURE_ALT --}}
<div class="col-12 col-lg-6 m-md-0 mb-3">
<div class="col-12 col-lg-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'newsPictureAlt',
'label' => __(':field1 :inter1:field2 :inter2:model', [
@ -224,7 +224,7 @@
<legend>{{ str(__('validation.custom.thumbnail'))->ucFirst() }}</legend>
<div class="row mb-3">
{{-- THUMBNAIL_ALT --}}
<div class="col-12 col-lg-6 m-md-0 mb-3">
<div class="col-12 col-lg-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'newsThumbnailAlt',
'label' => __(':field1 :inter1:field2 :inter2:model', [
@ -315,7 +315,7 @@
<fieldset class="h-100 border p-3">
<legend>{{ str(__('validation.custom.highlight'))->ucFirst() }}</legend>
<div class="row">
<div class="col-12 col-md-6 mb-3">
<div class="col-12 mb-3">
@include('bo.partials.inputs.tinyint-boolean', [
'id' => 'newsHighlight ',
'name' => 'highlight',
@ -332,7 +332,7 @@
<fieldset class="h-100 border p-3">
<legend>{{ str(__('validation.custom.category'))->ucFirst() }}</legend>
<div class="row">
<div class="col-12 col-md-6 mb-3">
<div class="col-12 mb-3">
@include('bo.partials.inputs.bigint-foreign-id', [
'id' => 'newsCategoryId',
'name' => 'news_category_id',

View file

@ -86,7 +86,7 @@
'id' => 'newsCategoryTitle',
'label' => __(':field :inter:model', [
'field' => str(__('validation.attributes.title'))->ucFirst(),
'inter' => __('validation.custom.of_the.vowel'),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.news_category', 1),
]),
'hasWordCounter' => true,
@ -96,7 +96,7 @@
'helper' => __('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.attributes.title'),
'inter' => __('validation.custom.of_the.vowel'),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.news_category', 1),
]),
'min' => 3,
@ -104,7 +104,7 @@
]),
'placeholder' => __(':field :inter:model', [
'field' => str(__('validation.attributes.title'))->ucFirst(),
'inter' => __('validation.custom.of_the.vowel'),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.news_category', 1),
]),
])
@ -124,7 +124,7 @@
__(':field :inter:model', [
'field' => __('validation.custom.color'),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.news_category'),
'model' => trans_choice('models.classes.news_category', 1),
]))->ucfirst(),
'name' => 'color',
'value' => "#268DC6",
@ -139,12 +139,12 @@
</fieldset>
</div>
{{-- PUBLICATION --}}
<div class="col-12 pb-3">
<div class="col-12 col-md-6 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ str(__('crud.minicrud.visibility_label'))->ucFirst() }}</legend>
<div class="row mb-3">
{{-- PUBLISHED --}}
<div class="col-12 col-md-6 mb-3">
<div class="col-12 mb-3">
@include('bo.partials.inputs.tinyint-boolean', [
'id' => 'newsCategoryPublished',
'name' => 'published',

View file

@ -41,7 +41,7 @@
<legend>{{ str(__('validation.attributes.image'))->ucFirst() }}</legend>
<div class="row mb-3">
{{-- PICTURE_ALT --}}
<div class="col-12 col-lg-6 m-md-0 mb-3">
<div class="col-12 col-lg-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'newsClubPictureAlt',
'label' => __(':field1 :inter1:field2 :inter2:model', [

View file

@ -266,7 +266,7 @@
{{-- NUTRITIONNAL VALUES --}}
<div class="col-12 mb-3">
<fieldset class="border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.nutritionnal_values.label')) }}</legend>
<legend>{{ str(__('validation.custom.nutritionnal_values.label'))->ucFirst() }}</legend>
<div class="row mb-3">
<div class="col-12">
@include('bo.partials.inputs.json-nutritionnal-values', [

View file

@ -64,7 +64,7 @@
{{-- PRICE --}}
<div class="col-12 col-md-6 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.attributes.price')) }}</legend>
<legend>{{ str(__('validation.attributes.price'))->ucFirst() }}</legend>
<div class="row mb-3">
<div class="col-12 mb-3">
@include('bo.partials.inputs.int-number', [
@ -96,7 +96,7 @@
<legend>{{ str(__('validation.attributes.image'))->ucFirst() }}</legend>
<div class="row mb-3">
{{-- PICTURE_ALT --}}
<div class="col-12 col-lg-6 m-md-0 mb-3">
<div class="col-12 col-lg-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'sellItemPictureAlt',
'label' => __(':field1 :inter1:field2 :inter2:model', [
@ -163,7 +163,7 @@
{{-- ARCADIA ID --}}
<div class="col-12 col-md-6 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.arcadiaId')) }}</legend>
<legend>{{ str(__('validation.custom.arcadiaId'))->ucFirst() }}</legend>
<div class="row mb-3">
<div class="col-12 mb-3">
@include('bo.partials.inputs.int-number', [
@ -192,7 +192,7 @@
{{-- ARCADIA WEIGHT --}}
<div class="col-12 col-md-6 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.arcadiaWeight')) }}</legend>
<legend>{{ str(__('validation.custom.arcadiaWeight'))->ucFirst() }}</legend>
<div class="row mb-3">
<div class="col-12 mb-3">
@include('bo.partials.inputs.int-number', [

View file

@ -78,7 +78,7 @@
<small>
{!! clean(
__(
'Le mot de passe doit avoir une longueur de 8 caractères minimum,<br>doit contenir une lettre majuscule et une lettre minucule,<br>doit contenir un caractère spécial comme une virgule par exemple,<br>doit contenir un chiffre.',
'Le mot de passe doît respecter certaines règles :<br>8 caractères minimum,<br>Au moins une lettre majuscule et une lettre minucule,<br>Au moins un caractère spécial : \ / * ! « ? : @ |,<br>Au moins un chiffre.',
),
) !!}
</small>

View file

@ -93,11 +93,12 @@
<li class="nav-item me-1">
<a class="btn btn-link text-tertiary position-relative p-1" href="{{ route('club.discounts.index') }}">
@include('club.icons.ticket')
<span class="position-absolute start-85 translate-middle badge rounded-pill bg-danger top-15">
{{-- FIXME: replace this br count and if it's greater than 99, show 99+ --}}
7
<span class="visually-hidden">{{ __('Nouveaux bons de réductions') }}</span>
</span>
@if($discountsCustomerCount)
<span class="position-absolute start-85 translate-middle badge rounded-pill bg-danger top-15">
{{ $discountsCustomerCount > 99 ? '99+' : $discountsCustomerCount }}
<span class="visually-hidden">{{ __('Nouveaux bons de réductions') }}</span>
</span>
@endif
</a>
</li>
</ul>

View file

@ -50,11 +50,12 @@
{{ __('« La Poulitude »') }}
</span>
</a>
<span class="nav-notification ms-auto">
<span class="visually-hidden">{{ __('Nouveaux bons de réduction') }}</span>
{{-- FIXME: replace this br count and if it's greater than 99, show 99+ --}}
<span>7</span>
</span>
@if($discountsCustomerCount)
<span class="nav-notification ms-auto">
<span class="visually-hidden">{{ __('Nouveaux bons de réduction') }}</span>
<span>{{ $discountsCustomerCount > 99 ? '99+' : $discountsCustomerCount }}</span>
</span>
@endif
</li>
<li class="nav-item">
<span class="nav-icon"><img

View file

@ -78,7 +78,7 @@
{{-- BIRTHDAY --}}
@if(!in_array('birth_date', $hideFields))
<label class="col-sm-4 col-md-2 mb-3" for="info-birthdate">
{{ Str::ucfirst(__('validation.attributes.birthday')) }} *
{{ str(__('validation.attributes.birthday'))->ucFirst() }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
@php
@ -101,7 +101,7 @@
{{-- PHONE --}}
@if(!in_array('phone', $hideFields))
<label for="info-phone" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.phone')) }} *
{{ str(__('validation.attributes.phone'))->ucFirst() }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<input class="form-control @if ($errors->has('phone')) is-invalid @endif mx-auto" id="info-phone"
@ -116,7 +116,7 @@
{{-- ADDRESS --}}
@if(!in_array('address', $hideFields))
<label for="info-address" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.line_address_1')) }} *
{{ str(__('validation.attributes.line_address_1'))->ucFirst() }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<input class="form-control @if ($errors->has('address')) is-invalid @endif mx-auto" id="info-address"
@ -131,7 +131,7 @@
{{-- ADDRESS 2 --}}
@if(!in_array('address2', $hideFields))
<label for="info-address2" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.line_address_2')) }}
{{ str(__('validation.attributes.line_address_2'))->ucFirst() }}
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<input class="form-control @if ($errors->has('address2')) is-invalid @endif mx-auto" id="info-address2"
@ -146,7 +146,7 @@
{{-- POSTCODE --}}
@if(!in_array('postcode', $hideFields))
<label for="info-postalcode" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.postal_code')) }} *
{{ str(__('validation.attributes.postal_code'))->ucFirst() }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<input class="form-control @if ($errors->has('postcode')) is-invalid @endif mx-auto" id="info-postalcode"
@ -161,7 +161,7 @@
{{-- CITY --}}
@if(!in_array('city', $hideFields))
<label for="info-city" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.city')) }} *
{{ str(__('validation.attributes.city'))->ucFirst() }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<input class="form-control @if ($errors->has('city')) is-invalid @endif mx-auto" id="info-city"
@ -176,7 +176,7 @@
{{-- COUNTRY --}}
@if(!in_array('country', $hideFields))
<label for="info-country" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.country')) }} *
{{ str(__('validation.attributes.country'))->ucFirst() }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
@php
@ -192,7 +192,7 @@
);
$old_country = old('country', optional($crmCustomer->country ?? null)->value ?: null);
@endphp
<select id="country" name="country" aria-label="{{ Str::ucfirst(__('validation.attributes.country')) }}"
<select id="country" name="country" aria-label="{{ str(__('validation.attributes.country'))->ucFirst() }}"
@class([
'form-select',
'mx-auto',
@ -205,12 +205,12 @@
</option>
@foreach ($franceCountries as $countryEnum)
<option value="{{ $countryEnum->value }}" @selected($old_country == $countryEnum->value)>
{{ Str::ucfirst($countryEnum->label()) }}
{{ str($countryEnum->label())->ucFirst() }}
</option>
@endforeach
@foreach ($countries as $countryEnum)
<option value="{{ $countryEnum->value }}" @selected($old_country == $countryEnum->value)>
{{ Str::ucfirst($countryEnum->label()) }}
{{ str($countryEnum->label())->ucFirst() }}
</option>
@endforeach
</select>

View file

@ -78,7 +78,7 @@
<input class="form-control @if ($errors->has('address')) is-invalid @endif mx-auto" name="address"
type="text" value="{{ old('address', $crmCustomer->address ?? null) }}"
aria-label="{{ __('validation.attributes.line_address_1') }}"
placeholder="{{ Str::ucfirst(__('validation.attributes.line_address_1')) }}*" autocomplete="address-line1"
placeholder="{{ str(__('validation.attributes.line_address_1'))->ucFirst() }}*" autocomplete="address-line1"
required />
@foreach ($errors->get('address') as $message)
<div class="invalid-feedback">{{ $message }}</div>
@ -90,7 +90,7 @@
<input class="form-control @if ($errors->has('address2')) is-invalid @endif mx-auto" name="address2"
type="text" value="{{ old('address2', $crmCustomer->address2 ?? null) }}"
aria-label="{{ __('validation.attributes.line_address_2') }}"
placeholder="{{ Str::ucfirst(__('validation.attributes.line_address_2')) }}"
placeholder="{{ str(__('validation.attributes.line_address_2'))->ucFirst() }}"
autocomplete="address-line2" />
@foreach ($errors->get('address2') as $message)
<div class="invalid-feedback">{{ $message }}</div>
@ -136,7 +136,7 @@
);
$old_country = old('country', optional($crmCustomer->country ?? null)->value ?: null);
@endphp
<select id="country" name="country" aria-label="{{ Str::ucfirst(__('validation.attributes.country')) }}"
<select id="country" name="country" aria-label="{{ str(__('validation.attributes.country'))->ucFirst() }}"
@class([
'form-select',
'mx-auto',
@ -149,12 +149,12 @@
</option>
@foreach ($franceCountries as $countryEnum)
<option value="{{ $countryEnum->value }}" @selected($old_country == $countryEnum->value)>
{{ Str::ucfirst($countryEnum->label()) }}
{{ str($countryEnum->label())->ucFirst() }}
</option>
@endforeach
@foreach ($countries as $countryEnum)
<option value="{{ $countryEnum->value }}" @selected($old_country == $countryEnum->value)>
{{ Str::ucfirst($countryEnum->label()) }}
{{ str($countryEnum->label())->ucFirst() }}
</option>
@endforeach
</select>
@ -195,7 +195,7 @@
<small>
{!! clean(
__(
'Le mot de passe doit avoir une longueur de 8 caractères minimum,<br>doit contenir une lettre majuscule et une lettre minucule,<br>doit contenir un caractère spécial comme une virgule par exemple,<br>doit contenir un chiffre.',
'Le mot de passe doît respecter certaines règles :<br>8 caractères minimum,<br>Au moins une lettre majuscule et une lettre minucule,<br>Au moins un caractère spécial : \ / * ! « ? : @ |,<br>Au moins un chiffre.',
),
) !!}
</small>

View file

@ -48,7 +48,7 @@
@foreach ($children as $child)
<div class="row">
<div class="col-12">{{ __('Poussin 1') }}</div>
<label class="col-md-3" for="birthday-0">{{ Str::ucfirst(__('validation.attributes.birthday')) }}</label>
<label class="col-md-3" for="birthday-0">{{ str(__('validation.attributes.birthday'))->ucFirst() }}</label>
<div class="col">
<div class="row">
comment here: BIRTHDAY
@ -70,7 +70,7 @@
aria-label="{{ __('validation.attributes.month') }}" autocomplete="off" required>
@foreach (\Carbon\CarbonPeriod::create('2018-01-01', '1 month', '2018-12-31') as $month)
<option value="{{ $month->month }}" @selected($month->month == old('birthday-month', ($child->birthday ?? Carbon::now()->setMonth(1))->month))>
{{ Str::ucfirst($month->isoFormat('MMM')) }}</option>
{{ str($month->isoFormat('MMM'))->ucFirst() }}</option>
@endforeach
</select>
@foreach ($errors->get('birthday-month') as $message)
@ -84,7 +84,7 @@
aria-label="{{ __('validation.attributes.year') }}" autocomplete="off" required>
@foreach (\Carbon\CarbonPeriod::create((clone $zeroDate)->subYears(120), '1 year', (clone $zeroDate)->subYears(6)) as $year)
<option value="{{ $year->year }}" @selected($year->year == old('birthday-year', ($child->birthday ?? (clone $zeroDate)->subYears(18))->year))>
{{ Str::ucfirst($year->isoFormat('YYYY')) }}
{{ str($year->isoFormat('YYYY'))->ucFirst() }}
</option>
@endforeach
</select>

View file

@ -1,70 +1,102 @@
<form class="text-bg-light form-customer-info rounded-4 container container p-3" method="POST"
action="{{ route('club.customers.password.update') }}">
@csrf
@php
$columns = [
'label' => 'col-sm-4 col-md-2',
'input' => 'col-sm-7 offset-sm-1 col-md-4 offset-md-0',
];
@endphp
<fieldset class="row mb-3">
<legend class="col-12 f-bourton-base mb-4">{{ __('Modification du mot de passe') }}</legend>
{{-- OLD PASSWORD --}}
<label for="info-old-password" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.custom.old_password')) }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<div class="col-12 col-lg-6 p-0">
<div class="row w-100 mx-auto">
<div class="col-12 input-group d-flex justify-content-center p-0">
<input class="form-control custom-input-old-password @if ($errors->has('old_password')) is-invalid @endif"
id="old_password" name="old_password" type="password" aria-label="{{ __('validation.custom.old_password') }}"
autocomplete="old_password" required />
@php $dataPassword = ['id' => 'old_password']; @endphp
<span class="btn-group password-visibility" data-json='@json($dataPassword)'></span>
<div class="col-sm-4 col-lg-12 fw-semibold m-0">
<label for="old_password" class="mt-md-3 mt-lg-0 mb-3">
{{ str(__('validation.custom.old_password'))->ucfirst() }} *
</label>
</div>
<div class="col-sm-8 col-lg-12">
<div class="mb-3">
<div class="row w-100 mx-auto">
<div class="col-12 input-group d-flex justify-content-center p-0">
<input class="form-control custom-input-old-password @if ($errors->has('old_password')) is-invalid @endif"
id="old_password" name="old_password" type="password" aria-label="{{ __('validation.custom.old_password') }}"
autocomplete="old_password" required />
<span class="btn-group password-visibility" data-json='@json(['id' => 'old_password'])'></span>
</div>
</div>
</div>
</div>
<div class="col-12">
@if ($errors->get('old_password'))
@foreach ($errors->get('old_password') as $message)
<p class="text-danger py-1">{{ $message }}</p>
@endforeach
@endif
</div>
@foreach ($errors->get('old_password') as $message)
<div class="invalid-feedback d-block">{{ $message }}</div>
@endforeach
</div>
</div>
{{-- PASSWORD --}}
<label for="info-password-confirmation" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.password')) }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<div class="col-12 col-lg-6 p-0">
<div class="row w-100 mx-auto">
<div class="col-12 input-group d-flex justify-content-center p-0">
<input class="form-control custom-input-password @if ($errors->has('password')) is-invalid @endif"
id="password" name="password" type="password" aria-label="{{ __('validation.attributes.password') }}"
autocomplete="password" required />
@php $dataPassword = ['id' => 'password']; @endphp
<span class="btn-group password-visibility" data-json='@json($dataPassword)'></span>
<div class="col-sm-4 col-lg-12 fw-semibold m-0">
<label for="old_password" class="mt-md-3 mt-lg-0 mb-3">
{{ str(__('validation.attributes.password'))->ucfirst() }} *
</label>
</div>
<div class="col-sm-8 col-lg-12">
<div class="mb-3">
<div class="row w-100 mx-auto">
<div class="col-12 input-group d-flex justify-content-center p-0">
<input class="form-control custom-input-password @if ($errors->has('password')) is-invalid @endif"
id="password" name="password" type="password" aria-label="{{ __('validation.attributes.password') }}"
autocomplete="password" required />
<span class="btn-group password-visibility" data-json='@json(['id' => 'password'])'></span>
</div>
</div>
</div>
</div>
<div class="col-12">
@if ($errors->get('password'))
<ul class="list-group list-group-flush text-danger">
<span class="mb-1">{{ __('Le mot de passe doît respecter certaines règles :') }}</span>
@foreach ($errors->get('password') as $message)
<li class="list-group-item list-group-item-danger bg-transparent text-danger border-0 py-1">{{ $message }}</li>
@endforeach
</ul>
@endif
</div>
@foreach ($errors->get('password') as $message)
<div class="invalid-feedback d-block">{{ $message }}</div>
@endforeach
</div>
</div>
{{-- PASSWORD CONFIRMATION --}}
<label for="info-password-confirmation" @class(array_merge(['mb-3', Arr::first($columns)]))>
{{ Str::ucfirst(__('validation.attributes.password_confirmation')) }} *
</label>
<div @class(array_merge(['mb-3', Arr::last($columns)]))>
<div class="col-12 col-lg-6 p-0">
<div class="row w-100 mx-auto">
<div class="col-12 input-group d-flex justify-content-center p-0">
<input class="form-control custom-input-password @if ($errors->has('password_confirmation')) is-invalid @endif"
id="password_confirmation" name="password_confirmation" type="password"
aria-label="{{ __('validation.attributes.password_confirmation') }}"
autocomplete="new-password" required />
@php $dataConfirmPassword = ['id' => 'password_confirmation']; @endphp
<span class="btn-group password-visibility" data-json='@json($dataConfirmPassword)'></span>
<div class="col-sm-4 col-lg-12 fw-semibold m-0">
<label for="password_confirmation" class="mt-md-3 mt-lg-0 mb-3">
{{ str(__('validation.attributes.password_confirmation'))->ucfirst() }} *
</label>
</div>
<div class="col-sm-8 col-lg-12">
<div class="mb-3">
<div class="row w-100 mx-auto">
<div class="col-12 input-group d-flex justify-content-center p-0">
<input class="form-control custom-input-password @if ($errors->has('password_confirmation')) is-invalid @endif"
id="password_confirmation" name="password_confirmation" type="password"
aria-label="{{ __('validation.attributes.password_confirmation') }}"
autocomplete="new-password" required />
<span class="btn-group password-visibility" data-json='@json(['id' => 'password_confirmation'])'></span>
</div>
</div>
</div>
</div>
<div class="col-12">
@if ($errors->get('password_confirmation'))
<ul class="list-group list-group-flush text-danger">{{ __('Le mot de passe doit avoir :') }}
@foreach ($errors->get('password_confirmation') as $message)
<li class="list-group-item list-group-item-danger bg-transparent text-danger border-0 py-1">{{ $message }}</li>
@endforeach
</ul>
@endif
</div>
@foreach ($errors->get('password') as $message)
<div class="invalid-feedback d-block">{{ $message }}</div>
@endforeach
</div>
</div>
</fieldset>

View file

@ -13,7 +13,7 @@
<span>pts</span>
</span>
</div>
<label class="col-md-3" for="email.0">{{ Str::ucfirst(__('validation.attributes.email')) }}</label>
<label class="col-md-3" for="email.0">{{ str(__('validation.attributes.email'))->ucFirst() }}</label>
<div class="col-md-5">
<input class="form-control @if ($errors->has('email.0')) is-invalid @endif mx-auto" id="email-0" name="email[]"
type="email" value="" aria-label="{{ __('validation.attributes.email') }}" />
@ -33,7 +33,7 @@
<span>pts</span>
</span>
</div>
<label class="col-md-3" for="birthday-0">{{ Str::ucfirst(__('validation.attributes.email')) }}</label>
<label class="col-md-3" for="birthday-0">{{ str(__('validation.attributes.email'))->ucFirst() }}</label>
<div class="col-md-5">
<input class="form-control @if ($errors->has('email.0')) is-invalid @endif mx-auto" id="email-0" name="email[]"
type="email" value="" aria-label="{{ __('validation.attributes.email') }}" />

View file

@ -31,10 +31,12 @@
</div>
<div class="col-12 col-md-6">
<span class="d-block h2 f-bourton-base">{{ __('La bourse aux échanges') }}</span>
<p>{{ __('Le Gaulois vous aide à gérer votre collection et vous met en relation avec d’autres collectionneurs pour échanger vos doubles et/ou trouver les magnets Départ’Aimants qu’il vous manquent.') }}
<p>
{{ __('Le Gaulois vous aide à gérer votre collection et vous met en relation avec d’autres collectionneurs pour échanger vos doubles et/ou trouver les magnets Départ’Aimants qu’il vous manquent.') }}
</p>
<a class="link-white" href="#FIXME:conditions bourse"
title="{{ __('Go to page', ['page' => 'PAGE']) }}">{{ __('Voir les conditions d\'utilisation du Club des Gaulois') }}</a>
<a class="link-white" href="{{ route('fo.legals.show') }}" target="_blank" title="{{ __('Go to page', ['page' => 'PAGE']) }}">
{{ __('Voir les conditions d\'utilisation du Club des Gaulois') }}
</a>
</div>
</div>
</section>

View file

@ -29,7 +29,7 @@
@if ($models->count())
@foreach($models as $model)
<div class="col-12 col-sm-6 col-lg-4 mx-auto">
@include($__env->yieldContent('blade'), ['model' => $model])
<div>@include($__env->yieldContent('blade'), ['model' => $model])</div>
</div>
@endforeach
<div class="col-12 mb-5 mt-3">

View file

@ -40,7 +40,7 @@
'contentClass' => 'text-bg-quint',
'membersAmount' => $customerModelsCount,
])
@include('club.partials.card-club-home', [
{{-- @include('club.partials.card-club-home', [
'outterClass' => 'm-3',
'picture' => Vite::asset('resources/assets/images/club/homepage/card-3.png'),
'line1' => __('Des jeux'),
@ -59,7 +59,7 @@
'line2Class' => 'fs-4',
'content' => __('Peluche, Chaussette, Set couverts, stylos Le Gaulois...'),
'contentClass' => 'text-bg-danger',
])
]) --}}
</div>
</div>
</section>

View file

@ -14,7 +14,7 @@
<div class="col-12 mb-2 mt-3">
<h1 class="f-bakerie-rough text-center">
{{ __('Bonjour :username !', [
'username' => Str::title(auth('club')->user()->username),
'username' => str(auth('club')->user()->username)->title(),
]) }}
</h1>
</div>
@ -82,23 +82,27 @@
<span class="text-bg-warning">{{ __('Économiser aujourd’hui') }}</span>
<span class="text-bg-danger">@money($discountsTotal)</span>
</h2>
<span class="d-block fs-5 fw-bold mb-5">
{{ __('En bons de réduction sur une sélection de produits Le Gaulois') }}
</span>
<div class="d-flex mb-5">
<div class="swiper d-none d-md-block w-100 mb-3" id="swiper-discounts">
<div class="swiper-wrapper w-fit">
@foreach ($discountModels as $discountModel)
<div class="swiper-slide">
@include('club.partials.club-card-coupon', [
'discount' => $discountModel,
'outerClass' => 'mx-3',
])
</div>
@endforeach
@if ($discountModels->count())
<span class="d-block fs-5 fw-bold mb-5">
{{ __('En bons de réduction sur une sélection de produits Le Gaulois') }}
</span>
<div class="d-flex mb-5">
<div class="swiper d-none d-md-block w-100 mb-3" id="swiper-discounts">
<div class="swiper-wrapper w-fit">
@foreach ($discountModels as $discountModel)
<div class="swiper-slide">
@include('club.partials.club-card-coupon', [
'discount' => $discountModel,
'outerClass' => 'mx-3',
])
</div>
@endforeach
</div>
</div>
</div>
</div>
@else
<p class="text-center">{{ __('Aucun bon de réduction n\'est actuellement disponible !') }}</p>
@endif
<div class="d-flex justify-content-center">
<div class="swiper-discounts-pagination py-4"></div>
</div>

View file

@ -241,7 +241,7 @@
</tbody>
</table>
<div class="text-end">
<p class="f-bourbon-base fs-title w-fit">{{ __('Montant total :') }}
<p class="f-bourbon-base fs-title w-fit">{{ __('Montant total (TTC) :') }}
<span class="text-center text-yellow w-fit">
{{ e(app('phpMoneyFormatter')->format(new Money($total * 100, app('phpMoneyCurrency')))) }}
</span>

View file

@ -1,4 +1,4 @@
<div @class(['card card-club-home rounded-5 border-0', $outterClass ?? ''])>
<a @class(['card card-club-home rounded-5 border-0', $outterClass ?? '']) href="{{ route('club.login') }}">
<img class="card-img-top rounded-5" src="{{ $picture }}" alt="{{ $picture_alt ?? __('Image de fond') }}">
<div class="card-body p-0">
<div class="lines d-inline-flex flex-column align-items-start flex-wrap">
@ -23,4 +23,4 @@
])>{{ clean($content) }}
</div>
</div>
</div>
</a>

View file

@ -27,7 +27,7 @@
<div class="notification-content">
<div>
<div class="d-inline-flex flex-column flex-sm-row flex-wrap align-items-center pb-2">
<span class="text-bg-white rounded-pill px-2 py-1 text-center">{{ Str::ucfirst($message_tag) }}</span>
<span class="text-bg-white rounded-pill px-2 py-1 text-center">{{ str($message_tag)->ucFirst() }}</span>
<span class="pt-1 pt-sm-0 px-sm-2">{{ $notification->created_at_nice_date }}</span>
</div>
<p class="m-0">{{ $message_label }}</p>

View file

@ -10,7 +10,7 @@
<div class="container-fluid">
{{-- TOP LOGO --}}
<div class="row">
<div class="col text-center col-logo">
<div class="col col-logo text-center">
<a href="{{ route('fo.home.show') }}" title="Accéder à la page d'accueil">
<img id="footer-logo" src="{{ Vite::asset('resources/assets/images/legaulois-logo-40ans.png') }}"
title="{{ __(':appname, Volaille 100% Française', ['appname' => config('app.name')]) }}"
@ -19,48 +19,64 @@
</div>
</div>
<div class="row d-sm-none mobile-span g-0 mt-3">
<div class="col f-bakerie-rough text-center">
<span class="fs-2 d-inline-block rotate-left ms-3">{{ __('C’est bon d’être Gaulois !') }}</span>
@unlessisExport
<div class="row d-sm-none mobile-span g-0 mt-3">
<div class="col f-bakerie-rough text-center">
<span class="fs-2 d-inline-block rotate-left ms-3">{{ __('C’est bon d’être Gaulois !') }}</span>
</div>
</div>
</div>
@endisExport
{{-- Bottom Menu Links --}}
<div class="row bottom-menu-links pb-3">
<div class="col col-lg-2 ms-lg-auto d-none d-sm-flex flex-column align-items-baseline">
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.products.index') }}"
title="{{ __('Go to page :page', ['page' => 'Nos produits']) }}">{{ __('Nos produits') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.recipes.index') }}"
title="{{ __('Go to page :page', ['page' => 'Nos recettes']) }}">{{ __('Nos recettes') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.commitments.brand') }}"
title="{{ __('Go to page :page', ['page' => 'Nos engagements']) }}">{{ __('Nos engagements') }}</a>
</div>
<div class="col col-lg-2 d-none d-sm-flex flex-column align-items-baseline">
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.breeding.index') }}"
title="{{ __('Go to page :page', ['page' => 'Les élevages']) }}">{{ __('Les élevages') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.brand.story') }}"
title="{{ __('Go to page :page', ['page' => 'Notre marque']) }}">{{ __('Notre marque') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.recruitment.show') }}"
title="{{ __('Go to page :page', ['page' => 'Recrutement']) }}">{{ __('Recrutement') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.news.index') }}"
title="{{ __('Go to page :page', ['page' => 'Actus']) }}">{{ __('Actus') }}</a>
</div>
@unlessisExport
<div class="col col-lg-2 ms-lg-auto d-none d-sm-flex flex-column align-items-baseline">
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.products.index') }}"
title="{{ __('Go to page :page', ['page' => 'Nos produits']) }}">{{ __('Nos produits') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.recipes.index') }}"
title="{{ __('Go to page :page', ['page' => 'Nos recettes']) }}">{{ __('Nos recettes') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.commitments.brand') }}"
title="{{ __('Go to page :page', ['page' => 'Nos engagements']) }}">{{ __('Nos engagements') }}</a>
</div>
<div class="col col-lg-2 d-none d-sm-flex flex-column align-items-baseline">
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.breeding.index') }}"
title="{{ __('Go to page :page', ['page' => 'Les élevages']) }}">{{ __('Les élevages') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.brand.story') }}"
title="{{ __('Go to page :page', ['page' => 'Notre marque']) }}">{{ __('Notre marque') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.recruitment.show') }}"
title="{{ __('Go to page :page', ['page' => 'Recrutement']) }}">{{ __('Recrutement') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.news.index') }}"
title="{{ __('Go to page :page', ['page' => 'Actus']) }}">{{ __('Actus') }}</a>
</div>
@endisExport
<div class="col col-lg-2 ms-lg-auto d-none d-sm-flex flex-column align-items-baseline">
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="{{ route('fo.contact.show') }}"
title="{{ __('Go to page :page', ['page' => 'Nous contacter']) }}">{{ __('Nous contacter') }}</a>
{{-- <a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="#FIXME:faq"
@unlessisExport
{{-- <a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="#FIXME:faq"
title="{{ __('Go to page :page', ['page' => 'Faq']) }}">{{ __('Faq') }}</a> --}}
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="https://www.legauloisprofessionnel.fr"
title="{{ __('Aller sur le site Le Gaulois Professionnel') }}" target="_blank">{{ __('Le Gaulois Professionnel') }}</a>
<a class="fs-5 text-uppercase btn btn-link text-decoration-none py-2" href="https://www.legauloisprofessionnel.fr"
title="{{ __('Aller sur le site Le Gaulois Professionnel') }}"
target="_blank">{{ __('Le Gaulois Professionnel') }}</a>
@endisExport
</div>
<div class="col col-lg-3 d-sm-none d-lg-block">
<div @class([
'col col-lg-3 d-sm-none d-lg-block',
'mx-auto' => request()->routeIs('fo.*.export'),
])>
<div class="row">
<div class="col-12 text-lg-start mb-3 text-center">
<div @class([
'col-12 mb-3 text-center',
'text-lg-start' => !request()->routeIs('fo.*.export'),
])>
{{-- SOCIAL LINKS --}}
@include('fo.layouts.footer.social-links')
</div>
<div class="d-none d-sm-flex col-12">
<div @class([
'd-none d-sm-flex col-12',
'justify-content-center' => request()->routeIs('fo.*.export'),
])>
{{-- LOCALES LIST --}}
@include('fo.layouts.footer.locales-list')
</div>

View file

@ -1,6 +1,9 @@
<nav class="navbar navbar-expand rounded-pill bg-body shadow mx-auto py-0" id="main-nav">
<nav class="navbar navbar-expand rounded-pill bg-body mx-auto py-0 shadow" id="main-nav">
{{-- MENU PHONE & TABLET --}}
<ul class="navbar-nav flex-grow-1 w-100 d-flex d-xl-none">
<ul @class([
'navbar-nav flex-grow-1 w-100 d-flex d-xl-none',
'header-export' => request()->routeIs('fo.*.export'),
])>
{{-- MENU BTN --}}
<li class="nav-item no-wrap ms-3">
<button class="btn btn-link bars text-decoration-none text-secondary" data-bs-toggle="offcanvas"
@ -18,22 +21,32 @@
])
{{-- CLUB --}}
@include('fo.layouts.main-menu.club-btn', ['noMargin' => true])
@unlessisExport
@include('fo.layouts.main-menu.club-btn', ['noMargin' => true])
@endisExport
</ul>
{{-- MENU DESKTOP (XL) --}}
<ul class="navbar-nav flex-grow-1 w-100 d-none d-xl-flex">
<ul @class([
'navbar-nav w-100 d-none d-xl-flex',
'header-export' => request()->routeIs('fo.*.export'),
])>
{{-- Search BTN --}}
{{-- @include('fo.layouts.main-menu.search-btn', ['offcanvaId' => 'offcanvas-search']) --}}
{{-- LANGS --}}
@include('fo.layouts.main-menu.locales')
{{-- LINKS --}}
@include('fo.layouts.main-menu.links')
@unlessisExport
{{-- LINKS --}}
@include('fo.layouts.main-menu.links')
{{-- CLUB --}}
@include('fo.layouts.main-menu.club-btn')
{{-- CLUB --}}
@include('fo.layouts.main-menu.club-btn')
@else
{{-- LOGO LINK --}}
@include('fo.layouts.main-menu.logo-link')
@endisExport
</ul>
</nav>

View file

@ -3,13 +3,7 @@
@switch($menuNode->type)
@case(\App\Enums\Settings\MenuNodeType::siteLogo)
@empty($noLogo)
<li class="nav-item menu-logo no-wrap mx-auto">
<a href="{{ route('fo.home.show') }}" title="Accéder à la page d'accueil">
<img src="{{ Vite::asset('resources/assets/images/legaulois-logo-40ans.png') }}" alt="{{ config('app.name') }}"
title="{{ __(':appname, Volaille 100% Française', ['appname' => config('app.name')]) }}"
role="img">
</a>
</li>
@include('fo.layouts.main-menu.logo-link')
@endempty
@break

View file

@ -1,4 +1,8 @@
<li class="nav-item dropdown no-wrap mx-auto" id="menu-lang-list">
<li id="menu-lang-list" @class([
'nav-item dropdown no-wrap',
'mx-auto' => !request()->routeIs('fo.*.export'),
'ms-4' => request()->routeIs('fo.*.export'),
])>
<button class="nav-link dropdown-toggle position-relative" data-bs-toggle="dropdown" role="button" aria-expanded="false">
{{ app()->currentLocale() }}
</button>

View file

@ -0,0 +1,7 @@
<li class="nav-item menu-logo no-wrap mx-auto">
<a href="{{ route('fo.home.show') }}" title="Accéder à la page d'accueil">
<img src="{{ Vite::asset('resources/assets/images/legaulois-logo-40ans.png') }}"
title="{{ __(':appname, Volaille 100% Française', ['appname' => config('app.name')]) }}" alt="{{ config('app.name') }}"
role="img">
</a>
</li>

View file

@ -9,36 +9,38 @@
</div>
<div class="offcanvas-body p-0">
<div class="container-fluid d-flex flex-column h-100">
<div class="row flex-grow-1">
<div class="col g-5 mt-0 pb-5">
<nav class="navbar">
<ul class="navbar-nav w-100">
{{-- LINKS --}}
@include('fo.layouts.main-menu.links', [
'noLogo' => true,
])
</ul>
</nav>
@unlessisExport
<div class="row flex-grow-1">
<div class="col g-5 mt-0 pb-5">
<nav class="navbar">
<ul class="navbar-nav w-100">
{{-- LINKS --}}
@include('fo.layouts.main-menu.links', [
'noLogo' => true,
])
</ul>
</nav>
</div>
</div>
<div class="row bg-body-secondary pb-3">
<div class="col g-5 mt-0 text-center">
{{-- CLUB LINK --}}
<a class="btn btn-primary btn-club rounded-pill" href="FIXME:CLUB"
title="{{ __('Accéder au club :appname', ['appname' => config('app.name')]) }}">
<img src="{{ Vite::asset('resources/assets/images/header/club-logo.png') }}"
alt="{{ __('Le club :appname', ['appname' => config('app.name')]) }}" role="img">
@if (!auth('club')->check())
<span class="rounded-pill text-bg-quad mx-2 px-3 py-2">
{{ __('Je m\'inscris') }}
</span>
@endauth
<img class="mirror-h"
src="{{ Vite::asset('resources/assets/images/littleChickens/little-chicken-shout.svg') }}"
alt="{{ __('Poussin') }}" role="img">
</a>
</div>
</div>
<div class="row bg-body-secondary pb-3">
<div class="col g-5 mt-0 text-center">
{{-- CLUB LINK --}}
<a class="btn btn-primary btn-club rounded-pill" href="FIXME:CLUB"
title="{{ __('Accéder au club :appname', ['appname' => config('app.name')]) }}">
<img src="{{ Vite::asset('resources/assets/images/header/club-logo.png') }}"
alt="{{ __('Le club :appname', ['appname' => config('app.name')]) }}" role="img">
@if (!auth('club')->check())
<span class="rounded-pill text-bg-quad mx-2 px-3 py-2">
{{ __('Je m\'inscris') }}
</span>
@endauth
<img class="mirror-h"
src="{{ Vite::asset('resources/assets/images/littleChickens/little-chicken-shout.svg') }}"
alt="{{ __('Poussin') }}" role="img">
</a>
</div>
</div>
@endisExport
<div class="row bg-body-secondary">
<div class="col-12 mb-2">
{{-- SOCIAL LINKS --}}

View file

@ -21,7 +21,9 @@
<div class="col-12 position-relative z-1">
<ul class="d-flex justify-content-start align-items-baseline p-0">
<li class="me-2">
<p class="text-uppercase text-bg-quad f-bourton-base fs-5 px-2 py-1">{{ $newsModel->newsCategory->title }}</p>
<p class="text-uppercase f-bourton-base fs-5 px-2 py-1" style="background-color: {{ $newsModel->newsCategory->color }}; color: #fff">
{{ $newsModel->newsCategory->title }}
</p>
</li>
<li class="me-2">
<p class="fs-4 px-2 py-1">{{ str($newsModel->updated_at->isoFormat('LL'))->ucFirst() }}</p>

View file

@ -30,7 +30,7 @@
</div>
</div>
<div
class="swiper-pagination swiper-recruitment-offers-pagination d-flex justify-content-center align-items-center w-100 mt-4">
class="swiper-pagination swiper-recruitment-offers-pagination d-flex justify-content-center align-items-center w-100 mt-4 p-1">
</div>
<button
class="swiper-button swiper-button-prev-custom swiper-recruitment-offers-button-prev rounded-circle z-1 border-0 bg-white">

View file

@ -12,7 +12,7 @@
</div>
<div class="col-6 d-flex flex-column justify-content-center align-items-start ps-2 pe-0">
<div class="mb-1">
<span class="text-bg-quad px-2 py-1 f-bourton-base">
<span class="px-2 py-1 f-bourton-base" style="background-color: {{ $newsModel->newsCategory->color }}; color: #fff">
{{ $newsModel->newsCategory->title }}
</span>
</div>

View file

@ -10,8 +10,8 @@
class="d-flex flex-column justify-content-start justify-content-md-center align-items-start w-100 m-md-0 ms-md-2 px-md-0 mb-2 mt-3 px-3">
<h4>{{ $offerModel->title }}</h4>
<p class="mb-0">
{{ Str::limit($offerModel->description, 180) }}
@if (Str::length($offerModel->description) >= 180)
{{ str($offerModel->description)->limit(180) }}
@if (str($offerModel->description)->length() >= 180)
<span class="text-quad text-decoration-underline">{{ __('Lire plus') }}</span>
@endcan
</p>

View file

@ -1,7 +1,7 @@
{{-- blade-formatter-disable --}}
@php
$site_name = Str::ucfirst(config('app.name'));
$site_name = str(config('app.name'))->ucFirst();
$logo_picture_url = Vite::asset('resources/assets/images/legaulois-logo.png');
$logo_title_text = __('Logo du site :name', ['name' => $site_name]);
$logo_alt_text = __('Logo :name', ['name' => $site_name]);
@ -12,12 +12,12 @@ $strings = (object)[
'button_close_cookies' => __('cookie-notice.button_close_cookies'),
'button_title_open_new_tab' => __('cookie-notice.button_title_open_new_tab'),
'button_toggle_cookie' => __('cookie-notice.button_toggle_cookie'),
'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_forbid_all' => str(__('cookie-notice.button_forbid_all'))->upper(),
'button_allow_all' => str(__('cookie-notice.button_allow_all'))->upper(),
'button_customize' => str(__('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_validate_and_close' => Str::upper(__('cookie-notice.button_validate_and_close')),
'button_validate_and_close' => str(__('cookie-notice.button_validate_and_close'))->upper(),
'banner_title' => __('cookie-notice.banner_title', ['site_name' => $site_name]),
'banner_text' => sprintf(
"%s<br><br>%s",
@ -83,12 +83,15 @@ function () {
videoLink.innerHTML = "";
const newIframe = document.createElement("iframe");
newIframe.frameBorder = "0";
newIframe.allow = "fullscreen";
newIframe.width = "1920px";
newIframe.height = "1080px";
newIframe.classList.add("w-100");
newIframe.classList.add("h-100");
newIframe.setAttribute("allowfullscreen", "allowfullscreen");
newIframe.setAttribute("allowfullscreen", "true");
newIframe.setAttribute("mozallowfullscreen", "true");
newIframe.setAttribute("msallowfullscreen", "true");
newIframe.setAttribute("oallowfullscreen", "true");
newIframe.setAttribute("webkitallowfullscreen", "true");
newIframe.src = String(videoLink.getAttribute("href"));
videoLink.appendChild(newIframe);
}