From 5ca55088cfc3df4edea96a72f4a114c46dba1fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 5 Oct 2021 23:49:44 +0300 Subject: [PATCH] close #2267 Enhancement: Invoice- settings changes are not saved when you choose a invoice template --- resources/assets/js/views/settings/settings.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/assets/js/views/settings/settings.js b/resources/assets/js/views/settings/settings.js index 40c7f9be6..805a2de76 100644 --- a/resources/assets/js/views/settings/settings.js +++ b/resources/assets/js/views/settings/settings.js @@ -103,6 +103,16 @@ const app = new Vue({ this.invoice_form = new Form('template'); + let skips = [ + '_method', '_prefix', '_token', 'action', 'errors', 'loading', 'method', 'response' + ]; + + for (const [key, value] of Object.entries(this.form)) { + if (!skips.includes(key)) { + this.invoice_form[key] = value; + } + } + this.invoice_form.template = this.invoice_form._template; },