diff --git a/docs/features/availability-management.md b/docs/features/availability-management.md index 85392a6..0839711 100644 --- a/docs/features/availability-management.md +++ b/docs/features/availability-management.md @@ -42,7 +42,7 @@ Instructors access **My Availability** in wp-admin (`?page=us-availability`). - Add a weekly series: tick weekly repeat and choose the number of weeks - Delete a slot: only allowed if `is_booked = 0` - Bulk delete: the list view has a checkbox per unbooked slot (with a select-all header checkbox) and a **Delete selected** button (`usc_action=bulk_delete`, `slot_ids[]`); each id is ownership-checked, and booked slots are refused at the repository level -- Current slots can be shown as a **list** or a **weekly calendar** (`usc_view=week`, navigated with `usc_week=Y-m-d`); the grid honours the site's `start_of_week` option via `Availability\WeekCalendar` +- Current slots can be shown as a **weekly calendar** (the default, navigated with `usc_week=Y-m-d`) or a **list** (`usc_view=list`); the grid honours the site's `start_of_week` option via `Availability\WeekCalendar` ## Public Calendar The front-end booking shortcode renders open slots from `GET /availability` diff --git a/src/Availability/AvailabilityController.php b/src/Availability/AvailabilityController.php index 089f7cb..b6036de 100644 --- a/src/Availability/AvailabilityController.php +++ b/src/Availability/AvailabilityController.php @@ -32,7 +32,7 @@ class AvailabilityController { // View-state query params only (which view, which week) — nothing is // mutated from them, so no nonce applies. // phpcs:disable WordPress.Security.NonceVerification.Recommended - $view = 'week' === sanitize_key( Val::string( wp_unslash( $_GET['usc_view'] ?? '' ) ) ) ? 'week' : 'list'; + $view = 'list' === sanitize_key( Val::string( wp_unslash( $_GET['usc_view'] ?? '' ) ) ) ? 'list' : 'week'; $requestedWeek = sanitize_text_field( Val::string( wp_unslash( $_GET['usc_week'] ?? '' ) ) ); // phpcs:enable WordPress.Security.NonceVerification.Recommended diff --git a/templates/admin/availability.php b/templates/admin/availability.php index 11f6350..7f65adc 100644 --- a/templates/admin/availability.php +++ b/templates/admin/availability.php @@ -84,24 +84,24 @@ $deleteForm = static function (\Unsupervised\Schedular\Availability\Availability