=== Umbofleet ===
Contributors: umbofleet
Tags: fleet, vehicle checks, walkaround, defects, mot
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.27.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Daily vehicle walkaround checks, defects, repairs, incidents and key-date reminders for UK fleets. Unlimited vehicles and drivers.

== Description ==

Umbofleet turns your WordPress site into a fleet app. Drivers do their daily walkaround checks on their phone. Managers see the defects, raise repairs and get reminders on screen before MOT, tax, insurance and licence checks are due.

* Daily walkaround checks with photos, using the standard checklist or your own checksheets.
* Each failed item becomes a defect, which you can follow through to a completed repair.
* Tyre pressures and tread, with a defect raised when a reading is too low or too high.
* Incident reports (first notice of loss) with photos.
* Several drivers per vehicle. Drivers only see the vehicles they're assigned to, and only their own checks and photos.
* Key dates with on-screen reminders, depots, fleet managers and CSV import.

Everything above is included and works without an account or licence. Umbofleet doesn't connect to any outside service, and all your data stays in your WordPress database.

An optional add-on, Umbofleet Plus, is available separately from [umbofleet.com](https://umbofleet.com). It adds MOT and road tax dates from DVSA and DVLA records, recall, tax and mileage warnings, email alerts, and audit and insurer reports.

= Source code =

Every JavaScript and CSS file in the plugin is the original, hand-written source. Nothing is compiled, bundled or minified, and there is no build step: the files in `assets/` are exactly what was written and can be read, changed and reused as they are. The plugin uses no third-party JavaScript or CSS libraries.

* `assets/app.js`: the app for managers and drivers
* `assets/checksheet-ui.js`, `assets/tyres-ui.js`, `assets/incidents-ui.js`, `assets/documents-ui.js`: the checksheet builder, tyre checks, incident reports and shared documents
* `assets/sw.js`: the service worker that lets drivers finish a check with no signal
* `assets/app.css`, `assets/access.css`: the styles

The fonts in `assets/fonts/` are Archivo and Atkinson Hyperlegible, used under the SIL Open Font License; their licences are included next to them.

== Privacy ==

Umbofleet stores vehicles, drivers, checks, photos, repairs and incident reports in your own WordPress database.

It sends email only through your site's own email settings (wp_mail), and only to the drivers and fleet managers you add: their invitations, a note when an existing user is given access to a company, and password reset links they ask for.

Umbofleet does not connect to umbofleet.com or to any other outside service, and sends no other data off your site.

== Installation ==

1. In WordPress, go to Plugins, then Add New, then Upload Plugin, and choose the umbofleet.zip file.
2. Activate Umbofleet.
3. Open Umbofleet from the admin menu. Add your vehicles and drivers, then invite your drivers.

== Changelog ==

= 0.27.4 =
* Repairs have the same Cards and List views as the other pages, with a filter (still to do, overdue, open, in progress, completed), a sort (most urgent first, newest, oldest, vehicle, cost) and 25, 50 or 100 a page.
* "View repair" from an inspection finds the repair whatever filter was last used, and opens its row in List view.

= 0.27.3 =
* Fixed: editing a repair raised from a check could fail with "Unexpected nested data".

= 0.27.2 =
* Repairs have a repair centre or garage, the date it's booked in for, the cost, an invoice number and notes. All optional.
* "View repair" on an inspection opens that repair, highlighted, with a link back to the inspection, instead of the whole Repairs list.
* Completing a repair by editing it now records when and by whom.

= 0.27.1 =
* Drivers now see only the checks they did themselves, and their photos. A driver who shares a vehicle no longer sees another driver's checks or photos; the vehicle card still warns them about any defect that hasn't been fixed. Managers see everything, as before.
* Vehicle, driver, check and repair lists for drivers are limited in the database query itself, and drivers don't get company-wide totals.
* The JavaScript and CSS are laid out one statement and one declaration per line, so they're easier to read. The readme says where the source is.
* Starting an inspection opens at the top of the page. The company name only shows on a driver's vehicle cards when they work for more than one company.

= 0.27.0 =
* New Documents page: share a policy, handbook or notice (PDF, JPEG or PNG, up to 10 MB) with every driver or chosen drivers. Drivers find it at the top of the Account tab in the app, with a number on the tab for anything they still have to read.
* Ask drivers to confirm they've read it: they open the document and tap "I've read this". The Documents page shows "Read by 7 of 12 drivers", and who has and hasn't read it, with the date and time.
* Change who a document is for, or delete it, at any time. Depot managers share with the drivers in their depots and see only their own drivers' reads.

= 0.26.2 =
* Fixed: checks with photos (fault photos, photo items, extra photos) and incident photos failed to send on some sites with a server error. Photo conversion now loads the WordPress file helpers it needs itself.

= 0.26.1 =
* Depot managers: recording that a driver has left now only unassigns them from vehicles in that manager's own depots, and only names those vehicles. Head office still sees and manages every depot.
* Depot managers: the Driver column in a vehicle import is matched only against drivers in their own depots, so the import can't reveal drivers in other depots.
* The leave, reinstate, off fleet, return and delete routes now check for manager access before the request reaches them.

= 0.26.0 =
* Vehicles, Drivers and Inspections have a Cards or List choice. List shows one row per vehicle, driver or check (status, next date due, last check), so a fleet of 60 or more is easy to scan. Choose a row to open its full details underneath.
* Filter: show only what needs attention, vehicles off the road, open defects, dates overdue or due soon, no driver, never checked, or one vehicle type. For drivers: not invited, invited but not signed in, or no vehicle. For checks: defects or passes, Today, Last 7 days or Last 30 days, and one vehicle.
* Sort: needs attention first, registration or name, next date due, last check, fleet number or depot; checks newest, oldest or defects first.
* Page numbers under each list, with 25, 50 or 100 a page. Search, filter and sort now cover the whole fleet, not just the records on screen.
* Your choices are remembered on each device.

= 0.25.1 =
* Photos are shrunk on the phone before they're saved or sent (longest side 1,920 pixels, JPEG). A typical camera photo goes from several megabytes to a few hundred kilobytes, so checks send much faster on a weak signal, take far less room while waiting offline, and photos from newer phones with large cameras are no longer refused for being too big. Covers fault photos, photo items on checksheets, extra check photos, incident photos and photo documents.

= 0.25.0 =
* Photos and documents are now kept as files in a private folder in wp-content/uploads instead of inside the database. The folder has a random name and can't be opened from the web: the app still shows them only to signed-in managers and the driver who took them. This keeps the database small, so backups and page loads stay quick as the photos build up.
* Existing photos and documents move across by themselves in the background, a few at a time, after updating. Umbofleet > Setup > Photos and documents shows how many are left, with a button to move some straight away.
* Ready for cloud storage in Umbofleet Plus 1.1.0.

= 0.24.7 =
* Drivers get a menu along the bottom of their phone: Checks, Tyres, Incident and Account. Account shows who's signed in and has Sign out, which drivers couldn't reach before. Report an incident moves from the home screen to its own tab.

= 0.24.6 =
* Inspection cards fold up, like vehicle and driver cards: folded, each shows the date, vehicle, result and one line of what failed (or All items passed), the odometer and who did it. Expand all and Collapse all are at the top.

= 0.24.5 =
* Checks work with no signal. Once a driver has opened Umbofleet with a signal, it opens without one, with their vehicles and checksheets. A check done offline, photos and all, is saved on the phone and sent automatically when the signal comes back. A banner shows what's waiting, with Send now.
* A check sent later is recorded with the time it was actually done, and counts for that day.
* Signing out clears everything Umbofleet kept on the phone (and warns if a check hasn't been sent yet).

= 0.24.4 =
* When a driver marks an item as failed on their check, they can say what's wrong and add up to 3 photos of it: Take photo opens the phone's camera, and Choose from phone picks photos already taken. The details and photos are kept with the check, shown against the item on the vehicle's outstanding defects, included in the repair description, and stored on the repair.
* New vehicle details under More details: Euro emissions status, revenue weight, wheel plan, engine size, CO2 and the date the logbook (V5C) was issued. They can be imported too.
* Editing a repair keeps the items already marked as fixed and when it was completed.

= 0.24.3 =
* With Umbofleet Plus, road tax dates are now looked up from DVLA records too, so the Plus import template drops its Road tax due column and an import fills in road tax dates that are missing.

= 0.24.2 =
* One company per site, renamed under Umbofleet > Setup. The unused route for adding companies has been removed.
* Depot managers get the same plain message for a registration used in another depot, whether they add it or import it, and drivers in other depots aren't matched by an import.
* The notice for old licences has gone: the free plugin no longer reads any licence setting.

= 0.24.1 =
* Brings together the trailer features from 0.24.0 and the WordPress.org review fixes from 0.23.3 and 0.23.4.

= 0.24.0 =
* Add trailer: a button on the Vehicles page with a form made for trailers. It asks for a trailer ID (ministry plate or your own reference) instead of a registration, plus trailer type, annual test and PMI dates. It doesn't ask for mileage, road tax, fuel or a driver.
* No duplicates: a registration or trailer ID can only be on one vehicle. Spaces and capitals don't count, and vehicles under Off fleet count too (return them instead).
* All, Vehicles and Trailers filter on the Vehicles page.
* Trailer cards show the trailer type, annual test and safety inspection dates.
* Import: a Trailer ID or Ministry number column, or a Trailer type column, marks the rows as trailers. The template now has a Type column and a sample trailer.

= 0.23.4 =
* With Umbofleet Plus, the vehicle import template keeps its Road tax due column: Plus fills in make, model and MOT dates from DVSA MOT records, and road tax dates are entered by hand.

= 0.23.3 =
* Scripts and styles load through wp_enqueue_script and wp_enqueue_style.
* Sign-in, welcome and password reset forms check a WordPress nonce.
* Stored data uses the umbofleet_ prefix (tables and user meta are renamed once on update, keeping everything).
* Depot managers are limited to their own depots in more places (incident changes, checksheets, tyre forms, history).
* The Umbofleet menu sits lower in the admin menu.

= 0.23.2 =
* The vehicle import template now has Make, Model and MOT due columns, next to Road tax due and Service due. With Umbofleet Plus the template stays short, because those details are looked up.

= 0.23.1 =
* Code reformatted for readability (one statement per line). No change in behaviour.

= 0.23.0 =
* Umbofleet is now completely free, with nothing locked. The paid extras (DVSA and DVLA records, warnings, email alerts and reports) have moved to a separate add-on, Umbofleet Plus.
* The free plugin no longer connects to any outside service.
* Settings: automatic repairs, the missing licence check flag and how far ahead to show dates.

= 0.22.9 =
* Overview alert lists fit cards of any width, and long names wrap neatly.
* Tidy-ups from WordPress Plugin Check: input is sanitised, output is escaped, temporary files are removed with WordPress functions, and there's a proper readme.

The full history is in CHANGELOG.md.
