diff --git a/public/js/clients/invoices/payment.js b/public/js/clients/invoices/payment.js index 7ee77190ed..13aec24256 100644 --- a/public/js/clients/invoices/payment.js +++ b/public/js/clients/invoices/payment.js @@ -77,6 +77,7 @@ var Payment = /*#__PURE__*/function () { }, { key: "displaySignature", value: function displaySignature() { + document.getElementById("signature-next-step").disabled = true; var displaySignatureModal = document.getElementById("displaySignatureModal"); displaySignatureModal.removeAttribute("style"); var signaturePad = new SignaturePad(document.getElementById("signature-pad"), { @@ -91,7 +92,6 @@ var Payment = /*#__PURE__*/function () { key: "handle", value: function handle() { var _this2 = this; - document.getElementById("signature-next-step").disabled = true; document.querySelectorAll(".dropdown-gateway-button").forEach(function (element) { element.addEventListener("click", function () { if (!_this2.submitting) { diff --git a/public/js/clients/purchase_orders/accept.js b/public/js/clients/purchase_orders/accept.js index 41deb8c75c..bb5964c590 100644 --- a/public/js/clients/purchase_orders/accept.js +++ b/public/js/clients/purchase_orders/accept.js @@ -54,7 +54,12 @@ var Accept = /*#__PURE__*/function () { value: function handle() { var _this = this; document.getElementById("signature-next-step").disabled = true; + document.getElementById("close-button").addEventListener('click', function () { + var approveButton = document.getElementById("approve-button"); + if (approveButton) approveButton.disabled = false; + }); document.getElementById('approve-button').addEventListener('click', function () { + console.log("accepted "); if (_this.shouldDisplaySignature && _this.shouldDisplayTerms) { _this.displaySignature(); document.getElementById('signature-next-step').addEventListener('click', function () { diff --git a/public/js/clients/quotes/approve.js b/public/js/clients/quotes/approve.js index 9234dee404..4fe3a7bbd9 100644 --- a/public/js/clients/quotes/approve.js +++ b/public/js/clients/quotes/approve.js @@ -61,12 +61,14 @@ var Approve = /*#__PURE__*/function () { value: function handle() { var _this = this; document.getElementById("signature-next-step").disabled = true; - document.getElementById("close_button").addEventListener('click', function () { + document.getElementById("close-button").addEventListener('click', function () { var approveButton = document.getElementById("approve-button"); + console.log('close button'); if (approveButton) approveButton.disabled = false; }); - document.getElementById("hide_close").addEventListener('click', function () { + document.getElementById("close-terms-button").addEventListener('click', function () { var approveButton = document.getElementById("approve-button"); + console.log('close terms-button'); if (approveButton) approveButton.disabled = false; }); document.getElementById('approve-button').addEventListener('click', function () { diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 5d7f7371c1..2dffe7a092 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -9,13 +9,13 @@ "/js/clients/payments/stripe-bacs.js": "/js/clients/payments/stripe-bacs.js?id=a82927936510bbecc60de3e9742f9739", "/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=b7601721afa9599518ba894a0f88f947", "/js/clients/purchase_orders/action-selectors.js": "/js/clients/purchase_orders/action-selectors.js?id=b9c510dffa8420879983f04cd521564c", - "/js/clients/purchase_orders/accept.js": "/js/clients/purchase_orders/accept.js?id=d13b4a7934c9f7ddf2154f8f233843f7", - "/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=1bd5f983e7d9394fe9ac603dea94e901", + "/js/clients/purchase_orders/accept.js": "/js/clients/purchase_orders/accept.js?id=e9040b9f5e9bbf5d04b8a02a284d0481", + "/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=edeab1566d21cb93901d571bdcbb7c30", "/js/clients/payments/stripe-sofort.js": "/js/clients/payments/stripe-sofort.js?id=f0252b9b140b667794c252ae200cd844", "/js/clients/payments/stripe-alipay.js": "/js/clients/payments/stripe-alipay.js?id=360b39d82a1a7dd90a8351776fbd9edb", "/js/clients/payments/checkout-credit-card.js": "/js/clients/payments/checkout-credit-card.js?id=a2168c43060a7de40da20b5fc599bcab", "/js/clients/quotes/action-selectors.js": "/js/clients/quotes/action-selectors.js?id=4158693089b29ee8e13cb7d9ce4480a9", - "/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=4e596cec23cdd6487534e6ed5499d791", + "/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=4091846cf28ded010380cc2678fbe831", "/js/clients/payments/stripe-credit-card.js": "/js/clients/payments/stripe-credit-card.js?id=bfa116c1df42c641bc7a3ff4fa8d50dd", "/js/setup/setup.js": "/js/setup/setup.js?id=086b9e114b0b9ee01f909d686f489162", "/js/clients/payments/card-js.min.js": "/js/clients/payments/card-js.min.js?id=cf50b5ba1fcd1d184bf0c10d710672c8", diff --git a/resources/js/clients/invoices/payment.js b/resources/js/clients/invoices/payment.js index 463735982e..588a3dfcfc 100644 --- a/resources/js/clients/invoices/payment.js +++ b/resources/js/clients/invoices/payment.js @@ -84,6 +84,8 @@ class Payment { } displaySignature() { + document.getElementById("signature-next-step").disabled = true; + let displaySignatureModal = document.getElementById( "displaySignatureModal" ); @@ -104,7 +106,6 @@ class Payment { } handle() { - document.getElementById("signature-next-step").disabled = true; document .querySelectorAll(".dropdown-gateway-button") diff --git a/resources/js/clients/purchase_orders/accept.js b/resources/js/clients/purchase_orders/accept.js index bd39e20b87..dfcf83d807 100644 --- a/resources/js/clients/purchase_orders/accept.js +++ b/resources/js/clients/purchase_orders/accept.js @@ -48,9 +48,20 @@ class Accept { document.getElementById("signature-next-step").disabled = true; + document.getElementById("close-button").addEventListener('click', () => { + const approveButton = document.getElementById("approve-button"); + + if (approveButton) + approveButton.disabled = false; + + }); + document .getElementById('approve-button') .addEventListener('click', () => { + + console.log("accepted "); + if (this.shouldDisplaySignature && this.shouldDisplayTerms) { this.displaySignature(); diff --git a/resources/js/clients/quotes/approve.js b/resources/js/clients/quotes/approve.js index 536c218d0e..ebbeb00f45 100644 --- a/resources/js/clients/quotes/approve.js +++ b/resources/js/clients/quotes/approve.js @@ -55,22 +55,27 @@ class Approve { document.getElementById("signature-next-step").disabled = true; - document.getElementById("close_button").addEventListener('click', () => { + document.getElementById("close-button").addEventListener('click', () => { const approveButton = document.getElementById("approve-button"); + console.log('close button'); + if(approveButton) approveButton.disabled = false; }); - document.getElementById("hide_close").addEventListener('click', () => { + document.getElementById("close-terms-button").addEventListener('click', () => { const approveButton = document.getElementById("approve-button"); - if(approveButton) + console.log('close terms-button'); + + if (approveButton) approveButton.disabled = false; }); + document .getElementById('approve-button') .addEventListener('click', () => { diff --git a/resources/views/portal/ninja2020/components/html-viewer.blade.php b/resources/views/portal/ninja2020/components/html-viewer.blade.php index b459ca03e4..e471ed24fa 100644 --- a/resources/views/portal/ninja2020/components/html-viewer.blade.php +++ b/resources/views/portal/ninja2020/components/html-viewer.blade.php @@ -1,4 +1,4 @@ - +@push('head') +@endpush
@@ -43,7 +44,6 @@ span {
-
@@ -182,10 +182,10 @@ span { {{ strip_tags($entity->footer) }}
-
@endif +@push('head') +@endpush \ No newline at end of file diff --git a/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php b/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php index 0a0852abd9..ddde1a25a7 100644 --- a/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php @@ -1,64 +1,64 @@
-
- -
- + -
-
-@include('portal.ninja2020.components.html-viewer') -
+
+ @include('portal.ninja2020.components.html-viewer') +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/components/pdf-viewer.blade.php b/resources/views/portal/ninja2020/components/pdf-viewer.blade.php index 847610d316..8bf2d69be1 100644 --- a/resources/views/portal/ninja2020/components/pdf-viewer.blade.php +++ b/resources/views/portal/ninja2020/components/pdf-viewer.blade.php @@ -56,14 +56,14 @@ -@if($mobile) + @livewire('pdf-slot', ['entity' => $entity, 'invitation' => $invitation, 'db' => $invitation->company->db]) -@endif + @if($mobile) diff --git a/resources/views/portal/ninja2020/credits/show.blade.php b/resources/views/portal/ninja2020/credits/show.blade.php index c8cccc0f7c..2960a301e3 100644 --- a/resources/views/portal/ninja2020/credits/show.blade.php +++ b/resources/views/portal/ninja2020/credits/show.blade.php @@ -32,8 +32,7 @@ @include('portal.ninja2020.components.entity-documents', ['entity' => $credit]) - - @include('portal.ninja2020.components.pdf-viewer', ['entity' => $credit, 'invitation' => $invitation]) + @livewire('pdf-slot', ['entity' => $credit, 'invitation' => $invitation, 'db' => $invitation->company->db]) @endsection diff --git a/resources/views/portal/ninja2020/invoices/includes/signature.blade.php b/resources/views/portal/ninja2020/invoices/includes/signature.blade.php index eaa17d80e7..5464b60750 100644 --- a/resources/views/portal/ninja2020/invoices/includes/signature.blade.php +++ b/resources/views/portal/ninja2020/invoices/includes/signature.blade.php @@ -1,4 +1,4 @@ - -
-
+
+
-
-
diff --git a/resources/views/portal/ninja2020/invoices/includes/terms.blade.php b/resources/views/portal/ninja2020/invoices/includes/terms.blade.php index a963926e9d..299bf9fc3f 100644 --- a/resources/views/portal/ninja2020/invoices/includes/terms.blade.php +++ b/resources/views/portal/ninja2020/invoices/includes/terms.blade.php @@ -1,4 +1,4 @@ -
-
+
-
-
diff --git a/resources/views/portal/ninja2020/invoices/show.blade.php b/resources/views/portal/ninja2020/invoices/show.blade.php index e62ef6e12c..7f090a4f7e 100644 --- a/resources/views/portal/ninja2020/invoices/show.blade.php +++ b/resources/views/portal/ninja2020/invoices/show.blade.php @@ -5,7 +5,6 @@ @include('portal.ninja2020.components.no-cache') - @endpush @@ -96,18 +95,26 @@ @endif @include('portal.ninja2020.components.entity-documents', ['entity' => $invoice]) - @include('portal.ninja2020.components.pdf-viewer', ['entity' => $invoice, 'invitation' => $invitation]) - @include('portal.ninja2020.invoices.includes.terms', ['entities' => [$invoice], 'entity_type' => ctrans('texts.invoice')]) - @include('portal.ninja2020.invoices.includes.signature') + @livewire('pdf-slot', ['entity' => $invoice, 'invitation' => $invitation, 'db' => $invitation->company->db]) + @endsection @section('footer') - - + @include('portal.ninja2020.invoices.includes.signature') + @include('portal.ninja2020.invoices.includes.terms', ['entities' => [$invoice], 'entity_type' => ctrans('texts.invoice')]) +@endsection + +@push('head') + + -@endsection +@endpush diff --git a/resources/views/portal/ninja2020/purchase_orders/show.blade.php b/resources/views/portal/ninja2020/purchase_orders/show.blade.php index c95648b5d8..172beb0291 100644 --- a/resources/views/portal/ninja2020/purchase_orders/show.blade.php +++ b/resources/views/portal/ninja2020/purchase_orders/show.blade.php @@ -46,19 +46,27 @@ @endif @include('portal.ninja2020.components.entity-documents', ['entity' => $purchase_order]) - @include('portal.ninja2020.components.pdf-viewer', ['entity' => $purchase_order, 'invitation' => $invitation]) + @livewire('pdf-slot', ['entity' => $purchase_order, 'invitation' => $invitation, 'db' => $invitation->company->db]) + +@endsection + +@section('footer') @include('portal.ninja2020.invoices.includes.terms', ['entities' => [$purchase_order], 'entity_type' => ctrans('texts.purchase_order')]) @include('portal.ninja2020.invoices.includes.signature') @endsection -@section('footer') - - +@push('head') + + -@endsection +@endpush diff --git a/resources/views/portal/ninja2020/quotes/includes/signature.blade.php b/resources/views/portal/ninja2020/quotes/includes/signature.blade.php index ae3e73d4e5..5f39e58b39 100644 --- a/resources/views/portal/ninja2020/quotes/includes/signature.blade.php +++ b/resources/views/portal/ninja2020/quotes/includes/signature.blade.php @@ -1,5 +1,5 @@