Add flag_mobile fields in vehicle and vehicle manufacturer #134
This commit is contained in:
parent
78a2cf4b36
commit
de14863e2f
3 changed files with 39 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ use App\Ramcar\TradeInType;
|
||||||
use App\Ramcar\InvoiceStatus;
|
use App\Ramcar\InvoiceStatus;
|
||||||
|
|
||||||
use App\Service\InvoiceCreator;
|
use App\Service\InvoiceCreator;
|
||||||
|
use App\Service\MQTTClient;
|
||||||
|
|
||||||
use App\Entity\RiderSession;
|
use App\Entity\RiderSession;
|
||||||
use App\Entity\Customer;
|
use App\Entity\Customer;
|
||||||
|
|
@ -457,7 +458,7 @@ class RAPIController extends Controller
|
||||||
$jo->setStatus(JOStatus::IN_TRANSIT);
|
$jo->setStatus(JOStatus::IN_TRANSIT);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// TODO: send mqtt event
|
// TODO: send mqtt event (?)
|
||||||
|
|
||||||
// TODO: add event
|
// TODO: add event
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,18 @@ class Vehicle
|
||||||
*/
|
*/
|
||||||
protected $batteries;
|
protected $batteries;
|
||||||
|
|
||||||
|
// display in mobile app
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
protected $flag_mobile;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->customers = new ArrayCollection();
|
$this->customers = new ArrayCollection();
|
||||||
$this->batteries = new ArrayCollection();
|
$this->batteries = new ArrayCollection();
|
||||||
|
$this->flag_mobile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getID()
|
public function getID()
|
||||||
|
|
@ -151,4 +159,15 @@ class Vehicle
|
||||||
{
|
{
|
||||||
return $this->batteries;
|
return $this->batteries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setDisplayMobile($bool = true)
|
||||||
|
{
|
||||||
|
$this->flag_mobile = $bool;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function shouldDisplayMobile()
|
||||||
|
{
|
||||||
|
return $this->flag_mobile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,16 @@ class VehicleManufacturer
|
||||||
*/
|
*/
|
||||||
protected $vehicles;
|
protected $vehicles;
|
||||||
|
|
||||||
|
// display in mobile app
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
protected $flag_mobile;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->vehicles = new ArrayCollection();
|
$this->vehicles = new ArrayCollection();
|
||||||
|
$this->flag_mobile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getID()
|
public function getID()
|
||||||
|
|
@ -71,4 +78,15 @@ class VehicleManufacturer
|
||||||
{
|
{
|
||||||
return $this->vehicles;
|
return $this->vehicles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setDisplayMobile($bool = true)
|
||||||
|
{
|
||||||
|
$this->flag_mobile = $bool;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function shouldDisplayMobile()
|
||||||
|
{
|
||||||
|
return $this->flag_mobile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue