Add re7 prize sent
This commit is contained in:
parent
b8bb0f2392
commit
0f3bf5e2ca
3 changed files with 32 additions and 5 deletions
|
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Bo;
|
|||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Mail\Won\DiscountWonMail;
|
||||
use App\Mail\Won\PrizeIsSentMail;
|
||||
use App\Mail\Won\PrizeWonMail;
|
||||
use App\Mail\Won\WinningProofSubmitedMail;
|
||||
use App\Models\Prize;
|
||||
|
|
@ -116,7 +117,7 @@ class Re7Controller extends Controller
|
|||
// * -- END Participation
|
||||
|
||||
/**
|
||||
* View won discount mail
|
||||
* View won prize mail
|
||||
*
|
||||
* @param \App\Models\Prize $prize
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
|
|
@ -165,6 +166,20 @@ class Re7Controller extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* View sent prize mail
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function mailPrizeSent(): View
|
||||
{
|
||||
return view('back::pages.re7-preview-mail', [
|
||||
'render_url' => route('re7.mail-print', [
|
||||
'type' => 'prize-sent'
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a specific mail
|
||||
*
|
||||
|
|
@ -207,14 +222,21 @@ class Re7Controller extends Controller
|
|||
$prize,
|
||||
config('app.url')
|
||||
))->render());
|
||||
case 'prize-sent':
|
||||
return response((new PrizeIsSentMail(
|
||||
new Address(
|
||||
$user->email,
|
||||
$user->first_name
|
||||
),
|
||||
$settings->name
|
||||
))->render());
|
||||
case 'proof':
|
||||
return response((new WinningProofSubmitedMail(
|
||||
new Address(
|
||||
$user->email,
|
||||
$user->first_name
|
||||
),
|
||||
$settings->name,
|
||||
config('app.url')
|
||||
$settings->name
|
||||
))->render());
|
||||
default:
|
||||
return response('', 404);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,11 @@
|
|||
<div class="list-group">
|
||||
<span class="list-group-item list-group-item-dark">{{ __('Mails') }}</span>
|
||||
|
||||
{{-- WON BR MAIL --}}
|
||||
{{-- PRIZE SENT --}}
|
||||
<a class="list-group-item list-group-item-action" href="{{ route('re7.mail-sent-prize') }}"
|
||||
title="{{ __('Afficher le mail de lot envoyé') }}" target="_blank">{{ __('Le lot à été envoyé') }}</a>
|
||||
|
||||
{{-- WON PROOF RECEIVED --}}
|
||||
<a class="list-group-item list-group-item-action" href="{{ route('re7.mail-proof') }}"
|
||||
title="{{ __('Afficher le mail de bonne reception des preuves de gains') }}"
|
||||
target="_blank">{{ __('Preuves de gains reçus') }}</a>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ Route::prefix('re7')->name('re7.')->middleware(['auth:backend'])->group(function
|
|||
Route::get('mail-prize/{prize}', [Re7Controller::class, 'mailPrize'])->name('mail-prize');
|
||||
Route::get('mail-discount', [Re7Controller::class, 'mailDiscount'])->name('mail-discount');
|
||||
Route::get('mail-proof', [Re7Controller::class, 'mailProofReceived'])->name('mail-proof');
|
||||
Route::get('mail-sent-prize', [Re7Controller::class, 'mailPrizeSent'])->name('mail-sent-prize');
|
||||
Route::get('mail/{type}/{prize?}', [Re7Controller::class, 'mailPrint'])->name('mail-print')
|
||||
->where('type', 'discount|prize|proof');
|
||||
->where('type', 'discount|prize|proof|prize-sent');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue