@php use App\Services\CompanyEmailDetails; \Illuminate\Support\Facades\Log::info('Style Partial: START - Partial is being loaded', [ 'customer_id' => $customer_id ?? 'NULL', 'customer_id_set' => isset($customer_id), 'file' => __FILE__ ]); // Get company details if customer_id is available if (isset($customer_id)) { \Illuminate\Support\Facades\Log::info('Style Partial: Getting company details', ['customer_id' => $customer_id]); $companyDetails = CompanyEmailDetails::getCompanyEmailDetails($customer_id); $emailTemplateBgColor = $companyDetails['email_template_background_color'] ?? ''; \Illuminate\Support\Facades\Log::info('Style Partial: Raw color from settings', [ 'raw_color' => $emailTemplateBgColor, 'is_empty' => empty($emailTemplateBgColor), 'is_not_found' => $emailTemplateBgColor === 'NOT_FOUND' ]); // Ensure we have a valid color - if empty or "NOT_FOUND", use default if (empty($emailTemplateBgColor) || $emailTemplateBgColor === 'NOT_FOUND') { $emailTemplateBgColor = '#1ABD4B'; \Illuminate\Support\Facades\Log::info('Style Partial: Using default color', ['color' => $emailTemplateBgColor]); } else { \Illuminate\Support\Facades\Log::info('Style Partial: Using color from settings', ['color' => $emailTemplateBgColor]); } } else { $emailTemplateBgColor = '#1ABD4B'; // Default color \Illuminate\Support\Facades\Log::info('Style Partial: No customer_id, using default color', ['color' => $emailTemplateBgColor]); } \Illuminate\Support\Facades\Log::info('Style Partial: About to render style tag', [ 'final_color' => $emailTemplateBgColor, 'color_length' => strlen($emailTemplateBgColor) ]); @endphp @php \Illuminate\Support\Facades\Log::info('Style Partial: END - Style tag rendered successfully', [ 'color_used' => $emailTemplateBgColor ?? 'NOT_SET', 'style_tag_closed' => true ]); @endphp @php \Illuminate\Support\Facades\Log::info('Style Partial: Style tag rendered successfully', [ 'style_tag_length' => strlen(''), 'color_used' => $emailTemplateBgColor ]); @endphp