From 1c5cd4007fc67b5eec392a27ee208314619bab82 Mon Sep 17 00:00:00 2001 From: Moko Consulting Date: Sat, 27 Jun 2026 15:35:18 -0500 Subject: [PATCH] feat: initial scaffold --- CHANGELOG.md | 24 +-- CLAUDE.md | 9 +- README.md | 41 ++--- source/com_mokosuitebooking/admin/access.xml | 17 -- source/com_mokosuitebooking/admin/config.xml | 19 --- .../language/en-GB/com_mokosuitebooking.ini | 14 -- .../en-GB/com_mokosuitebooking.sys.ini | 14 -- .../admin/services/provider.php | 41 ----- .../src/Controller/DisplayController.php | 17 -- .../src/View/BookingBookings/HtmlView.php | 23 --- .../src/View/BookingDashboard/HtmlView.php | 23 --- .../src/View/BookingLocations/HtmlView.php | 23 --- .../src/View/BookingSchedules/HtmlView.php | 23 --- .../src/View/BookingServices/HtmlView.php | 23 --- .../admin/src/View/BookingStaff/HtmlView.php | 23 --- .../src/View/BookingWaitlist/HtmlView.php | 23 --- .../admin/tmpl/bookingbookings/default.php | 12 -- .../admin/tmpl/bookingdashboard/default.php | 12 -- .../admin/tmpl/bookinglocations/default.php | 12 -- .../admin/tmpl/bookingschedules/default.php | 12 -- .../admin/tmpl/bookingservices/default.php | 12 -- .../admin/tmpl/bookingstaff/default.php | 12 -- .../admin/tmpl/bookingwaitlist/default.php | 12 -- .../com_mokosuitebooking/mokosuitebooking.xml | 39 ----- .../com_mokosuitebooking/admin/access.xml | 12 +- .../com_mokosuitebooking/admin/config.xml | 7 +- .../language/en-GB/com_mokosuitebooking.ini | 23 +-- .../en-GB/com_mokosuitebooking.sys.ini | 13 +- .../admin/services/provider.php | 26 +-- .../src/Controller/DisplayController.php | 4 +- .../admin/src/Model/BookingDashboardModel.php | 17 -- .../src/View/BookingDashboard/HtmlView.php | 7 +- .../src/View/BookingLocations/HtmlView.php | 23 --- .../{BookingStaff => Bookings}/HtmlView.php | 7 +- .../HtmlView.php | 7 +- .../HtmlView.php | 7 +- .../HtmlView.php | 7 +- .../admin/src/View/Staff/HtmlView.php | 24 +++ .../admin/src/View/Waitlist/HtmlView.php | 24 +++ .../admin/tmpl/bookingdashboard/default.php | 4 + .../{bookingbookings => bookings}/default.php | 4 + .../default.php | 4 + .../default.php | 4 + .../{bookingservices => services}/default.php | 4 + .../tmpl/{bookingstaff => staff}/default.php | 4 + .../admin/tmpl/waitlist/default.php | 15 ++ .../com_mokosuitebooking/mokosuitebooking.xml | 63 ++++---- .../en-GB/plg_system_mokosuitebooking.ini | 24 ++- .../en-GB/plg_system_mokosuitebooking.sys.ini | 6 +- .../mokosuitebooking.xml | 70 ++++---- .../services/provider.php | 24 +-- .../sql/install.mysql.sql | 153 ++++++++---------- .../sql/uninstall.mysql.sql | 10 +- .../src/Extension/Booking.php | 4 +- .../mokosuitebooking.xml | 30 ++-- .../services/provider.php | 24 ++- .../src/Extension/MokoSuiteBooking.php | 23 +-- source/pkg_mokosuitebooking.xml | 21 ++- .../en-GB/plg_system_mokosuitebooking.ini | 26 --- .../en-GB/plg_system_mokosuitebooking.sys.ini | 6 - .../mokosuitebooking.xml | 139 ---------------- .../services/provider.php | 35 ---- .../sql/install.mysql.sql | 138 ---------------- .../sql/uninstall.mysql.sql | 12 -- .../src/Extension/Booking.php | 23 --- .../plg_webservices_mokosuitebooking.ini | 6 - .../plg_webservices_mokosuitebooking.sys.ini | 6 - .../mokosuitebooking.xml | 28 ---- .../services/provider.php | 35 ---- .../src/Extension/MokoSuiteBooking.php | 46 ------ 70 files changed, 410 insertions(+), 1269 deletions(-) delete mode 100644 source/com_mokosuitebooking/admin/access.xml delete mode 100644 source/com_mokosuitebooking/admin/config.xml delete mode 100644 source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini delete mode 100644 source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini delete mode 100644 source/com_mokosuitebooking/admin/services/provider.php delete mode 100644 source/com_mokosuitebooking/admin/src/Controller/DisplayController.php delete mode 100644 source/com_mokosuitebooking/admin/src/View/BookingBookings/HtmlView.php delete mode 100644 source/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php delete mode 100644 source/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php delete mode 100644 source/com_mokosuitebooking/admin/src/View/BookingSchedules/HtmlView.php delete mode 100644 source/com_mokosuitebooking/admin/src/View/BookingServices/HtmlView.php delete mode 100644 source/com_mokosuitebooking/admin/src/View/BookingStaff/HtmlView.php delete mode 100644 source/com_mokosuitebooking/admin/src/View/BookingWaitlist/HtmlView.php delete mode 100644 source/com_mokosuitebooking/admin/tmpl/bookingbookings/default.php delete mode 100644 source/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php delete mode 100644 source/com_mokosuitebooking/admin/tmpl/bookinglocations/default.php delete mode 100644 source/com_mokosuitebooking/admin/tmpl/bookingschedules/default.php delete mode 100644 source/com_mokosuitebooking/admin/tmpl/bookingservices/default.php delete mode 100644 source/com_mokosuitebooking/admin/tmpl/bookingstaff/default.php delete mode 100644 source/com_mokosuitebooking/admin/tmpl/bookingwaitlist/default.php delete mode 100644 source/com_mokosuitebooking/mokosuitebooking.xml delete mode 100644 source/packages/com_mokosuitebooking/admin/src/Model/BookingDashboardModel.php delete mode 100644 source/packages/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php rename source/packages/com_mokosuitebooking/admin/src/View/{BookingStaff => Bookings}/HtmlView.php (74%) rename source/packages/com_mokosuitebooking/admin/src/View/{BookingBookings => Locations}/HtmlView.php (74%) rename source/packages/com_mokosuitebooking/admin/src/View/{BookingServices => Schedules}/HtmlView.php (74%) rename source/packages/com_mokosuitebooking/admin/src/View/{BookingSchedules => Services}/HtmlView.php (73%) create mode 100644 source/packages/com_mokosuitebooking/admin/src/View/Staff/HtmlView.php create mode 100644 source/packages/com_mokosuitebooking/admin/src/View/Waitlist/HtmlView.php rename source/packages/com_mokosuitebooking/admin/tmpl/{bookingbookings => bookings}/default.php (86%) rename source/packages/com_mokosuitebooking/admin/tmpl/{bookinglocations => locations}/default.php (86%) rename source/packages/com_mokosuitebooking/admin/tmpl/{bookingschedules => schedules}/default.php (86%) rename source/packages/com_mokosuitebooking/admin/tmpl/{bookingservices => services}/default.php (86%) rename source/packages/com_mokosuitebooking/admin/tmpl/{bookingstaff => staff}/default.php (86%) create mode 100644 source/packages/com_mokosuitebooking/admin/tmpl/waitlist/default.php delete mode 100644 source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini delete mode 100644 source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini delete mode 100644 source/plg_system_mokosuitebooking/mokosuitebooking.xml delete mode 100644 source/plg_system_mokosuitebooking/services/provider.php delete mode 100644 source/plg_system_mokosuitebooking/sql/install.mysql.sql delete mode 100644 source/plg_system_mokosuitebooking/sql/uninstall.mysql.sql delete mode 100644 source/plg_system_mokosuitebooking/src/Extension/Booking.php delete mode 100644 source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.ini delete mode 100644 source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.sys.ini delete mode 100644 source/plg_webservices_mokosuitebooking/mokosuitebooking.xml delete mode 100644 source/plg_webservices_mokosuitebooking/services/provider.php delete mode 100644 source/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php diff --git a/CHANGELOG.md b/CHANGELOG.md index e8b6077..9743b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,21 @@ # Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/). + ## [Unreleased] ### Added -- **Repository** -- initial scaffold -- **System Plugin** -- Extension class, service provider -- **SQL Schema** -- 8 tables: locations, services, staff, schedules, availability_overrides, bookings, booking_services, waitlist -- **Admin Component** -- 6 views: dashboard, bookings, services, staff, schedules, locations -- **Webservices Plugin** -- 7 API routes -- **Configuration** -- plugin settings across 4 fieldsets -- **Access Control** -- granular permissions \ No newline at end of file + +- **Repository** -- initial scaffold for MokoSuiteBooking +- **System Plugin** (`plg_system_mokosuitebooking`) -- configuration and schema management +- **SQL Schema** -- services, staff, staff_services, schedules, bookings, locations, waitlist, booking_history tables +- **Admin Component** (`com_mokosuitebooking`) -- Dashboard, Services, Staff, Schedules, Bookings, Locations, Waitlist views +- **Webservices Plugin** (`plg_webservices_mokosuitebooking`) -- REST API route stubs +- **Configuration** -- basic, booking, notifications, display fieldsets diff --git a/CLAUDE.md b/CLAUDE.md index c3d59f0..9358ce0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ -# MokoSuitebooking +# MokoSuiteBooking -Appointment and resource booking for service businesses for Joomla 6. +Appointment and resource booking for service businesses ## Quick Reference @@ -10,10 +10,11 @@ Appointment and resource booking for service businesses for Joomla 6. | **Layer** | 2 (requires: Client, CRM) | | **Language** | PHP 8.3+ | | **Branch** | develop on `dev`, merge to `main` (protected) | +| **Wiki** | [MokoSuiteBooking Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBooking/wiki) | ## Architecture -Joomla **package** -- Layer 2 add-on. CRM contacts as clients, service catalog with staff scheduling and online booking. +Joomla **package** -- Layer 2 add-on. Manages services, staff, schedules, bookings, locations, and waitlist. ## Rules @@ -27,4 +28,4 @@ Joomla **package** -- Layer 2 add-on. CRM contacts as clients, service catalog w - PHP 8.3+ / Joomla 6 patterns - `$this->getDatabase()` in models, `Factory::getContainer()->get(DatabaseInterface::class)` in helpers -- `Factory::getApplication()->getIdentity()` for user \ No newline at end of file +- `Factory::getApplication()->getIdentity()` for user diff --git a/README.md b/README.md index 73b9b27..457db93 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,32 @@ - +# MokoSuiteBooking -# MokoSuite booking - -Appointment and resource booking for service businesses for MokoSuite on Joomla 6. +Appointment and resource booking for service businesses for Joomla 6. ## Overview -MokoSuitebooking is a **Layer 2** extension in the MokoSuite platform, building on MokoSuiteClient (Layer 0) and MokoSuiteCRM (Layer 1). - -## Features - -- **Service Catalog** -- services with duration, pricing, staff assignment -- **Online Booking** -- real-time availability with booking widget -- **Staff Scheduling** -- recurring availability patterns with overrides -- **Multi-Location** -- support for multiple business locations -- **Walk-In Queue** -- walk-in queue management -- **Client History** -- CRM contact-linked visit frequency and spend tracking -- **Waitlist** -- automated notification when slots open -- **REST API** -- full CRUD for services, staff, bookings, schedules, locations -- **Access Control** -- granular permissions +MokoSuiteBooking provides appointment scheduling, staff management, calendar schedules, booking lifecycle, multi-location support, and waitlist functionality as a Layer 2 MokoSuite extension. ## Requirements -- Joomla 6.x +- Joomla 6+ - PHP 8.3+ -- MokoSuiteClient (Layer 0) +- MokoSuiteClient (Layer 1) - MokoSuiteCRM (Layer 1) ## Installation -Install via Joomla Extension Manager using the package file `pkg_mokosuitebooking.zip`. +Install via the Joomla extension manager. The package includes: + +- **System Plugin** (`plg_system_mokosuitebooking`) -- database schema and configuration +- **Component** (`com_mokosuitebooking`) -- admin interface +- **Webservices Plugin** (`plg_webservices_mokosuitebooking`) -- REST API routes ## License -GNU General Public License v3.0 or later. +GPL-3.0-or-later ## Links -- [Documentation](https://git.mokoconsulting.tech/MokoConsulting/MokoSuitebooking/wiki) -- [Issues](https://git.mokoconsulting.tech/MokoConsulting/MokoSuitebooking/issues) -- [MokoSuite Platform](https://mokoconsulting.tech) \ No newline at end of file +- [Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBooking/wiki) +- [Issues](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBooking/issues) +- [MokoSuite](https://mokoconsulting.tech) diff --git a/source/com_mokosuitebooking/admin/access.xml b/source/com_mokosuitebooking/admin/access.xml deleted file mode 100644 index 0f104e1..0000000 --- a/source/com_mokosuitebooking/admin/access.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - -
- - - - - - - -
-
diff --git a/source/com_mokosuitebooking/admin/config.xml b/source/com_mokosuitebooking/admin/config.xml deleted file mode 100644 index 41f3166..0000000 --- a/source/com_mokosuitebooking/admin/config.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - -
- -
-
diff --git a/source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini b/source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini deleted file mode 100644 index 15bc705..0000000 --- a/source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini +++ /dev/null @@ -1,14 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; Authored-by: Moko Consulting - -COM_MOKOSUITEBOOKING="MokoSuiteBooking" -COM_MOKOSUITEBOOKING_DESCRIPTION="Appointment and resource booking for service businesses." - -COM_MOKOSUITEBOOKING_MENU_DASHBOARD="Dashboard" -COM_MOKOSUITEBOOKING_MENU_BOOKINGS="Bookings" -COM_MOKOSUITEBOOKING_MENU_SERVICES="Services" -COM_MOKOSUITEBOOKING_MENU_STAFF="Staff" -COM_MOKOSUITEBOOKING_MENU_SCHEDULES="Schedules" -COM_MOKOSUITEBOOKING_MENU_LOCATIONS="Locations" -COM_MOKOSUITEBOOKING_MENU_WAITLIST="Waitlist" diff --git a/source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini b/source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini deleted file mode 100644 index 15bc705..0000000 --- a/source/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini +++ /dev/null @@ -1,14 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; Authored-by: Moko Consulting - -COM_MOKOSUITEBOOKING="MokoSuiteBooking" -COM_MOKOSUITEBOOKING_DESCRIPTION="Appointment and resource booking for service businesses." - -COM_MOKOSUITEBOOKING_MENU_DASHBOARD="Dashboard" -COM_MOKOSUITEBOOKING_MENU_BOOKINGS="Bookings" -COM_MOKOSUITEBOOKING_MENU_SERVICES="Services" -COM_MOKOSUITEBOOKING_MENU_STAFF="Staff" -COM_MOKOSUITEBOOKING_MENU_SCHEDULES="Schedules" -COM_MOKOSUITEBOOKING_MENU_LOCATIONS="Locations" -COM_MOKOSUITEBOOKING_MENU_WAITLIST="Waitlist" diff --git a/source/com_mokosuitebooking/admin/services/provider.php b/source/com_mokosuitebooking/admin/services/provider.php deleted file mode 100644 index 81c4927..0000000 --- a/source/com_mokosuitebooking/admin/services/provider.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -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\HTML\Registry; -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 ComponentDispatcherFactory('\\Moko\\Component\\MokoSuiteBooking')); - $container->registerServiceProvider(new MVCFactory('\\Moko\\Component\\MokoSuiteBooking')); - $container->registerServiceProvider(new RouterFactory('\\Moko\\Component\\MokoSuiteBooking')); - - $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)); - $component->setRegistry($container->get(Registry::class)); - $component->setDispatcherFactory($container->get(ComponentDispatcherFactoryInterface::class)); - - return $component; - } - ); - } -}; diff --git a/source/com_mokosuitebooking/admin/src/Controller/DisplayController.php b/source/com_mokosuitebooking/admin/src/Controller/DisplayController.php deleted file mode 100644 index 58261e9..0000000 --- a/source/com_mokosuitebooking/admin/src/Controller/DisplayController.php +++ /dev/null @@ -1,17 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\Controller; - -defined('_JEXEC') or die; - -use Joomla\CMS\MVC\Controller\BaseController; - -class DisplayController extends BaseController -{ - protected $default_view = 'bookingdashboard'; -} diff --git a/source/com_mokosuitebooking/admin/src/View/BookingBookings/HtmlView.php b/source/com_mokosuitebooking/admin/src/View/BookingBookings/HtmlView.php deleted file mode 100644 index 7fbe05b..0000000 --- a/source/com_mokosuitebooking/admin/src/View/BookingBookings/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingBookings; - -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('MokoSuiteBooking: Bookings', 'calendar'); - - parent::display($tpl); - } -} diff --git a/source/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php b/source/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php deleted file mode 100644 index 228c366..0000000 --- a/source/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingDashboard; - -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('MokoSuiteBooking: Dashboard', 'calendar'); - - parent::display($tpl); - } -} diff --git a/source/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php b/source/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php deleted file mode 100644 index cf9b450..0000000 --- a/source/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingLocations; - -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('MokoSuiteBooking: Locations', 'location'); - - parent::display($tpl); - } -} diff --git a/source/com_mokosuitebooking/admin/src/View/BookingSchedules/HtmlView.php b/source/com_mokosuitebooking/admin/src/View/BookingSchedules/HtmlView.php deleted file mode 100644 index 58abb59..0000000 --- a/source/com_mokosuitebooking/admin/src/View/BookingSchedules/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingSchedules; - -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('MokoSuiteBooking: Schedules', 'clock'); - - parent::display($tpl); - } -} diff --git a/source/com_mokosuitebooking/admin/src/View/BookingServices/HtmlView.php b/source/com_mokosuitebooking/admin/src/View/BookingServices/HtmlView.php deleted file mode 100644 index 0af820e..0000000 --- a/source/com_mokosuitebooking/admin/src/View/BookingServices/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingServices; - -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('MokoSuiteBooking: Services', 'list'); - - parent::display($tpl); - } -} diff --git a/source/com_mokosuitebooking/admin/src/View/BookingStaff/HtmlView.php b/source/com_mokosuitebooking/admin/src/View/BookingStaff/HtmlView.php deleted file mode 100644 index df606a3..0000000 --- a/source/com_mokosuitebooking/admin/src/View/BookingStaff/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingStaff; - -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('MokoSuiteBooking: Staff', 'users'); - - parent::display($tpl); - } -} diff --git a/source/com_mokosuitebooking/admin/src/View/BookingWaitlist/HtmlView.php b/source/com_mokosuitebooking/admin/src/View/BookingWaitlist/HtmlView.php deleted file mode 100644 index 524bdbf..0000000 --- a/source/com_mokosuitebooking/admin/src/View/BookingWaitlist/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingWaitlist; - -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('MokoSuiteBooking: Waitlist', 'list'); - - parent::display($tpl); - } -} diff --git a/source/com_mokosuitebooking/admin/tmpl/bookingbookings/default.php b/source/com_mokosuitebooking/admin/tmpl/bookingbookings/default.php deleted file mode 100644 index d46253c..0000000 --- a/source/com_mokosuitebooking/admin/tmpl/bookingbookings/default.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -defined('_JEXEC') or die; -?> -
-

Bookings

-
diff --git a/source/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php b/source/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php deleted file mode 100644 index 95fd72d..0000000 --- a/source/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -defined('_JEXEC') or die; -?> -
-

MokoSuiteBooking Dashboard

-
diff --git a/source/com_mokosuitebooking/admin/tmpl/bookinglocations/default.php b/source/com_mokosuitebooking/admin/tmpl/bookinglocations/default.php deleted file mode 100644 index 22216f9..0000000 --- a/source/com_mokosuitebooking/admin/tmpl/bookinglocations/default.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -defined('_JEXEC') or die; -?> -
-

Locations

-
diff --git a/source/com_mokosuitebooking/admin/tmpl/bookingschedules/default.php b/source/com_mokosuitebooking/admin/tmpl/bookingschedules/default.php deleted file mode 100644 index 6d70ab4..0000000 --- a/source/com_mokosuitebooking/admin/tmpl/bookingschedules/default.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -defined('_JEXEC') or die; -?> -
-

Schedules

-
diff --git a/source/com_mokosuitebooking/admin/tmpl/bookingservices/default.php b/source/com_mokosuitebooking/admin/tmpl/bookingservices/default.php deleted file mode 100644 index 1a4b479..0000000 --- a/source/com_mokosuitebooking/admin/tmpl/bookingservices/default.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -defined('_JEXEC') or die; -?> -
-

Services

-
diff --git a/source/com_mokosuitebooking/admin/tmpl/bookingstaff/default.php b/source/com_mokosuitebooking/admin/tmpl/bookingstaff/default.php deleted file mode 100644 index c1d3b8f..0000000 --- a/source/com_mokosuitebooking/admin/tmpl/bookingstaff/default.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -defined('_JEXEC') or die; -?> -
-

Staff

-
diff --git a/source/com_mokosuitebooking/admin/tmpl/bookingwaitlist/default.php b/source/com_mokosuitebooking/admin/tmpl/bookingwaitlist/default.php deleted file mode 100644 index a633ec7..0000000 --- a/source/com_mokosuitebooking/admin/tmpl/bookingwaitlist/default.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -defined('_JEXEC') or die; -?> -
-

Waitlist

-
diff --git a/source/com_mokosuitebooking/mokosuitebooking.xml b/source/com_mokosuitebooking/mokosuitebooking.xml deleted file mode 100644 index 88fd55c..0000000 --- a/source/com_mokosuitebooking/mokosuitebooking.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - com_mokosuitebooking - 0.0.1 - 2026-06-27 - Moko Consulting - hello@mokoconsulting.tech - https://mokoconsulting.tech - Copyright (C) 2026 Moko Consulting - GPL-3.0-or-later - COM_MOKOSUITEBOOKING_DESCRIPTION - Moko\Component\MokoSuiteBooking - - - COM_MOKOSUITEBOOKING - - COM_MOKOSUITEBOOKING_MENU_DASHBOARD - COM_MOKOSUITEBOOKING_MENU_BOOKINGS - COM_MOKOSUITEBOOKING_MENU_SERVICES - COM_MOKOSUITEBOOKING_MENU_STAFF - COM_MOKOSUITEBOOKING_MENU_SCHEDULES - COM_MOKOSUITEBOOKING_MENU_LOCATIONS - COM_MOKOSUITEBOOKING_MENU_WAITLIST - - - language - services - src - tmpl - access.xml - config.xml - - - diff --git a/source/packages/com_mokosuitebooking/admin/access.xml b/source/packages/com_mokosuitebooking/admin/access.xml index 3b7b618..e89cc75 100644 --- a/source/packages/com_mokosuitebooking/admin/access.xml +++ b/source/packages/com_mokosuitebooking/admin/access.xml @@ -2,16 +2,14 @@
- - - - - - + + + +
-
\ No newline at end of file + diff --git a/source/packages/com_mokosuitebooking/admin/config.xml b/source/packages/com_mokosuitebooking/admin/config.xml index 4cf87ad..b4eb91b 100644 --- a/source/packages/com_mokosuitebooking/admin/config.xml +++ b/source/packages/com_mokosuitebooking/admin/config.xml @@ -1,6 +1,7 @@ -
- +
- \ No newline at end of file + diff --git a/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini b/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini index 13443bb..d3ee9e4 100644 --- a/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini +++ b/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.ini @@ -1,9 +1,14 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -COM_MOKOSUITEBOOKING="MokoSuite Booking" -COM_MOKOSUITEBOOKING_DASHBOARD="Dashboard" -COM_MOKOSUITEBOOKING_BOOKINGS="Bookings" -COM_MOKOSUITEBOOKING_SERVICES="Services" -COM_MOKOSUITEBOOKING_STAFF="Staff" -COM_MOKOSUITEBOOKING_SCHEDULES="Schedules" -COM_MOKOSUITEBOOKING_LOCATIONS="Locations" +COM_MOKOSUITEBOOKING="MokoSuiteBooking" +COM_MOKOSUITEBOOKING_DESCRIPTION="Appointment and resource booking for service businesses" +COM_MOKOSUITEBOOKING_CONFIG_DESCRIPTION="Configuration is managed in the system plugin." +COM_MOKOSUITEBOOKING_MENU_DASHBOARD="Dashboard" +COM_MOKOSUITEBOOKING_MENU_SERVICES="Services" +COM_MOKOSUITEBOOKING_MENU_STAFF="Staff" +COM_MOKOSUITEBOOKING_MENU_SCHEDULES="Schedules" +COM_MOKOSUITEBOOKING_MENU_BOOKINGS="Bookings" +COM_MOKOSUITEBOOKING_MENU_LOCATIONS="Locations" +COM_MOKOSUITEBOOKING_MENU_WAITLIST="Waitlist" +COM_MOKOSUITEBOOKING_ACTION_MANAGE_SERVICES="Manage Services" +COM_MOKOSUITEBOOKING_ACTION_MANAGE_STAFF="Manage Staff" +COM_MOKOSUITEBOOKING_ACTION_MANAGE_BOOKINGS="Manage Bookings" +COM_MOKOSUITEBOOKING_ACTION_VIEW_WAITLIST="View Waitlist" diff --git a/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini b/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini index 8efe74e..f042eff 100644 --- a/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini +++ b/source/packages/com_mokosuitebooking/admin/language/en-GB/com_mokosuitebooking.sys.ini @@ -1,4 +1,9 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -COM_MOKOSUITEBOOKING="MokoSuite Booking" -COM_MOKOSUITEBOOKING_XML_DESCRIPTION="Appointment and resource booking" +COM_MOKOSUITEBOOKING="MokoSuiteBooking" +COM_MOKOSUITEBOOKING_DESCRIPTION="Appointment and resource booking for service businesses" +COM_MOKOSUITEBOOKING_MENU_DASHBOARD="Dashboard" +COM_MOKOSUITEBOOKING_MENU_SERVICES="Services" +COM_MOKOSUITEBOOKING_MENU_STAFF="Staff" +COM_MOKOSUITEBOOKING_MENU_SCHEDULES="Schedules" +COM_MOKOSUITEBOOKING_MENU_BOOKINGS="Bookings" +COM_MOKOSUITEBOOKING_MENU_LOCATIONS="Locations" +COM_MOKOSUITEBOOKING_MENU_WAITLIST="Waitlist" diff --git a/source/packages/com_mokosuitebooking/admin/services/provider.php b/source/packages/com_mokosuitebooking/admin/services/provider.php index cc30d87..1bca439 100644 --- a/source/packages/com_mokosuitebooking/admin/services/provider.php +++ b/source/packages/com_mokosuitebooking/admin/services/provider.php @@ -8,21 +8,27 @@ defined('_JEXEC') or die; +use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface; use Joomla\CMS\Extension\ComponentInterface; use Joomla\CMS\Extension\MVCComponent; -use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface; 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->set(ComponentInterface::class, function (Container $container) { - $c = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class)); - $c->setMVCFactory($container->get(MVCFactoryInterface::class)); - $c->setRouterFactory($container->get(RouterFactoryInterface::class)); - return $c; - }); +return new class implements ServiceProviderInterface +{ + public function register(Container $container): void + { + $container->set( + ComponentInterface::class, + function (Container $container) { + $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class)); + $component->setMVCFactory($container->get(MVCFactoryInterface::class)); + $component->setRouterFactory($container->get(RouterFactoryInterface::class)); + + return $component; + } + ); } -}; \ No newline at end of file +}; diff --git a/source/packages/com_mokosuitebooking/admin/src/Controller/DisplayController.php b/source/packages/com_mokosuitebooking/admin/src/Controller/DisplayController.php index e5303c7..770b731 100644 --- a/source/packages/com_mokosuitebooking/admin/src/Controller/DisplayController.php +++ b/source/packages/com_mokosuitebooking/admin/src/Controller/DisplayController.php @@ -6,7 +6,7 @@ * Authored-by: Moko Consulting */ -namespace Moko\Component\MokoSuiteBooking\Administrator\Controller; +namespace Moko\Component\MokoSuiteBooking\Controller; defined('_JEXEC') or die; @@ -15,4 +15,4 @@ use Joomla\CMS\MVC\Controller\BaseController; class DisplayController extends BaseController { protected $default_view = 'bookingdashboard'; -} \ No newline at end of file +} diff --git a/source/packages/com_mokosuitebooking/admin/src/Model/BookingDashboardModel.php b/source/packages/com_mokosuitebooking/admin/src/Model/BookingDashboardModel.php deleted file mode 100644 index 09dcebf..0000000 --- a/source/packages/com_mokosuitebooking/admin/src/Model/BookingDashboardModel.php +++ /dev/null @@ -1,17 +0,0 @@ - - * SPDX-License-Identifier: GPL-3.0-or-later - * Authored-by: Moko Consulting - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\Model; - -defined('_JEXEC') or die; - -use Joomla\CMS\MVC\Model\BaseDatabaseModel; - -class BookingDashboardModel extends BaseDatabaseModel -{ -} \ No newline at end of file diff --git a/source/packages/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php index fc55501..d0932fa 100644 --- a/source/packages/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php +++ b/source/packages/com_mokosuitebooking/admin/src/View/BookingDashboard/HtmlView.php @@ -6,7 +6,7 @@ * Authored-by: Moko Consulting */ -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingDashboard; +namespace Moko\Component\MokoSuiteBooking\View\BookingDashboard; defined('_JEXEC') or die; @@ -17,7 +17,8 @@ class HtmlView extends BaseHtmlView { public function display($tpl = null): void { - ToolbarHelper::title('MokoSuite Booking - Dashboard'); + ToolbarHelper::title('Dashboard', 'home'); + parent::display($tpl); } -} \ No newline at end of file +} diff --git a/source/packages/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php deleted file mode 100644 index f24cca7..0000000 --- a/source/packages/com_mokosuitebooking/admin/src/View/BookingLocations/HtmlView.php +++ /dev/null @@ -1,23 +0,0 @@ - - * SPDX-License-Identifier: GPL-3.0-or-later - * Authored-by: Moko Consulting - */ - -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingLocations; - -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 Booking - Locations'); - parent::display($tpl); - } -} \ No newline at end of file diff --git a/source/packages/com_mokosuitebooking/admin/src/View/BookingStaff/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/Bookings/HtmlView.php similarity index 74% rename from source/packages/com_mokosuitebooking/admin/src/View/BookingStaff/HtmlView.php rename to source/packages/com_mokosuitebooking/admin/src/View/Bookings/HtmlView.php index 5c9ed61..400c8bf 100644 --- a/source/packages/com_mokosuitebooking/admin/src/View/BookingStaff/HtmlView.php +++ b/source/packages/com_mokosuitebooking/admin/src/View/Bookings/HtmlView.php @@ -6,7 +6,7 @@ * Authored-by: Moko Consulting */ -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingStaff; +namespace Moko\Component\MokoSuiteBooking\View\Bookings; defined('_JEXEC') or die; @@ -17,7 +17,8 @@ class HtmlView extends BaseHtmlView { public function display($tpl = null): void { - ToolbarHelper::title('MokoSuite Booking - Staff'); + ToolbarHelper::title('Bookings', 'book'); + parent::display($tpl); } -} \ No newline at end of file +} diff --git a/source/packages/com_mokosuitebooking/admin/src/View/BookingBookings/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/Locations/HtmlView.php similarity index 74% rename from source/packages/com_mokosuitebooking/admin/src/View/BookingBookings/HtmlView.php rename to source/packages/com_mokosuitebooking/admin/src/View/Locations/HtmlView.php index 4839094..10801e1 100644 --- a/source/packages/com_mokosuitebooking/admin/src/View/BookingBookings/HtmlView.php +++ b/source/packages/com_mokosuitebooking/admin/src/View/Locations/HtmlView.php @@ -6,7 +6,7 @@ * Authored-by: Moko Consulting */ -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingBookings; +namespace Moko\Component\MokoSuiteBooking\View\Locations; defined('_JEXEC') or die; @@ -17,7 +17,8 @@ class HtmlView extends BaseHtmlView { public function display($tpl = null): void { - ToolbarHelper::title('MokoSuite Booking - Bookings'); + ToolbarHelper::title('Locations', 'location'); + parent::display($tpl); } -} \ No newline at end of file +} diff --git a/source/packages/com_mokosuitebooking/admin/src/View/BookingServices/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/Schedules/HtmlView.php similarity index 74% rename from source/packages/com_mokosuitebooking/admin/src/View/BookingServices/HtmlView.php rename to source/packages/com_mokosuitebooking/admin/src/View/Schedules/HtmlView.php index 1e28e08..9357823 100644 --- a/source/packages/com_mokosuitebooking/admin/src/View/BookingServices/HtmlView.php +++ b/source/packages/com_mokosuitebooking/admin/src/View/Schedules/HtmlView.php @@ -6,7 +6,7 @@ * Authored-by: Moko Consulting */ -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingServices; +namespace Moko\Component\MokoSuiteBooking\View\Schedules; defined('_JEXEC') or die; @@ -17,7 +17,8 @@ class HtmlView extends BaseHtmlView { public function display($tpl = null): void { - ToolbarHelper::title('MokoSuite Booking - Services'); + ToolbarHelper::title('Schedules', 'calendar'); + parent::display($tpl); } -} \ No newline at end of file +} diff --git a/source/packages/com_mokosuitebooking/admin/src/View/BookingSchedules/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/Services/HtmlView.php similarity index 73% rename from source/packages/com_mokosuitebooking/admin/src/View/BookingSchedules/HtmlView.php rename to source/packages/com_mokosuitebooking/admin/src/View/Services/HtmlView.php index fdf500f..b1a175b 100644 --- a/source/packages/com_mokosuitebooking/admin/src/View/BookingSchedules/HtmlView.php +++ b/source/packages/com_mokosuitebooking/admin/src/View/Services/HtmlView.php @@ -6,7 +6,7 @@ * Authored-by: Moko Consulting */ -namespace Moko\Component\MokoSuiteBooking\Administrator\View\BookingSchedules; +namespace Moko\Component\MokoSuiteBooking\View\Services; defined('_JEXEC') or die; @@ -17,7 +17,8 @@ class HtmlView extends BaseHtmlView { public function display($tpl = null): void { - ToolbarHelper::title('MokoSuite Booking - Schedules'); + ToolbarHelper::title('Services', 'list'); + parent::display($tpl); } -} \ No newline at end of file +} diff --git a/source/packages/com_mokosuitebooking/admin/src/View/Staff/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/Staff/HtmlView.php new file mode 100644 index 0000000..457c2b1 --- /dev/null +++ b/source/packages/com_mokosuitebooking/admin/src/View/Staff/HtmlView.php @@ -0,0 +1,24 @@ + + * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting + */ + +namespace Moko\Component\MokoSuiteBooking\View\Staff; + +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('Staff', 'users'); + + parent::display($tpl); + } +} diff --git a/source/packages/com_mokosuitebooking/admin/src/View/Waitlist/HtmlView.php b/source/packages/com_mokosuitebooking/admin/src/View/Waitlist/HtmlView.php new file mode 100644 index 0000000..4996133 --- /dev/null +++ b/source/packages/com_mokosuitebooking/admin/src/View/Waitlist/HtmlView.php @@ -0,0 +1,24 @@ + + * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting + */ + +namespace Moko\Component\MokoSuiteBooking\View\Waitlist; + +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('Waitlist', 'clock'); + + parent::display($tpl); + } +} diff --git a/source/packages/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php b/source/packages/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php index a69f273..496ffcc 100644 --- a/source/packages/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php +++ b/source/packages/com_mokosuitebooking/admin/tmpl/bookingdashboard/default.php @@ -1,9 +1,13 @@ * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting */ + defined('_JEXEC') or die; + ?>

Dashboard

diff --git a/source/packages/com_mokosuitebooking/admin/tmpl/bookingbookings/default.php b/source/packages/com_mokosuitebooking/admin/tmpl/bookings/default.php similarity index 86% rename from source/packages/com_mokosuitebooking/admin/tmpl/bookingbookings/default.php rename to source/packages/com_mokosuitebooking/admin/tmpl/bookings/default.php index 1db369e..c42ac48 100644 --- a/source/packages/com_mokosuitebooking/admin/tmpl/bookingbookings/default.php +++ b/source/packages/com_mokosuitebooking/admin/tmpl/bookings/default.php @@ -1,9 +1,13 @@ * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting */ + defined('_JEXEC') or die; + ?>

Bookings

diff --git a/source/packages/com_mokosuitebooking/admin/tmpl/bookinglocations/default.php b/source/packages/com_mokosuitebooking/admin/tmpl/locations/default.php similarity index 86% rename from source/packages/com_mokosuitebooking/admin/tmpl/bookinglocations/default.php rename to source/packages/com_mokosuitebooking/admin/tmpl/locations/default.php index 070f7c4..da0ba4c 100644 --- a/source/packages/com_mokosuitebooking/admin/tmpl/bookinglocations/default.php +++ b/source/packages/com_mokosuitebooking/admin/tmpl/locations/default.php @@ -1,9 +1,13 @@ * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting */ + defined('_JEXEC') or die; + ?>

Locations

diff --git a/source/packages/com_mokosuitebooking/admin/tmpl/bookingschedules/default.php b/source/packages/com_mokosuitebooking/admin/tmpl/schedules/default.php similarity index 86% rename from source/packages/com_mokosuitebooking/admin/tmpl/bookingschedules/default.php rename to source/packages/com_mokosuitebooking/admin/tmpl/schedules/default.php index 5c6526d..3166bbf 100644 --- a/source/packages/com_mokosuitebooking/admin/tmpl/bookingschedules/default.php +++ b/source/packages/com_mokosuitebooking/admin/tmpl/schedules/default.php @@ -1,9 +1,13 @@ * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting */ + defined('_JEXEC') or die; + ?>

Schedules

diff --git a/source/packages/com_mokosuitebooking/admin/tmpl/bookingservices/default.php b/source/packages/com_mokosuitebooking/admin/tmpl/services/default.php similarity index 86% rename from source/packages/com_mokosuitebooking/admin/tmpl/bookingservices/default.php rename to source/packages/com_mokosuitebooking/admin/tmpl/services/default.php index 9ae829b..4ad1380 100644 --- a/source/packages/com_mokosuitebooking/admin/tmpl/bookingservices/default.php +++ b/source/packages/com_mokosuitebooking/admin/tmpl/services/default.php @@ -1,9 +1,13 @@ * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting */ + defined('_JEXEC') or die; + ?>

Services

diff --git a/source/packages/com_mokosuitebooking/admin/tmpl/bookingstaff/default.php b/source/packages/com_mokosuitebooking/admin/tmpl/staff/default.php similarity index 86% rename from source/packages/com_mokosuitebooking/admin/tmpl/bookingstaff/default.php rename to source/packages/com_mokosuitebooking/admin/tmpl/staff/default.php index 2ca1ab2..6b38e2d 100644 --- a/source/packages/com_mokosuitebooking/admin/tmpl/bookingstaff/default.php +++ b/source/packages/com_mokosuitebooking/admin/tmpl/staff/default.php @@ -1,9 +1,13 @@ * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting */ + defined('_JEXEC') or die; + ?>

Staff

diff --git a/source/packages/com_mokosuitebooking/admin/tmpl/waitlist/default.php b/source/packages/com_mokosuitebooking/admin/tmpl/waitlist/default.php new file mode 100644 index 0000000..02d15a8 --- /dev/null +++ b/source/packages/com_mokosuitebooking/admin/tmpl/waitlist/default.php @@ -0,0 +1,15 @@ + + * SPDX-License-Identifier: GPL-3.0-or-later + * Authored-by: Moko Consulting + */ + +defined('_JEXEC') or die; + +?> +
+

Waitlist

+

Coming soon.

+
diff --git a/source/packages/com_mokosuitebooking/mokosuitebooking.xml b/source/packages/com_mokosuitebooking/mokosuitebooking.xml index 859c553..8abda16 100644 --- a/source/packages/com_mokosuitebooking/mokosuitebooking.xml +++ b/source/packages/com_mokosuitebooking/mokosuitebooking.xml @@ -1,36 +1,35 @@ - MokoSuite Booking - Moko Consulting - hello@mokoconsulting.tech - https://mokoconsulting.tech - 2026-06-27 - Copyright (C) 2026 Moko Consulting. - GPL-3.0-or-later - 06.00.00 - Appointment and resource booking - Moko\Component\MokoSuiteBooking - - - access.xml - config.xml - language - services - src - tmpl - + com_mokosuitebooking + 06.00.00 + 2026-06-27 + Moko Consulting + hello@mokoconsulting.tech + https://mokoconsulting.tech + Copyright (C) 2026 Moko Consulting + GPL-3.0-or-later + COM_MOKOSUITEBOOKING_DESCRIPTION + Moko\Component\MokoSuiteBooking + + COM_MOKOSUITEBOOKING + + COM_MOKOSUITEBOOKING_MENU_DASHBOARD + COM_MOKOSUITEBOOKING_MENU_SERVICES + COM_MOKOSUITEBOOKING_MENU_STAFF + COM_MOKOSUITEBOOKING_MENU_SCHEDULES + COM_MOKOSUITEBOOKING_MENU_BOOKINGS + COM_MOKOSUITEBOOKING_MENU_LOCATIONS + COM_MOKOSUITEBOOKING_MENU_WAITLIST + + + language + services + src + tmpl + + - en-GB/com_mokosuitebooking.ini - en-GB/com_mokosuitebooking.sys.ini + en-GB/com_mokosuitebooking.ini + en-GB/com_mokosuitebooking.sys.ini - COM_MOKOSUITEBOOKING - - COM_MOKOSUITEBOOKING_DASHBOARD - COM_MOKOSUITEBOOKING_BOOKINGS - COM_MOKOSUITEBOOKING_SERVICES - COM_MOKOSUITEBOOKING_STAFF - COM_MOKOSUITEBOOKING_SCHEDULES - COM_MOKOSUITEBOOKING_LOCATIONS - - - \ No newline at end of file + diff --git a/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini b/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini index 764b0bb..f066011 100644 --- a/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini +++ b/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini @@ -1,4 +1,20 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -PLG_SYSTEM_MOKOSUITEBOOKING="System - MokoSuite Booking" -PLG_SYSTEM_MOKOSUITEBOOKING_DESC="Appointment booking helpers and schema" +PLG_SYSTEM_MOKOSUITEBOOKING="System - MokoSuiteBooking" +PLG_SYSTEM_MOKOSUITEBOOKING_DESCRIPTION="MokoSuiteBooking system plugin — schema and configuration management" +PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_BASIC="Basic" +PLG_SYSTEM_MOKOSUITEBOOKING_BUSINESS_NAME="Business Name" +PLG_SYSTEM_MOKOSUITEBOOKING_CURRENCY="Currency" +PLG_SYSTEM_MOKOSUITEBOOKING_TIMEZONE="Timezone" +PLG_SYSTEM_MOKOSUITEBOOKING_TIME_SLOT_MINUTES="Time Slot (Minutes)" +PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_BOOKING="Booking" +PLG_SYSTEM_MOKOSUITEBOOKING_MAX_ADVANCE_DAYS="Max Advance Booking (Days)" +PLG_SYSTEM_MOKOSUITEBOOKING_CANCELLATION_WINDOW="Cancellation Window (Hours)" +PLG_SYSTEM_MOKOSUITEBOOKING_AUTO_CONFIRM="Auto-Confirm" +PLG_SYSTEM_MOKOSUITEBOOKING_ALLOW_WALK_INS="Allow Walk-Ins" +PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_NOTIFICATIONS="Notifications" +PLG_SYSTEM_MOKOSUITEBOOKING_CONFIRMATION_EMAIL="Confirmation Email" +PLG_SYSTEM_MOKOSUITEBOOKING_REMINDER_HOURS="Reminder (Hours Before)" +PLG_SYSTEM_MOKOSUITEBOOKING_NOSHOW_THRESHOLD="No-Show Threshold (Minutes)" +PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_DISPLAY="Display" +PLG_SYSTEM_MOKOSUITEBOOKING_CALENDAR_START="Calendar Start Hour" +PLG_SYSTEM_MOKOSUITEBOOKING_CALENDAR_END="Calendar End Hour" +PLG_SYSTEM_MOKOSUITEBOOKING_SLOTS_PER_PAGE="Slots Per Page" diff --git a/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini b/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini index 764b0bb..3e14941 100644 --- a/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini +++ b/source/packages/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini @@ -1,4 +1,2 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -PLG_SYSTEM_MOKOSUITEBOOKING="System - MokoSuite Booking" -PLG_SYSTEM_MOKOSUITEBOOKING_DESC="Appointment booking helpers and schema" +PLG_SYSTEM_MOKOSUITEBOOKING="System - MokoSuiteBooking" +PLG_SYSTEM_MOKOSUITEBOOKING_DESCRIPTION="MokoSuiteBooking system plugin — schema and configuration management" diff --git a/source/packages/plg_system_mokosuitebooking/mokosuitebooking.xml b/source/packages/plg_system_mokosuitebooking/mokosuitebooking.xml index dd0be81..08b92c4 100644 --- a/source/packages/plg_system_mokosuitebooking/mokosuitebooking.xml +++ b/source/packages/plg_system_mokosuitebooking/mokosuitebooking.xml @@ -1,59 +1,53 @@ - System - MokoSuite Booking - mokosuitebooking - Moko Consulting + plg_system_mokosuitebooking + 06.00.00 2026-06-27 - Copyright (C) 2026 Moko Consulting. All rights reserved. - GPL-3.0-or-later + Moko Consulting hello@mokoconsulting.tech https://mokoconsulting.tech - 06.00.00 - 8.3 - PLG_SYSTEM_MOKOSUITEBOOKING_DESC + Copyright (C) 2026 Moko Consulting + GPL-3.0-or-later + PLG_SYSTEM_MOKOSUITEBOOKING_DESCRIPTION Moko\Plugin\System\MokoSuiteBooking + services src - services - language - sql en-GB/plg_system_mokosuitebooking.ini en-GB/plg_system_mokosuitebooking.sys.ini - sql/install.mysql.sql - sql/uninstall.mysql.sql + + sql/install.mysql.sql + + + sql/uninstall.mysql.sql + -
- - - +
+ + + +
-
- - - - - - +
+ + + +
-
- - - - - - +
+ + +
-
- - - - - +
+ + +
- \ No newline at end of file + diff --git a/source/packages/plg_system_mokosuitebooking/services/provider.php b/source/packages/plg_system_mokosuitebooking/services/provider.php index f210625..5041d3f 100644 --- a/source/packages/plg_system_mokosuitebooking/services/provider.php +++ b/source/packages/plg_system_mokosuitebooking/services/provider.php @@ -15,13 +15,19 @@ use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Moko\Plugin\System\MokoSuiteBooking\Extension\Booking; -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 Booking($dispatcher, (array) PluginHelper::getPlugin('system', 'mokosuitebooking')); - $plugin->setApplication(\Joomla\CMS\Factory::getApplication()); - return $plugin; - }); +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 Booking($dispatcher, (array) PluginHelper::getPlugin('system', 'mokosuitebooking')); + $plugin->setApplication(\Joomla\CMS\Factory::getApplication()); + + return $plugin; + } + ); } -}; \ No newline at end of file +}; diff --git a/source/packages/plg_system_mokosuitebooking/sql/install.mysql.sql b/source/packages/plg_system_mokosuitebooking/sql/install.mysql.sql index 3b479af..2c4dfb7 100644 --- a/source/packages/plg_system_mokosuitebooking/sql/install.mysql.sql +++ b/source/packages/plg_system_mokosuitebooking/sql/install.mysql.sql @@ -1,37 +1,12 @@ --- --- MokoSuite Booking Tables --- - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_locations` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `address` VARCHAR(500) NOT NULL DEFAULT '', - `city` VARCHAR(100) NOT NULL DEFAULT '', - `state` VARCHAR(100) NOT NULL DEFAULT '', - `postal_code` VARCHAR(20) NOT NULL DEFAULT '', - `country` VARCHAR(100) NOT NULL DEFAULT '', - `timezone` VARCHAR(50) NOT NULL DEFAULT 'America/New_York', - `phone` VARCHAR(50) NOT NULL DEFAULT '', - `email` VARCHAR(255) NOT NULL DEFAULT '', - `photo` VARCHAR(500) NOT NULL DEFAULT '', - `notes` TEXT, - `published` TINYINT NOT NULL DEFAULT 1, - `ordering` INT NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL, - `created_by` INT NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_services` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `description` TEXT, `category` VARCHAR(100) NOT NULL DEFAULT '', - `duration_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 30, + `duration_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 60, `buffer_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 0, `price` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `currency` VARCHAR(3) NOT NULL DEFAULT 'USD', - `max_attendees` SMALLINT UNSIGNED NOT NULL DEFAULT 1, + `max_participants` TINYINT UNSIGNED NOT NULL DEFAULT 1, `requires_deposit` TINYINT NOT NULL DEFAULT 0, `deposit_amount` DECIMAL(10,2) NOT NULL DEFAULT 0.00, `color` VARCHAR(7) NOT NULL DEFAULT '#3788d8', @@ -39,7 +14,6 @@ CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_services` ( `published` TINYINT NOT NULL DEFAULT 1, `ordering` INT NOT NULL DEFAULT 0, `created` DATETIME NOT NULL, - `created_by` INT NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_category` (`category`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; @@ -47,22 +21,27 @@ CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_services` ( CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_staff` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `contact_id` INT DEFAULT NULL, - `user_id` INT DEFAULT NULL, - `display_name` VARCHAR(255) NOT NULL, - `title` VARCHAR(255) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL, `email` VARCHAR(255) NOT NULL DEFAULT '', `phone` VARCHAR(50) NOT NULL DEFAULT '', + `title` VARCHAR(100) NOT NULL DEFAULT '', `bio` TEXT, `photo` VARCHAR(500) NOT NULL DEFAULT '', `color` VARCHAR(7) NOT NULL DEFAULT '#3788d8', - `services_json` JSON DEFAULT NULL, - `locations_json` JSON DEFAULT NULL, + `max_daily_bookings` TINYINT UNSIGNED NOT NULL DEFAULT 20, + `rating` DECIMAL(3,2) NOT NULL DEFAULT 5.00, + `total_bookings` INT UNSIGNED NOT NULL DEFAULT 0, `published` TINYINT NOT NULL DEFAULT 1, `ordering` INT NOT NULL DEFAULT 0, `created` DATETIME NOT NULL, PRIMARY KEY (`id`), - KEY `idx_contact` (`contact_id`), - KEY `idx_user` (`user_id`) + KEY `idx_contact` (`contact_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_staff_services` ( + `staff_id` INT UNSIGNED NOT NULL, + `service_id` INT UNSIGNED NOT NULL, + PRIMARY KEY (`staff_id`, `service_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_schedules` ( @@ -72,92 +51,100 @@ CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_schedules` ( `day_of_week` TINYINT UNSIGNED NOT NULL, `start_time` TIME NOT NULL, `end_time` TIME NOT NULL, - `effective_from` DATE DEFAULT NULL, - `effective_until` DATE DEFAULT NULL, - `published` TINYINT NOT NULL DEFAULT 1, + `is_recurring` TINYINT NOT NULL DEFAULT 1, + `specific_date` DATE DEFAULT NULL, + `override_type` ENUM('available','unavailable') DEFAULT NULL, + `created` DATETIME NOT NULL, PRIMARY KEY (`id`), KEY `idx_staff` (`staff_id`), KEY `idx_location` (`location_id`), - KEY `idx_day` (`day_of_week`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_availability_overrides` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `staff_id` INT UNSIGNED NOT NULL, - `override_date` DATE NOT NULL, - `available` TINYINT NOT NULL DEFAULT 0, - `start_time` TIME DEFAULT NULL, - `end_time` TIME DEFAULT NULL, - `reason` VARCHAR(255) NOT NULL DEFAULT '', - `created` DATETIME NOT NULL, - PRIMARY KEY (`id`), - KEY `idx_staff_date` (`staff_id`, `override_date`) + KEY `idx_day` (`day_of_week`), + KEY `idx_date` (`specific_date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_bookings` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `booking_ref` VARCHAR(20) NOT NULL, - `contact_id` INT DEFAULT NULL, + `service_id` INT UNSIGNED NOT NULL, `staff_id` INT UNSIGNED DEFAULT NULL, `location_id` INT UNSIGNED DEFAULT NULL, + `customer_contact_id` INT DEFAULT NULL, `customer_name` VARCHAR(255) NOT NULL, `customer_email` VARCHAR(255) NOT NULL DEFAULT '', `customer_phone` VARCHAR(50) NOT NULL DEFAULT '', + `status` ENUM('pending','confirmed','checked_in','in_progress','completed','cancelled','no_show') NOT NULL DEFAULT 'pending', `booking_date` DATE NOT NULL, `start_time` TIME NOT NULL, `end_time` TIME NOT NULL, - `status` ENUM('pending','confirmed','in_progress','completed','cancelled','no_show') NOT NULL DEFAULT 'pending', - `total_price` DECIMAL(10,2) NOT NULL DEFAULT 0.00, + `participants` TINYINT UNSIGNED NOT NULL DEFAULT 1, + `price` DECIMAL(10,2) NOT NULL DEFAULT 0.00, `deposit_paid` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `payment_status` ENUM('unpaid','partial','paid','refunded') NOT NULL DEFAULT 'unpaid', + `payment_status` ENUM('pending','deposit_paid','paid','refunded') NOT NULL DEFAULT 'pending', + `source` ENUM('admin','online','phone','walk_in') NOT NULL DEFAULT 'online', `notes` TEXT, - `internal_notes` TEXT, - `source` ENUM('admin','website','api','walk_in') NOT NULL DEFAULT 'admin', - `cancelled_at` DATETIME DEFAULT NULL, - `cancellation_reason` VARCHAR(500) NOT NULL DEFAULT '', + `customer_notes` TEXT, `reminder_sent` TINYINT NOT NULL DEFAULT 0, `created` DATETIME NOT NULL, `created_by` INT NOT NULL DEFAULT 0, - `modified` DATETIME DEFAULT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `uk_ref` (`booking_ref`), - KEY `idx_contact` (`contact_id`), + UNIQUE KEY `idx_ref` (`booking_ref`), + KEY `idx_service` (`service_id`), KEY `idx_staff` (`staff_id`), - KEY `idx_location` (`location_id`), + KEY `idx_customer` (`customer_contact_id`), + KEY `idx_status` (`status`), KEY `idx_date` (`booking_date`), - KEY `idx_status` (`status`) + KEY `idx_datetime` (`booking_date`, `start_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_booking_services` ( +CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_locations` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `booking_id` INT UNSIGNED NOT NULL, - `service_id` INT UNSIGNED NOT NULL, - `staff_id` INT UNSIGNED DEFAULT NULL, - `price` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `duration_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 30, - PRIMARY KEY (`id`), - KEY `idx_booking` (`booking_id`), - KEY `idx_service` (`service_id`) + `name` VARCHAR(255) NOT NULL, + `address` VARCHAR(500) NOT NULL DEFAULT '', + `city` VARCHAR(100) NOT NULL DEFAULT '', + `state` VARCHAR(100) NOT NULL DEFAULT '', + `postal_code` VARCHAR(20) NOT NULL DEFAULT '', + `phone` VARCHAR(50) NOT NULL DEFAULT '', + `email` VARCHAR(255) NOT NULL DEFAULT '', + `timezone` VARCHAR(50) NOT NULL DEFAULT 'America/New_York', + `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 `#__mokosuitebooking_waitlist` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `contact_id` INT DEFAULT NULL, `service_id` INT UNSIGNED NOT NULL, `staff_id` INT UNSIGNED DEFAULT NULL, `location_id` INT UNSIGNED DEFAULT NULL, + `customer_contact_id` INT DEFAULT NULL, `customer_name` VARCHAR(255) NOT NULL, - `customer_email` VARCHAR(255) NOT NULL DEFAULT '', `customer_phone` VARCHAR(50) NOT NULL DEFAULT '', - `preferred_date_start` DATE DEFAULT NULL, - `preferred_date_end` DATE DEFAULT NULL, - `preferred_time_start` TIME DEFAULT NULL, - `preferred_time_end` TIME DEFAULT NULL, - `status` ENUM('waiting','notified','booked','expired','cancelled') NOT NULL DEFAULT 'waiting', - `notified_at` DATETIME DEFAULT NULL, + `customer_email` VARCHAR(255) NOT NULL DEFAULT '', + `preferred_date` DATE DEFAULT NULL, + `preferred_time` TIME DEFAULT NULL, + `status` ENUM('waiting','offered','booked','expired','cancelled') NOT NULL DEFAULT 'waiting', + `position` INT UNSIGNED NOT NULL DEFAULT 0, `notes` TEXT, `created` DATETIME NOT NULL, PRIMARY KEY (`id`), KEY `idx_service` (`service_id`), + KEY `idx_customer` (`customer_contact_id`), KEY `idx_status` (`status`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_booking_history` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `booking_id` INT UNSIGNED NOT NULL, + `action` ENUM('created','confirmed','rescheduled','cancelled','completed','no_show','reminder_sent') NOT NULL, + `old_date` DATE DEFAULT NULL, + `old_time` TIME DEFAULT NULL, + `new_date` DATE DEFAULT NULL, + `new_time` TIME DEFAULT NULL, + `note` TEXT, + `created` DATETIME NOT NULL, + `created_by` INT NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_booking` (`booking_id`), + KEY `idx_action` (`action`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/source/packages/plg_system_mokosuitebooking/sql/uninstall.mysql.sql b/source/packages/plg_system_mokosuitebooking/sql/uninstall.mysql.sql index 1b1d773..e3c61f7 100644 --- a/source/packages/plg_system_mokosuitebooking/sql/uninstall.mysql.sql +++ b/source/packages/plg_system_mokosuitebooking/sql/uninstall.mysql.sql @@ -1,12 +1,8 @@ --- --- MokoSuite Booking — Uninstall --- - +DROP TABLE IF EXISTS `#__mokosuitebooking_booking_history`; DROP TABLE IF EXISTS `#__mokosuitebooking_waitlist`; -DROP TABLE IF EXISTS `#__mokosuitebooking_booking_services`; +DROP TABLE IF EXISTS `#__mokosuitebooking_locations`; DROP TABLE IF EXISTS `#__mokosuitebooking_bookings`; -DROP TABLE IF EXISTS `#__mokosuitebooking_availability_overrides`; DROP TABLE IF EXISTS `#__mokosuitebooking_schedules`; +DROP TABLE IF EXISTS `#__mokosuitebooking_staff_services`; DROP TABLE IF EXISTS `#__mokosuitebooking_staff`; DROP TABLE IF EXISTS `#__mokosuitebooking_services`; -DROP TABLE IF EXISTS `#__mokosuitebooking_locations`; \ No newline at end of file diff --git a/source/packages/plg_system_mokosuitebooking/src/Extension/Booking.php b/source/packages/plg_system_mokosuitebooking/src/Extension/Booking.php index a49c2d9..ff4ee01 100644 --- a/source/packages/plg_system_mokosuitebooking/src/Extension/Booking.php +++ b/source/packages/plg_system_mokosuitebooking/src/Extension/Booking.php @@ -13,10 +13,10 @@ defined('_JEXEC') or die; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\Event\SubscriberInterface; -class Booking extends CMSPlugin implements SubscriberInterface +final class Booking extends CMSPlugin implements SubscriberInterface { public static function getSubscribedEvents(): array { return []; } -} \ No newline at end of file +} diff --git a/source/packages/plg_webservices_mokosuitebooking/mokosuitebooking.xml b/source/packages/plg_webservices_mokosuitebooking/mokosuitebooking.xml index 45c2880..56ce03d 100644 --- a/source/packages/plg_webservices_mokosuitebooking/mokosuitebooking.xml +++ b/source/packages/plg_webservices_mokosuitebooking/mokosuitebooking.xml @@ -1,15 +1,17 @@ - + - Web Services - MokoSuite Booking - mokosuitebooking - Moko Consulting - hello@mokoconsulting.tech - https://mokoconsulting.tech - 2026-06-27 - Copyright (C) 2026 Moko Consulting. - 06.00.00 - GPL-3.0-or-later - REST API routes for MokoSuite Booking operations - Moko\Plugin\WebServices\MokoSuiteBooking - srcservices - \ No newline at end of file + plg_webservices_mokosuitebooking + 06.00.00 + 2026-06-27 + Moko Consulting + hello@mokoconsulting.tech + https://mokoconsulting.tech + Copyright (C) 2026 Moko Consulting + GPL-3.0-or-later + PLG_WEBSERVICES_MOKOSUITEBOOKING_DESCRIPTION + Moko\Plugin\Webservices\MokoSuiteBooking + + services + src + + diff --git a/source/packages/plg_webservices_mokosuitebooking/services/provider.php b/source/packages/plg_webservices_mokosuitebooking/services/provider.php index 6be452f..f43259d 100644 --- a/source/packages/plg_webservices_mokosuitebooking/services/provider.php +++ b/source/packages/plg_webservices_mokosuitebooking/services/provider.php @@ -13,13 +13,21 @@ use Joomla\CMS\Plugin\PluginHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; -use Moko\Plugin\WebServices\MokoSuiteBooking\Extension\MokoSuiteBooking; +use Moko\Plugin\Webservices\MokoSuiteBooking\Extension\MokoSuiteBooking; -return new class implements ServiceProviderInterface { - public function register(Container $container): void { - $container->set(PluginInterface::class, function (Container $container) { - $dispatcher = $container->get(DispatcherInterface::class); - return new MokoSuiteBooking($dispatcher, (array) PluginHelper::getPlugin('webservices', 'mokosuitebooking')); - }); +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 MokoSuiteBooking($dispatcher, (array) PluginHelper::getPlugin('webservices', 'mokosuitebooking')); + $plugin->setApplication(\Joomla\CMS\Factory::getApplication()); + + return $plugin; + } + ); } -}; \ No newline at end of file +}; diff --git a/source/packages/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php b/source/packages/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php index 4d2ce96..9985441 100644 --- a/source/packages/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php +++ b/source/packages/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php @@ -6,7 +6,7 @@ * Authored-by: Moko Consulting */ -namespace Moko\Plugin\WebServices\MokoSuiteBooking\Extension; +namespace Moko\Plugin\Webservices\MokoSuiteBooking\Extension; defined('_JEXEC') or die; @@ -14,7 +14,7 @@ use Joomla\CMS\Plugin\CMSPlugin; use Joomla\CMS\Router\ApiRouter; use Joomla\Event\SubscriberInterface; -class MokoSuiteBooking extends CMSPlugin implements SubscriberInterface +final class MokoSuiteBooking extends CMSPlugin implements SubscriberInterface { public static function getSubscribedEvents(): array { @@ -23,21 +23,8 @@ class MokoSuiteBooking extends CMSPlugin implements SubscriberInterface ]; } - public function onBeforeApiRoute($event): void + public function onBeforeApiRoute(&$router): void { - $router = $event->getArgument('router'); - - $routes = [ - 'services', 'staff', 'bookings', 'schedules', - 'locations', 'availability', 'waitlist', - ]; - - foreach ($routes as $route) { - $router->createCRUDRoutes( - "v1/booking/{$route}", - $route, - ['component' => 'com_mokosuitebooking'] - ); - } + // Route registrations will be added during development } -} \ No newline at end of file +} diff --git a/source/pkg_mokosuitebooking.xml b/source/pkg_mokosuitebooking.xml index cd945f3..1222f7b 100644 --- a/source/pkg_mokosuitebooking.xml +++ b/source/pkg_mokosuitebooking.xml @@ -1,24 +1,21 @@ - Package - MokoSuite Booking + pkg_mokosuitebooking mokosuitebooking 06.00.00 2026-06-27 Moko Consulting hello@mokoconsulting.tech https://mokoconsulting.tech - Copyright (C) 2026 Moko Consulting. All rights reserved. - GNU General Public License version 3 or later; see LICENSE + Copyright (C) 2026 Moko Consulting + GPL-3.0-or-later Appointment and resource booking for service businesses - 8.3 - - true - - plg_system_mokosuitebooking.zip - com_mokosuitebooking.zip - plg_webservices_mokosuitebooking.zip + + packages/plg_system_mokosuitebooking + packages/com_mokosuitebooking + packages/plg_webservices_mokosuitebooking - https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBooking/updates.xml + https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBooking/updates.xml - \ No newline at end of file + diff --git a/source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini b/source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini deleted file mode 100644 index 4e8b50c..0000000 --- a/source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.ini +++ /dev/null @@ -1,26 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; Authored-by: Moko Consulting - -PLG_SYSTEM_MOKOSUITEBOOKING="System - MokoSuiteBooking" -PLG_SYSTEM_MOKOSUITEBOOKING_DESCRIPTION="MokoSuiteBooking system plugin for appointment and resource booking." - -PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_BASIC="Basic Settings" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_BUSINESS_NAME="Business Name" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_TIMEZONE="Timezone" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_SLOT_DURATION="Slot Duration (minutes)" - -PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_BOOKING="Booking Settings" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_MAX_ADVANCE_DAYS="Max Advance Booking Days" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_CANCELLATION_WINDOW="Cancellation Window (hours)" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_CANCELLATION_WINDOW_DESC="Minimum hours before appointment to allow cancellation." -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_REQUIRE_DEPOSIT="Require Deposit" - -PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_NOTIFICATIONS="Notifications" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_SEND_CONFIRMATION="Send Confirmation Email" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_SEND_REMINDER="Send Reminder Email" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_REMINDER_HOURS="Reminder Hours Before" - -PLG_SYSTEM_MOKOSUITEBOOKING_FIELDSET_DISPLAY="Display" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_SHOW_PRICES="Show Prices" -PLG_SYSTEM_MOKOSUITEBOOKING_FIELD_SHOW_DURATION="Show Duration" diff --git a/source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini b/source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini deleted file mode 100644 index d476e64..0000000 --- a/source/plg_system_mokosuitebooking/language/en-GB/plg_system_mokosuitebooking.sys.ini +++ /dev/null @@ -1,6 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; Authored-by: Moko Consulting - -PLG_SYSTEM_MOKOSUITEBOOKING="System - MokoSuiteBooking" -PLG_SYSTEM_MOKOSUITEBOOKING_DESCRIPTION="MokoSuiteBooking system plugin for appointment and resource booking." diff --git a/source/plg_system_mokosuitebooking/mokosuitebooking.xml b/source/plg_system_mokosuitebooking/mokosuitebooking.xml deleted file mode 100644 index 20df0d3..0000000 --- a/source/plg_system_mokosuitebooking/mokosuitebooking.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - plg_system_mokosuitebooking - 0.0.1 - 2026-06-27 - Moko Consulting - hello@mokoconsulting.tech - https://mokoconsulting.tech - Copyright (C) 2026 Moko Consulting - GPL-3.0-or-later - PLG_SYSTEM_MOKOSUITEBOOKING_DESCRIPTION - Moko\Plugin\System\MokoSuiteBooking - - - services - src - - - - en-GB/plg_system_mokosuitebooking.ini - en-GB/plg_system_mokosuitebooking.sys.ini - - - - - sql/install.mysql.sql - - - - - sql/uninstall.mysql.sql - - - - - -
- - - -
-
- - - - - - -
-
- - - - - - - - - -
-
- - - - - - - - -
-
-
-
diff --git a/source/plg_system_mokosuitebooking/services/provider.php b/source/plg_system_mokosuitebooking/services/provider.php deleted file mode 100644 index ca6e7c7..0000000 --- a/source/plg_system_mokosuitebooking/services/provider.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -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\MokoSuiteBooking\Extension\Booking; - -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 Booking( - $dispatcher, - (array) PluginHelper::getPlugin('system', 'mokosuitebooking') - ); - $plugin->setApplication(Factory::getApplication()); - - return $plugin; - } - ); - } -}; diff --git a/source/plg_system_mokosuitebooking/sql/install.mysql.sql b/source/plg_system_mokosuitebooking/sql/install.mysql.sql deleted file mode 100644 index c79b8cd..0000000 --- a/source/plg_system_mokosuitebooking/sql/install.mysql.sql +++ /dev/null @@ -1,138 +0,0 @@ --- Copyright (C) 2026 Moko Consulting --- SPDX-License-Identifier: GPL-3.0-or-later --- Authored-by: Moko Consulting - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_locations` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `address` VARCHAR(500) NOT NULL DEFAULT '', - `phone` VARCHAR(50) NOT NULL DEFAULT '', - `email` VARCHAR(255) NOT NULL DEFAULT '', - `timezone` VARCHAR(50) NOT NULL DEFAULT 'America/New_York', - `operating_hours` JSON 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 `#__mokosuitebooking_staff` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `contact_id` INT DEFAULT NULL, - `name` VARCHAR(255) NOT NULL, - `email` VARCHAR(255) NOT NULL DEFAULT '', - `phone` VARCHAR(50) NOT NULL DEFAULT '', - `title` VARCHAR(255) NOT NULL DEFAULT '', - `bio` TEXT, - `photo` VARCHAR(500) NOT NULL DEFAULT '', - `color` VARCHAR(7) NOT NULL DEFAULT '#3788d8', - `location_id` INT UNSIGNED DEFAULT NULL, - `published` TINYINT NOT NULL DEFAULT 1, - `ordering` INT NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL, - PRIMARY KEY (`id`), - KEY `idx_contact` (`contact_id`), - KEY `idx_location` (`location_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_services` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `description` TEXT, - `category` VARCHAR(100) NOT NULL DEFAULT '', - `duration_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 60, - `buffer_before` SMALLINT UNSIGNED NOT NULL DEFAULT 0, - `buffer_after` SMALLINT UNSIGNED NOT NULL DEFAULT 0, - `price` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `deposit_required` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `max_participants` SMALLINT UNSIGNED NOT NULL DEFAULT 1, - `color` VARCHAR(7) NOT NULL DEFAULT '#3788d8', - `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 `#__mokosuitebooking_schedules` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `staff_id` INT UNSIGNED NOT NULL, - `day_of_week` TINYINT UNSIGNED NOT NULL, - `start_time` TIME NOT NULL, - `end_time` TIME NOT NULL, - `location_id` INT UNSIGNED DEFAULT NULL, - `effective_from` DATE DEFAULT NULL, - `effective_to` DATE DEFAULT NULL, - `published` TINYINT NOT NULL DEFAULT 1, - PRIMARY KEY (`id`), - KEY `idx_staff` (`staff_id`), - KEY `idx_day` (`day_of_week`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_availability_overrides` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `staff_id` INT UNSIGNED NOT NULL, - `override_date` DATE NOT NULL, - `available` TINYINT NOT NULL DEFAULT 0, - `start_time` TIME DEFAULT NULL, - `end_time` TIME DEFAULT NULL, - `reason` VARCHAR(255) NOT NULL DEFAULT '', - `created` DATETIME NOT NULL, - PRIMARY KEY (`id`), - KEY `idx_staff` (`staff_id`), - KEY `idx_date` (`override_date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_bookings` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `booking_ref` VARCHAR(20) NOT NULL, - `client_contact_id` INT DEFAULT NULL, - `client_name` VARCHAR(255) NOT NULL, - `client_email` VARCHAR(255) NOT NULL DEFAULT '', - `client_phone` VARCHAR(50) NOT NULL DEFAULT '', - `staff_id` INT UNSIGNED DEFAULT NULL, - `location_id` INT UNSIGNED DEFAULT NULL, - `status` ENUM('pending','confirmed','in_progress','completed','cancelled','no_show') NOT NULL DEFAULT 'pending', - `booking_date` DATE NOT NULL, - `start_time` TIME NOT NULL, - `end_time` TIME NOT NULL, - `total_price` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `deposit_paid` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `payment_status` ENUM('pending','partial','paid','refunded') NOT NULL DEFAULT 'pending', - `source` ENUM('admin','online','phone','walkin') NOT NULL DEFAULT 'admin', - `notes` TEXT, - `reminder_sent` TINYINT NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL, - `created_by` INT NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY `idx_ref` (`booking_ref`), - KEY `idx_client` (`client_contact_id`), - KEY `idx_staff` (`staff_id`), - KEY `idx_status` (`status`), - KEY `idx_date` (`booking_date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_booking_services` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `booking_id` INT UNSIGNED NOT NULL, - `service_id` INT UNSIGNED NOT NULL, - `price` DECIMAL(10,2) NOT NULL DEFAULT 0.00, - `duration_minutes` SMALLINT UNSIGNED NOT NULL DEFAULT 60, - PRIMARY KEY (`id`), - KEY `idx_booking` (`booking_id`), - KEY `idx_service` (`service_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `#__mokosuitebooking_waitlist` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `client_contact_id` INT DEFAULT NULL, - `client_name` VARCHAR(255) NOT NULL, - `client_email` VARCHAR(255) NOT NULL DEFAULT '', - `service_id` INT UNSIGNED DEFAULT NULL, - `staff_id` INT UNSIGNED DEFAULT NULL, - `preferred_date` DATE DEFAULT NULL, - `status` ENUM('waiting','notified','booked','expired','cancelled') NOT NULL DEFAULT 'waiting', - `notes` TEXT, - `created` DATETIME NOT NULL, - PRIMARY KEY (`id`), - KEY `idx_status` (`status`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/source/plg_system_mokosuitebooking/sql/uninstall.mysql.sql b/source/plg_system_mokosuitebooking/sql/uninstall.mysql.sql deleted file mode 100644 index 70df5a2..0000000 --- a/source/plg_system_mokosuitebooking/sql/uninstall.mysql.sql +++ /dev/null @@ -1,12 +0,0 @@ --- Copyright (C) 2026 Moko Consulting --- SPDX-License-Identifier: GPL-3.0-or-later --- Authored-by: Moko Consulting - -DROP TABLE IF EXISTS `#__mokosuitebooking_waitlist`; -DROP TABLE IF EXISTS `#__mokosuitebooking_booking_services`; -DROP TABLE IF EXISTS `#__mokosuitebooking_bookings`; -DROP TABLE IF EXISTS `#__mokosuitebooking_availability_overrides`; -DROP TABLE IF EXISTS `#__mokosuitebooking_schedules`; -DROP TABLE IF EXISTS `#__mokosuitebooking_services`; -DROP TABLE IF EXISTS `#__mokosuitebooking_staff`; -DROP TABLE IF EXISTS `#__mokosuitebooking_locations`; diff --git a/source/plg_system_mokosuitebooking/src/Extension/Booking.php b/source/plg_system_mokosuitebooking/src/Extension/Booking.php deleted file mode 100644 index 0f9cc86..0000000 --- a/source/plg_system_mokosuitebooking/src/Extension/Booking.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Plugin\System\MokoSuiteBooking\Extension; - -defined('_JEXEC') or die; - -use Joomla\CMS\Plugin\CMSPlugin; -use Joomla\Event\DispatcherInterface; -use Psr\Container\ContainerInterface; - -final class Booking extends CMSPlugin -{ - protected $autoloadLanguage = true; - - public function boot(ContainerInterface $container): void - { - } -} diff --git a/source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.ini b/source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.ini deleted file mode 100644 index e6138ac..0000000 --- a/source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.ini +++ /dev/null @@ -1,6 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; Authored-by: Moko Consulting - -PLG_WEBSERVICES_MOKOSUITEBOOKING="Web Services - MokoSuiteBooking" -PLG_WEBSERVICES_MOKOSUITEBOOKING_DESCRIPTION="MokoSuiteBooking web services plugin for REST API access." diff --git a/source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.sys.ini b/source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.sys.ini deleted file mode 100644 index e6138ac..0000000 --- a/source/plg_webservices_mokosuitebooking/language/en-GB/plg_webservices_mokosuitebooking.sys.ini +++ /dev/null @@ -1,6 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; Authored-by: Moko Consulting - -PLG_WEBSERVICES_MOKOSUITEBOOKING="Web Services - MokoSuiteBooking" -PLG_WEBSERVICES_MOKOSUITEBOOKING_DESCRIPTION="MokoSuiteBooking web services plugin for REST API access." diff --git a/source/plg_webservices_mokosuitebooking/mokosuitebooking.xml b/source/plg_webservices_mokosuitebooking/mokosuitebooking.xml deleted file mode 100644 index ab45b85..0000000 --- a/source/plg_webservices_mokosuitebooking/mokosuitebooking.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - plg_webservices_mokosuitebooking - 0.0.1 - 2026-06-27 - Moko Consulting - hello@mokoconsulting.tech - https://mokoconsulting.tech - Copyright (C) 2026 Moko Consulting - GPL-3.0-or-later - PLG_WEBSERVICES_MOKOSUITEBOOKING_DESCRIPTION - Moko\Plugin\WebServices\MokoSuiteBooking - - - services - src - - - - en-GB/plg_webservices_mokosuitebooking.ini - en-GB/plg_webservices_mokosuitebooking.sys.ini - - diff --git a/source/plg_webservices_mokosuitebooking/services/provider.php b/source/plg_webservices_mokosuitebooking/services/provider.php deleted file mode 100644 index c6fef13..0000000 --- a/source/plg_webservices_mokosuitebooking/services/provider.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -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\MokoSuiteBooking\Extension\MokoSuiteBooking; - -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 MokoSuiteBooking( - $dispatcher, - (array) PluginHelper::getPlugin('webservices', 'mokosuitebooking') - ); - $plugin->setApplication(Factory::getApplication()); - - return $plugin; - } - ); - } -}; diff --git a/source/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php b/source/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php deleted file mode 100644 index 71641b8..0000000 --- a/source/plg_webservices_mokosuitebooking/src/Extension/MokoSuiteBooking.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @license GPL-3.0-or-later - */ - -namespace Moko\Plugin\WebServices\MokoSuiteBooking\Extension; - -defined('_JEXEC') or die; - -use Joomla\CMS\Plugin\CMSPlugin; -use Joomla\CMS\Router\ApiRouter; -use Joomla\Event\SubscriberInterface; - -final class MokoSuiteBooking extends CMSPlugin implements SubscriberInterface -{ - public static function getSubscribedEvents(): array - { - return [ - 'onBeforeApiRoute' => 'onBeforeApiRoute', - ]; - } - - public function onBeforeApiRoute(&$router): void - { - $routes = [ - 'bookings' => 'bookingbookings', - 'services' => 'bookingservices', - 'staff' => 'bookingstaff', - 'schedules' => 'bookingschedules', - 'locations' => 'bookinglocations', - 'waitlist' => 'bookingwaitlist', - ]; - - $defaults = ['component' => 'com_mokosuitebooking', 'public' => false]; - - foreach ($routes as $pattern => $controller) { - $router->createCRUDRoutes( - 'v1/mokosuitebooking/' . $pattern, - $controller, - $defaults - ); - } - } -}