Merge branch dev into features/notifications
This commit is contained in:
@@ -5,9 +5,7 @@ namespace App\Events;
|
|||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use Illuminate\Broadcasting\Channel;
|
use Illuminate\Broadcasting\Channel;
|
||||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
use Illuminate\Broadcasting\PresenceChannel;
|
|
||||||
use Illuminate\Broadcasting\PrivateChannel;
|
use Illuminate\Broadcasting\PrivateChannel;
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
||||||
use Illuminate\Foundation\Events\Dispatchable;
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@ namespace App\Events;
|
|||||||
|
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Task;
|
use App\Models\Task;
|
||||||
use Illuminate\Broadcasting\Channel;
|
|
||||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
use Illuminate\Broadcasting\PresenceChannel;
|
|
||||||
use Illuminate\Broadcasting\PrivateChannel;
|
use Illuminate\Broadcasting\PrivateChannel;
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
||||||
use Illuminate\Foundation\Events\Dispatchable;
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@ namespace App\Events;
|
|||||||
|
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Task;
|
use App\Models\Task;
|
||||||
use Illuminate\Broadcasting\Channel;
|
|
||||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
use Illuminate\Broadcasting\PresenceChannel;
|
|
||||||
use Illuminate\Broadcasting\PrivateChannel;
|
use Illuminate\Broadcasting\PrivateChannel;
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
||||||
use Illuminate\Foundation\Events\Dispatchable;
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@ namespace App\Events;
|
|||||||
|
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Task;
|
use App\Models\Task;
|
||||||
use Illuminate\Broadcasting\Channel;
|
|
||||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
use Illuminate\Broadcasting\PresenceChannel;
|
|
||||||
use Illuminate\Broadcasting\PrivateChannel;
|
use Illuminate\Broadcasting\PrivateChannel;
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
||||||
use Illuminate\Foundation\Events\Dispatchable;
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|||||||
@@ -5,11 +5,14 @@ namespace App\Http\Controllers;
|
|||||||
use App\Events\EventParticipationCancelled;
|
use App\Events\EventParticipationCancelled;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Notification;
|
use App\Models\Notification;
|
||||||
|
use App\Mail\EventParticipationCancelledMail;
|
||||||
use App\Models\Task;
|
use App\Models\Task;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
|
||||||
class EventsController extends Controller
|
class EventsController extends Controller
|
||||||
@@ -96,22 +99,32 @@ class EventsController extends Controller
|
|||||||
return $task->users;
|
return $task->users;
|
||||||
})->unique('id');
|
})->unique('id');
|
||||||
|
|
||||||
$notification = Notification::create([
|
|
||||||
'content' => "L'événement '{$event->name}' a été supprimé. Vous n'y participez donc plus."
|
|
||||||
]);
|
|
||||||
$notification->users()->attach($participants->pluck('id'));
|
|
||||||
|
|
||||||
foreach ($participants as $user) {
|
if (Carbon::now()->lessThanOrEqualTo($event->end)) {
|
||||||
broadcast(new EventParticipationCancelled(
|
$notification = Notification::create([
|
||||||
$user->id,
|
'content' => "L'événement '{$event->name}' a été supprimé. Vous n'y participez donc plus."
|
||||||
$event
|
]);
|
||||||
));
|
$notification->users()->attach($participants->pluck('id'));
|
||||||
|
|
||||||
|
foreach ($participants as $user) {
|
||||||
|
broadcast(new EventParticipationCancelled(
|
||||||
|
$user->id,
|
||||||
|
$event
|
||||||
|
));
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
'eventName' => $event->name,
|
||||||
|
'start' => $event->start,
|
||||||
|
'end' => $event->end,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new EventParticipationCancelledMail($data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$event->delete();
|
$event->delete();
|
||||||
|
|
||||||
return response()->json(["message" => "Event deleted and participants notified"]);
|
return response()->json(["message" => "Event deleted and participants notified"]);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Log::error("Event delete error: " . $e->getMessage());
|
Log::error("Event delete error: " . $e->getMessage());
|
||||||
return response()->json(['message' => "Server error"], 500);
|
return response()->json(['message' => "Server error"], 500);
|
||||||
|
|||||||
@@ -7,12 +7,17 @@ use App\Events\VolunteerAssignedToTask;
|
|||||||
use App\Events\VolunteerUnassignedFromTask;
|
use App\Events\VolunteerUnassignedFromTask;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Notification;
|
use App\Models\Notification;
|
||||||
|
use App\Mail\VolunteerAssignToTaskMail;
|
||||||
|
use App\Mail\VolunteerUnassignToTaskMail;
|
||||||
use App\Models\Task;
|
use App\Models\Task;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
use App\Mail\TaskParticipationCancelledMail;
|
||||||
|
|
||||||
class TasksController extends Controller
|
class TasksController extends Controller
|
||||||
{
|
{
|
||||||
@@ -74,8 +79,8 @@ class TasksController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$task = Task::find($request["task_id"]);
|
||||||
$task = Task::with('event')->find($request["task_id"]);
|
$event = \App\Models\Event::find($task->events_id);
|
||||||
|
|
||||||
if ($task->users()->where('user_id', $id)->exists()) {
|
if ($task->users()->where('user_id', $id)->exists()) {
|
||||||
return response()->json(["message" => "User already assigned to this task"], 400);
|
return response()->json(["message" => "User already assigned to this task"], 400);
|
||||||
@@ -87,17 +92,28 @@ class TasksController extends Controller
|
|||||||
|
|
||||||
$user = User::find($id);
|
$user = User::find($id);
|
||||||
|
|
||||||
if($user) {
|
if($user && Carbon::now()->lessThanOrEqualTo($task->end)) {
|
||||||
$task->users()->attach($id);
|
$task->users()->attach($id);
|
||||||
|
|
||||||
$notification = Notification::create([
|
$notification = Notification::create([
|
||||||
'content' => "Vous avez été assigné à la tâche {$task->title} de l'événement {$task->event->name}."
|
'content' => "Vous avez été assigné à la tâche {$task->title} de l'événement {$task->event->name}."
|
||||||
]);
|
]);
|
||||||
$notification->users()->attach($user->id);
|
$notification->users()->attach($user->id);
|
||||||
|
|
||||||
broadcast(new VolunteerAssignedToTask(
|
broadcast(new VolunteerAssignedToTask(
|
||||||
$user->id,
|
$user->id,
|
||||||
$task,
|
$task,
|
||||||
$task->event
|
$event
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
'taskName' => $task->name,
|
||||||
|
'start' => $task->start,
|
||||||
|
'end' => $task->end,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new VolunteerAssignToTaskMail($data));
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json(['message' => "Task assigned"], 200);
|
return response()->json(['message' => "Task assigned"], 200);
|
||||||
@@ -129,26 +145,39 @@ class TasksController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$task = Task::with(['users', 'event'])->find($id);
|
$task = Task::with(['users'])->find($id);
|
||||||
|
$event = \App\Models\Event::find($task->events_id);
|
||||||
|
|
||||||
if (!$task) {
|
if (!$task) {
|
||||||
return response()->json(["message" => "Task not found"], 404);
|
return response()->json(["message" => "Task not found"], 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$participants = $task->users;
|
$participants = $task->users;
|
||||||
if ($participants->isNotEmpty()) {
|
|
||||||
$notification = Notification::create([
|
|
||||||
'content' => "La tâche '{$task->title}' pour l'événement '{$task->event->name}' a été supprimée. Vous n'y participez donc plus."
|
|
||||||
]);
|
|
||||||
$notification->users()->attach($participants->pluck('id'));
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($participants as $user) {
|
if (Carbon::now()->lessThanOrEqualTo($task->end)) {
|
||||||
broadcast(new TaskParticipationCancelled(
|
if ($participants->isNotEmpty()) {
|
||||||
$user->id,
|
$notification = Notification::create([
|
||||||
$task,
|
'content' => "La tâche '{$task->title}' pour l'événement '{$task->event->name}' a été supprimée. Vous n'y participez donc plus."
|
||||||
$task->event
|
]);
|
||||||
));
|
$notification->users()->attach($participants->pluck('id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($participants as $user) {
|
||||||
|
broadcast(new TaskParticipationCancelled(
|
||||||
|
$user->id,
|
||||||
|
$task,
|
||||||
|
$event
|
||||||
|
));
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
'taskName' => $task->name,
|
||||||
|
'start' => $event->start,
|
||||||
|
'end' => $task->end,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new TaskParticipationCancelledMail($data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$task->delete();
|
$task->delete();
|
||||||
@@ -186,10 +215,6 @@ class TasksController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function unassignSelf(Request $request): JsonResponse {
|
public function unassignSelf(Request $request): JsonResponse {
|
||||||
try {
|
try {
|
||||||
$task = Task::find($request["task_id"]);
|
$task = Task::find($request["task_id"]);
|
||||||
@@ -209,8 +234,6 @@ class TasksController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function unassignUser(Request $request, int $id): JsonResponse {
|
public function unassignUser(Request $request, int $id): JsonResponse {
|
||||||
|
|
||||||
if(Gate::denies('unassignOther', Task::class)) {
|
if(Gate::denies('unassignOther', Task::class)) {
|
||||||
@@ -218,17 +241,13 @@ class TasksController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$task = Task::with('event')->find($request["task_id"]);
|
$task = Task::find($request["task_id"]);
|
||||||
|
$event = \App\Models\Event::find($task->events_id);
|
||||||
|
|
||||||
if (!$task) {
|
if (!$task) {
|
||||||
return response()->json(["message" => "Task not found"], 404);
|
return response()->json(["message" => "Task not found"], 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$task->event) {
|
|
||||||
Log::error("Relation 'event' manquante pour la tâche ID: " . $task->id);
|
|
||||||
return response()->json(["message" => "Task is missing its parent event"], 422);
|
|
||||||
}
|
|
||||||
|
|
||||||
$isAssigned = $task->users()->where('user_id', $id)->exists();
|
$isAssigned = $task->users()->where('user_id', $id)->exists();
|
||||||
if (!$isAssigned) {
|
if (!$isAssigned) {
|
||||||
return response()->json(["message" => "User is not assigned to this task"], 400);
|
return response()->json(["message" => "User is not assigned to this task"], 400);
|
||||||
@@ -236,7 +255,7 @@ class TasksController extends Controller
|
|||||||
|
|
||||||
$user = User::find($id);
|
$user = User::find($id);
|
||||||
|
|
||||||
if ($user) {
|
if ($user && Carbon::now()->lessThanOrEqualTo($task->end)) {
|
||||||
$task->users()->detach($id);
|
$task->users()->detach($id);
|
||||||
$notification = Notification::create([
|
$notification = Notification::create([
|
||||||
'content' => "Vous avez été désassigné de la tâche {$task->title} de l'événement {$task->event->name}."
|
'content' => "Vous avez été désassigné de la tâche {$task->title} de l'événement {$task->event->name}."
|
||||||
@@ -245,8 +264,17 @@ class TasksController extends Controller
|
|||||||
broadcast(new VolunteerUnassignedFromTask(
|
broadcast(new VolunteerUnassignedFromTask(
|
||||||
$user->id,
|
$user->id,
|
||||||
$task,
|
$task,
|
||||||
$task->event
|
$event
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
'taskName' => $task->name,
|
||||||
|
'start' => $task->start,
|
||||||
|
'end' => $task->end,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new VolunteerUnassignToTaskMail($data));
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json(['message' => "User unassigned successfully"], 200);
|
return response()->json(['message' => "User unassigned successfully"], 200);
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Events\UserCreated;
|
use App\Events\UserCreated;
|
||||||
|
use App\Mail\CreateUserByAdminMail;
|
||||||
|
use App\Mail\DeactivateAccountMail;
|
||||||
|
use App\Mail\DeleteAccountMail;
|
||||||
|
use App\Mail\RegisterMail;
|
||||||
|
use App\Mail\UpdateRoleMail;
|
||||||
use App\Mail\ValidateMail;
|
use App\Mail\ValidateMail;
|
||||||
use App\Models\Notification;
|
use App\Models\Notification;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
@@ -54,9 +59,18 @@ class UserController extends Controller
|
|||||||
$notification->users()->attach(
|
$notification->users()->attach(
|
||||||
$admins->pluck('id')->toArray()
|
$admins->pluck('id')->toArray()
|
||||||
);
|
);
|
||||||
|
|
||||||
broadcast(new UserCreated($user));
|
broadcast(new UserCreated($user));
|
||||||
|
|
||||||
|
foreach ($admins as $admin) {
|
||||||
|
$data = [
|
||||||
|
'adminName' => $admin->name,
|
||||||
|
'adminLastname' => $admin->lastname,
|
||||||
|
'userName' => $user->name,
|
||||||
|
'userLastname' => $user->lastname,
|
||||||
|
];
|
||||||
|
Mail::to($admin->email)->send(new RegisterMail($data));
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json(['message' => 'User created successfully']);
|
return response()->json(['message' => 'User created successfully']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +99,13 @@ class UserController extends Controller
|
|||||||
"phone" => $phone->formatInternational(),
|
"phone" => $phone->formatInternational(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new CreateUserByAdminMail($data));
|
||||||
|
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => 'User created successfully',
|
'message' => 'User created successfully',
|
||||||
"password" => $password,
|
"password" => $password,
|
||||||
@@ -94,6 +115,13 @@ class UserController extends Controller
|
|||||||
public function delete(Request $request): JsonResponse {
|
public function delete(Request $request): JsonResponse {
|
||||||
try {
|
try {
|
||||||
$user = User::find($request->user()->id);
|
$user = User::find($request->user()->id);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new DeleteAccountMail($data));
|
||||||
|
|
||||||
$user->delete();
|
$user->delete();
|
||||||
return response()->json(['message' => 'User deleted successfully']);
|
return response()->json(['message' => 'User deleted successfully']);
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@@ -124,6 +152,12 @@ class UserController extends Controller
|
|||||||
try {
|
try {
|
||||||
$user = User::find($id);
|
$user = User::find($id);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new DeleteAccountMail($data));
|
||||||
|
|
||||||
$user->delete();
|
$user->delete();
|
||||||
return response()->json(['message' => 'User deleted successfully']);
|
return response()->json(['message' => 'User deleted successfully']);
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@@ -142,6 +176,12 @@ class UserController extends Controller
|
|||||||
try {
|
try {
|
||||||
$userToDeactivate->update(['validate' => 0]);
|
$userToDeactivate->update(['validate' => 0]);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $userToDeactivate->name,
|
||||||
|
'lastname' => $userToDeactivate->lastname,
|
||||||
|
];
|
||||||
|
Mail::to($userToDeactivate->email)->send(new DeactivateAccountMail($data));
|
||||||
|
|
||||||
return response()->json(['message' => 'User deactivated successfully']);
|
return response()->json(['message' => 'User deactivated successfully']);
|
||||||
} catch (ModelNotFoundException $e) {
|
} catch (ModelNotFoundException $e) {
|
||||||
return response()->json(['message' => 'Utilisateur non trouvé'], 404);
|
return response()->json(['message' => 'Utilisateur non trouvé'], 404);
|
||||||
@@ -181,12 +221,12 @@ class UserController extends Controller
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$user = User::find($id);
|
$user = User::find($id);
|
||||||
|
|
||||||
$user->validate = 1;
|
$user->validate = 1;
|
||||||
$user->role = 3;
|
$user->role = 3;
|
||||||
$user->verified_at = now();
|
$user->verified_at = now();
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $user->name,
|
'name' => $user->name,
|
||||||
'lastname' => $user->lastname,
|
'lastname' => $user->lastname,
|
||||||
@@ -213,11 +253,20 @@ class UserController extends Controller
|
|||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
$role = \App\Services\GetRole::getRole($request['role']);
|
$role = \App\Services\GetRole::getRole($request['role']);
|
||||||
|
|
||||||
$notification = Notification::create([
|
$notification = Notification::create([
|
||||||
'content' => "Votre rôle à changé pour {$role} !",
|
'content' => "Votre rôle à changé pour {$role} !",
|
||||||
]);
|
]);
|
||||||
$notification->users()->attach($user->id);
|
$notification->users()->attach($user->id);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => $user->name,
|
||||||
|
'lastname' => $user->lastname,
|
||||||
|
'role' => $role,
|
||||||
|
];
|
||||||
|
Mail::to($user->email)->send(new UpdateRoleMail($data));
|
||||||
|
|
||||||
|
|
||||||
return response()->json(['message' => 'User role added successfully']);
|
return response()->json(['message' => 'User role added successfully']);
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
Log::info($e->getMessage());
|
Log::info($e->getMessage());
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class CreateUserByAdminMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Compte créé - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.createUserByAdmin',
|
||||||
|
with: [
|
||||||
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class DeactivateAccountMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Compte désactivé - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.deactivateAccount',
|
||||||
|
with: [
|
||||||
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ use Illuminate\Mail\Mailables\Content;
|
|||||||
use Illuminate\Mail\Mailables\Envelope;
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class TestMail extends Mailable
|
class DeleteAccountMail extends Mailable
|
||||||
{
|
{
|
||||||
use Queueable, SerializesModels;
|
use Queueable, SerializesModels;
|
||||||
public $data;
|
public $data;
|
||||||
@@ -28,7 +28,7 @@ class TestMail extends Mailable
|
|||||||
public function envelope(): Envelope
|
public function envelope(): Envelope
|
||||||
{
|
{
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
subject: 'Test Mail',
|
subject: 'Compte supprimé - Comité des fêtes de Beaupont',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,9 +38,10 @@ class TestMail extends Mailable
|
|||||||
public function content(): Content
|
public function content(): Content
|
||||||
{
|
{
|
||||||
return new Content(
|
return new Content(
|
||||||
view: 'mails.test',
|
view: 'mails.deleteAccount',
|
||||||
with: [
|
with: [
|
||||||
'name' => $this->data['name'],
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use App\Services\FormatDate;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class EventParticipationCancelledMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Evénement supprimé - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.eventParticipationCancelled',
|
||||||
|
with: [
|
||||||
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
|
'eventName' => $this->data['eventName'],
|
||||||
|
'start' => FormatDate::formatDate($this->data['start']),
|
||||||
|
'end' => FormatDate::formatDate($this->data['end']),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class RegisterMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Nouvelle demande de validation - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.register',
|
||||||
|
with: [
|
||||||
|
'adminName' => $this->data['adminName'],
|
||||||
|
'adminLastname' => $this->data['adminLastname'],
|
||||||
|
'userName' => $this->data['userName'],
|
||||||
|
'userLastname' => $this->data['userLastname'],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use App\Services\FormatDate;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class TaskParticipationCancelledMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Tâche supprimée - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.taskParticipationCancelled',
|
||||||
|
with: [
|
||||||
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
|
'taskName' => $this->data['taskName'],
|
||||||
|
'end' => FormatDate::formatDate($this->data['end']),
|
||||||
|
'start' => FormatDate::formatDate($this->data['start']),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class UpdateRoleMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Rôle mis à jour - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.updateRole',
|
||||||
|
with: [
|
||||||
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
|
'role' => $this->data['role'],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use App\Services\FormatDate;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class VolunteerAssignToTaskMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Assignation - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.volunteerAssignToTask',
|
||||||
|
with: [
|
||||||
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
|
'taskName' => $this->data['taskName'],
|
||||||
|
'start' => FormatDate::formatDate($this->data['start']),
|
||||||
|
'end' => FormatDate::formatDate($this->data['end']),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Mail\Mailables\Content;
|
||||||
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use App\Services\FormatDate;
|
||||||
|
|
||||||
|
class VolunteerUnassignToTaskMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Désassignation - Comité des fêtes de Beaupont',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
return new Content(
|
||||||
|
view: 'mails.volunteerUnassignToTask',
|
||||||
|
with: [
|
||||||
|
'name' => $this->data['name'],
|
||||||
|
'lastname' => $this->data['lastname'],
|
||||||
|
'taskName' => $this->data['taskName'],
|
||||||
|
'start' => FormatDate::formatDate($this->data['start']),
|
||||||
|
'end' => FormatDate::formatDate($this->data['end']),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
class FormatDate
|
||||||
|
{
|
||||||
|
public static function formatDate($date){
|
||||||
|
return Carbon::parse($date)->format('d/m/Y, H:i');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ class GetRole
|
|||||||
{
|
{
|
||||||
public static function getRole($role)
|
public static function getRole($role)
|
||||||
{
|
{
|
||||||
|
$role = (int)$role;
|
||||||
return match ($role) {
|
return match ($role) {
|
||||||
1 => "Président",
|
1 => "Président",
|
||||||
2 => "Gérant",
|
2 => "Gérant",
|
||||||
|
|||||||
@@ -20,9 +20,13 @@ return [
|
|||||||
|
|
||||||
'allowed_methods' => ['*'],
|
'allowed_methods' => ['*'],
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
'allowed_origins' => env('DEV', 0) == 1
|
'allowed_origins' => env('DEV', 0) == 1
|
||||||
? explode(',', env('DEV_CORS_ALLOWED_ORIGINS'))
|
? explode(',', env('DEV_CORS_ALLOWED_ORIGINS'))
|
||||||
: explode(',', env('PROD_CORS_ALLOWED_ORIGINS')),
|
: explode(',', env('PROD_CORS_ALLOWED_ORIGINS')),
|
||||||
|
=======
|
||||||
|
'allowed_origins' => ['*'],
|
||||||
|
>>>>>>> dev
|
||||||
|
|
||||||
'allowed_origins_patterns' => [],
|
'allowed_origins_patterns' => [],
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Compte créé</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Un compte a été créé pour vous par un administrateur sur le site de gestion des bénévoles
|
||||||
|
du Comité des fêtes de Beaupont.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous pouvez dès à présent vous connecter et accéder à votre espace personnel afin de participer
|
||||||
|
aux activités proposées.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Veuillez vous renseigner auprès d'un administrateur pour récupérer vos identifiants.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="text-align: center; margin: 30px 0;">
|
||||||
|
<a href="{{ url('/') }}"
|
||||||
|
style="background-color: #3498db; color: white; padding: 12px 20px; text-decoration: none; border-radius: 5px;">
|
||||||
|
Se connecter
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous n’êtes pas à l’origine de cette création de compte ou si vous avez des questions,
|
||||||
|
merci de contacter rapidement l’équipe organisatrice.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Compte désactivé</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Nous vous informons que votre compte sur le site de gestion des bénévoles
|
||||||
|
du Comité des fêtes de Beaupont a été désactivé par un administrateur.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous ne pouvez désormais plus accéder à votre espace personnel ni participer aux activités proposées.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous pensez qu’il s’agit d’une erreur ou si vous souhaitez obtenir plus d’informations,
|
||||||
|
nous vous invitons à contacter l’équipe organisatrice.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Votre compte pourra être réactivé ultérieurement si nécessaire.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Compte supprimé</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Nous vous informons que votre compte sur le site de gestion des bénévoles
|
||||||
|
du Comité des fêtes de Beaupont a été supprimé.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous n’avez désormais plus accès à votre espace personnel ni aux services associés.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous n’êtes pas à l’origine de cette action, merci de nous contacter rapidement.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous souhaitez à nouveau participer aux activités, vous pouvez effectuer une nouvelle inscription à tout moment.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Événement supprimé</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
L’événement {{ $eventName }} a été supprimé par un administrateur.
|
||||||
|
Vous n’y participez donc plus. Cet événement avait lieu du {{ $start }} au {{ $end }}.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous pensez qu’il s’agit d’une erreur ou si vous souhaitez plus d’informations,
|
||||||
|
merci de contacter l’équipe du Comité des fêtes de Beaupont.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Nouvelle demande de validation</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $adminName }} {{ $adminLastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
L’utilisateur {{ $userName }} {{ $userLastname }} a créé un compte
|
||||||
|
qui est maintenant en attente de validation sur le site du Comité des fêtes de Beaupont.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="text-align: center; margin: 30px 0;">
|
||||||
|
<a href="{{ url('/admin') }}"
|
||||||
|
style="background-color: #f39c12; color: white; padding: 12px 20px; text-decoration: none; border-radius: 5px;">
|
||||||
|
Valider ce compte
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous pouvez cliquer sur le bouton ci-dessus pour vous rendre sur la page permettant de valider le compte.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Tâche supprimée</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
La tâche {{ $taskName }} a été supprimé par un administrateur.
|
||||||
|
Vous n’y participez donc plus. Cette tâche avait lieu du {{ $start }} au {{ $end }}.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous pensez qu’il s’agit d’une erreur ou si vous souhaitez plus d’informations,
|
||||||
|
merci de contacter l’équipe du Comité des fêtes de Beaupont.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Test Email</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Hello {{ $name }}</h1>
|
|
||||||
<p>This is a test email sent from your application using MailHog!</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Rôle mis à jour</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Votre rôle sur le site de gestion des bénévoles du Comité des fêtes de Beaupont
|
||||||
|
a été mis à jour par un administrateur.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous êtes désormais : {{ $role }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous avez des questions concernant ce changement, n’hésitez pas à contacter l’équipe organisatrice.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,12 +1,47 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Test Email</title>
|
<title>Compte validé</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
<h1>Bonjour {{ $name }} {{ $lastname }},</h1>
|
<body style="padding:20px; font-family: Arial, sans-serif;">
|
||||||
<p>Votre compte sur le site de gestion des bénévoles de l'assiocation des comitées des fêtes de Beaupont à été validé.</p>
|
|
||||||
</body>
|
<div style="width:100%; text-align:center;">
|
||||||
|
<h1 style="color:#2c3e50;">🎉 Compte validé !</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Nous avons le plaisir de vous informer que votre compte sur le site de gestion des bénévoles du Comité des fêtes de Beaupont a été validé avec succès.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous pouvez dès à présent accéder à votre espace personnel et participer aux différentes activités proposées.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div style="text-align:center; margin:30px 0;">
|
||||||
|
<a href="{{ url('/') }}"
|
||||||
|
style="background-color:#3498db; color:white; padding:12px 20px; text-decoration:none; border-radius:5px;">
|
||||||
|
Accéder à mon compte
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous avez la moindre question ou besoin d’assistance, n’hésitez pas à nous contacter.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size:14px; color:#999; text-align:center; padding-top:20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Assignation</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous avez été assigné à la tâche {{ $taskName }} par un administrateur.
|
||||||
|
Cette tâche aura lieu du {{ $start }} au {{ $end }}.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous pensez qu’il s’agit d’une erreur ou si vous souhaitez plus d’informations,
|
||||||
|
merci de contacter l’équipe du Comité des fêtes de Beaupont.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Désassignation</title>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px; font-family: Arial, sans-serif;">
|
||||||
|
<div>
|
||||||
|
<p>Bonjour {{ $name }} {{ $lastname }},</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Vous avez été désassigné de la tâche {{ $taskName }} par un administrateur.
|
||||||
|
Vous n'y participez donc plus. Cette tâche avait lieu du {{ $start }} au {{ $end }}.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Si vous pensez qu’il s’agit d’une erreur ou si vous souhaitez plus d’informations,
|
||||||
|
merci de contacter l’équipe du Comité des fêtes de Beaupont.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
À très bientôt,<br>
|
||||||
|
L’équipe du Comité des fêtes de Beaupont
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-size: 14px; color: #999; text-align: center; padding-top: 20px;">
|
||||||
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user