{{ trans('siri.saving') }}
@php // Convert legacy session success and validation errors into the unified // `notifications` shape for the current request only. Use session()->now // so we don't re-flash for the next request and risk persistence. $currentNotifications = session('notifications', []); if (session('success')) { $currentNotifications[] = [ 'type' => 'success', 'message' => session('success'), 'options' => ['title' => 'Success!', 'duration' => 5000], ]; } if ($errors->any()) { foreach ($errors->all() as $error) { $currentNotifications[] = [ 'type' => 'error', 'message' => $error, 'options' => ['title' => 'Validation Error', 'duration' => 8000], ]; } } if (!empty($currentNotifications)) { // Make available for the current render only session()->now('notifications', $currentNotifications); } @endphp
@csrf @if (isset($submission)) @method('POST') {{-- or use PATCH if your update route expects PATCH --}} @endif
{{-- This sets Tunisia as default --}}

{!! trans('siri.ai_generated_company_context') ?? 'AI Generated Company Context' !!}

{{-- Automation Category --}} {{-- Connectivity Category --}} {{-- Intelligence Category --}}

{!! trans('cosiri_html.interpretationBenchmark') !!}

{!! trans('cosiri.benchmark_chart_info') !!}

@php $dimensionKeys = [ 'vertical_integration', 'horizontal_integration', 'integrated_product_lifecycle', 'shop_floor_automation', 'enterprise_automation', 'facility_automation', 'shop_floor_connectivity', 'enterprise_connectivity', 'facility_connectivity', 'shop_floor_intelligence', 'enterprise_intelligence', 'facility_intelligence', 'workforce_learning_and_development', 'leadership_competency', 'inter_and_intra_company_collaboration', 'strategy_and_governance' ]; $dimensionLabels = []; foreach ($dimensionKeys as $k) { $dimensionLabels[$k] = trans('siri.dimensions.' . $k . '.name'); } @endphp @php $rawStrengths = old('strengthPoints', $submission->data['strengthPoints'] ?? []); $rawWeakness = old('weaknessPoints', $submission->data['weaknessPoints'] ?? []); $initialStrengths = array_map(function($p){ if (!is_array($p)) return $p; return [ 'dimension' => $p['dimension'] ?? '', 'strengthPoint_note' => js_safe($p['strengthPoint_note'] ?? $p['note'] ?? '') ]; }, (array) $rawStrengths); $initialWeaknesses = array_map(function($p){ if (!is_array($p)) return $p; $dimension = $p['dimension'] ?? ''; // Handle different dimension formats if (is_array($dimension)) { // Already an array $dimensionArray = $dimension; } elseif (is_string($dimension) && !empty($dimension)) { // String that might be comma-separated if (strpos($dimension, ',') !== false) { $dimensionArray = array_map('trim', explode(',', $dimension)); } else { $dimensionArray = [$dimension]; } } else { // Empty or null $dimensionArray = []; } return [ 'dimension' => $dimensionArray, 'weaknessPoint_note' => js_safe($p['weaknessPoint_note'] ?? '') ]; }, (array) $rawWeakness); $initialStrengthsJson = json_encode($initialStrengths); $initialWeaknessesJson = json_encode($initialWeaknesses); $dimensionKeysJson = json_encode($dimensionKeys); $dimensionLabelsJson = json_encode($dimensionLabels); $initialStrengthsB64 = base64_encode($initialStrengthsJson ?: '[]'); $initialWeaknessesB64 = base64_encode($initialWeaknessesJson ?: '[]'); $dimensionKeysB64 = base64_encode($dimensionKeysJson ?: '[]'); $dimensionLabelsB64 = base64_encode($dimensionLabelsJson ?: '{}'); @endphp
{{-- Enhanced Structure: - The layout is organized into logical sections with clear visual separators. - The "Strength Points" and "Weakness Points" sections are placed side-by-side on larger screens for an intuitive SWOT analysis feel. - Repetitive icons are replaced with unique, meaningful Heroicons for each field. Enhanced Icons & Style: - Each field and section now has a descriptive icon, improving scannability. - The dynamic list items for Strengths/Weaknesses have a cleaner card design with improved spacing and layout. - Interactive elements like "Add" and "Remove" buttons have refined hover states for better user feedback. --}}

{{ trans('cosiri.strength_points') }}

{{ trans('cosiri.weakness_points') }}

{{ trans('siri.table_mobile_message') }}

{{ trans('siri.current_priority') }}

# {{ trans('siri.project_name') }}
@if (config('app.debug'))

Notification System Demo

This demo section is only visible in development mode. Click any button to test the notification system!

@endif