diff --git a/development-system/database/README.md b/development-system/database/README.md index f804c80..2fa01d9 100644 --- a/development-system/database/README.md +++ b/development-system/database/README.md @@ -63,3 +63,5 @@ lokale Entwicklungs- und Testdatenbank bestimmt und darf nicht auf dem Produktivsystem ausgeführt werden. `004_booking_contact_phones.sql` ergänzt die Telefonnummer der Ansprechperson und ersetzt die Kontakte der stabilen Demo-Termine durch Carina Hollederer und Sarah van den Heuvel. +`005_booking_demo_july_august.sql` ergänzt ausschließlich lokal weitere +bestätigte Demo-Termine und -Teilnahmen für Juli und August. diff --git a/development-system/database/migrations/005_booking_demo_july_august.sql b/development-system/database/migrations/005_booking_demo_july_august.sql new file mode 100644 index 0000000..a62d496 --- /dev/null +++ b/development-system/database/migrations/005_booking_demo_july_august.sql @@ -0,0 +1,26 @@ +-- SUFW Terminbuchung: Zusätzliche lokale Demo-Termine für Juli und August +-- +-- Nur für lokale Entwicklungs- und Testdatenbanken. Stabile IDs sorgen dafür, +-- dass die Beispieldaten bei erneutem Ausführen nicht dupliziert werden. + +INSERT INTO `sufw_booking_events` + (`id`, `project`, `title`, `starts_at`, `ends_at`, `capacity`, `format`, `introduction_required`, `contact_name`, `contact_email`, `contact_phone`, `is_active`) +VALUES + ('f5c7f216-2704-4c81-b17a-000000000001', 'perspektivwerk', 'Soz. Päd. Modul PerspektivWerk', CONCAT(YEAR(CURDATE()), '-07-10 09:00:00'), CONCAT(YEAR(CURDATE()), '-07-10 13:00:00'), 2, 'vor_ort', 0, 'Carina Hollederer', 'c.hollederer@sufw.de', '(0176) 17922244', 1), + ('f5c7f216-2704-4c81-b17a-000000000002', 'produktionsschule', 'Voranmeldung Kennenlerntermin Produktionsschule', CONCAT(YEAR(CURDATE()), '-07-10 10:00:00'), CONCAT(YEAR(CURDATE()), '-07-10 11:00:00'), 3, 'vor_ort', 0, 'Sarah van den Heuvel', 's.vandenHeuvel@sufw.de', '(0176) 60328929', 1), + ('f5c7f216-2704-4c81-b17a-000000000003', 'perspektivwerk', 'Erstgespräch PerspektivWerk', CONCAT(YEAR(CURDATE()), '-08-12 09:00:00'), CONCAT(YEAR(CURDATE()), '-08-12 10:00:00'), 2, 'vor_ort', 0, 'Carina Hollederer', 'c.hollederer@sufw.de', '(0176) 17922244', 1), + ('f5c7f216-2704-4c81-b17a-000000000004', 'produktionsschule', 'Probearbeiten', CONCAT(YEAR(CURDATE()), '-08-12 08:00:00'), CONCAT(YEAR(CURDATE()), '-08-12 16:00:00'), 2, 'vor_ort', 1, 'Sarah van den Heuvel', 's.vandenHeuvel@sufw.de', '(0176) 60328929', 1) +ON DUPLICATE KEY UPDATE + `title` = VALUES(`title`), `starts_at` = VALUES(`starts_at`), `ends_at` = VALUES(`ends_at`), `capacity` = VALUES(`capacity`), `format` = VALUES(`format`), `introduction_required` = VALUES(`introduction_required`), `contact_name` = VALUES(`contact_name`), `contact_email` = VALUES(`contact_email`), `contact_phone` = VALUES(`contact_phone`), `is_active` = VALUES(`is_active`); + +INSERT INTO `sufw_booking_registrations` + (`id`, `event_id`, `status`, `name`, `email`, `phone`, `privacy_accepted_at`, `confirmed_at`, `introduction_attended`, `introduction_date`) +VALUES + ('g5c7f216-2704-4c81-b17a-000000000001', 'f5c7f216-2704-4c81-b17a-000000000001', 'confirmed', 'Demo Greta Juli', 'greta.juli@example.test', '+49 000 100006', DATE_SUB(NOW(), INTERVAL 50 DAY), DATE_SUB(NOW(), INTERVAL 50 DAY), 0, NULL), + ('g5c7f216-2704-4c81-b17a-000000000002', 'f5c7f216-2704-4c81-b17a-000000000002', 'confirmed', 'Demo Hasan Juli', 'hasan.juli@example.test', '+49 000 100007', DATE_SUB(NOW(), INTERVAL 50 DAY), DATE_SUB(NOW(), INTERVAL 50 DAY), 0, NULL), + ('g5c7f216-2704-4c81-b17a-000000000003', 'f5c7f216-2704-4c81-b17a-000000000003', 'confirmed', 'Demo Ines August', 'ines.august@example.test', '+49 000 100008', DATE_SUB(NOW(), INTERVAL 20 DAY), DATE_SUB(NOW(), INTERVAL 20 DAY), 0, NULL), + ('g5c7f216-2704-4c81-b17a-000000000004', 'f5c7f216-2704-4c81-b17a-000000000004', 'confirmed', 'Demo Jakob August', 'jakob.august@example.test', '+49 000 100009', DATE_SUB(NOW(), INTERVAL 20 DAY), DATE_SUB(NOW(), INTERVAL 20 DAY), 1, CURDATE()) +ON DUPLICATE KEY UPDATE + `event_id` = VALUES(`event_id`), `status` = VALUES(`status`), `name` = VALUES(`name`), `email` = VALUES(`email`), `phone` = VALUES(`phone`), `privacy_accepted_at` = VALUES(`privacy_accepted_at`), `confirmed_at` = VALUES(`confirmed_at`), `introduction_attended` = VALUES(`introduction_attended`), `introduction_date` = VALUES(`introduction_date`), `removed_at` = NULL; + +INSERT IGNORE INTO `sufw_booking_schema_migrations` (`version`) VALUES ('005_booking_demo_july_august'); diff --git a/development-system/public/booking-admin/index.php b/development-system/public/booking-admin/index.php index 75054c5..074ede5 100644 --- a/development-system/public/booking-admin/index.php +++ b/development-system/public/booking-admin/index.php @@ -107,8 +107,9 @@ if ($view === 'events') { $statement->execute(['project' => $project]); $outbox = $statement->fetchAll(); } -$defaultFrom = date('Y-m-01'); -$defaultTo = date('Y-m-t'); +$nextMonth = new DateTimeImmutable('first day of next month'); +$defaultFrom = $nextMonth->format('Y-m-01'); +$defaultTo = $nextMonth->format('Y-m-t'); ?>