43 Commits

Author SHA1 Message Date
jmiller ac9c1fccb7 fix: add missing tables to uninstall (modifiers, staff_shifts) 2026-06-27 20:41:27 +00:00
jmiller 8f552352dc fix: use exact SQL schema from spec (10 tables) 2026-06-27 20:41:25 +00:00
jmiller 6bb64d75ab scaffold: add webservices Extension class 2026-06-27 20:33:57 +00:00
jmiller 1461dd2f5d scaffold: add webservices provider 2026-06-27 20:33:34 +00:00
jmiller d86bb169df scaffold: add webservices plugin manifest 2026-06-27 20:33:15 +00:00
jmiller 84e47c8d37 scaffold: add restoshifts template 2026-06-27 20:32:46 +00:00
jmiller 69a27d3b3c scaffold: add restoorders template 2026-06-27 20:32:33 +00:00
jmiller 653bb64690 scaffold: add restoreservations template 2026-06-27 20:32:26 +00:00
jmiller 0b2a42ca18 scaffold: add restotables template 2026-06-27 20:32:20 +00:00
jmiller 40232d4e78 scaffold: add restoitems template 2026-06-27 20:32:13 +00:00
jmiller ec9e88e1ca scaffold: add restomenus template 2026-06-27 20:32:05 +00:00
jmiller 72d8581084 scaffold: add template stubs 2026-06-27 20:31:59 +00:00
jmiller 52df72b492 scaffold: add RestoShifts view 2026-06-27 20:31:38 +00:00
jmiller a1a48d2e92 scaffold: add RestoInventory view 2026-06-27 20:31:27 +00:00
jmiller c4b88ecf5d scaffold: add RestoOrders view 2026-06-27 20:31:13 +00:00
jmiller a6c676b708 scaffold: add RestoReservations view 2026-06-27 20:31:01 +00:00
jmiller bbaabb2e99 scaffold: add RestoTables view 2026-06-27 20:30:49 +00:00
jmiller ec77db51d5 scaffold: add RestoItems view 2026-06-27 20:30:38 +00:00
jmiller 4b7d1a42f6 scaffold: add RestoMenus view 2026-06-27 20:30:32 +00:00
jmiller 90df713b1f scaffold: add HtmlView stubs 2026-06-27 20:30:23 +00:00
jmiller b81e5cf860 scaffold: add component sys.ini 2026-06-27 20:29:53 +00:00
jmiller cb631682e2 scaffold: add component language ini 2026-06-27 20:29:48 +00:00
jmiller 581cee8d5f scaffold: add config.xml 2026-06-27 20:29:25 +00:00
jmiller 80a7cfed64 scaffold: add access.xml 2026-06-27 20:29:16 +00:00
jmiller 899dfbdaff scaffold: add DisplayController 2026-06-27 20:28:52 +00:00
jmiller ab99482ab9 scaffold: add component service provider 2026-06-27 20:28:43 +00:00
jmiller ff83c103a3 scaffold: add component manifest 2026-06-27 20:28:18 +00:00
jmiller e2beeb92ac feat: initial scaffold files 2026-06-27 15:27:01 -05:00
jmiller 6dc85ee82c scaffold: add system plugin sys.ini 2026-06-27 20:21:42 +00:00
jmiller 8b47ce3dfa scaffold: add system plugin language files 2026-06-27 20:21:38 +00:00
jmiller 11a8e2ef64 scaffold: add uninstall SQL 2026-06-27 20:21:31 +00:00
jmiller a8d7c079d6 scaffold: add install SQL schema 2026-06-27 20:21:19 +00:00
jmiller 422103c89b scaffold: add system plugin Extension class 2026-06-27 20:18:56 +00:00
jmiller 04e1dbe7d9 scaffold: add system plugin provider 2026-06-27 20:18:47 +00:00
jmiller 02ee35231e scaffold: add system plugin manifest 2026-06-27 20:18:23 +00:00
jmiller 696ee0b464 feat: scaffold batch 2 2026-06-27 20:17:16 +00:00
jmiller 9d1485c056 feat: scaffold batch 1 2026-06-27 20:17:14 +00:00
jmiller 09d36bdca1 feat: initial scaffold 2026-06-27 20:17:13 +00:00
jmiller 67aa1c5655 scaffold: add package manifest 2026-06-27 20:17:12 +00:00
jmiller aa9dff8e62 scaffold: add CHANGELOG.md 2026-06-27 20:16:42 +00:00
jmiller e199a570a9 scaffold: add README.md 2026-06-27 20:16:18 +00:00
jmiller 6dfda1192f scaffold: add CLAUDE.md 2026-06-27 20:16:08 +00:00
jmiller 9e19ca58c1 feat: initial scaffold 2026-06-27 19:57:21 +00:00
53 changed files with 1195 additions and 2 deletions
+8
View File
@@ -0,0 +1,8 @@
*.min.css
*.min.js
node_modules/
.claude/
.mcp.json
TODO.md
*.zip
*.tar.gz
+21
View File
@@ -0,0 +1,21 @@
<!--
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<!--
INGROUP: MokoSuiteResto.Documentation
BRIEF: Version history using Keep a Changelog
-->
# Changelog
## [Unreleased]
### Added
- **Repository** -- initial repo creation with scaffolding
- **System Plugin** -- Extension class, service provider
- **SQL Schema** -- 8 tables: menus, menu_items, tables, reservations, orders, order_items, inventory, inventory_transactions
- **Admin Component** -- 7 views: dashboard, menus, menu items, tables, reservations, orders, inventory
- **Webservices Plugin** -- 7 API routes: menus, menuitems, tables, reservations, orders, inventory, inventory-transactions
- **Configuration** -- settings across basic, ordering, reservations, kitchen
- **Access Control** -- permissions for granular role-based access
+31
View File
@@ -0,0 +1,31 @@
# MokoSuiteResto
Menu management, table reservations, online ordering, kitchen display, and inventory for Joomla 6.
## Quick Reference
| Field | Value |
|---|---|
| **Package** | `pkg_mokosuiteresto` |
| **Layer** | 2 (requires: Client, CRM) |
| **Language** | PHP 8.3+ |
| **Branch** | develop on `dev`, merge to `main` (protected) |
| **Wiki** | [MokoSuiteResto Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteResto/wiki) |
## Architecture
Joomla **package** -- Layer 2 add-on. CRM contacts as customers, menu management with categories, table reservations, online ordering with kitchen display, and inventory tracking.
## Rules
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
- **Attribution**: `Authored-by: Moko Consulting`
- **Workflow directory**: `.mokogitea/`
- **Standards**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/wiki)
- **Changelog**: `[Unreleased]` only -- release system assigns versions
## Coding Standards
- PHP 8.3+ / Joomla 6 patterns
- `$this->getDatabase()` in models, `Factory::getContainer()->get(DatabaseInterface::class)` in helpers
- `Factory::getApplication()->getIdentity()` for user
+42 -2
View File
@@ -1,3 +1,43 @@
# MokoSuiteResto
<!--
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
SPDX-License-Identifier: GPL-3.0-or-later
-->
MokoSuite Resto — restaurant menus, reservations, ordering, kitchen display, inventory for Joomla 6
# MokoSuite Resto
Menu management, table reservations, online ordering, kitchen display, and inventory module for MokoSuite on Joomla 6.
## Overview
MokoSuiteResto is a Layer 2 module in the MokoSuite platform, building on MokoSuiteClient (Layer 0) and MokoSuiteCRM (Layer 1) to provide complete restaurant operations management.
## Features
- **Menu Management** -- menus with categories, items, pricing, allergens, dietary tags
- **Table Management** -- sections, capacity tracking, real-time status
- **Reservations** -- party size, time slots, auto-confirm, special requests
- **Online Ordering** -- dine-in, takeout, delivery, and catering order types
- **Kitchen Display** -- order status tracking from pending to served
- **Inventory** -- stock tracking with minimum levels, supplier info, expiry dates
- **Inventory Transactions** -- received, used, wasted, adjusted, returned tracking
## Requirements
- Joomla 6.x
- PHP 8.3+
- MokoSuiteClient (Layer 0)
- MokoSuiteCRM (Layer 1)
## Installation
Install via Joomla Extension Manager using the package file `pkg_mokosuiteresto.zip`.
## License
GNU General Public License v3.0 or later -- see [LICENSE](LICENSE).
## Links
- [Documentation](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteResto/wiki)
- [Issues](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteResto/issues)
- [MokoSuite Platform](https://mokoconsulting.tech)
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<access component="com_mokosuiteresto">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" />
<action name="core.options" title="JACTION_OPTIONS" />
<action name="core.manage" title="JACTION_MANAGE" />
<action name="core.create" title="JACTION_CREATE" />
<action name="core.delete" title="JACTION_DELETE" />
<action name="core.edit" title="JACTION_EDIT" />
<action name="core.edit.state" title="JACTION_EDITSTATE" />
<action name="resto.menus.manage" title="COM_MOKOSUITERESTO_ACTION_MENUS_MANAGE" />
<action name="resto.reservations.manage" title="COM_MOKOSUITERESTO_ACTION_RESERVATIONS_MANAGE" />
<action name="resto.orders.manage" title="COM_MOKOSUITERESTO_ACTION_ORDERS_MANAGE" />
<action name="resto.inventory.manage" title="COM_MOKOSUITERESTO_ACTION_INVENTORY_MANAGE" />
<action name="resto.shifts.manage" title="COM_MOKOSUITERESTO_ACTION_SHIFTS_MANAGE" />
<action name="resto.reports" title="COM_MOKOSUITERESTO_ACTION_REPORTS" />
<action name="resto.settings" title="COM_MOKOSUITERESTO_ACTION_SETTINGS" />
</section>
</access>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<config>
<fieldset name="component" label="COM_MOKOSUITERESTO">
<field name="note" type="note" label="COM_MOKOSUITERESTO_CONFIG_NOTE" description="COM_MOKOSUITERESTO_CONFIG_NOTE_DESC" class="alert alert-info" />
</fieldset>
</config>
@@ -0,0 +1,19 @@
COM_MOKOSUITERESTO="MokoSuite Resto"
COM_MOKOSUITERESTO_DESC="Restaurant operations: menu, reservations, and order management"
COM_MOKOSUITERESTO_SUBMENU_DASHBOARD="Dashboard"
COM_MOKOSUITERESTO_SUBMENU_MENUS="Menus"
COM_MOKOSUITERESTO_SUBMENU_ITEMS="Menu Items"
COM_MOKOSUITERESTO_SUBMENU_TABLES="Tables"
COM_MOKOSUITERESTO_SUBMENU_RESERVATIONS="Reservations"
COM_MOKOSUITERESTO_SUBMENU_ORDERS="Orders"
COM_MOKOSUITERESTO_SUBMENU_INVENTORY="Inventory"
COM_MOKOSUITERESTO_SUBMENU_SHIFTS="Staff Shifts"
COM_MOKOSUITERESTO_CONFIG_NOTE="Component settings are managed via the System - MokoSuite Resto plugin parameters."
COM_MOKOSUITERESTO_CONFIG_NOTE_DESC="Open the plugin options to configure restaurant settings."
COM_MOKOSUITERESTO_ACTION_MENUS_MANAGE="Manage Menus"
COM_MOKOSUITERESTO_ACTION_RESERVATIONS_MANAGE="Manage Reservations"
COM_MOKOSUITERESTO_ACTION_ORDERS_MANAGE="Manage Orders"
COM_MOKOSUITERESTO_ACTION_INVENTORY_MANAGE="Manage Inventory"
COM_MOKOSUITERESTO_ACTION_SHIFTS_MANAGE="Manage Staff Shifts"
COM_MOKOSUITERESTO_ACTION_REPORTS="View Reports"
COM_MOKOSUITERESTO_ACTION_SETTINGS="Manage Settings"
@@ -0,0 +1,10 @@
COM_MOKOSUITERESTO="MokoSuite Resto"
COM_MOKOSUITERESTO_DESC="Restaurant operations: menu, reservations, and order management"
COM_MOKOSUITERESTO_SUBMENU_DASHBOARD="Dashboard"
COM_MOKOSUITERESTO_SUBMENU_MENUS="Menus"
COM_MOKOSUITERESTO_SUBMENU_ITEMS="Menu Items"
COM_MOKOSUITERESTO_SUBMENU_TABLES="Tables"
COM_MOKOSUITERESTO_SUBMENU_RESERVATIONS="Reservations"
COM_MOKOSUITERESTO_SUBMENU_ORDERS="Orders"
COM_MOKOSUITERESTO_SUBMENU_INVENTORY="Inventory"
COM_MOKOSUITERESTO_SUBMENU_SHIFTS="Staff Shifts"
@@ -0,0 +1,39 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
use Joomla\CMS\Extension\Service\Provider\RouterFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Component\Router\RouterFactoryInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
return new class implements ServiceProviderInterface
{
public function register(Container $container): void
{
$container->registerServiceProvider(new MVCFactory('\\Moko\\Component\\MokoSuiteResto'));
$container->registerServiceProvider(new ComponentDispatcherFactory('\\Moko\\Component\\MokoSuiteResto'));
$container->registerServiceProvider(new RouterFactory('\\Moko\\Component\\MokoSuiteResto'));
$container->set(
ComponentInterface::class,
function (Container $container) {
$component = new \Joomla\CMS\Extension\MVCComponent();
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
$component->setRouterFactory($container->get(RouterFactoryInterface::class));
return $component;
}
);
}
};
@@ -0,0 +1,18 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\Controller\BaseController;
class DisplayController extends BaseController
{
protected $default_view = 'restodashboard';
}
@@ -0,0 +1,17 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\Model;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
class RestoDashboardModel extends BaseDatabaseModel
{
}
@@ -0,0 +1,23 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\Inventory;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Inventory');
parent::display($tpl);
}
}
@@ -0,0 +1,23 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\MenuItems;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Menu Items');
parent::display($tpl);
}
}
@@ -0,0 +1,23 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\Menus;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Menus');
parent::display($tpl);
}
}
@@ -0,0 +1,23 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\Orders;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Orders');
parent::display($tpl);
}
}
@@ -0,0 +1,23 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\Reservations;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Reservations');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoDashboard;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Dashboard');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoInventory;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Inventory');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoItems;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Menu Items');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,21 @@
<?php
/**
* @copyright (C) 2026 Moko Consulting
* @license GPL-3.0-or-later
*/
namespace MokoConsulting\Component\MokoSuiteResto\Administrator\View\RestoMenuItems;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('Menu Items', 'generic');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoMenus;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Menus');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoOrders;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Orders');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoReservations;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Reservations');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoShifts;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Staff Shifts');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\RestoTables;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Tables');
ToolbarHelper::preferences('com_mokosuiteresto');
parent::display($tpl);
}
}
@@ -0,0 +1,23 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Component\MokoSuiteResto\Administrator\View\Tables;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
ToolbarHelper::title('MokoSuite Resto - Tables');
parent::display($tpl);
}
}
@@ -0,0 +1 @@
<?php defined('_JEXEC') or die; ?><div><h2>Inventory</h2><p>Coming soon.</p></div>
@@ -0,0 +1 @@
<?php defined('_JEXEC') or die; ?><div><h2>Menu Items</h2><p>Coming soon.</p></div>
@@ -0,0 +1 @@
<?php defined('_JEXEC') or die; ?><div><h2>Menus</h2><p>Coming soon.</p></div>
@@ -0,0 +1 @@
<?php defined('_JEXEC') or die; ?><div><h2>Orders</h2><p>Coming soon.</p></div>
@@ -0,0 +1 @@
<?php defined('_JEXEC') or die; ?><div><h2>Reservations</h2><p>Coming soon.</p></div>
@@ -0,0 +1,19 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<p class="text-muted">View stub — implement list layout.</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1,15 @@
<?php
/**
* @copyright (C) 2026 Moko Consulting
* @license GPL-3.0-or-later
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col-12">
<h2>Inventory</h2>
<p>Manage inventory here.</p>
</div>
</div>
@@ -0,0 +1,19 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<p class="text-muted">View stub — implement list layout.</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1,15 @@
<?php
/**
* @copyright (C) 2026 Moko Consulting
* @license GPL-3.0-or-later
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col-12">
<h2>Menu Items</h2>
<p>Manage menu items here.</p>
</div>
</div>
@@ -0,0 +1,19 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<p class="text-muted">View stub — implement list layout.</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1,19 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<p class="text-muted">View stub — implement list layout.</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1,19 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<p class="text-muted">View stub — implement list layout.</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1,19 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<p class="text-muted">View stub — implement list layout.</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1,19 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
?>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<p class="text-muted">View stub — implement list layout.</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1 @@
<?php defined('_JEXEC') or die; ?><div><h2>Tables</h2><p>Coming soon.</p></div>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" method="upgrade">
<name>com_mokosuiteresto</name>
<author>Moko Consulting</author>
<creationDate>2026-06-27</creationDate>
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>06.00.00</version>
<php_minimum>8.3</php_minimum>
<description>COM_MOKOSUITERESTO_DESC</description>
<namespace path="admin/src">Moko\Component\MokoSuiteResto</namespace>
<administration>
<files folder="admin">
<folder>services</folder>
<folder>src</folder>
<folder>tmpl</folder>
<folder>language</folder>
<filename>access.xml</filename>
<filename>config.xml</filename>
</files>
<menu img="class:default">COM_MOKOSUITERESTO</menu>
<submenu>
<menu link="option=com_mokosuiteresto&amp;view=restodashboard">COM_MOKOSUITERESTO_SUBMENU_DASHBOARD</menu>
<menu link="option=com_mokosuiteresto&amp;view=restomenus">COM_MOKOSUITERESTO_SUBMENU_MENUS</menu>
<menu link="option=com_mokosuiteresto&amp;view=restoitems">COM_MOKOSUITERESTO_SUBMENU_ITEMS</menu>
<menu link="option=com_mokosuiteresto&amp;view=restotables">COM_MOKOSUITERESTO_SUBMENU_TABLES</menu>
<menu link="option=com_mokosuiteresto&amp;view=restoreservations">COM_MOKOSUITERESTO_SUBMENU_RESERVATIONS</menu>
<menu link="option=com_mokosuiteresto&amp;view=restoorders">COM_MOKOSUITERESTO_SUBMENU_ORDERS</menu>
<menu link="option=com_mokosuiteresto&amp;view=restoinventory">COM_MOKOSUITERESTO_SUBMENU_INVENTORY</menu>
<menu link="option=com_mokosuiteresto&amp;view=restoshifts">COM_MOKOSUITERESTO_SUBMENU_SHIFTS</menu>
</submenu>
</administration>
</extension>
@@ -0,0 +1,2 @@
PLG_SYSTEM_MOKOSUITERESTO="System - MokoSuite Resto"
PLG_SYSTEM_MOKOSUITERESTO_DESC="Menu management, table reservations, online ordering, kitchen display, and inventory"
@@ -0,0 +1,2 @@
PLG_SYSTEM_MOKOSUITERESTO="System - MokoSuite Resto"
PLG_SYSTEM_MOKOSUITERESTO_DESC="Menu management, table reservations, online ordering, kitchen display, and inventory"
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" group="system" method="upgrade">
<name>System - MokoSuite Resto</name>
<element>mokosuiteresto</element>
<author>Moko Consulting</author>
<creationDate>2026-06-27</creationDate>
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>06.00.00</version>
<php_minimum>8.3</php_minimum>
<description>PLG_SYSTEM_MOKOSUITERESTO_DESC</description>
<namespace path="src">Moko\Plugin\System\MokoSuiteResto</namespace>
<files>
<folder>src</folder>
<folder>services</folder>
<folder>language</folder>
<folder>sql</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/plg_system_mokosuiteresto.ini</language>
<language tag="en-GB">en-GB/plg_system_mokosuiteresto.sys.ini</language>
</languages>
<install><sql><file driver="mysql" charset="utf8">sql/install.mysql.sql</file></sql></install>
<uninstall><sql><file driver="mysql" charset="utf8">sql/uninstall.mysql.sql</file></sql></uninstall>
<config>
<fields name="params">
<fieldset name="basic" label="Restaurant Defaults">
<field name="restaurant_name" type="text" default="" label="Restaurant Name" />
<field name="default_currency" type="text" default="USD" label="Default Currency" />
<field name="timezone" type="text" default="UTC" label="Operating Timezone" />
<field name="tax_rate" type="number" default="0" step="0.01" label="Tax Rate (%)" />
</fieldset>
<fieldset name="ordering" label="Ordering">
<field name="enable_online_ordering" type="radio" default="1" label="Enable Online Ordering" class="btn-group btn-group-yesno">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="minimum_order_amount" type="number" default="0" step="0.01" label="Minimum Order Amount" />
<field name="prep_time_minutes" type="number" default="30" label="Default Prep Time (min)" />
</fieldset>
<fieldset name="reservations" label="Reservations">
<field name="max_party_size" type="number" default="20" label="Max Party Size" />
<field name="time_slot_minutes" type="number" default="30" label="Time Slot (min)" />
<field name="auto_confirm" type="radio" default="0" label="Auto-Confirm Reservations" class="btn-group btn-group-yesno">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset name="kitchen" label="Kitchen">
<field name="display_refresh_seconds" type="number" default="30" label="Display Refresh (seconds)" />
</fieldset>
</fields>
</config>
</extension>
@@ -0,0 +1,33 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Moko\Plugin\System\MokoSuiteResto\Extension\Resto;
return new class implements ServiceProviderInterface
{
public function register(Container $container): void
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new Resto($dispatcher, (array) PluginHelper::getPlugin('system', 'mokosuiteresto'));
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};
@@ -0,0 +1,158 @@
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_menus` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`description` TEXT,
`menu_type` ENUM('breakfast','lunch','dinner','brunch','drinks','desserts','specials','kids') NOT NULL DEFAULT 'dinner',
`available_from` TIME DEFAULT NULL,
`available_to` TIME DEFAULT NULL,
`published` TINYINT NOT NULL DEFAULT 1,
`ordering` INT NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_menu_items` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`menu_id` INT UNSIGNED NOT NULL,
`name` VARCHAR(255) NOT NULL,
`description` TEXT,
`category` VARCHAR(100) NOT NULL DEFAULT '',
`price` DECIMAL(10,2) NOT NULL,
`calories` SMALLINT UNSIGNED DEFAULT NULL,
`allergens` VARCHAR(500) NOT NULL DEFAULT '',
`dietary_tags` VARCHAR(255) NOT NULL DEFAULT '',
`prep_time_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 15,
`photo` VARCHAR(500) NOT NULL DEFAULT '',
`available` TINYINT NOT NULL DEFAULT 1,
`published` TINYINT NOT NULL DEFAULT 1,
`ordering` INT NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_menu` (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_modifiers` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`menu_item_id` INT UNSIGNED NOT NULL,
`name` VARCHAR(255) NOT NULL,
`modifier_type` ENUM('add_on','size','preparation','sauce','side','substitution') NOT NULL DEFAULT 'add_on',
`price_adjustment` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`ordering` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_item` (`menu_item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_tables` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`table_number` VARCHAR(20) NOT NULL,
`section` VARCHAR(100) NOT NULL DEFAULT '',
`capacity` TINYINT UNSIGNED NOT NULL DEFAULT 4,
`table_type` ENUM('indoor','outdoor','patio','bar','private','booth') NOT NULL DEFAULT 'indoor',
`status` ENUM('available','occupied','reserved','cleaning','closed') NOT NULL DEFAULT 'available',
`published` TINYINT NOT NULL DEFAULT 1,
`ordering` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_reservations` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`reservation_ref` VARCHAR(20) NOT NULL,
`customer_contact_id` INT DEFAULT NULL,
`customer_name` VARCHAR(255) NOT NULL,
`customer_phone` VARCHAR(50) NOT NULL DEFAULT '',
`table_id` INT UNSIGNED DEFAULT NULL,
`party_size` TINYINT UNSIGNED NOT NULL DEFAULT 2,
`reservation_date` DATE NOT NULL,
`reservation_time` TIME NOT NULL,
`duration_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 90,
`status` ENUM('pending','confirmed','seated','completed','cancelled','no_show') NOT NULL DEFAULT 'pending',
`special_requests` TEXT,
`created` DATETIME NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_ref` (`reservation_ref`),
KEY `idx_customer` (`customer_contact_id`),
KEY `idx_date` (`reservation_date`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_orders` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`order_ref` VARCHAR(20) NOT NULL,
`order_type` ENUM('dine_in','takeout','delivery','catering') NOT NULL DEFAULT 'dine_in',
`table_id` INT UNSIGNED DEFAULT NULL,
`customer_name` VARCHAR(255) NOT NULL DEFAULT '',
`status` ENUM('pending','preparing','ready','served','completed','cancelled') NOT NULL DEFAULT 'pending',
`subtotal` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`tax` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`tip` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`total` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`payment_method` ENUM('cash','card','tab','comp') NOT NULL DEFAULT 'card',
`payment_status` ENUM('pending','paid','refunded') NOT NULL DEFAULT 'pending',
`server_name` VARCHAR(255) NOT NULL DEFAULT '',
`notes` TEXT,
`created` DATETIME NOT NULL,
`created_by` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_ref` (`order_ref`),
KEY `idx_table` (`table_id`),
KEY `idx_status` (`status`),
KEY `idx_created` (`created`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_order_items` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`order_id` INT UNSIGNED NOT NULL,
`menu_item_id` INT UNSIGNED NOT NULL,
`quantity` SMALLINT UNSIGNED NOT NULL DEFAULT 1,
`unit_price` DECIMAL(10,2) NOT NULL,
`modifiers` JSON DEFAULT NULL,
`modifiers_price` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`special_instructions` VARCHAR(500) NOT NULL DEFAULT '',
`status` ENUM('pending','preparing','ready','served','cancelled') NOT NULL DEFAULT 'pending',
PRIMARY KEY (`id`),
KEY `idx_order` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_inventory` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`category` ENUM('produce','meat','seafood','dairy','dry_goods','beverages','supplies','other') NOT NULL DEFAULT 'other',
`unit` VARCHAR(50) NOT NULL DEFAULT 'each',
`current_qty` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`reorder_level` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`unit_cost` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`supplier` VARCHAR(255) NOT NULL DEFAULT '',
`created` DATETIME NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_category` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_inventory_transactions` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`inventory_id` INT UNSIGNED NOT NULL,
`transaction_type` ENUM('received','used','waste','adjustment','transfer') NOT NULL DEFAULT 'received',
`quantity` DECIMAL(10,2) NOT NULL,
`unit_cost` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`reference` VARCHAR(255) NOT NULL DEFAULT '',
`created` DATETIME NOT NULL,
`created_by` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_inventory` (`inventory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `#__mokosuiteresto_staff_shifts` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`staff_name` VARCHAR(255) NOT NULL,
`contact_id` INT DEFAULT NULL,
`role` ENUM('server','bartender','host','cook','chef','dishwasher','manager','busser') NOT NULL DEFAULT 'server',
`shift_date` DATE NOT NULL,
`start_time` TIME NOT NULL,
`end_time` TIME NOT NULL,
`status` ENUM('scheduled','active','completed','no_show','cancelled') NOT NULL DEFAULT 'scheduled',
`tips_earned` DECIMAL(10,2) NOT NULL DEFAULT 0.00,
`created` DATETIME NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_date` (`shift_date`),
KEY `idx_role` (`role`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@@ -0,0 +1,10 @@
DROP TABLE IF EXISTS `#__mokosuiteresto_staff_shifts`;
DROP TABLE IF EXISTS `#__mokosuiteresto_inventory_transactions`;
DROP TABLE IF EXISTS `#__mokosuiteresto_inventory`;
DROP TABLE IF EXISTS `#__mokosuiteresto_order_items`;
DROP TABLE IF EXISTS `#__mokosuiteresto_orders`;
DROP TABLE IF EXISTS `#__mokosuiteresto_reservations`;
DROP TABLE IF EXISTS `#__mokosuiteresto_tables`;
DROP TABLE IF EXISTS `#__mokosuiteresto_modifiers`;
DROP TABLE IF EXISTS `#__mokosuiteresto_menu_items`;
DROP TABLE IF EXISTS `#__mokosuiteresto_menus`;
@@ -0,0 +1,24 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Plugin\System\MokoSuiteResto\Extension;
defined('_JEXEC') or die;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Event\SubscriberInterface;
class Resto extends CMSPlugin implements SubscriberInterface
{
protected $autoloadLanguage = true;
public static function getSubscribedEvents(): array
{
return [];
}
}
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" group="webservices" method="upgrade">
<name>Web Services - MokoSuite Resto</name>
<element>mokosuiteresto</element>
<author>Moko Consulting</author>
<creationDate>2026-06-27</creationDate>
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
<license>GPL-3.0-or-later</license>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl>
<version>06.00.00</version>
<php_minimum>8.3</php_minimum>
<description>PLG_WEBSERVICES_MOKOSUITERESTO_DESC</description>
<namespace path="src">Moko\Plugin\WebServices\MokoSuiteResto</namespace>
<files>
<folder>src</folder>
<folder>services</folder>
</files>
</extension>
@@ -0,0 +1,33 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
defined('_JEXEC') or die;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Moko\Plugin\WebServices\MokoSuiteResto\Extension\MokoSuiteResto;
return new class implements ServiceProviderInterface
{
public function register(Container $container): void
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new MokoSuiteResto($dispatcher, (array) PluginHelper::getPlugin('webservices', 'mokosuiteresto'));
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};
@@ -0,0 +1,35 @@
<?php
/**
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Authored-by: Moko Consulting
*/
namespace Moko\Plugin\WebServices\MokoSuiteResto\Extension;
defined('_JEXEC') or die;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Event\SubscriberInterface;
class MokoSuiteResto extends CMSPlugin implements SubscriberInterface
{
public static function getSubscribedEvents(): array
{
return ['onBeforeApiRoute' => 'onBeforeApiRoute'];
}
public function onBeforeApiRoute(&$event): void
{
$router = $event->getArgument('router');
$opts = ['component' => 'com_mokosuiteresto'];
$router->createCRUDRoutes('v1/mokosuiteresto/menus', 'menus', $opts);
$router->createCRUDRoutes('v1/mokosuiteresto/items', 'items', $opts);
$router->createCRUDRoutes('v1/mokosuiteresto/tables', 'tables', $opts);
$router->createCRUDRoutes('v1/mokosuiteresto/reservations', 'reservations', $opts);
$router->createCRUDRoutes('v1/mokosuiteresto/orders', 'orders', $opts);
$router->createCRUDRoutes('v1/mokosuiteresto/inventory', 'inventory', $opts);
}
}
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="package" method="upgrade">
<name>Package - MokoSuite Resto</name>
<packagename>mokosuiteresto</packagename>
<version>06.00.00</version>
<creationDate>2026-06-27</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
<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>Menu management, table reservations, online ordering, kitchen display, and inventory</description>
<php_minimum>8.3</php_minimum>
<dlid prefix="dlid=" suffix=""/>
<blockChildUninstall>true</blockChildUninstall>
<files folder="packages">
<file type="plugin" id="plg_system_mokosuiteresto" group="system">plg_system_mokosuiteresto.zip</file>
</files>
<updateservers>
<server type="extension" priority="1" name="Package - MokoSuite Resto">https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteResto/updates.xml</server>
</updateservers>
</extension>