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