oportunidades 5
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-10 14:15:28 +02:00
parent 6ddafc95ba
commit 01405cbf8a
144 changed files with 28903 additions and 1103 deletions
@@ -3,6 +3,8 @@
namespace App\Http\Middleware;
use App\Services\InvestorPath;
use App\Services\OpportunityManagement;
use App\Services\PortalProfileAccess;
use Illuminate\Http\Request;
use Inertia\Middleware;
@@ -24,6 +26,14 @@ class HandleInertiaRequests extends Middleware
*/
public function version(Request $request): ?string
{
if (app()->environment('testing') && config('portal.qa_build_directory')) {
$manifest = public_path(config('portal.qa_build_directory').'/manifest.json');
$version = is_file($manifest) ? hash_file('xxh128', $manifest) : false;
return $version === false ? null : $version;
}
return parent::version($request);
}
@@ -39,11 +49,18 @@ class HandleInertiaRequests extends Middleware
return [
...parent::share($request),
'name' => config('app.name'),
'profileAccess' => app(PortalProfileAccess::class)->navigation($request->user()),
'portalOperator' => config('portal.operator_name'),
'educationEnabled' => (bool) config('education.enabled', false),
'aiEnabled' => (bool) config('investmoz_ai.enabled', false),
'existingBusinessEnabled' => (bool) config('existing-business.enabled', false),
'investorPathEnabled' => app(InvestorPath::class)->available(),
'opportunityManagement' => config('portal.opportunity_dashboard_access_enabled') && $request->user() && app(PortalProfileAccess::class)->legacyWriteAllowed($request->user()) ? [
'installed' => app(OpportunityManagement::class)->installed(),
'manage' => ['label' => 'Gestão de Oportunidades', 'href' => '/management/opportunities'],
'create' => ['label' => 'Nova oportunidade', 'href' => '/management/opportunities/create'],
'installationHref' => '/management/opportunity-management-install',
] : null,
'flash' => ['success' => fn () => $request->session()->get('success'), 'warning' => fn () => $request->session()->get('warning')],
'auth' => [
'user' => $request->user(),