mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
Code sync from Shipping Portal, independent deployment of Vue Polling, Performance Improvement and tweaking for better user experience
This commit is contained in:
@@ -11,19 +11,9 @@ use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Classes\ValueObjects\Constants\DocumentType;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class BookingResource extends JsonResource
|
||||
{
|
||||
private $userInfo;
|
||||
|
||||
public function __construct($resource, $userInfo = null)
|
||||
{
|
||||
parent::__construct($resource);
|
||||
$this->userInfo = $userInfo ?? ($resource->userInfo ?? null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
@@ -35,7 +25,7 @@ class BookingResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'company' => new CompanyResource($this->company, $this->userInfo),
|
||||
'company' => new CompanyResource($this->company),
|
||||
'bank' => new BankResource($this->bank),
|
||||
'service' => new ServiceTypeResource($this->service),
|
||||
'marking' => $this->marking,
|
||||
|
||||
Reference in New Issue
Block a user