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 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;