Code sync from Shipping Portal, independent deployment of Vue Polling, Performance Improvement and tweaking for better user experience

This commit is contained in:
Dillon Ngo
2023-12-30 18:35:17 +08:00
parent 6da337b9dc
commit bf5ea2b2f2
26 changed files with 809 additions and 178 deletions
+1 -11
View File
@@ -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,