From 192d07e3a02a2a63fb59889c8029645e16f6134f Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 22 Mar 2021 04:16:57 +0800 Subject: [PATCH] fixing bugs --- .../CreateBookingPaymentLogic.php | 4 +- .../ControllersLogic/RenderDocumentLogic.php | 8 +- .../CreateSupplierTransactionLogic.php | 6 +- .../SuspendTransactionLogic.php | 2 +- .../forms/RegistrationFormComponent.vue | 228 +++++++++--------- .../banks/forms/BankAccountFormComponent.vue | 65 +++-- .../elements/PaymentVerificationComponent.vue | 8 +- .../bookings/forms/BookingFormComponent.vue | 16 ++ .../BookingPaymentQuotationComponent.vue | 24 +- .../forms/ConfirmQuotationFormComponent.vue | 4 +- .../DeletePaymentAttemptFormComponent.vue | 2 +- .../PaymentVerificationFormComponent.vue | 2 +- .../BookingDetailsSectionComponent.vue | 6 +- .../IdentificationVerificationComponent.vue | 8 +- .../elements/DocumentFileViewrComponent.vue | 8 +- routes/api.php | 2 +- 16 files changed, 210 insertions(+), 183 deletions(-) diff --git a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php index ab741b6b..b2a0732a 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php @@ -29,8 +29,8 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic */ protected function notification():array { return [ - 'title' => 'Create Payment Attempt', - 'message' => 'You have successfully created a payment attempt' + 'title' => 'Create Payment Booking', + 'message' => 'You have successfully created a payment booking' ]; } diff --git a/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php b/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php index 84759f14..2d095750 100644 --- a/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php +++ b/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php @@ -59,12 +59,6 @@ class RenderDocumentLogic extends AbstractControllerLogic throw new ResourceNotFoundException(); } - $extention = explode('.', $file); - if ($extention[1] == 'pdf') { - return $this->response(['src' => chunk_split(base64_encode(Storage::disk('documents')->get($file)))]); - } - else { - return $this->response(['src' => Storage::disk('documents')->get($file)]); - } + return $this->response(['src' => explode('.', $file)[1] == 'pdf' ? chunk_split(base64_encode(Storage::disk('documents')->get($file))) : Storage::disk('documents')->get($file) ]); } } \ No newline at end of file diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php index 95fd6b59..3e627645 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreateSupplierTransactionLogic.php @@ -17,6 +17,7 @@ use App\Classes\ValueObjects\Constants\ApprovalStatus; use App\Classes\ValueObjects\Constants\PaymentMethodType; use App\Classes\ValueObjects\Constants\TransactionType; use App\Classes\ValueObjects\Constants\DocumentType; +use App\Models\Document; use App\Models\Transaction; use Barryvdh\DomPDF\PDF; use Carbon\Carbon; @@ -115,12 +116,13 @@ class CreateSupplierTransactionLogic extends AbstractControllerLogic $object = new DocumentObject( DocumentType::CUSTOMER_PAYMENT_PROOF, [chunk_split('data:application/pdf;base64,'.base64_encode($pdf->output()))], - '', - ApprovalStatus::COMPLETED, + '', + ApprovalStatus::COMPLETED, 'supplier_orders' ); foreach ($transactions as $key => $row) { + /** @var Document $document */ $document = $this->createsDocument->execute($row, $object); $this->createsFile->execute($document, $object); } diff --git a/app/Classes/Modules/Transactions/ControllersLogic/SuspendTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/SuspendTransactionLogic.php index 07050078..e824547e 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/SuspendTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/SuspendTransactionLogic.php @@ -22,7 +22,7 @@ class SuspendTransactionLogic extends AbstractControllerLogic protected function notification():array { return [ 'title' => 'Suspend Transaction', - 'message' => 'You have successfully suspended the payment attempt' + 'message' => 'You have successfully suspended the payment booking' ]; } diff --git a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue index 1789325a..e3445491 100644 --- a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue @@ -1,79 +1,115 @@