Files
thetool/application/TimerecordingPermit/TimerecordingPermitController.php
Spitzer Daniel 828caa35c9 Mobile Integration,Pop Multiple Networks,DataTables responsible update,Migrations
Mobile Integration:
* in footer.php js eingefügt damit das mobile Menu funktioniert
* in menu.php bzw. app.css neue Klasse eingefügt mobile-hide um in der mobilen Version Menupünkte zu verstecken

Pop Multiple Networks
* Pops können nun mehrere Netzgebiete haben
* Netzgebiete und Pop ansicht angepasst
* (Script muss ausgeführt werden um die PopNetwork Table vom Bestand zu befüllen)

DataTables responsible update
* Datatables update und responsible addon
* Diverse Anpassungen für Responsible in:
  - Pops, Geräte Hersteller, Geräte Typen, Devices, Benutzer

Anpassungen auf neu getProperty

Migrations
* PopNetwork
* Poprackmodulepatch
2024-01-09 16:25:26 +01:00

63 lines
1.4 KiB
PHP

<?php
class TimerecordingPermitController extends mfBaseController
{
protected function init()
{
$this->needlogin = true;
$me = new User();
$me->loadMe();
$this->me = $me;
$this->layout()->set("me", $me);
if (!$me->can(["Fibu"])) {
$this->redirect("Dashboard");
}
}
protected function indexAction()
{
$this->layout()->setTemplate("TimerecordingPermit/Index");
$timerecordingCategoriess = TimerecordingCategoryModel::getAll();
$this->layout()->set("timerecordingCategoriess", $timerecordingCategoriess);
$timerecordings = TimerecordingModel::getAllPermits();
$this->layout()->set("timerecordings", $timerecordings);
}
protected function addAction()
{
}
protected function editAction()
{
}
protected function saveAction()
{
}
protected function approveAction()
{
$id = $this->request->id;
$timerecordings = new Timerecording($id);
if (!$timerecordings->id || $timerecordings->id != $id) {
$this->layout()->setFlash("Buchung nicht gefunden.", "error");
$this->redirect("TimerecordingPermit");
}
$data = [];
$data['approved'] = 1;
$timerecordings->update($data);
$timerecordings->save();
$this->redirect("TimerecordingPermit");
}
}