===== PCIO VIS Boat =====
Contributors: pcio
Tags: members, boats, club, nautical
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.0.1
Requires PHP: 8.1
Requires Plugins: pcio-vis-member-event
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Extends PCIO VIS Member Event with a boat club register.

== Description ==

Adds a **Boat Register** to PCIO VIS Member Event for sailing clubs and other
boat-oriented organisations.

**Features**

* Register boats with: home harbour, name, type, model, build year, sail
  number and MMSI number.
* Link each boat to a registered owner member and zero or more crew members.
* Crew members can optionally be linked to a pcio-vis-products subscription so
  their activity status is shown next to them in the register.
* When a core member is deleted all their owned boats (and crew associations)
  are cleaned up automatically.
* Boat Register admin page at `/vis/boats`, access-controlled by the new
  `vis_boat_manage` capability (granted to Editor and Administrator on
  activation).
* Boat name(s) appear as a read-only column in the core member list.

This plugin stores all data locally in two custom database tables; it does **not**
communicate with any external service.

== Installation ==

1. Make sure **PCIO VIS Member Event** is installed and active.
2. Upload the `pcio-vis-boat` folder to `/wp-content/plugins/`.
3. Activate the plugin in WordPress.
4. Navigate to `/vis/boats` to start managing the boat register.

== Frequently Asked Questions ==

= Where do I manage boats? =

Go to `/vis/boats` on the front end. A "Boats" link also appears in the Vis
navigation and as a tile on the `/vis/` landing page for users with the
`vis_boat_manage` capability.

= Can crew members see their own boats? =

The REST endpoint `GET /pcio-vis/v1/boat/member/{member_id}` returns all boats
where the given member is the owner or crew. This endpoint is accessible to
administrators and to the member themselves when they are logged in.

= Does this plugin send any data externally? =

No. All data is stored in the local WordPress database. No external connections
are made.

= What happens when a member is deleted from the core plugin? =

All boats owned by that member are deleted, and any crew links for that member
on other boats are removed.

== Screenshots ==

1. New register for boat data
2. Map showing members home habour
3. Advanced member statistics and sponsor activity (number of link clicks)

== Changelog ==

= 1.0.1 =
* Security: the harbour map endpoint that lists member names and membership
  numbers now requires the `vis_member` capability instead of being public.
* Security: creating a shared harbour now requires the `vis_boat_manage`
  capability. Harbours added on the map during sign-up are stored only after
  membership is confirmed, removing the unauthenticated write path.

= 1.0.0 =
* Initial release.
