diff --git a/config/app.php b/config/app.php index 56992ec551..26f3feb348 100644 --- a/config/app.php +++ b/config/app.php @@ -47,10 +47,10 @@ // Option Fractal, Serializer // TODO Does the ProcessMakerSerializer class exist, if so, we need to fix its namespace :) - 'serialize_fractal' => env('SERIALIZE_FRACTAL', \ProcessMaker\Transformers\ProcessMakerSerializer::class), + 'serialize_fractal' => env('SERIALIZE_FRACTAL', ProcessMaker\Transformers\ProcessMakerSerializer::class), //Option Fractal, paginator - 'paginate_fractal' => env('PAGINATE_FRACTAL', \League\Fractal\Pagination\IlluminatePaginatorAdapter::class), + 'paginate_fractal' => env('PAGINATE_FRACTAL', League\Fractal\Pagination\IlluminatePaginatorAdapter::class), // The processmaker identifier of the web client application 'web_client_application_id' => env('PM_CLIENT_ID', 'x-pm-local-client'), @@ -109,6 +109,10 @@ // Allows to detect if OpenAI is enabled or not 'open_ai_nlq_to_pmql' => env('OPEN_AI_NLQ_TO_PMQL_ENABLED', false) && env('OPEN_AI_SECRET', false), + // Allows to detect if OpenAI is enabled or not + 'open_ai_process_translations' => env('OPEN_AI_PROCESS_TRANSLATIONS_ENABLED', false) && + env('OPEN_AI_SECRET', false), + // Microservice AI Host 'ai_microservice_host' => env('AI_MICROSERVICE_HOST'), diff --git a/resources/views/processes/edit.blade.php b/resources/views/processes/edit.blade.php index 29bd43a339..e799bf8a24 100644 --- a/resources/views/processes/edit.blade.php +++ b/resources/views/processes/edit.blade.php @@ -25,12 +25,14 @@ {{__('Configuration')}} - @can('view-process-translations') - {{__('Translations')}} - @endcan + @if (config('app.open_ai_process_translations')) + @can('view-process-translations') + {{__('Translations')}} + @endcan + @endif {{__('Notifications')}} @@ -198,79 +200,81 @@ {{-- Translations --}} - @can('view-process-translations') -