Add hub branch in outlest list table
This commit is contained in:
parent
59b1cd3b31
commit
7ea7e238cc
2 changed files with 9 additions and 3 deletions
|
|
@ -67,7 +67,8 @@ class OutletController extends BaseController
|
|||
|
||||
// build query
|
||||
$query = $qb->select('q')
|
||||
->addSelect('hub.name as hub_name');
|
||||
->addSelect('hub.name as hub_name')
|
||||
->addSelect('hub.branch as hub_branch');
|
||||
|
||||
$this->setQueryFilters($datatable, $query);
|
||||
|
||||
|
|
@ -101,7 +102,7 @@ class OutletController extends BaseController
|
|||
$row['contact_nums'] = $orow[0]->getContactNumbers();
|
||||
$row['time_open'] = $orow[0]->getTimeOpen()->format('g:i A');
|
||||
$row['time_close'] = $orow[0]->getTimeClose()->format('g:i A');
|
||||
$row['hub_name'] = $orow['hub_name'];
|
||||
$row['hub_name'] = $orow['hub_name'] . ' ' . $orow['hub_branch'];
|
||||
|
||||
// add row metadata
|
||||
$row['meta'] = [
|
||||
|
|
|
|||
|
|
@ -93,6 +93,11 @@ trait Location
|
|||
return $this->branch;
|
||||
}
|
||||
|
||||
public function getFullName()
|
||||
{
|
||||
return $this->name . ' ' . $this->branch;
|
||||
}
|
||||
|
||||
public function setAddress($address)
|
||||
{
|
||||
$this->address = $address;
|
||||
|
|
@ -147,4 +152,4 @@ trait Location
|
|||
{
|
||||
return $this->time_close;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue