482 lines
21 KiB
PHP
482 lines
21 KiB
PHP
<div class="row mb-3">
|
|
{{-- CODE VAR --}}
|
|
<div class="col">
|
|
<fieldset>
|
|
<legend>{{ __('Codes configuration') }}</legend>
|
|
<div class="container">
|
|
<ul class="row list-unstyled">
|
|
<li class="col-md-6">
|
|
<span>{{ __('Dictionnaire utilisé') }} </span>
|
|
<pre class="fw-bold fs-5 font-monospace">{{ config('codes.codeCharList') }}</pre>
|
|
</li>
|
|
<li class="col-md-6">
|
|
<span>{{ __('Longueur des codes uniques') }} </span>
|
|
<span class="fw-bold fs-5 font-monospace d-inline-block m-0">
|
|
{{ config('codes.codeLength') }}
|
|
</span>
|
|
</li>
|
|
<li class="col-md-6">
|
|
<span>{{ __('Longueur des codes uniques') }} </span>
|
|
<pre class="fw-bold fs-5 font-monospace">{{ config('codes.paginate') }}</pre>
|
|
</li>
|
|
<li class="col-md-6">
|
|
<span>{{ __('HASH') }} </span>
|
|
<span class="fw-bold fs-5 font-monospace px-5 py-3 text-center" id="serial-key-hash">
|
|
<span class="text-bg-info">{{ \App\Models\Code::serialKeyHash() }}</span>
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<h4 class="mb-3 mt-3">
|
|
<span class="d-block">{{ __('Général') }}</span>
|
|
<small class="text-muted">{{ __('Paramètres généraux du jeu') }}</small>
|
|
</h4>
|
|
|
|
<div class="row">
|
|
{{-- NAME --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.name')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.varchar', [
|
|
'id' => 'settings-name',
|
|
'label' => __(':field du jeu', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'name',
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field du jeu', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field du jeu', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- COMPANY --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.company')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.varchar', [
|
|
'id' => 'settings-company',
|
|
'label' => __('Nom de la :field qui organise le jeu', [
|
|
'field' => Str::ucfirst(__('validation.custom.company')),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'company',
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __('Nom de la :field', [
|
|
'field' => Str::ucfirst(__('validation.custom.company')),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field', [
|
|
'field' => Str::ucfirst(__('validation.custom.company')),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- START_DATE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.start_date')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.timestamp-datetime', [
|
|
'id' => 'settings-start-date',
|
|
'label' => Str::ucfirst(__('validation.custom.start_date')),
|
|
'name' => 'start_date',
|
|
'defaultValue' => true,
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('La date doit être supérieure ou égale à aujourd\'hui.'),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- END_DATE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.end_date')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.timestamp-datetime', [
|
|
'id' => 'settings-end-date',
|
|
'label' => Str::ucfirst(__('validation.custom.end_date')),
|
|
'name' => 'end_date',
|
|
'defaultValue' => true,
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('La date doit être supérieure ou égale à aujourd\'hui.'),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<span class="col h4 mb-3 mt-3">
|
|
<span class="d-block">{{ __('Les participations') }}</span>
|
|
<small class="text-muted">{{ __('Paramétrages des seuils de participation') }}</small>
|
|
</span>
|
|
|
|
{{-- Force next columns to break to new line --}}
|
|
<div class="w-100"></div>
|
|
|
|
{{-- AUTHORIZED_COUNTRIES --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.authorized_countries'))->ucfirst() }}</legend>
|
|
<div>
|
|
@php $itemsList = collect(\LDC\LDCCRM\Enums\Country::getValidCountries())->values(); @endphp
|
|
@include('back::partials.inputs.select-multiple-enum', [
|
|
'name' => 'authorized_countries',
|
|
'label' => str(__('validation.custom.authorized_countries'))->ucfirst(),
|
|
'placeholder' => str(__('rechercher parmi les :field', ['field' => __('validation.custom.authorized_countries')]))->ucfirst(),
|
|
'model' => $settingsModel ?? null,
|
|
'itemsList' => $itemsList,
|
|
'itemLimit' => [0, count($itemsList)],
|
|
'helper' => sprintf('%s %s', __('crud.minicrud.enum_select', [
|
|
'enum' => str(__('validation.custom.authorized_countries'))->ucfirst(),
|
|
]), __('Laisser vide afin de ne pas appliquer de restrictions.')),
|
|
'required' => false,
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- NB_PARTICIPATION_PLAYER --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.nb_participation_player')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.int-number', [
|
|
'id' => 'settings-nb-participation-player',
|
|
'label' => Str::ucfirst(__('validation.custom.nb_participation_player')),
|
|
'name' => 'nb_participation_player',
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' =>
|
|
__('validation.min.numeric', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.nb_participation_player')),
|
|
'min' => 0,
|
|
]) .
|
|
"\u{00A0}\u{00A0}\u{00A0} " .
|
|
__('0 => illimité'),
|
|
'min' => 0,
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- NB_PARTICIPATION_IP --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.nb_participation_ip')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.int-number', [
|
|
'id' => 'settings-nb-participation-ip',
|
|
'label' => Str::ucfirst(__('validation.custom.nb_participation_ip')),
|
|
'name' => 'nb_participation_ip',
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' =>
|
|
__('validation.min.numeric', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.nb_participation_ip')),
|
|
'min' => 0,
|
|
]) .
|
|
"\u{00A0}\u{00A0}\u{00A0} " .
|
|
__('0 => illimité'),
|
|
'min' => 0,
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- CODES TYPES --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.code_type'))->ucfirst() }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.tinyint-enum', [
|
|
'id' => 'codeType',
|
|
'label' => str(__('validation.custom.code_type'))->ucfirst(),
|
|
'name' => 'code_type',
|
|
'model' => $settingsModel ?? null,
|
|
'required' => true,
|
|
'disabled' => false,
|
|
'value' => optional(optional($settingsModel ?? null)->code_type)->value(),
|
|
'associatedModels' => \App\Enums\CodeType::toArray(),
|
|
'helper' => __('Sélectionner un :field pour le jeu', [
|
|
'field' => __('validation.custom.code_type'),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- NB_UNIQUE_CODE_USE --}}
|
|
<div id="settings-nb-unique-code-use" class="col-12 col-md-6 mb-3" data-enum-hide="{{ \App\Enums\CodeType::ean->value() }}">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.nb_unique_code_use')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.int-number', [
|
|
'id' => 'settings-nb-unique-code-use',
|
|
'label' => Str::ucfirst(__('validation.custom.nb_unique_code_use')),
|
|
'name' => 'nb_unique_code_use',
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' =>
|
|
__('validation.min.numeric', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.nb_unique_code_use')),
|
|
'min' => 0,
|
|
]) .
|
|
"\u{00A0}\u{00A0}\u{00A0} " .
|
|
__('0 => illimité'),
|
|
'min' => 0,
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
{{-- Force next columns to break to new line --}}
|
|
<div class="w-100"></div>
|
|
|
|
<div class="row">
|
|
<span class="col h4 mb-3 mt-3">
|
|
<span class="d-block">{{ __('Les Fonctionnalités') }}</span>
|
|
<small class="text-muted">{{ __('Paramétrages des fonctionnalités du jeu') }}</small>
|
|
</span>
|
|
</div>
|
|
|
|
{{-- REDIRECT_CLOSE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.redirect_close')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.varchar', [
|
|
'id' => 'settings-redirect-close',
|
|
'label' => Str::ucfirst(__('validation.custom.redirect_close')),
|
|
'hasWordCounter' => true,
|
|
'name' => 'redirect_close',
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('crud.minicrud.url'),
|
|
'placeholder' => 'https://example.test',
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
{{-- ACTIVATED_TEASER --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.activated_teaser')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.tinyint-boolean', [
|
|
'id' => 'settings-activated-teaser',
|
|
'label' => Str::ucfirst(__('validation.custom.activated_teaser')),
|
|
'name' => 'activated_teaser',
|
|
'required' => false,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.boolean', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.activated_teaser')),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
{{-- Force next columns to break to new line --}}
|
|
<div class="w-100"></div>
|
|
|
|
{{-- ACTIVATED_CLOSE_PAGE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.activated_close_page')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.tinyint-boolean', [
|
|
'id' => 'settings-activated-close-page',
|
|
'label' => Str::ucfirst(__('validation.custom.activated_close_page')),
|
|
'name' => 'activated_close_page',
|
|
'required' => false,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.boolean', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.activated_close_page')),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- CLOSE_PAGE_ACTIVE_DATE --}}
|
|
<div class="col-12 col-md-6 mb-3" id="close-page-active-date">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.close_page_active_date')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.timestamp-datetime', [
|
|
'id' => 'settings-close-page-active-date',
|
|
'label' => Str::ucfirst(__('validation.custom.close_page_active_date')),
|
|
'name' => 'close_page_active_date',
|
|
'defaultValue' => false,
|
|
'required' => true,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('La date doit être supérieure ou égale à aujourd\'hui.'),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
{{-- Force next columns to break to new line --}}
|
|
<div class="w-100"></div>
|
|
|
|
{{-- WINNING_PROOF --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.winning_proof')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.tinyint-boolean', [
|
|
'id' => 'settings-winning-proof-activated',
|
|
'label' => Str::ucfirst(__('validation.custom.winning_proof')),
|
|
'name' => 'winning_proof',
|
|
'required' => false,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.boolean', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.winning_proof')),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
{{-- NOTIFY_PRIZE_SENT --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.notify_prize_sent')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.tinyint-boolean', [
|
|
'id' => 'notify-prize-sent',
|
|
'label' => Str::ucfirst(__('validation.custom.notify_prize_sent')),
|
|
'name' => 'notify_prize_sent',
|
|
'required' => false,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.boolean', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.notify_prize_sent')),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<span class="col h5 mb-3">
|
|
<hr>
|
|
<span class="d-block">{{ __('Les réductions') }}</span>
|
|
<small class="text-muted">{{ __('Paramétrages des bons de réduction MLDC') }}</small>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="row">
|
|
{{-- DISCOUNTS_ACTIVATED --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.discounts_activated')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.tinyint-boolean', [
|
|
'id' => 'settings-discounts-activated',
|
|
'label' => Str::ucfirst(__('validation.custom.discounts_activated')),
|
|
'name' => 'discounts_activated',
|
|
'required' => false,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.boolean', [
|
|
'attribute' => Str::ucfirst(__('validation.custom.discounts_activated')),
|
|
]),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- DISCOUNTS_SITE --}}
|
|
<div class="col-12 col-md-6 mb-3" id="discounts-site">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.discounts_site')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.varchar', [
|
|
'id' => 'settings-discounts-site',
|
|
'label' => __('validation.custom.discounts_site'),
|
|
'hasWordCounter' => true,
|
|
'name' => 'discounts_site',
|
|
'required' => false,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __('validation.custom.discounts_site'),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __('validation.custom.discounts_site'),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- DISCOUNTS_CAMPAIGN --}}
|
|
<div class="col-12 col-md-6 mb-3" id="discounts-campaign">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.discounts_campaign')) }}</legend>
|
|
<div>
|
|
@include('back::partials.inputs.varchar', [
|
|
'id' => 'settings-discounts-campaign',
|
|
'label' => __('validation.custom.discounts_campaign'),
|
|
'hasWordCounter' => true,
|
|
'name' => 'discounts_campaign',
|
|
'required' => false,
|
|
'model' => $settingsModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __('validation.custom.discounts_campaign'),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __('validation.custom.discounts_campaign'),
|
|
])
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- WEB_COUPONS --}}
|
|
@php
|
|
$data = [
|
|
'coupon_list' => old('web_coupons', $settingsModel->web_coupons),
|
|
'name' => 'web_coupons',
|
|
'coupon_with' => 920,
|
|
'coupon_height' => 409,
|
|
];
|
|
@endphp
|
|
<div class="web-coupons mb-3" id="discounts-web-coupons" data-json='@json($data)'></div>
|
|
@include('back::modules.input-error', ['inputName' => 'web_coupons'])
|
|
@include('back::modules.input-error', ['inputName' => 'web_coupons.*'])
|
|
</div>
|
|
|
|
<hr>
|
|
<h5 class="card-subtitle mb-3">
|
|
{{ __('Destinataires des notifications de gain') }}<br />
|
|
<small class="text-muted">{{ __('Ces mails recevront toutes les notifications de gain.') }}</small>
|
|
</h5>
|
|
|
|
<div class="row">
|
|
{{-- NOTIFICATION_EMAILS --}}
|
|
@php
|
|
$data = [
|
|
'emails' => old('notification_emails', $settingsModel->notification_emails),
|
|
'name' => 'notification_emails',
|
|
];
|
|
@endphp
|
|
<div class="win-notification mb-3" data-json='@json($data)'></div>
|
|
@include('back::modules.input-error', ['inputName' => 'notification_emails'])
|
|
@include('back::modules.input-error', ['inputName' => 'notification_emails.*'])
|
|
</div>
|