| {{ index + 1 }} |
@@ -84,7 +84,8 @@
Poucentage total > 100%
+ >
+ Poucentage total › 100%
;
+ name: string,
} {
return {
- datas: []
+ datas: [],
+ name: "",
};
},
watch: {
@@ -139,7 +137,7 @@ export default defineComponent({
computed: {
totalPercentage() {
let total = 0;
- this.datas.forEach(element => total += parseInt(String(element.percentage)));
+ this.datas.forEach((element: Record) => total += parseInt(String(element.percentage)));
return total;
}
}
diff --git a/resources/ts/bo/components/WinNotification.vue b/resources/ts/bo/components/WinNotification.vue
index c3e68e0..8e87f92 100644
--- a/resources/ts/bo/components/WinNotification.vue
+++ b/resources/ts/bo/components/WinNotification.vue
@@ -67,28 +67,23 @@
diff --git a/resources/views/bo/instant-win/index.blade.php b/resources/views/bo/instant-win/index.blade.php
index dfe98db..e8c7557 100644
--- a/resources/views/bo/instant-win/index.blade.php
+++ b/resources/views/bo/instant-win/index.blade.php
@@ -7,5 +7,5 @@
'instantwin' => $instant_win
]
@endphp
-
+
@endsection
diff --git a/resources/views/bo/layouts/nav-menu.blade.php b/resources/views/bo/layouts/nav-menu.blade.php
index 7a023ec..d07c47b 100644
--- a/resources/views/bo/layouts/nav-menu.blade.php
+++ b/resources/views/bo/layouts/nav-menu.blade.php
@@ -10,11 +10,11 @@
@superadmin
-
- {{ __('Réglages') }}
+ {{ __('models.classes.settings') }}
@@ -40,14 +40,6 @@
@endsuperadmin
-
-
- {{ __('Codes EAN') }}
-
-
@endsuperadmin
-
-
- {{ __('Aller sur le jeu') }}
-
-
@endauth
-
- {{-- FIXME A REMOVE ? --}}
- {{-- {{ __('Social share') }} --}}
diff --git a/resources/views/bo/pages/settings/edit.blade.php b/resources/views/bo/pages/settings/edit.blade.php
new file mode 100644
index 0000000..1ea32e7
--- /dev/null
+++ b/resources/views/bo/pages/settings/edit.blade.php
@@ -0,0 +1,48 @@
+@extends('bo.layout', ['brParam' => $settingsModel])
+
+@section('title', __('Édition d\'une :model', ['model' => Str::singular(__('models.classes.settings'))]))
+@section('description', __('Édition d\'une :model déjà existante', ['model' => Str::singular(__('models.classes.settings'))]))
+@section('breadcrumb', request()->route()->getName())
+
+@section('content')
+
+
+ @include('breadcrumbs.breadcrumb-body', ['brParam' => $settingsModel])
+
+
+
+
+@endsection
diff --git a/resources/views/bo/pages/settings/form-inputs.blade.php b/resources/views/bo/pages/settings/form-inputs.blade.php
new file mode 100644
index 0000000..620b289
--- /dev/null
+++ b/resources/views/bo/pages/settings/form-inputs.blade.php
@@ -0,0 +1,538 @@
+
+ {{ __('Général') }}
+ {{ __('Paramètres généraux du jeu') }}
+
+
+
+ {{-- NAME --}}
+
+
+
+ {{-- START_DATE --}}
+
+
+
+ {{-- END_DATE --}}
+
+
+
+ {{-- NB_PARTICIPATION_PLAYER --}}
+
+
+
+ {{-- NB_PARTICIPATION_IP --}}
+
+
+
+ {{-- NB_UNIQUE_CODE_USE --}}
+
+
+
+ {{-- CODE_LENGTH --}}
+
+
+
+ {{-- USE_EAN_CODES --}}
+
+
+
+ {{-- ACTIVATED_TEASER --}}
+
+
+
+ {{-- TEASER_END_ACTIVITY --}}
+
+
+
+ {{-- ACTIVATED_CLOSE_PAGE --}}
+
+
+
+ {{-- CLOSE_PAGE_ACTIVE_DATE --}}
+
+
+
+ {{-- REDIRECT_CLOSE --}}
+
+
+
+ {{-- WINNING_PROOF --}}
+
+
+
+ {{-- COMPANY --}}
+
+
+
+
+
+
+
+ {{ __('Les réductions') }}
+ {{ __('Paramétrages des bons de réduction MLDC') }}
+
+
+
+ {{-- REDUCTIONS_ACTIVATED --}}
+
+
+
+ {{-- REDUCTIONS_SITE --}}
+
+
+
+ {{-- REDUCTIONS_CAMPAIGN --}}
+
+
+
+ {{-- WEB_COUPONS --}}
+ @php
+ $data = [
+ 'dbdatas' => $settingsModel->web_coupons,
+ 'name' => 'web_coupons'
+ ]
+ @endphp
+
+
+
+
+
+ {{ __('Destinataires des notifications de gain') }}
+ {{ __('Ces mails recevront toutes les notifications de gain.') }}
+
+
+
+ {{-- NOTIFICATION_EMAILS --}}
+ @php
+ $data = [
+ 'dbdatas' => $settingsModel->notification_emails,
+ 'name' => 'notification_emails'
+ ]
+ @endphp
+
+
+
+
+
+ {{ __('Analytics') }}
+ {{ __('Saississez les informations permettant d\'établir des statistiques pour le jeu.') }}
+
+
+
+ {{-- ANALYTICS --}}
+
+
+
+
+
+@push('scripts')
+
+@endpush
diff --git a/resources/views/bo/pages/settings/manage.blade.php b/resources/views/bo/pages/settings/manage.blade.php
new file mode 100644
index 0000000..67d6f81
--- /dev/null
+++ b/resources/views/bo/pages/settings/manage.blade.php
@@ -0,0 +1,350 @@
+@extends('bo.layout')
+
+@section('content')
+
+@endsection
+
+@push('scripts')
+
+@endpush
diff --git a/resources/views/bo/pages/winners-list/index.blade.php b/resources/views/bo/pages/winners-list/index.blade.php
new file mode 100644
index 0000000..3b2b745
--- /dev/null
+++ b/resources/views/bo/pages/winners-list/index.blade.php
@@ -0,0 +1,72 @@
+@extends('bo.layout')
+
+@section('title', __('models.classes.winners'))
+@section('description', __('Liste de tous les :model', ['model' => __('models.classes.winners')]))
+
+@section('content')
+
+ @include('breadcrumbs.breadcrumb-body')
+
+
+ @if (count($participationModels) > 0)
+
+ @php
+ $cols = [
+ 'created_at' => __('Date participation'),
+ 'prize' => __('Lot'),
+ 'email' => __('Email')
+ ];
+ if ($settings->use_ean_codes === 1) {
+ $cols['code_ean_id'] = __('Code EAN');
+ }
+ $cols['code_unique_id'] = __('Code unique');
+ if ($settings->winning_proof === 1) {
+ $cols['sticker'] = __('Sticker');
+ $cols['barcode'] = __('Code barre');
+ $cols['ticket'] = __('Ticket');
+ }
+ @endphp
+ @include('bo.modules.table-col-sorter', [
+ 'cols' => $cols,
+ 'ignore' => ['sticker', 'barcode', 'ticket']
+ ])
+
+
+ @foreach ($participationModels as $participationModel)
+
+ | {{ \Carbon\Carbon::parse($participationModel->created_at)->format('d/m/Y à H:i') }} |
+ {{$participationModel->instantWin()->first()->prize->label_one}} |
+ {{$participationModel->user->email}} |
+ @if ($settings->use_ean_codes)
+ {{$participationModel->codeEan->code}} |
+ @endif
+ {{$participationModel->code->code_unique}} |
+ @if ($settings->winning_proof === 1)
+ @if ($participationModel->sticker !== null)
+ Voir |
+ @else
+ - |
+ @endif
+ @if ($participationModel->barcode !== null)
+ Voir |
+ @else
+ - |
+ @endif
+ @if ($participationModel->ticket !== null)
+ Voir |
+ @else
+ - |
+ @endif
+ @endif
+
+
+ @endforeach
+
+ @else
+
+ | {{ __('crud.other.no_model_found', ['model' => Str::singular(__('models.classes.winners'))]) }} |
+
+ @endif
+
+{!! $participationModels->links() !!}
+@endsection
diff --git a/resources/views/bo/partials/inputs/int-number.blade.php b/resources/views/bo/partials/inputs/int-number.blade.php
index cd2236b..efd20bd 100644
--- a/resources/views/bo/partials/inputs/int-number.blade.php
+++ b/resources/views/bo/partials/inputs/int-number.blade.php
@@ -32,6 +32,9 @@
@endif
@if(!empty($required))
required
+ @endif
+ @if(!empty($disabled))
+ disabled
@endif>
@if(isset($appendText))
diff --git a/resources/views/bo/winners-list/arcadia.blade.php b/resources/views/bo/winners-list/arcadia.blade.php
deleted file mode 100644
index 4e73077..0000000
--- a/resources/views/bo/winners-list/arcadia.blade.php
+++ /dev/null
@@ -1,31 +0,0 @@
-@extends('bo.layout')
-
-@section('content')
-
-@endsection
diff --git a/resources/views/bo/winners-list/index.blade.php b/resources/views/bo/winners-list/index.blade.php
deleted file mode 100644
index 610daa8..0000000
--- a/resources/views/bo/winners-list/index.blade.php
+++ /dev/null
@@ -1,60 +0,0 @@
-@extends('bo.layout')
-
-@section('content')
-
-
-
-
-
-
- | Date participation |
- Lot |
- Email |
- @if ($settings->use_ean_codes === 1)
- Code EAN |
- @endif
- Code unique |
- @if ($settings->winning_proof === 1)
- Sticker |
- Code barre |
- Ticket |
- @endif
- Arcadia |
-
-
- @foreach($winnersList as $winner)
-
- | {{ \Carbon\Carbon::parse($winner->created_at)->format('d/m/Y à H:i') }} |
- {{$winner->instantWin()->first()->prize->label_one}} |
- {{$winner->user->email}} |
- @if ($settings->use_ean_codes)
- {{$winner->codeEan->code}} |
- @endif
- {{$winner->code->code_unique}} |
- @if ($settings->winning_proof === 1)
- @if ($winner->sticker !== null)
- Voir |
- @else
- - |
- @endif
- @if ($winner->barcode !== null)
- Voir |
- @else
- - |
- @endif
- @if ($winner->ticket !== null)
- Voir |
- @else
- - |
- @endif
- @endif
- Envoyer |
-
- @endforeach
-
-
-
-
-@endsection
diff --git a/routes/breadcrumbs-bo.php b/routes/breadcrumbs-bo.php
index 9e538b4..638ac4f 100644
--- a/routes/breadcrumbs-bo.php
+++ b/routes/breadcrumbs-bo.php
@@ -124,3 +124,13 @@ Breadcrumbs::for('bo.products.edit', function (Generator $trail, Product $produc
$trail->parent('bo.products.index');
$trail->push(__('crud.actions.edit'), route('bo.products.edit', $product->id));
});
+
+// * SETTINGS
+Breadcrumbs::for('bo.settings.edit', function (Generator $trail) {
+ $trail->push(__('models.classes.settings'), route('bo.products.index'));
+});
+
+// * WINNERS LIST
+Breadcrumbs::for('bo.winners-list', function (Generator $trail) {
+ $trail->push(__('models.classes.winners'), route('bo.winners-list'));
+});
diff --git a/routes/web-bo.php b/routes/web-bo.php
index 86abfcb..8697449 100644
--- a/routes/web-bo.php
+++ b/routes/web-bo.php
@@ -66,6 +66,11 @@ Route::prefix('bo')
Route::resource('products', ProductsController::class)
->except('show')
->withoutMiddleware('is-super-admin');
+ // * SETTINGS.
+ Route::resource('/settings', SettingsController::class)
+ ->only(['edit', 'update']);
+ // * WINNERS LIST
+ Route::get('/winners-list', [WinnersListController::class, 'index'])->name('winners-list');
// TODO RESTE A FAIRE :.
Route::get('/', [DashboardController::class, 'index'])
@@ -81,11 +86,5 @@ Route::prefix('bo')
Route::post('/codes', [CodesController::class, 'generate'])->name('generate-codes');
Route::get('/codes/search', [CodesController::class, 'search'])->name('codes.search');
Route::post('/codes/export', [CodesController::class, 'export'])->name('export-codes');
- // Liste des gagnants.
- Route::get('/winners-list', [WinnersListController::class, 'index'])->name('winners-list');
- Route::get('/winners-list/arcadia/{id}', [WinnersListController::class, 'courrierArcadia'])
- ->name('winners-arcadia');
- Route::post('/winners-list/arcadia/{id}/send', [WinnersListController::class, 'createCourrierArcadia'])
- ->name('courrier-arcadia');
});
});
|