mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on speech rec
This commit is contained in:
parent
276200ad3c
commit
c4e960a805
@ -12,17 +12,14 @@ class NavigateToIntent extends BaseIntent
|
|||||||
$location = $this->getField('Location');
|
$location = $this->getField('Location');
|
||||||
$location = str_replace(' ', '_', $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))) {
|
if (in_array($location, array_merge(Account::$basicSettings, Account::$advancedSettings))) {
|
||||||
$location = '/settings/' . $location;
|
$location = '/settings/' . $location;
|
||||||
|
} elseif (in_array($location, ['report', 'reports'])) {
|
||||||
|
$location = '/reports';
|
||||||
|
} elseif ($location == 'settings') {
|
||||||
|
$location = '/settings';
|
||||||
|
} else {
|
||||||
|
$location = '/dashboard';
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect($location);
|
return redirect($location);
|
||||||
|
@ -1041,7 +1041,7 @@ $LANG = array(
|
|||||||
'invoiced_amount' => 'Invoiced Amount',
|
'invoiced_amount' => 'Invoiced Amount',
|
||||||
'invoice_item_fields' => 'Invoice Item Fields',
|
'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.',
|
'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\'.',
|
'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
|
// Client Passwords
|
||||||
@ -2464,7 +2464,7 @@ $LANG = array(
|
|||||||
'confirm_account_to_import' => 'Please confirm your account to import data.',
|
'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.',
|
'import_started' => 'Your import has started, we\'ll send you an email once it completes.',
|
||||||
'listening' => 'Listening...',
|
'listening' => 'Listening...',
|
||||||
'microphone_help' => 'Say \'Create new invoice for...\'',
|
'microphone_help' => 'Say \'new invoice for...\'',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@
|
|||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<input type="text" name="command" id="search" style="width: 240px;padding-top:0px;padding-bottom:0px;margin-right:12px;"
|
<input type="text" name="command" id="search" style="width: 240px;padding-top:0px;padding-bottom:0px;margin-right:12px;"
|
||||||
class="form-control" placeholder="{{ trans('texts.search') . ': ' . trans('texts.search_hotkey')}}"/>
|
class="form-control" placeholder="{{ trans('texts.search') . ': ' . trans('texts.search_hotkey')}}"/>
|
||||||
@if (Utils::isNinja())
|
@if (Utils::isNinja() && Utils::isPro() && env('SPEECH_ENABLED'))
|
||||||
@include('partials/speech_recognition')
|
@include('partials/speech_recognition')
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -173,8 +173,8 @@
|
|||||||
|
|
||||||
function onMicrophoneClick() {
|
function onMicrophoneClick() {
|
||||||
//$('#search').val('create new invoice for edgar a po number of 1234');
|
//$('#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('create a task for edgar');
|
||||||
//$('#search').val('go to settings');
|
|
||||||
//$('#search-form').submit();
|
//$('#search-form').submit();
|
||||||
//return;
|
//return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user