From 13e56105e3bf1b667953381181cf4cfbb1bd9f68 Mon Sep 17 00:00:00 2001 From: raishvaria Date: Wed, 22 Jan 2020 13:39:59 +0530 Subject: [PATCH] fix auto update issue in dev --- app/Space/Updater.php | 15 ++++++++++++-- resources/assets/js/views/invoices/Create.vue | 20 ++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/app/Space/Updater.php b/app/Space/Updater.php index 536abf8e..6acb8f6a 100644 --- a/app/Space/Updater.php +++ b/app/Space/Updater.php @@ -19,7 +19,13 @@ class Updater $data = null; $path = null; - $url = 'https://craterapp.com/downloads/file/'.$version.'?type=update'; + if(env('APP_ENV') === 'development') + { + $url = 'https://craterapp.com/downloads/file/'.$version.'?type=update&is_dev=1'; + } else { + $url = 'https://craterapp.com/downloads/file/'.$version.'?type=update'; + } + $response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]); @@ -115,7 +121,12 @@ class Updater public static function checkForUpdate() { $data = null; - $url = 'https://craterapp.com/downloads/check/latest/'. Setting::getSetting('version') . '?type=update'; + if(env('APP_ENV') === 'development') + { + $url = 'https://craterapp.com/downloads/check/latest/'. Setting::getSetting('version') . '?type=update&is_dev=1'; + } else { + $url = 'https://craterapp.com/downloads/check/latest/'. Setting::getSetting('version') . '?type=update'; + } $response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]); diff --git a/resources/assets/js/views/invoices/Create.vue b/resources/assets/js/views/invoices/Create.vue index 89b45823..bb5e6dd7 100644 --- a/resources/assets/js/views/invoices/Create.vue +++ b/resources/assets/js/views/invoices/Create.vue @@ -135,8 +135,17 @@ icon="hashtag" @input="$v.invoiceNumAttribute.$touch()" /> - {{ $tc('validation.required') }} - {{ $tc('validation.numbers_only') }} + + {{ $tc('validation.required') }} + + + {{ $tc('validation.numbers_only') }} +
@@ -146,7 +155,12 @@ icon="hashtag" @input="$v.newInvoice.reference_number.$touch()" /> -
{{ $tc('validation.ref_number_maxlength') }}
+
+ {{ $tc('validation.ref_number_maxlength') }} +