10 Commits
Author SHA1 Message Date
bastien a58647a67d Merge branch 'release/0.0.3'
Laverie/backend/pipeline/tag This commit looks good
2026-07-09 22:07:04 +02:00
bastien 47bed5a5ab version 0.0.3 2026-07-09 22:06:54 +02:00
bastien bac9b0a1e5 Ajout desactivation check offline machine 2026-07-09 22:06:27 +02:00
bastien 9be2aa3468 Merge tag '0.0.2' into develop
0.0.2
2026-07-05 01:41:31 +02:00
bastien e569c84c9d Merge branch 'release/0.0.2'
Laverie/backend/pipeline/tag This commit looks good
2026-07-05 01:41:21 +02:00
bastien 4ff8ff2aac version 0.0.2 2026-07-05 01:41:11 +02:00
bastien 80085a94d3 mise en place schedulers (crons laravel) 2026-07-05 01:40:31 +02:00
bastien c347796c29 Merge tag '0.0.1' into develop
0.0.1
2026-07-05 00:40:14 +02:00
bastien 6dbec68894 Merge branch 'release/0.0.1'
Laverie/backend/pipeline/head This commit looks good
Laverie/backend/pipeline/tag This commit looks good
2026-07-05 00:40:01 +02:00
bastien 661b4ebdb0 version 0.0.1 2026-07-05 00:39:49 +02:00
8 changed files with 44 additions and 5 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
```cmd ```cmd
/c/wamp64/bin/php/php8.3.28/php.exe artisan serve /c/wamp64/bin/php/php8.3.28/php.exe artisan serve
vite npm run dev
/c/wamp64/bin/php/php8.3.28/php.exe artisan queue:work /c/wamp64/bin/php/php8.3.28/php.exe artisan queue:work
``` ```
+7 -1
View File
@@ -1,4 +1,4 @@
APP_NAME=Laverie APP_NAME=laundry-backend
APP_ENV=local APP_ENV=local
APP_KEY= APP_KEY=
APP_DEBUG=true APP_DEBUG=true
@@ -38,8 +38,12 @@ SESSION_DOMAIN=null
BROADCAST_CONNECTION=log BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local FILESYSTEM_DISK=local
QUEUE_CONNECTION=redis QUEUE_CONNECTION=redis
# En production sans Redis (VPS Ansible) : database
# QUEUE_CONNECTION=database
CACHE_STORE=redis CACHE_STORE=redis
# En production sans Redis (VPS Ansible) : database
# CACHE_STORE=database
# CACHE_PREFIX= # CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1 MEMCACHED_HOST=127.0.0.1
@@ -86,6 +90,8 @@ LAVERIE_BOOKING_PENALTY_AMOUNT=3.00
# Machines # Machines
LAVERIE_MACHINE_OFFLINE_THRESHOLD_MINUTES=10 LAVERIE_MACHINE_OFFLINE_THRESHOLD_MINUTES=10
# Désactiver le passage automatique en hors ligne (démo / dev sans matériel)
LAVERIE_MACHINE_OFFLINE_CHECK_ENABLED=false
# Paiements # Paiements
LAVERIE_PAYMENT_PROVIDER=stripe LAVERIE_PAYMENT_PROVIDER=stripe
@@ -89,6 +89,10 @@ class MachinePageController extends Controller
$validated['qr_code'] = $this->resolveQrCode($validated['qr_code'] ?? null); $validated['qr_code'] = $this->resolveQrCode($validated['qr_code'] ?? null);
$validated['status'] = $validated['status'] ?? 'available'; $validated['status'] = $validated['status'] ?? 'available';
if ($validated['status'] === 'available') {
$validated['last_heartbeat_at'] = now();
}
$machine = Machine::query()->create($validated); $machine = Machine::query()->create($validated);
$this->createSimulatedIntegration($machine); $this->createSimulatedIntegration($machine);
@@ -108,6 +112,14 @@ class MachinePageController extends Controller
unset($validated['qr_code']); unset($validated['qr_code']);
} }
if (
array_key_exists('status', $validated)
&& $validated['status'] === 'available'
&& $machine->status !== 'available'
) {
$validated['last_heartbeat_at'] = now();
}
$machine->update($validated); $machine->update($validated);
return redirect()->route('supervisor.machines.index') return redirect()->route('supervisor.machines.index')
+4
View File
@@ -15,6 +15,10 @@ class RefreshOfflineMachines implements ShouldQueue
public function handle(): void public function handle(): void
{ {
if (! config('laverie.machine.offline_check_enabled', true)) {
return;
}
$thresholdMinutes = (int) config('laverie.machine.offline_threshold_minutes', 10); $thresholdMinutes = (int) config('laverie.machine.offline_threshold_minutes', 10);
$cutoff = now()->subMinutes($thresholdMinutes); $cutoff = now()->subMinutes($thresholdMinutes);
+1
View File
@@ -5,6 +5,7 @@
"description": "The skeleton application for the Laravel framework.", "description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"], "keywords": ["laravel", "framework"],
"license": "MIT", "license": "MIT",
"version": "0.0.3",
"require": { "require": {
"php": "^8.3", "php": "^8.3",
"inertiajs/inertia-laravel": "^2.0", "inertiajs/inertia-laravel": "^2.0",
+4
View File
@@ -16,6 +16,10 @@ return [
'machine' => [ 'machine' => [
'offline_threshold_minutes' => (int) env('LAVERIE_MACHINE_OFFLINE_THRESHOLD_MINUTES', 10), 'offline_threshold_minutes' => (int) env('LAVERIE_MACHINE_OFFLINE_THRESHOLD_MINUTES', 10),
'offline_check_enabled' => filter_var(
env('LAVERIE_MACHINE_OFFLINE_CHECK_ENABLED', true),
FILTER_VALIDATE_BOOL
),
], ],
'payment' => [ 'payment' => [
+1
View File
@@ -2,6 +2,7 @@
"$schema": "https://www.schemastore.org/package.json", "$schema": "https://www.schemastore.org/package.json",
"private": true, "private": true,
"type": "module", "type": "module",
"version": "0.0.3",
"scripts": { "scripts": {
"prod": "vite build", "prod": "vite build",
"dev": "vite" "dev": "vite"
+14 -3
View File
@@ -11,6 +11,17 @@ Artisan::command('inspire', function () {
$this->comment(Inspiring::quote()); $this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote'); })->purpose('Display an inspiring quote');
Schedule::job(new CheckNoShowBookings)->everyFiveMinutes(); Schedule::job(new CheckNoShowBookings)
Schedule::job(new RefreshOfflineMachines)->everyFiveMinutes(); ->everyFiveMinutes()
Schedule::job(new GenerateDailyStats)->dailyAt('01:00'); ->withoutOverlapping()
->onOneServer();
Schedule::job(new RefreshOfflineMachines)
->everyFiveMinutes()
->withoutOverlapping()
->onOneServer();
Schedule::job(new GenerateDailyStats)
->dailyAt('01:00')
->withoutOverlapping()
->onOneServer();