diff --git a/app/Ninja/Intents/WebApp/NavigateToIntent.php b/app/Ninja/Intents/WebApp/NavigateToIntent.php index 08990eb2d7c3..53ea8f72caeb 100644 --- a/app/Ninja/Intents/WebApp/NavigateToIntent.php +++ b/app/Ninja/Intents/WebApp/NavigateToIntent.php @@ -12,17 +12,14 @@ class NavigateToIntent extends BaseIntent $location = $this->getField('Location'); $location = str_replace(' ', '_', $location); - $map = [ - 'report' => 'reports', - 'settings' => ACCOUNT_COMPANY_DETAILS, - ]; - - if (isset($map[$location])) { - $location = $map[$location]; - } - if (in_array($location, array_merge(Account::$basicSettings, Account::$advancedSettings))) { $location = '/settings/' . $location; + } elseif (in_array($location, ['report', 'reports'])) { + $location = '/reports'; + } elseif ($location == 'settings') { + $location = '/settings'; + } else { + $location = '/dashboard'; } return redirect($location); diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 26632b74f7ee..97244efd3e7d 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1041,7 +1041,7 @@ $LANG = array( 'invoiced_amount' => 'Invoiced Amount', 'invoice_item_fields' => 'Invoice Item Fields', 'custom_invoice_item_fields_help' => 'Add a field when creating an invoice item and display the label and value on the PDF.', - 'recurring_invoice_number' => 'Recurring Invoice Number', + 'recurring_invoice_number' => 'Recurring Number', 'recurring_invoice_number_prefix_help' => 'Speciy a prefix to be added to the invoice number for recurring invoices. The default value is \'R\'.', // Client Passwords @@ -2464,7 +2464,7 @@ $LANG = array( 'confirm_account_to_import' => 'Please confirm your account to import data.', 'import_started' => 'Your import has started, we\'ll send you an email once it completes.', 'listening' => 'Listening...', - 'microphone_help' => 'Say \'Create new invoice for...\'', + 'microphone_help' => 'Say \'new invoice for...\'', ); diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index ff4ddbe8e2b2..b5ce6d8e47ff 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -313,7 +313,7 @@
- @if (Utils::isNinja()) + @if (Utils::isNinja() && Utils::isPro() && env('SPEECH_ENABLED')) @include('partials/speech_recognition') @endif
diff --git a/resources/views/partials/speech_recognition.blade.php b/resources/views/partials/speech_recognition.blade.php index 057c04a4928e..9b94ffcdb479 100644 --- a/resources/views/partials/speech_recognition.blade.php +++ b/resources/views/partials/speech_recognition.blade.php @@ -173,8 +173,8 @@ function onMicrophoneClick() { //$('#search').val('create new invoice for edgar a po number of 1234'); + //$('#search').val('invoice for edgar'); //$('#search').val('create a task for edgar'); - //$('#search').val('go to settings'); //$('#search-form').submit(); //return;