SYNC 22 Submit winning proof + notifications ok
This commit is contained in:
parent
f3f57d1278
commit
8f31c8a419
13 changed files with 125 additions and 143 deletions
|
|
@ -70,6 +70,13 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
document.addEventListener("DOMContentLoaded", function () {
|
||||
document.querySelectorAll("input.is-invalid").forEach((input) => {
|
||||
let timer: NodeJS.Timeout|null = null;
|
||||
input.addEventListener("change", () => {
|
||||
const parent = input.parentElement;
|
||||
input.classList.remove("is-invalid");
|
||||
if (parent && parent.classList.contains("is-invalid")) {
|
||||
parent.classList.remove("is-invalid");
|
||||
}
|
||||
});
|
||||
input.addEventListener("input", () => {
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
|
|
|
|||
16
views/mails/submited-proof.blade.php
Normal file
16
views/mails/submited-proof.blade.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{-- blade-formatter-disable --}}
|
||||
<x-mail::message>
|
||||
# {{ __('Merci :first_name ,', ['first_name' => $first_name]) }}
|
||||
|
||||
{{ __('Nous avons bien recu à ce jour vos preuves de gains.') }}
|
||||
|
||||
{{ __('Vous recevrez prochainement votre dotation à votre domicile.') }}
|
||||
|
||||
|
||||
{{ __('Nous vous remercions de votre participation.') }}
|
||||
{{ __('L\'équipe :game_name .', ['game_name' => Str::ucfirst($game_name)]) }}
|
||||
|
||||
{{ __('Si vous avez des questions, n\'hésitez pas à nous contacter via notre [formulaire de contact](:url).', [
|
||||
'url' => 'https://www.legaulois.fr/contactez-nous'
|
||||
]) }}
|
||||
</x-mail::message>
|
||||
|
|
@ -1,25 +1,25 @@
|
|||
{{-- blade-formatter-disable --}}
|
||||
<x-mail::message>
|
||||
# Bravo {{ $first_name }} !
|
||||
# {{ __('Bravo :first_name !', ['first_name' => $first_name]) }}
|
||||
|
||||
Vous venez de gagner un bon d'achat de {{ number_format($discount->face_value / 100, 2, ',') }}€
|
||||
en participant à notre jeu {{ Str::ucfirst($game_name) }} !
|
||||
{{ __('Vous venez de gagner un bon d\'achat de :face_value € en participant à notre grand jeu :game_name .', [
|
||||
'face_value' => number_format($discount->face_value / 100, 2, ','),
|
||||
'game_name' => Str::ucfirst($game_name),
|
||||
]) }}
|
||||
|
||||
<x-mail::panel>
|
||||
|
||||
<x-mail::button :url="$print_url">
|
||||
Cliquez ici pour accéder à la page d'impression de votre bon
|
||||
{{ __('Cliquez ici pour accéder à la page d\'impression de votre bon') }}
|
||||
</x-mail::button>
|
||||
|
||||
|
||||
Assurez-vous d'être équipé d'une imprimante en état de marche
|
||||
avant de lancer l'impression de votre bon, il ne pourra être imprimé et
|
||||
utilisé qu'une seule fois.
|
||||
{{ __('Assurez-vous d\'être équipé d\'une imprimante en état de marche avant de lancer l\'impression de votre bon, il ne pourra être imprimé et utilisé qu\'une seule fois.') }}
|
||||
</x-mail::panel>
|
||||
|
||||
Nous vous remercions de votre participation.
|
||||
L'équipe {{ Str::ucfirst($game_name) }}.
|
||||
{{ __('Nous vous remercions de votre participation.') }}
|
||||
{{ __('L\'équipe :game_name .', ['game_name' => Str::ucfirst($game_name)]) }}
|
||||
|
||||
Si vous avez des questions, n'hésitez pas à nous contacter via notre
|
||||
[formulaire de contact](https://www.legaulois.fr/contactez-nous).
|
||||
{{ __('Si vous avez des questions, n\'hésitez pas à nous contacter via notre [formulaire de contact](:url).', [
|
||||
'url' => 'https://www.legaulois.fr/contactez-nous'
|
||||
]) }}
|
||||
</x-mail::message>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
{{-- blade-formatter-disable --}}
|
||||
<x-mail::message>
|
||||
# Bravo {{ $first_name }} !
|
||||
# {{ __('Bravo :first_name !', ['first_name' => $first_name]) }}
|
||||
|
||||
Vous venez de gagner 1 {{ $prize_label }} en participant à
|
||||
notre grand jeu {{ Str::ucfirst($game_name) }}!
|
||||
{{ __('Vous venez de gagner 1 :prize en participant à notre grand jeu :game_name .', [
|
||||
'prize' => Str::ucfirst($prize_label),
|
||||
'game_name' => Str::ucfirst($game_name),
|
||||
]) }}
|
||||
|
||||
Vous recevrez prochainement votre dotation à votre domicile.
|
||||
{{ __('Vous recevrez prochainement votre dotation à votre domicile.') }}
|
||||
|
||||
Nous vous remercions de votre participation.
|
||||
L'équipe {{ Str::ucfirst($game_name) }}.
|
||||
{{ __('Nous vous remercions de votre participation.') }}
|
||||
{{ __('L\'équipe :game_name .', ['game_name' => Str::ucfirst($game_name)]) }}
|
||||
|
||||
Si vous avez des questions, n'hésitez pas à nous contacter via notre
|
||||
[formulaire de contact](https://www.legaulois.fr/contactez-nous).
|
||||
{{ __('Si vous avez des questions, n\'hésitez pas à nous contacter via notre [formulaire de contact](:url).', [
|
||||
'url' => 'https://www.legaulois.fr/contactez-nous'
|
||||
]) }}
|
||||
</x-mail::message>
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
<p>Bonjour,</p>
|
||||
<p>Vous trouverez en PJ les preuves de gain du joueur suivant :</p>
|
||||
<p>
|
||||
<b>Lot : {{ $participation->instantWin()->first()->prize->label ?? '' }}</b><br />
|
||||
{{ $user->lastname }} {{ $user->firstname }}<br />
|
||||
{{ $user->address }}<br />
|
||||
@if ($user->address2 !== null)
|
||||
{{ $user->address2 }}<br />
|
||||
@endif
|
||||
{{ $user->postal_code }} {{ $user->town }} - {{ $user->country }}<br />
|
||||
{{ $user->email }}
|
||||
</p>
|
||||
<p>Codes utilisés :</p>
|
||||
<p>
|
||||
@if ($settings->use_ean_codes)
|
||||
Code On Pack : {{ $participation->codeEan->code }}<br />
|
||||
@endif
|
||||
Code Unique : {{ $participation->code->code_unique ?? '' }}
|
||||
</p>
|
||||
|
|
@ -1,4 +1,11 @@
|
|||
<section class="container-fluid d-none overflow-x-hidden pb-5 pt-5 text-center" id="{{ $sectionId }}">
|
||||
<section id="{{ $sectionId }}" @class([
|
||||
'container-fluid',
|
||||
'pb-5',
|
||||
'pt-5',
|
||||
'text-center',
|
||||
'overflow-x-hidden',
|
||||
'd-none' => empty($noHide),
|
||||
])>
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
<img class="img-fluid" src="{{ asset($prizeModel->picture) }}" title="{{ $prizeModel->picture_title }}"
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@
|
|||
|
||||
{{-- FIRST_NAME --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.first_name')
|
||||
@include('theme::auth.partials.inputs.first_name', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- LAST_NAME --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.last_name')
|
||||
@include('theme::auth.partials.inputs.last_name', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- ADDRESS --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.address')
|
||||
@include('theme::auth.partials.inputs.address', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- ADDRESS2 --}}
|
||||
|
|
@ -26,22 +26,22 @@
|
|||
|
||||
{{-- POSTAL_CODE --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.postal_code')
|
||||
@include('theme::auth.partials.inputs.postal_code', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- CITY --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.city')
|
||||
@include('theme::auth.partials.inputs.city', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- COUNTRY --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.country')
|
||||
@include('theme::auth.partials.inputs.country', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- PHONE --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.phone')
|
||||
@include('theme::auth.partials.inputs.phone', ['required' => true])
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
|
|
|||
|
|
@ -6,16 +6,21 @@
|
|||
|
||||
{{-- FILE CODE --}}
|
||||
<div class="col col-lg-8 col-xl-6 py-2">
|
||||
<label class="form-label fw-bold" for="file-code">{{ __('Code-barres du produit *') }}</label>
|
||||
<input class="form-control form-control-lg" id="file-code" name="file_code" type="file" @class([
|
||||
<label class="form-label fw-bold" for="barcode">{{ Str::ucfirst(__('validation.custom.barcode')) }} *</label>
|
||||
<input id="barcode" name="barcode" type="file" @class([
|
||||
'form-control',
|
||||
'form-control-lg',
|
||||
'is-invalid' => $errors->has('file_code'),
|
||||
'is-invalid' => $errors->has('barcode'),
|
||||
]) @class([
|
||||
'form-control',
|
||||
'form-control-lg',
|
||||
'is-invalid' => $errors->has('barcode'),
|
||||
])
|
||||
accept=".jpg,.jpeg,.png,.pdf" required>
|
||||
@foreach ($errors->get('file_code') as $message)
|
||||
@foreach ($errors->get('barcode') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
<small>{{ __('Image ou pdf, 2 Mo maximum') }}</small>
|
||||
</div>
|
||||
|
||||
{{-- Force next columns to break to new line --}}
|
||||
|
|
@ -23,16 +28,21 @@
|
|||
|
||||
{{-- FILE RECEIPT --}}
|
||||
<div class="col col-lg-8 col-xl-6 py-2">
|
||||
<label class="form-label fw-bold" for="file-code">{{ __('Ticket de caisse avec la date *') }}</label>
|
||||
<input class="form-control form-control-lg" id="file-code" name="file_receipt" type="file" @class([
|
||||
<label class="form-label fw-bold" for="ticket">{{ Str::ucfirst(__('validation.custom.ticket')) }} *</label>
|
||||
<input id="ticket" name="ticket" type="file" @class([
|
||||
'form-control',
|
||||
'form-control-lg',
|
||||
'is-invalid' => $errors->has('file_receipt'),
|
||||
'is-invalid' => $errors->has('ticket'),
|
||||
]) @class([
|
||||
'form-control',
|
||||
'form-control-lg',
|
||||
'is-invalid' => $errors->has('ticket'),
|
||||
])
|
||||
accept=".jpg,.jpeg,.png,.pdf" required>
|
||||
@foreach ($errors->get('file_receipt') as $message)
|
||||
@foreach ($errors->get('ticket') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
<small>{{ __('Image ou pdf, 2 Mo maximum') }}</small>
|
||||
</div>
|
||||
|
||||
{{-- Force next columns to break to new line --}}
|
||||
|
|
@ -40,16 +50,21 @@
|
|||
|
||||
{{-- FILE STICKER --}}
|
||||
<div class="col col-lg-8 col-xl-6 py-2">
|
||||
<label class="form-label fw-bold" for="file-sticker">{{ __('Sticker du produit *') }}</label>
|
||||
<input class="form-control form-control-lg" id="file-sticker" name="file_sticker" type="file" @class([
|
||||
<label class="form-label fw-bold" for="sticker">{{ Str::ucfirst(__('validation.custom.sticker')) }} *</label>
|
||||
<input id="sticker" name="sticker" type="file" @class([
|
||||
'form-control',
|
||||
'form-control-lg',
|
||||
'is-invalid' => $errors->has('file_sticker'),
|
||||
'is-invalid' => $errors->has('sticker'),
|
||||
]) @class([
|
||||
'form-control',
|
||||
'form-control-lg',
|
||||
'is-invalid' => $errors->has('sticker'),
|
||||
])
|
||||
accept=".jpg,.jpeg,.png,.pdf" required>
|
||||
@foreach ($errors->get('file_sticker') as $message)
|
||||
@foreach ($errors->get('sticker') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
<small>{{ __('Image ou pdf, 2 Mo maximum') }}</small>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
<section class="container-fluid d-none pb-5 pt-5" id="{{ $sectionId }}">
|
||||
<section id="{{ $sectionId }}" @class([
|
||||
'container-fluid',
|
||||
'pb-5',
|
||||
'pt-5',
|
||||
'd-none' => empty($noHide),
|
||||
])>
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<span class="fs-1 fw-bold text-tertiary d-block text-center">{{ __('Envoyez vos preuves de gain') }}</span>
|
||||
|
|
@ -16,9 +21,9 @@
|
|||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col g-0">
|
||||
<form class="container my-2 border py-3" method="POST" action="{{ route('fo.send-winning-proof') }}"
|
||||
<form class="container my-2 border py-3" method="POST" action="{{ route('fo.winning-proof-submit', $participationModel) }}"
|
||||
enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@method('POST')
|
||||
@csrf
|
||||
|
||||
@include('theme::pages.participation.parts.winning-proof-form.coordinates')
|
||||
|
|
|
|||
27
views/pages/participation/won-form-only.blade.php
Normal file
27
views/pages/participation/won-form-only.blade.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
@extends('theme::layout')
|
||||
|
||||
@section('title', __('Vous avez gagné !'))
|
||||
@section('description', __('Vous avez gagné un Lot, veuillez compléter le formulaire de preuve de gains'))
|
||||
|
||||
@section('main-class', 'won-page g-0')
|
||||
@section('content')
|
||||
|
||||
{{-- LOT --}}
|
||||
@include('theme::pages.participation.parts.prize', [
|
||||
'noHide' => true,
|
||||
'sectionId' => 'prize-section',
|
||||
'prizeModel' => $prizeModel,
|
||||
'participationModel' => $participationModel,
|
||||
'winProofAnchor' => 'winning-proof-section',
|
||||
])
|
||||
|
||||
@if ($settingsGlobal->winning_proof and !empty($prizeModel))
|
||||
{{-- WINNING PROOF SUBMIT PART --}}
|
||||
@include('theme::pages.participation.parts.winning-proof', [
|
||||
'noHide' => true,
|
||||
'sectionId' => 'winning-proof-section',
|
||||
'participationModel' => $participationModel,
|
||||
])
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
@include('theme::pages.participation.parts.prize', [
|
||||
'sectionId' => 'prize-section',
|
||||
'prizeModel' => $prizeModel,
|
||||
'participationModel' => $participationModel,
|
||||
'winProofAnchor' => 'winning-proof-section',
|
||||
])
|
||||
@elseif (!empty($discount))
|
||||
|
|
@ -36,6 +37,7 @@
|
|||
{{-- WINNING PROOF SUBMIT PART --}}
|
||||
@include('theme::pages.participation.parts.winning-proof', [
|
||||
'sectionId' => 'winning-proof-section',
|
||||
'participationModel' => $participationModel,
|
||||
])
|
||||
@endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
@extends('theme::layout')
|
||||
|
||||
@section('title', 'Rejouer')
|
||||
|
||||
@section('content')
|
||||
<div class="register floating grid">
|
||||
<div class="head-bloc"></div>
|
||||
<section class="main--bloc container">
|
||||
<p>Félicitations pour votre gain !</p>
|
||||
<p>Vous possédez un autre code ?</p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<div class="main-btn">
|
||||
<a href="{{ route('fo.participate') }}">Je rejoue</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
@extends('theme::layout')
|
||||
|
||||
@section('title', 'Preuve de gain')
|
||||
|
||||
@section('content')
|
||||
<p>Envoyer vos preuves de gain</p>
|
||||
<form method="POST" action="{{ route('fo.send-winning-proof') }}" enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="lastname" type="text" value="{{ Auth::user()->lastname }}" placeholder="Nom *" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="firstname" type="text" value="{{ Auth::user()->firstname }}" placeholder="Prénom *" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="address" type="text" value="{{ Auth::user()->address }}" placeholder="Adresse *" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="address2" type="text" value="{{ Auth::user()->address2 }}"
|
||||
placeholder="Adresse complémentaire">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="town" type="text" value="{{ Auth::user()->town }}" placeholder="Ville *" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="postal_code" type="text" value="{{ Auth::user()->postal_code }}" placeholder="Code postal *"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="country" type="text" value="{{ Auth::user()->country }}" placeholder="Pays *" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="phone" type="text" placeholder="Téléphone *" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sticker">Stickers <small class="text-muted">Format : png, jpeg, jpg, pdf - Taille max. : 1,5Mo.</small></label><br />
|
||||
<input class="input-file" id="sticker" name="sticker" type="file" accept="image/png, image/jpeg, pdf" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ticket">Ticket de caisse <small class="text-muted">Format : png, jpeg, jpg, pdf - Taille max. :
|
||||
1,5Mo.</small></label><br />
|
||||
<input class="input-file" id="ticket" name="ticket" type="file" accept="image/png, image/jpeg, pdf" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="barcode">Code barres <small class="text-muted">Format : png, jpeg, jpg, pdf - Taille max. :
|
||||
1,5Mo.</small></label><br />
|
||||
<input class="input-file" id="barcode" name="barcode" type="file" accept="image/png, image/jpeg, pdf" required>
|
||||
</div>
|
||||
<div class="form-group text-center">
|
||||
<input class="btn btn-success" type="submit" value="Envoyer">
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
Loading…
Add table
Reference in a new issue