From 24f8175c2a0a73d8e6647fda11602a0c81da446a Mon Sep 17 00:00:00 2001 From: jayvirsinh_gohil Date: Fri, 15 Nov 2019 18:24:42 +0530 Subject: [PATCH 1/2] refactor send invoice and estimate --- app/Http/Controllers/EstimatesController.php | 4 ++-- app/Http/Controllers/InvoicesController.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/EstimatesController.php b/app/Http/Controllers/EstimatesController.php index 790502d1..706a50a1 100644 --- a/app/Http/Controllers/EstimatesController.php +++ b/app/Http/Controllers/EstimatesController.php @@ -328,13 +328,13 @@ class EstimatesController extends Controller ]); } + \Mail::to($email)->send(new EstimatePdf($data, $notificationEmail)); + if ($estimate->status == Estimate::STATUS_DRAFT) { $estimate->status = Estimate::STATUS_SENT; $estimate->save(); } - \Mail::to($email)->send(new EstimatePdf($data, $notificationEmail)); - return response()->json([ 'success' => true ]); diff --git a/app/Http/Controllers/InvoicesController.php b/app/Http/Controllers/InvoicesController.php index 54a8d764..13415b36 100644 --- a/app/Http/Controllers/InvoicesController.php +++ b/app/Http/Controllers/InvoicesController.php @@ -392,13 +392,14 @@ class InvoicesController extends Controller ]); } + \Mail::to($email)->send(new invoicePdf($data, $notificationEmail)); + if ($invoice->status == Invoice::STATUS_DRAFT) { $invoice->status = Invoice::STATUS_SENT; $invoice->sent = true; $invoice->save(); } - \Mail::to($email)->send(new invoicePdf($data, $notificationEmail)); return response()->json([ 'success' => true From 563ae2c3f903ab74b311044126084f7f782a2422 Mon Sep 17 00:00:00 2001 From: Aman upadhyay Date: Fri, 15 Nov 2019 18:48:00 +0530 Subject: [PATCH 2/2] fixes --- resources/assets/js/views/settings/UpdateApp.vue | 10 +++++++--- resources/assets/sass/pages/settings.scss | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/views/settings/UpdateApp.vue b/resources/assets/js/views/settings/UpdateApp.vue index 787d066d..8b9db1ea 100644 --- a/resources/assets/js/views/settings/UpdateApp.vue +++ b/resources/assets/js/views/settings/UpdateApp.vue @@ -13,7 +13,7 @@ {{ $t('settings.update_app.check_update') }}
-
+

{{ $t('settings.update_app.avail_update') }}


@@ -24,13 +24,13 @@ {{ $t('settings.update_app.update') }}
- +
@@ -42,6 +42,7 @@ export default { return { isShowProgressBar: false, isUpdateAvail: false, + isUpdating: false, progress: 10, interval: null, description: '', @@ -60,11 +61,14 @@ export default { }, methods: { async onUpdateApp () { + this.isUpdating = true const data = this.updateData let response = await axios.post('/api/update', data) console.log(response.data) + this.isUpdating = false }, async checkUpdate () { + this.isUpdateAvail = true let response = await axios.get('/api/check/update') console.log(response.data) if (response.data) { diff --git a/resources/assets/sass/pages/settings.scss b/resources/assets/sass/pages/settings.scss index 3e451271..c9b682eb 100644 --- a/resources/assets/sass/pages/settings.scss +++ b/resources/assets/sass/pages/settings.scss @@ -153,6 +153,7 @@ .version { background: #EAF1FB; + color: #A5ACC1; border: 1px solid #EAF1FB; box-sizing: border-box; border-radius: 5px;