Resolve "New invoice service" #1669

Merged
korina.cordero merged 105 commits from 744-new-invoice-service into master 2023-11-22 08:54:54 +00:00
2 changed files with 20 additions and 0 deletions
Showing only changes of commit 3bf350ceaf - Show all commits

View file

@ -5,6 +5,8 @@ namespace App\Controller\CustomerAppAPI;
use Symfony\Component\HttpFoundation\Request;
use Catalyst\ApiBundle\Component\Response as ApiResponse;
use App\Entity\Service;
class ServiceController extends ApiController
{
public function listServices(Request $req)
@ -45,6 +47,7 @@ class ServiceController extends ApiController
$services[] = [
'id' => $result->getID(),
'name' => $result->getName(),
'icon' => $result->getIcon(),
// 'partners' => $partners,
];
}

View file

@ -28,6 +28,12 @@ class Service
*/
protected $name;
// icon used by service on app
/**
* @ORM\Column(type="string", length=80, nullable=true)
*/
protected $icon;
// link to partners with this service
/**
* @ORM\ManyToMany(targetEntity="Partner", mappedBy="services", fetch="EXTRA_LAZY")
@ -55,6 +61,17 @@ class Service
return $this->name;
}
public function setIcon($icon)
{
$this->icon = $icon;
return $this;
}
public function getIcon()
{
return $this->icon;
}
public function addPartner(Partner $partner)
{
$this->partners[$partner->getID()] = $partner;