=== Resourcemanager ===
Contributors: mystryx
Tags: resource booking, room booking, booking calendar, equipment reservation, appointment scheduling
Donate link: https://www.paypal.com/paypalme/edvhacker/6
Requires at least: 6.5
Tested up to: 7.1
Stable tag: 2.2.1
Requires PHP: 7.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.txt

Professional, GDPR-compliant resource booking system for rooms, vehicles, equipment, and staff with intuitive month & week views.

== Description ==

**Resourcemanager** is a powerful, flexible, and 100% privacy-friendly booking and scheduling system for WordPress. Whether you need to manage meeting rooms, hot desks, company vehicle fleets, rental equipment, audio/video gear, or team schedules, Resourcemanager provides a clean, responsive, and interactive calendar interface that your team and clients will love.

Built from the ground up for performance and data privacy, Resourcemanager runs entirely on your local WordPress installation with **zero external tracking, zero third-party dependencies, and lightning-fast REST API communication**.

[Official Website](https://seo-hacker.de) | [Support the Project via PayPal](https://www.paypal.com/paypalme/edvhacker/6)

---

### Why Choose Resourcemanager?

* **100% Privacy & GDPR / DSGVO Compliant**: No tracking pixels, no external CDNs, and zero third-party telemetry. All booking records, user info, and custom field data remain strictly inside your own WordPress database.
* **High-Performance REST API Architecture**: Powered entirely by the native WordPress REST API (`resourcemanager/v1`) and `wp.apiFetch`. Experience instant calendar updates, fast modal dialogues, and zero sluggish page reloads.
* **Intuitive Month & Week Views**: Crystal-clear overview of all resources side-by-side with color-coded status badges (confirmed, pending, canceled).
* **Collision & Double-Booking Prevention**: Built-in interval-conflict detection ensures that unique resources are never accidentally double-booked.
* **Countable & Multi-Capacity Resources**: Define maximum quantities for inventory pools (e.g., 5 projectors, 10 rental laptops, 20 seminar desks) with automated remaining-capacity calculations.
* **Recurring Bookings Engine**: Effortlessly schedule repeating appointments (daily, weekly, monthly, or yearly) with automated conflict validation across the entire series.
* **Dual-Mode Custom Fields (Visual & JSON)**: Tailor your booking forms to your exact needs. Add text inputs, number fields (with min/max/step limits), and required constraints using an intuitive visual editor or direct JSON schema.
* **Role-Based Permission Control**: Easily grant view or management permissions to specific WordPress user roles (Administrators, Editors, Authors, or custom intranet roles).
* **Automated Email Notifications**: Keep everyone informed with automatic email alerts sent to resource owners and bookers upon submission, confirmation, or cancellation.
* **Remote ICS Holiday Synchronization**: Automatically import public or corporate holiday feeds via scheduled background tasks (WP-Cron) without ever exposing visitor IP addresses.
* **Modernized Admin Interface**: Streamline your daily management with instant Quick-Add toolbars, live real-time search filtering, 1-click shortcode copy badges, and spacious rich-text (TinyMCE) modal description editing.
* **Native 12-Language Support**: Fully translated into English, German, Spanish, French, Italian, Brazilian Portuguese, Dutch, Russian, Polish, Japanese, Turkish, Swedish, and Simplified Chinese using WordPress 6.5+ high-speed translation arrays.

---

### Common Use Cases

* **Meeting Rooms & Offices**: Conference rooms, meeting suites, video-conference cabins, desk sharing, and coworking spaces.
* **Vehicle Fleet Management**: Company pool cars, delivery vans, electric vehicles, trailers, and bikes.
* **Equipment & Device Rentals**: Cameras, lighting kits, lab apparatus, measuring tools, musical instruments, and beamers.
* **Schools, Universities & Research**: Computer laboratories, sports gyms, rehearsal halls, and workshop machinery.
* **Team & Facility Scheduling**: Consultation hours, shared workstations, therapy rooms, and shift rotas.

---

### Key Features at a Glance

* **Compact Month View**: Day-cell matrix showing resource availability, booking occupancy, and holiday highlights.
* **Hour-by-Hour Week View**: Detailed weekly timetable with customizable day boundaries (`day_start` and `day_end`).
* **Instant Booking Modal**: Smooth, responsive booking dialog with recurrence options and bespoke custom fields.
* **Visual Custom Fields Builder**: Add custom fields without writing a single line of code.
* **Real-Time Search & Quick-Add**: Quickly find and manage hundreds of items with instant keyboard filtering.
* **1-Click Shortcode Badges**: Copy embedding shortcodes directly to your clipboard with visual confirmation.
* **Modal Rich-Text Editor**: Provide detailed resource guidelines, rules of use, and specifications using the familiar WordPress editor.
* **Theme-Safe Styling**: Strictly scoped CSS styles protect your website against styling conflicts with third-party themes.

== Installation ==

1. Upload the `resourcemanager` directory to your `/wp-content/plugins/` directory, or install it directly via the WordPress Plugins dashboard.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. In your WordPress admin menu, navigate to **Resourcemanager**:
   - Go to **Resources** to add your bookable assets (rooms, vehicles, equipment, etc.).
   - Go to **Calendars** to create a calendar view and assign the desired resources.
4. Copy the shortcode badge from the Calendars overview (e.g. `[resourcemanager cal_id="1"]`).
5. Paste the shortcode into any WordPress page, post, or widget block!

== Shortcodes & Configuration ==

Embed your resource calendar on any page using the simple shortcode:

`[resourcemanager cal_id="1"]`

#### Supported Attributes:

* `cal_id` *(integer, default: 0)*: The ID of the calendar view you want to display.
* `initial_view` *(string, default: "monthly")*: The view displayed on initial load. Accepted values: `"monthly"` or `"weekly"`.
* `day_start` *(string, default: "07:00:00")*: Earliest time shown in the weekly view timetable (`HH:MM:SS`).
* `day_end` *(string, default: "18:00:00")*: Latest time shown in the weekly view timetable (`HH:MM:SS`).
* `line_sectors` *(string, default: "0:10:90:100")*: Percentage distribution markers for visual column rendering.

#### Custom Example:
`[resourcemanager cal_id="2" initial_view="weekly" day_start="08:00:00" day_end="20:00:00"]`

== Frequently Asked Questions ==

= Is Resourcemanager compliant with the EU General Data Protection Regulation (GDPR / DSGVO)? =
Yes, absolutely! Resourcemanager is 100% self-hosted and privacy-respecting. All bookings, user details, and resource parameters are stored exclusively in your own local WordPress database. The plugin does not load external scripts or tracking beacons. External holiday ICS feeds are fetched server-to-server via background WP-Cron jobs so user and visitor IP addresses are never shared with third parties.

= Can multiple users book the same resource simultaneously? =
For unique resources (such as a specific conference room or vehicle), our conflict engine strictly prevents double bookings. For inventory items with multiple identical units (e.g., 10 laptops or 25 seminar seats), simply configure the capacity to the total count. The plugin tracks concurrent bookings and permits reservations until all available units are booked.

= How do custom booking fields work? =
Under the **Resources** management table, click the **Custom Fields** button for any resource. You can visually add text inputs, number fields (with optional min, max, and step validation), or toggle into the JSON schema view. These fields appear automatically in the front-end reservation modal and are saved with the booking.

= Can I restrict who can view or book resources? =
Yes. You can configure viewer roles and administrator roles independently for each calendar and each resource. You can choose to make a calendar public, restrict it to logged-in users, or limit access to specific WordPress roles (e.g., Administrator, Editor, Subscriber).

= Can I import national or regional public holidays? =
Yes. Under **Resourcemanager -> Settings**, enter the URL of any standard iCalendar (.ics) feed. Resourcemanager caches the holiday events in the background and visually highlights them in your calendars.

= What languages are available? =
Resourcemanager includes 100% complete translations for 12 languages:
* English
* German (Deutsch - `de_DE`)
* Spanish (Espanol - `es_ES`)
* French (Francais - `fr_FR`)
* Italian (Italiano - `it_IT`)
* Brazilian Portuguese (Portugues do Brasil - `pt_BR`)
* Dutch (Nederlands - `nl_NL`)
* Russian (Russian - `ru_RU`)
* Polish (Polski - `pl_PL`)
* Japanese (Japanese - `ja`)
* Turkish (Turkce - `tr_TR`)
* Swedish (Svenska - `sv_SE`)
* Simplified Chinese (Chinese Simplified - `zh_CN`)

== Screenshots ==

1. **Monthly Calendar View**: Compact, interactive month grid showing bookings, occupancy status, and holiday highlights.
2. **Weekly Timetable View**: Detailed weekly agenda showing exact hours and time slots.
3. **Reservation Dialog**: Intuitive booking popup with date pickers, recurrence settings, and custom field inputs.
4. **Modern Admin Dashboard**: Streamlined resource and calendar management with real-time live search and Quick-Add toolbars.
5. **Dual-Mode Custom Fields Editor**: Visual and JSON schema builder for creating tailored booking fields.
6. **Rich-Text Description Modal**: Spacious WordPress TinyMCE editor for extended resource guidelines and terms.

== Changelog ==

= 2.2.1 =
* Verified full compatibility up to WordPress 7.1.
* Comprehensive marketing overhaul, refined feature documentation, and updated shortcode reference.
* Updated asset versions and translation catalogs for version 2.2.1.

= 2.2.0 =
* Complete redesign and modernization of backend admin UI (Resources, Calendars, About dashboard).
* Introduced Quick-Add action toolbars with live real-time filtering for resources and calendars.
* Upgraded extended description editor to a spacious, non-intrusive WordPress modal popup with full TinyMCE support.
* Enhanced custom fields management with dual-mode visual and JSON editors.
* Added 1-click shortcode copy badges with instant clipboard feedback.
* Comprehensive legal, privacy, and GDPR/DSGVO compliance documentation in modernized About dashboard.
* Synchronized 100% translation coverage across all 12 supported languages.
* Updated official author website to seo-hacker.de and contact email to alex@seo-hacker.de.

= 2.0.0 =
* Major architecture update: completely transitioned from legacy admin-ajax.php to WordPress REST API (`resourcemanager/v1`).
* Frontend and backend client scripts modernized to use native WordPress `wp.apiFetch`.
* Eliminated N+1 database queries on calendar views via single prepared resource batch-fetching.
* Optimized user query memory usage and enforced privacy restrictions on user listings.
* Fully retired legacy AJAX endpoints in favor of robust, secure REST routes.
* Updated asset versions and translation catalogs for version 2.0.0.

= 1.3 =
* Modernized localization to native WordPress 6.5+ PHP arrays (.l10n.php) supporting 12 languages.
* Registered custom post type `resman_view` and added standard `uninstall.php` cleanup routine.
* Security enhancements: nonces, permission checks, strict SQL preparation, and Settings API sanitization callbacks.
* Critical bugfixes: date calculations, countable resource collision overlap checks, admin resource creation.
* REST API support (`resourcemanager/v1`) alongside AJAX endpoints.
* Asynchronous cached ICS holiday fetching via WP-Cron.
* Strictly scoped CSS styles to prevent theme/plugin styling bleed.
* Codebase-wide PHPDoc/JSDoc documentation and modernization.

= 1.2.1 =
* Performance updates and bugfixes.
* Updated week view layout and hour calculations.
* Introduced shortcode attributes: initial_view, day_start, day_end, line_sectors.

= 1.2 =
* Introduced weekday view.
* Updated database to use auto-increment IDs instead of resource/time as primary key.
* General bugfixes and UI adjustments.

= 1.1 =
* Initial public release.

== Upgrade Notice ==

= 2.2.1 =
Version 2.2.1 adds verified compatibility up to WordPress 7.1 and refined documentation. Recommended for all users!

= 2.2.0 =
Version 2.2.0 brings a completely redesigned backend admin interface with live search filtering, Quick-Add toolbars, 1-click shortcode copying, rich-text modal editing, and full 12-language translation coverage. Highly recommended for all users!