fix dashboard and order ui & fix address select component and added reference to addresses

This commit is contained in:
omair saleh
2021-08-12 15:01:16 +08:00
parent f876cc5822
commit fc0786264a
56 changed files with 1423 additions and 946 deletions
@@ -22,7 +22,8 @@ class CreateOrderAddressProcessor
/**
* CreateAddressProcessor constructor.
* @param CanCreateAddress $canCreateAddress
* @param CreatesAddress $CreatesAddress
* @param CreatesOrderAddress $createsOrderAddress
* @param FetchesAddress $fetchesAddress
*/
public function __construct(CanCreateAddress $canCreateAddress, CreatesOrderAddress $createsOrderAddress, FetchesAddress $fetchesAddress)
{
@@ -38,9 +39,9 @@ class CreateOrderAddressProcessor
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws \App\Classes\Exceptions\RequestValidationException
*/
public function execute(int $address_id, Order $order): Model {
public function execute(int $address, Order $order): Model {
$address = $this->fetchesAddress->getRepository()->whereIn('id',[$address_id])->first();
$address = $this->fetchesAddress->execute(['id' => $address_id]);
// $this->canCreateAddress->passes($object);