From 78c2fd6c2dc384c714cd8fe46d6b95f5623035b1 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 3 May 2022 13:17:35 +0800 Subject: [PATCH 1/4] debug export booking analytics --- .../Exports/Services/ExportsAnalyticBookingTransactions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php b/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php index 791c0de3..d7b95220 100644 --- a/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php @@ -86,6 +86,7 @@ class ExportsAnalyticBookingTransactions implements FromQuery, WithHeadings, Wit $lastPayment = $booking->transactions()->where('type', 1)->whereIn('status', [2, 3])->orderBy('id', 'desc')->first(); + dump($booking); return [ $booking->id, $booking->company_id, From 060ae247f0fbf79fc923666591a52b9191c875f1 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 3 May 2022 13:20:29 +0800 Subject: [PATCH 2/4] debug export booking analytics --- .../Exports/Services/ExportsAnalyticBookingTransactions.php | 1 - app/Models/Booking.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php b/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php index d7b95220..791c0de3 100644 --- a/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php @@ -86,7 +86,6 @@ class ExportsAnalyticBookingTransactions implements FromQuery, WithHeadings, Wit $lastPayment = $booking->transactions()->where('type', 1)->whereIn('status', [2, 3])->orderBy('id', 'desc')->first(); - dump($booking); return [ $booking->id, $booking->company_id, diff --git a/app/Models/Booking.php b/app/Models/Booking.php index 69b8a745..2dfd945a 100644 --- a/app/Models/Booking.php +++ b/app/Models/Booking.php @@ -38,7 +38,7 @@ class Booking extends AbstractModel implements Documentable, Transactionable */ public function company(): BelongsTo { - return $this->BelongsTo(Company::class, 'company_id'); + return $this->BelongsTo(Company::class, 'company_id')->withTrashed(); } /** From 860e1314ea8624607fc7d91b7edda67b6a91ce04 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 3 May 2022 13:27:35 +0800 Subject: [PATCH 3/4] debug export booking analytics --- .../Modules/Accounts/ControllersLogic/CreateCustomerLogic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php index 3fe7b382..2c732126 100644 --- a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php +++ b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php @@ -14,6 +14,7 @@ use App\Classes\Modules\Companies\DataTransferObjects\EmploymentObject; use App\Classes\Modules\Contacts\Processors\CreateContactProcessor; use App\Classes\ValueObjects\Constants\ApprovalStatus; use App\Classes\ValueObjects\Constants\BusinessType; +use App\Classes\ValueObjects\Constants\CompanyType; use App\Classes\ValueObjects\Constants\RoleTypes; use App\Models\Company; use App\Models\User; @@ -91,7 +92,7 @@ class CreateCustomerLogic extends AbstractControllerLogic $user = $this->createUserProcessor->execute($request, RoleTypes::USER, App::environment(['local']) ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION); /** @var Company $company */ - $company = $this->createCompanyProcessor->execute($request, BusinessType::IMPORTER, $request->input('type'), ApprovalStatus::PENDING_SUBMISSION); + $company = $this->createCompanyProcessor->execute($request, BusinessType::IMPORTER, $request->input('type') === CompanyType::COMPANY_BUSINESS ? CompanyType::COMPANY_BUSINESS : CompanyType::PERSONAL_BUSINESS, ApprovalStatus::PENDING_SUBMISSION); $this->createContactProcessor->execute($request, $company); From 06dd1efa247202e279f35784fb189d4b696918ce Mon Sep 17 00:00:00 2001 From: omair saleh Date: Fri, 6 May 2022 13:49:37 +0800 Subject: [PATCH 4/4] remove raya announcement --- .../companies/sections/CustomerDashboardSectionComponent.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/resources/assets/vue/components/companies/sections/CustomerDashboardSectionComponent.vue b/resources/assets/vue/components/companies/sections/CustomerDashboardSectionComponent.vue index bcfafad5..9d11ecd0 100644 --- a/resources/assets/vue/components/companies/sections/CustomerDashboardSectionComponent.vue +++ b/resources/assets/vue/components/companies/sections/CustomerDashboardSectionComponent.vue @@ -3,11 +3,6 @@
-
-
- -
-