feat: Implement admin ListModel and AdminModel classes for all entities #32

Open
opened 2026-06-29 14:06:27 +00:00 by jmiller · 1 comment
Owner

Summary

The admin component has 9 Views but only 1 Model (FieldDashboardModel) which is empty. No ListModel or AdminModel classes exist for any entity, so none of the admin list views or edit forms will actually work.

Requirements

Each entity needs a pair of models following Joomla's ListModel/AdminModel pattern:

  • WorkOrdersModel (ListModel) — query #__mokosuitefield_work_orders with status/priority/technician/category filters
  • WorkOrderModel (AdminModel) — CRUD with form XML, getForm(), getTable()
  • EquipmentListModel (ListModel) — query with type/customer filters
  • EquipmentModel (AdminModel) — CRUD with form
  • TechniciansModel (ListModel) — query with status filter
  • TechnicianModel (AdminModel) — CRUD with form
  • PartsModel (ListModel) — query with category/stock filters
  • PartModel (AdminModel) — CRUD with form
  • TruckInventoryModel (ListModel) — query by technician
  • TruckInventoryItemModel (AdminModel) — CRUD
  • ChecklistsModel (ListModel) — query by category
  • ChecklistModel (AdminModel) — CRUD with JSON items
  • PmAgreementsModel (ListModel) — query with status/customer filters
  • PmAgreementModel (AdminModel) — CRUD
  • DispatchesModel (ListModel) — query by WO/tech/status
  • DispatchModel (AdminModel) — CRUD
  • FieldDashboardModel — implement KPI queries (open WO count, revenue, tech utilization)

Technical Notes

  • Use $this->getDatabase() (Joomla 6 pattern, not Factory::getDbo())
  • Extend Joomla\CMS\MVC\Model\ListModel / Joomla\CMS\MVC\Model\AdminModel
  • Each AdminModel needs a corresponding forms/ XML file
  • Namespace: Moko\Component\MokoSuiteField\Administrator\Model
## Summary The admin component has 9 Views but only 1 Model (FieldDashboardModel) which is empty. No ListModel or AdminModel classes exist for any entity, so none of the admin list views or edit forms will actually work. ## Requirements Each entity needs a pair of models following Joomla's ListModel/AdminModel pattern: - [ ] **WorkOrdersModel** (ListModel) — query `#__mokosuitefield_work_orders` with status/priority/technician/category filters - [ ] **WorkOrderModel** (AdminModel) — CRUD with form XML, getForm(), getTable() - [ ] **EquipmentListModel** (ListModel) — query with type/customer filters - [ ] **EquipmentModel** (AdminModel) — CRUD with form - [ ] **TechniciansModel** (ListModel) — query with status filter - [ ] **TechnicianModel** (AdminModel) — CRUD with form - [ ] **PartsModel** (ListModel) — query with category/stock filters - [ ] **PartModel** (AdminModel) — CRUD with form - [ ] **TruckInventoryModel** (ListModel) — query by technician - [ ] **TruckInventoryItemModel** (AdminModel) — CRUD - [ ] **ChecklistsModel** (ListModel) — query by category - [ ] **ChecklistModel** (AdminModel) — CRUD with JSON items - [ ] **PmAgreementsModel** (ListModel) — query with status/customer filters - [ ] **PmAgreementModel** (AdminModel) — CRUD - [ ] **DispatchesModel** (ListModel) — query by WO/tech/status - [ ] **DispatchModel** (AdminModel) — CRUD - [ ] **FieldDashboardModel** — implement KPI queries (open WO count, revenue, tech utilization) ## Technical Notes - Use `$this->getDatabase()` (Joomla 6 pattern, not `Factory::getDbo()`) - Extend `Joomla\CMS\MVC\Model\ListModel` / `Joomla\CMS\MVC\Model\AdminModel` - Each AdminModel needs a corresponding `forms/` XML file - Namespace: `Moko\Component\MokoSuiteField\Administrator\Model`
Author
Owner

Branch created: feature/32-feat-implement-admin-listmodel-and-admin

git fetch origin
git checkout feature/32-feat-implement-admin-listmodel-and-admin
Branch created: [`feature/32-feat-implement-admin-listmodel-and-admin`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteField/src/branch/feature/32-feat-implement-admin-listmodel-and-admin) ```bash git fetch origin git checkout feature/32-feat-implement-admin-listmodel-and-admin ```
Sign in to join this conversation.
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteField#32