=== Patro Appointment Booking ===
Contributors: arjunchhetri100
Author URI: https://arjunregmichhetri.com
Tags: booking system, appointments, booking, booking form
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License:  GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers book appointments 24/7 via a Gutenberg block — manage services, staff, and bookings from one clean WordPress admin dashboard.

== Description ==

Take control of your appointment business with **Patro Appointment Booking** — a fast, modern WordPress booking plugin built around a beautiful Gutenberg block. Customers complete a clean, guided multi-step form to pick a service, choose a staff member, select a date and time, fill in their details, and confirm — all without ever leaving your site. You manage every booking from a dedicated, React-powered admin dashboard.

No coding required. No complex setup. Just drop the block onto any page and start taking bookings. 📅

Who is Patro Appointment Booking For?
Patro Appointment Booking is built for any individual or business that takes scheduled appointments and wants an elegant, hassle-free booking experience for their customers.

**Salons & Beauty Studios**
Give clients the freedom to book haircuts, treatments, and styling sessions around the clock. Block holidays, close weekdays, and let your calendar manage itself while you focus on the work.

**Consultants & Coaches**
Let prospects book discovery calls and sessions directly from your site. Assign bookings to specific team members, get instant email alerts, and never miss a new client inquiry.

**Healthcare & Wellness Providers**
Collect patient or client details at booking time, set a custom booking window, and manage appointment status — Pending, Approved, Canceled, Rejected, Completed — from one clear screen.

**Fitness Trainers & Gyms**
Set your available days and hours, block out personal-training sessions per staff member, and let members self-book 24/7 without picking up the phone.

**Tutors & Educators**
Create sessions as services, set their duration and price, and let students pick the slot that works for them. The form works equally well on desktop, tablet, and mobile.

**Any Service-Based Business**
If your business runs on scheduled appointments, Patro Appointment Booking gives you the tools to automate bookings, reduce no-shows through email confirmations, and grow without adding admin overhead.

A free booking system gives your business the freedom to grow 📈

No more missed bookings — automatic confirmation emails keep customers informed.
Your calendar, your rules — block dates, close weekdays, and set how far ahead clients can book.
Mobile-first — the booking form looks great and converts on every screen size.
Developer-friendly — REST API plus WordPress action and filter hooks for add-ons.

== Patro Appointment Booking Free Features ==

**Beautiful Multi-Step Booking Form**

* React-powered booking flow: Services → Date & Time → Your Details → Review → Confirmation
* Step-by-step sidebar navigator with active-state indicators and icon-headed panels
* Collapsible sidebar for a distraction-free experience on smaller screens
* Radio-style service cards with duration pills for instant clarity
* Real-time calendar with blocked-date and closed-weekday enforcement
* Fully responsive — sidebar collapses to a top bar on mobile, single-column on small screens

**Services & Staff Management**

* Create unlimited services with name, duration, and price
* Organise services into categories for easier browsing
* Add staff members and assign them to one or more services
* Optional staff-selection step in the booking flow — let customers choose who they book with

**Bookings Dashboard**

* Central bookings screen with per-booking status management (Pending, Approved, Canceled, Rejected, Completed) plus search and date filtering
* Update any booking status in one click
* Full customer details stored per booking for easy reference
* Automatic confirmation email to the customer on every new booking
* Instant admin notification email so you never miss a reservation

**Flexible Settings**

* Set your booking window — control how many days ahead customers can schedule
* Block individual dates using the built-in date picker
* Close recurring weekdays so your calendar reflects your real availability
* Customise the thank-you message displayed after a successful booking
* Configure admin notification email address and sender name

**Developer Friendly**

* REST API support
* WordPress hooks and filters
* Extensible architecture for custom integrations

== Patro Appointment Booking Pro *(separate plugin)* ==

Unlock powerful premium features with the optional Pro add-on:

* **Email Templates** — fully customise customer and admin email HTML to match your brand
* **Coupons & Discounts** — create percentage and fixed-amount coupon codes for promotions
* **reCAPTCHA** — Google reCAPTCHA v2/v3 protection to stop spam bookings
* **IP Rate Limiting** — cap the number of bookings per IP address per day
* **Role-Based Access** — restrict the booking form to logged-in users or specific WordPress roles
* **Layout Variants** — Modern Card, Minimal, Compact, Step-by-Step Wizard, and Split Screen layouts, selectable per block from the Gutenberg inspector panel

== 5 Easy Steps to Get Started ==

1. Install and activate the plugin from **Plugins → Add New** in your WordPress admin.
2. Go to **Patro Appointment Booking → Services** and add at least one service (name, duration, price).
3. Go to **Patro Appointment Booking → Settings** and set your booking window, notification email, and any blocked dates.
4. Open any page or post in the Gutenberg editor, search for **Booking Form**, and insert the block.
5. Publish the page — your customers can now book 24/7.

== What Makes Patro Appointment Booking Stand Out ==

**Gutenberg-native** — no shortcodes, no iframes. The booking form is a first-class Gutenberg block that works seamlessly with the WordPress editor and any block-based theme.

**React-powered, fast-loading** — the multi-step form is built with React for smooth, animated step transitions and a snappy user experience with no full-page reloads.

**Zero configuration clutter** — every setting has a sensible default. You can have a working booking form live in under five minutes.

**Extensible by design** — REST API endpoints and WordPress action and filter hooks let third-party add-ons build cleanly on top of the free core without hacks.

**Transparent booking flow** — the collapsible sidebar shows customers exactly where they are in the process at all times, reducing drop-off and improving completion rates.

== Installation ==

1. Upload the `patro-appointment-booking` folder to `/wp-content/plugins/`, or install via **Plugins → Add New** in WordPress.
2. Activate the plugin through the **Plugins** screen.
3. Go to **Patro Appointment Booking → Services** and create at least one service.
4. Go to **Patro Appointment Booking → Settings** and configure your booking window and notifications.
5. Open any page or post in the Gutenberg editor, search for the **Booking Form** block, and insert it.
6. Publish the page — your booking form is live.

== Frequently Asked Questions ==

= Where do I manage bookings? =

Go to **Patro Appointment Booking → Bookings** in the WordPress admin menu. You can search bookings and filter them by date, and update each booking's status (Pending, Approved, Canceled, Rejected, Completed) from there.

= How do I add a booking form to my page? =

In the Gutenberg editor, click the **+** block inserter, search for **Booking Form**, and insert it. The block renders the full multi-step form on the frontend automatically.

= Can customers book without logging in? =

Yes. The booking form is publicly accessible by default. No WordPress account is required to make a booking.

= Can I assign bookings to specific staff members? =

Yes. Create employees under **Patro Appointment Booking → Employees**, assign services to them, and enable the staff-selection step in **Settings**. Customers will then be able to choose who they book with.

= Where are booking emails sent? =

The customer receives a confirmation email at the address they enter in the form. The admin receives an alert at the address configured in **Settings**, which defaults to the site admin email.

= Is the booking form mobile-friendly? =

Yes. The form is fully responsive. On screens below 900 px the sidebar collapses into a compact top navigation bar. On very small screens the layout becomes a single column with full touch support.

= How do I block specific dates or days of the week? =

Go to **Patro Appointment Booking → Settings**. Use the **Blocked Dates** date picker to block individual dates and the **Closed Weekdays** checkboxes to disable recurring days of the week.

= Does Patro Appointment Booking work with page builders? =

The booking form is a native Gutenberg block and works best in the WordPress block editor. For Elementor and other builders that support Gutenberg widgets or HTML embeds, you can use a Custom HTML widget with the block markup, though native Gutenberg is recommended for the best experience.

= Is there a Pro version? =

Yes. The optional **Patro Appointment Booking Pro** plugin extends the free version with email template customisation, coupon codes, reCAPTCHA, IP rate limiting, role-based access, and multiple form layout variants.

= Can developers extend the plugin? =

Yes. Patro Appointment Booking exposes REST API endpoints and WordPress action and filter hooks (such as `patrabk_booking_created`) for add-on developers.

== Screenshots ==

1. Frontend booking form — Services step with icon header, service cards, and duration pills
2. Frontend booking form — Date & Time step with real-time calendar and time slot grid
3. Frontend booking form — Your Details step with customer contact fields
4. Frontend booking form — Review step showing a full summary before confirmation
5. Booking confirmation screen with customisable thank-you message
6. Admin bookings management screen with status management plus search and date filters
7. Admin services configuration screen
8. Gutenberg block inspector showing the Booking Form block options

== Changelog ==

= 1.0.0 =
* Initial release
* Gutenberg booking form block — place the booking form on any page with a single block insert
* React-powered multi-step booking flow: Services → Date & Time → Your Details → Review → Confirmation
* Collapsible sidebar step navigator with active-step highlighting and icon-headed panels
* Service cards with radio-style selection and clock-icon duration display
* Admin dashboard built with React: Bookings, Services, Categories, Employees, and Settings screens
* Real-time date picker with blocked-date and closed-weekday enforcement
* Time slot grid with automatic filtering of past slots for same-day bookings
* Staff/employee assignment with optional customer-facing staff selection step
* Automatic email notifications — confirmation to the customer and alert to the admin
* Booking status management: Pending, Approved, Canceled, Rejected, Completed
* REST API endpoints for services, time slots, employees, and bookings
* WordPress action and filter hooks for add-on developers

== Upgrade Notice ==

= 1.0.0 =
Initial release — no upgrade steps required.

== Development ==

The React admin app, the Gutenberg block, and the frontend booking form are
compiled from the human-readable source in the `resources/` directory using
@wordpress/scripts. The compiled output ships in `build/`. Both the source and
the build manifest (`package.json`) are included in the plugin so the code can
be inspected and rebuilt.

To build from source:

1. `npm install`
2. `npm run build`

Source locations:

* `resources/admin/` — React admin app (compiled to `build/admin/`)
* `resources/blocks/booking-form/` — Gutenberg block (compiled to `build/blocks/`)
* `resources/frontend/` — frontend booking form components
