This commit is contained in:
2026-05-06 23:16:47 +02:00
parent ea77c8ea35
commit c4a485e530
23 changed files with 2141 additions and 1772 deletions

View File

@@ -10,6 +10,24 @@
- Cyfry dni `#021526` (past `#6c757d`) — przebicie globalnej reguły `body a:not([href])`
- Legenda rozszerzona o 3-ci swatch „Dzień odbioru / zwrotu" z gradientem
- Helper `test-add-booking.php` (token-protected, akcje add/list/remove) do smoke testu — DO USUNIĘCIA z FTP po testach
- [Phase 9, Plan 02] Globalna synchronizacja iCal — jeden wspólny Google Calendar dla całej floty z podziałem po prefiksie nazwy jachtu w tytule eventu
- Globalny iCal Export feed (`/yacht-ical-global/{token}.ics`) — wszystkie rezerwacje w jednym pliku, każdy event z prefiksem `"{nazwa_jachtu} - {klient}"`, anti-loop (pomija events z source `ical_import_global`)
- Globalny iCal Import URL — pobiera kalendarz Google admina, parser dopasowuje prefiks przed `" - "` (mb_* dla polskich znaków, case-insensitive) do `post_title` lub `_yacht_gcal_alias` (priorytet alias)
- Eventy bez separatora lub bez dopasowanego jachtu — ignorowane (logowane). Stale cleanup usuwa booking gdy event zniknął z GCal
- Cron godzinny `yacht_booking_ical_global_import` + manualny przycisk "Importuj teraz"
- Pole `_yacht_gcal_alias` w yacht-edit (krótki alias, np. "Maja" zamiast "Marina Maja Sailing 35")
- Settings UI: nowa sekcja "Globalna synchronizacja iCal" z export URL (kopiuj + regeneracja tokenu), import URL, instrukcja
- Per-yacht feedy iCal i OAuth push pozostają jako kompatybilność wsteczna (out of scope ich sprzątania)
- [Phase 9, Plan 03] Cleanup OAuth + per-yacht iCal — plugin sprowadzony do JEDNEGO mechanizmu sync (globalny iCal)
- Usunięte 3 pliki OAuth (`integrations/google-calendar/class-{sync-controller,gcal-service,oauth-handler}.php`) + cały katalog
- Wycięte z bootstrap: require + setup_cron + clear_cron Sync_Controller (yacht-booking-system.php, class-yacht-booking.php)
- Wycięte z admin: cała sekcja UI OAuth (Client ID/Secret, "Połącz", "Synchronizuj teraz", instrukcja), `handle_oauth_callback`, `save_gcal_credentials`, callback/disconnect/credentials w `process_settings_save`, notice connected/disconnected
- Wycięte per-yacht iCal: `IMPORT_SOURCE`, `run_import`, `import_for_yacht`, `get/set_import_url`, `get_existing_import_map`, `upsert_booking`, `get_last_import_time`, cron `yacht_booking_ical_import`, rewrite rule `^yacht-ical/(\d+)/...`, `output_ics`, `get_feed_token`, `regenerate_token`, `get_feed_url`
- Wycięte z yacht-edit: pola "Google Calendar ID", "iCal Import URL", "iCal Feed URL". Pozostaje tylko Alias.
- Wycięte z yacht-list-table: kolumna "Google Calendar"
- Yacht class: usunięte `get_gcal_id()`, `update_gcal_id()`
- Cleanup migration w `Installer::migrate()` — version-gated (idempotent), kasuje 4 stale meta keys, 6 stale options OAuth, bookings z source `ical_import`, 5 stale cron hooków. "Po cichu" — bez admin notice
- uninstall.php zaktualizowany o globalne iCal opcje + defensywne legacy gcal_* delete
## Zmienione pliki
@@ -20,5 +38,22 @@
- `test-add-booking.php` (nowy, helper testowy)
- `.paul/phases/09-finalizacja/09-01-PLAN.md` (nowy)
- `.paul/phases/09-finalizacja/09-01-SUMMARY.md` (nowy)
- `.paul/phases/09-finalizacja/09-02-PLAN.md` (nowy)
- `.paul/phases/09-finalizacja/09-02-SUMMARY.md` (nowy)
- `.paul/phases/09-finalizacja/09-03-PLAN.md` (nowy)
- `.paul/phases/09-finalizacja/09-03-SUMMARY.md` (nowy)
- `wp-content/plugins/yacht-booking-system/integrations/google-calendar/class-sync-controller.php` (USUNIĘTY)
- `wp-content/plugins/yacht-booking-system/integrations/google-calendar/class-gcal-service.php` (USUNIĘTY)
- `wp-content/plugins/yacht-booking-system/integrations/google-calendar/class-oauth-handler.php` (USUNIĘTY)
- `wp-content/plugins/yacht-booking-system/yacht-booking-system.php`
- `wp-content/plugins/yacht-booking-system/includes/class-yacht-booking.php`
- `wp-content/plugins/yacht-booking-system/integrations/ical/class-ical-feed.php`
- `wp-content/plugins/yacht-booking-system/integrations/ical/class-ical-import.php`
- `wp-content/plugins/yacht-booking-system/includes/class-yacht.php`
- `wp-content/plugins/yacht-booking-system/includes/class-installer.php`
- `wp-content/plugins/yacht-booking-system/admin/class-admin.php`
- `wp-content/plugins/yacht-booking-system/admin/views/yacht-edit.php`
- `wp-content/plugins/yacht-booking-system/admin/class-yacht-list-table.php`
- `wp-content/plugins/yacht-booking-system/uninstall.php`
- `.paul/STATE.md`
- `.paul/ROADMAP.md`