Add rider_slots to hub. #381
This commit is contained in:
parent
cc055f34f9
commit
c7af1c1592
3 changed files with 27 additions and 2 deletions
|
|
@ -152,7 +152,8 @@ class HubController extends Controller
|
|||
->setTimeClose($time_close)
|
||||
->setCoordinates($point)
|
||||
->setBranchCode($req->request->get('branch_code', ''))
|
||||
->setStatusOpen($req->request->get('status_open') ?? false);
|
||||
->setStatusOpen($req->request->get('status_open') ?? false)
|
||||
->setRiderSlots($req->request->get('rider_slots'), 0);
|
||||
}
|
||||
|
||||
protected function setQueryFilters($datatable, QueryBuilder $query)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,12 @@ class Hub
|
|||
*/
|
||||
protected $status_open;
|
||||
|
||||
// number of rider slots per day
|
||||
/**
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
protected $rider_slots;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->time_open = new DateTime();
|
||||
|
|
@ -150,4 +156,15 @@ class Hub
|
|||
return $this->status_open;
|
||||
}
|
||||
|
||||
public function setRiderSlots($rider_slots)
|
||||
{
|
||||
$this->rider_slots = $rider_slots;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRiderSlots()
|
||||
{
|
||||
return $this->rider_slots;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,14 @@
|
|||
<input type="text" name="branch_code" class="form-control m-input" value="{{ obj.getBranchCode() }}">
|
||||
<div class="form-control-feedback hide" data-field="branch_code"></div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-3">
|
||||
<label for="rider_slots" data-field="rider_slots">
|
||||
Number of Riders Per Slot
|
||||
</label>
|
||||
<input type="text" name="rider_slots" class="form-control m-input" value="{{ obj.getRiderSlots() }}">
|
||||
<div class="form-control-feedback hide" data-field="rider_slots"></div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<span class="m-switch m-switch--icon block-switch">
|
||||
<label>
|
||||
<input type="checkbox" name="status_open" id="status-open" value="1"{{ obj.isStatusOpen ? ' checked' }}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue