Resolve "White list capability for cars for mobile app" #931

Merged
jankstudio merged 3 commits from 134-white-list-capability-for-cars-for-mobile-app into master 2018-06-03 21:52:05 +00:00
3 changed files with 39 additions and 1 deletions
Showing only changes of commit de14863e2f - Show all commits

View file

@ -24,6 +24,7 @@ use App\Ramcar\TradeInType;
use App\Ramcar\InvoiceStatus;
use App\Service\InvoiceCreator;
use App\Service\MQTTClient;
use App\Entity\RiderSession;
use App\Entity\Customer;
@ -457,7 +458,7 @@ class RAPIController extends Controller
$jo->setStatus(JOStatus::IN_TRANSIT);
$em->flush();
// TODO: send mqtt event
// TODO: send mqtt event (?)
// TODO: add event

View file

@ -59,10 +59,18 @@ class Vehicle
*/
protected $batteries;
// display in mobile app
/**
* @ORM\Column(type="boolean")
*/
protected $flag_mobile;
public function __construct()
{
$this->customers = new ArrayCollection();
$this->batteries = new ArrayCollection();
$this->flag_mobile = true;
}
public function getID()
@ -151,4 +159,15 @@ class Vehicle
{
return $this->batteries;
}
public function setDisplayMobile($bool = true)
{
$this->flag_mobile = $bool;
return $this;
}
public function shouldDisplayMobile()
{
return $this->flag_mobile;
}
}

View file

@ -34,9 +34,16 @@ class VehicleManufacturer
*/
protected $vehicles;
// display in mobile app
/**
* @ORM\Column(type="boolean")
*/
protected $flag_mobile;
public function __construct()
{
$this->vehicles = new ArrayCollection();
$this->flag_mobile = true;
}
public function getID()
@ -71,4 +78,15 @@ class VehicleManufacturer
{
return $this->vehicles;
}
public function setDisplayMobile($bool = true)
{
$this->flag_mobile = $bool;
return $this;
}
public function shouldDisplayMobile()
{
return $this->flag_mobile;
}
}