added new workorder mobile app

This commit is contained in:
2025-09-04 11:39:21 +02:00
parent 7046a4383f
commit 7fe07e2dc0
4 changed files with 652 additions and 0 deletions
@@ -30,6 +30,20 @@ class WorkorderCompanyController extends WorkorderBaseController {
parent::indexAction();
}
public function mobileAction() {
$company = WorkorderCompanyModel::getFirst(['addressId' => $this->user->address_id]);
$vue_config = [
'BASE_PATH' => '/WorkorderCompany',
'COMPANY_ID' => $company ? $company->id : 0,
// You can add more global variables for your Vue app here
];
// This tells the framework to use your new PWA layout file
$this->layout()->setTemplate("VueViews/WorkorderCompanyPWA");
$this->layout()->set("JSGlobals", $vue_config);
}
protected function getAction() {
$pagination = $this->postData['pagination'] ?? ['page' => 1, 'per_page' => 10];
$filters = $this->postData['filters'] ?? [];