Rentiva v4.39.0 — Customers Page React SPA (Faz 2)
· 2 min read
The legacy jQuery / WP_List_Table Customers admin page is gone. v4.39.0 replaces it with a full React SPA backed by a dedicated REST API — live search, sortable columns, a slide-in detail panel, and bulk delete, all without page reloads.
What's New
Customers Page — React SPA Migration
This is the second major admin page migrated from PHP-rendered output to a React SPA (Faz 2, following the Dashboard in Faz 1).
New REST Endpoints
GET /mhm-rentiva/v1/customers— paginated customer list with search, sort, and per-page controlsGET /mhm-rentiva/v1/customers/{id}— full customer detail (name, email, phone, address, booking stats, first/last booking)DELETE /mhm-rentiva/v1/customers/bulk— bulk delete by ID array withmanage_optionsgate
New React Components
CustomersPage— root state orchestrator wiring search, pagination, and panel stateCustomerTable— sortable table replacingWP_List_Table; columns: Name, Email, Bookings, Total Spent, Last Booking, RegisteredCustomerDetailPanel— slide-in panel on row click; shows full profile with Edit and View Bookings quick linksFilterBar— live search input with 300 ms debounce and bulk delete trigger
Removed Legacy Code
CustomersListTable.php— deletedCustomersListPage.php— deletedcustomers.js,customers-calendar.js,customers.css,simple-calendars.css— deleted
Other Changes
CustomersOptimizerextended withsort_by/sort_dirparameters and a PHP-side column whitelist for safeORDER BYinjection- Export CSV still streams via
admin-post.php— the download flow is preserved alongside the SPA CustomersPage::register()no longer hooksrest_api_initdirectly; routes register throughPlugin.phpso they're available beforeadmin_menufires
Tests
13 new PHPUnit integration tests (10 REST endpoint tests + 3 exporter tests). Full suite: 1115 tests, 3425 assertions. PHPCS: 0 errors.
