Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b0156864e5 | |||
| d8af3c63da | |||
| 3d2b8aa471 |
+24
-1
@@ -10,10 +10,33 @@
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- **Package Script** -- license key warning on install/update when no DLID is configured
|
||||
- **Repository** -- initial repo creation with scaffolding
|
||||
- **System Plugin** -- Extension class, service provider, 6 helpers
|
||||
- **SQL Schema** -- 8 tables: vehicles, drivers, zones, fares, rides, ratings, dispatch, shifts
|
||||
- **Admin Component** -- 6 views: dashboard, rides, vehicles, drivers, zones, fares
|
||||
- **Admin Component** -- 6 views with ListModels: dashboard, rides, vehicles, drivers, zones, fares
|
||||
- **Admin Templates** -- functional Joomla 6 list views with pagination and status badges
|
||||
- **Webservices Plugin** -- 7 API routes: rides, vehicles, drivers, zones, fares, dispatch, ratings
|
||||
- **Configuration** -- 16 settings across general, dispatch, fares, drivers, booking
|
||||
- **Access Control** -- 21 permissions for granular role-based access
|
||||
- **Component Language Files** -- en-GB translations for menu, submenu, and extension manager
|
||||
- **Wiki Documentation** -- 13 pages covering installation, configuration, database, ride management, ride lifecycle, dispatch engine, fare system, fare zones, fleet management, driver management, API reference, and permissions
|
||||
|
||||
### Fixed
|
||||
- **Package Manifest** -- added `<scriptfile>` for package install script
|
||||
- **Package Manifest** -- added component and webservices plugin to package files list (only system plugin was listed)
|
||||
- **FareHelper** -- timezone-aware night surcharge using `Factory::getDate()` instead of `date('H')`
|
||||
- **FareHelper** -- peak multiplier now gated by `peak_hours_start`/`peak_hours_end` instead of always applied
|
||||
- **FareHelper** -- surcharges return value now conditionally includes night surcharge
|
||||
- **FareHelper** -- replaced deprecated `bootPlugin()` with `PluginHelper::getPlugin()` + `Registry`
|
||||
- **ZoneHelper** -- surge supply count now filtered to drivers within zone bounding box instead of global count
|
||||
- **ZoneHelper** -- replaced deprecated `bootPlugin()` with `PluginHelper::getPlugin()` + `Registry`
|
||||
- **ZoneHelper** -- radius fallback uses null coalesce (`??`) instead of falsy coalesce (`?:`)
|
||||
- **RideHelper** -- `requestRide()` now detects pickup/dropoff zones via `ZoneHelper::detectZone()`
|
||||
- **RideHelper** -- surge multiplier stored on ride at request time for use at completion
|
||||
- **RideHelper** -- `completeRide()` now passes ride's pickup zone to `calculateFare()`
|
||||
- **DispatchHelper** -- SQL bounding-box pre-filter before haversine distance calculation
|
||||
- **DispatchHelper** -- `LIMIT` applied after distance filtering instead of before (was silently missing nearby drivers)
|
||||
- **Component Manifest** -- added `access.xml`, `config.xml`, language folder, submenu entries
|
||||
- **Component Provider** -- added `RouterFactoryInterface` registration for SEF URL support
|
||||
- **Webservices Manifest** -- added description, author metadata
|
||||
|
||||
@@ -9,12 +9,37 @@
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 3 or later; see LICENSE</license>
|
||||
<description>Ride-hailing, dispatch, fleet management, fare zones, and driver scheduling</description>
|
||||
<description><![CDATA[
|
||||
<h3>MokoSuite Taxi</h3>
|
||||
<p>Layer 2 ride-hailing extension for the MokoSuite platform on Joomla 6.</p>
|
||||
<p><strong>Requires:</strong> MokoSuiteClient (Layer 0), MokoSuiteCRM (Layer 1)</p>
|
||||
<h4>Included Extensions</h4>
|
||||
<ul>
|
||||
<li><strong>System - MokoSuite Taxi</strong> — Core helpers, SQL schema (8 tables), dispatch engine, fare calculator</li>
|
||||
<li><strong>MokoSuite Taxi Component</strong> — Admin dashboard, rides, vehicles, drivers, zones, and fares management</li>
|
||||
<li><strong>Web Services - MokoSuite Taxi</strong> — REST API with 7 endpoints for rides, vehicles, drivers, zones, fares, dispatch, and ratings</li>
|
||||
</ul>
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
<li>On-demand, scheduled, airport, and corporate ride types</li>
|
||||
<li>Zone-aware dispatch with bounding-box pre-filter and haversine distance matching</li>
|
||||
<li>Dynamic surge pricing based on zone-level demand/supply ratio</li>
|
||||
<li>Fleet management with vehicle tracking and document expiry alerts</li>
|
||||
<li>Driver profiles linked to CRM contacts with commission tracking</li>
|
||||
<li>GeoJSON fare zones with radius fallback and zone-specific pricing rules</li>
|
||||
<li>Bidirectional rider/driver ratings with feedback tags</li>
|
||||
<li>Shift scheduling with location tracking and earnings aggregation</li>
|
||||
</ul>
|
||||
<p><a href="https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteTaxi/wiki" target="_blank">Documentation</a> | <a href="https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteTaxi/issues" target="_blank">Support</a></p>
|
||||
]]></description>
|
||||
<scriptfile>script.php</scriptfile>
|
||||
<php_minimum>8.3</php_minimum>
|
||||
<dlid prefix="dlid=" suffix=""/>
|
||||
<blockChildUninstall>true</blockChildUninstall>
|
||||
<files folder="packages">
|
||||
<file type="plugin" id="plg_system_mokosuitetaxi" group="system">plg_system_mokosuitetaxi.zip</file>
|
||||
<file type="component" id="com_mokosuitetaxi">com_mokosuitetaxi.zip</file>
|
||||
<file type="plugin" id="plg_webservices_mokosuitetaxi" group="webservices">plg_webservices_mokosuitetaxi.zip</file>
|
||||
</files>
|
||||
<updateservers>
|
||||
<server type="extension" priority="1" name="Package - MokoSuite Taxi">https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteTaxi/updates.xml</server>
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @package MokoSuiteTaxi
|
||||
* @subpackage pkg_mokosuitetaxi
|
||||
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see LICENSE
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Installer\InstallerAdapter;
|
||||
use Joomla\CMS\Log\Log;
|
||||
|
||||
/**
|
||||
* Package installation script for MokoSuiteTaxi.
|
||||
*/
|
||||
class Pkg_MokoSuiteTaxiInstallerScript
|
||||
{
|
||||
public function postflight(string $type, InstallerAdapter $adapter): void
|
||||
{
|
||||
$this->warnMissingLicenseKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* Warn after install/update if no license key (dlid) is configured on the update site.
|
||||
*/
|
||||
private function warnMissingLicenseKey(): void
|
||||
{
|
||||
try
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select([$db->quoteName('update_site_id'), $db->quoteName('extra_query')])
|
||||
->from($db->quoteName('#__update_sites'))
|
||||
->where('(' . $db->quoteName('name') . ' LIKE ' . $db->quote('%MokoSuiteTaxi%')
|
||||
. ' OR ' . $db->quoteName('location') . ' LIKE ' . $db->quote('%MokoSuiteTaxi%') . ')')
|
||||
->setLimit(1);
|
||||
$db->setQuery($query);
|
||||
$site = $db->loadObject();
|
||||
|
||||
if ($site)
|
||||
{
|
||||
$extraQuery = (string) ($site->extra_query ?? '');
|
||||
|
||||
if (!empty($extraQuery) && strpos($extraQuery, 'dlid=') !== false)
|
||||
{
|
||||
parse_str($extraQuery, $parsed);
|
||||
|
||||
if (!empty($parsed['dlid']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$editUrl = 'index.php?option=com_installer&task=updatesite.edit&update_site_id=' . (int) $site->update_site_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$editUrl = 'index.php?option=com_installer&view=updatesites';
|
||||
}
|
||||
|
||||
$app->enqueueMessage(
|
||||
'<strong>Moko Consulting License Key Required</strong> — '
|
||||
. 'No download key is configured. Updates will not be available until a valid license key is entered. '
|
||||
. '<a href="' . $editUrl . '" class="btn btn-sm btn-warning ms-2">Enter License Key</a>',
|
||||
'warning'
|
||||
);
|
||||
}
|
||||
catch (\Throwable $e)
|
||||
{
|
||||
// Silent — avoid breaking install if update_sites query fails
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user