sls/resources/views/emails/call_mom.blade.php

114 lines
6.7 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minutes of Meeting (MoM)</title>
<style>
body { font-family: 'Segoe UI', Arial, sans-serif; background-color: #0b0f19; color: #f3f4f6; margin: 0; padding: 24px; }
.email-card { max-width: 650px; margin: 0 auto; background: #111827; border-radius: 12px; border: 1px solid rgba(255,255,255,0.15); overflow: hidden; }
.email-header { background: linear-gradient(135deg, #1e1b4b, #312e81); padding: 26px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.email-header h1 { margin: 0; color: #ffffff; font-size: 20px; font-weight: 700; }
.email-header p { margin: 6px 0 0 0; color: #a5b4fc; font-size: 13px; }
.email-body { padding: 26px 24px; }
.section-title { font-size: 15px; font-weight: 700; color: #e0e7ff; margin: 20px 0 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 6px; }
.summary-box { background: rgba(99, 102, 241, 0.08); border-left: 4px solid #6366f1; padding: 14px 18px; border-radius: 0 8px 8px 0; color: #cbd5e1; font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.badge-happy { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-neutral { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-sad { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-angry { background: rgba(239, 68, 68, 0.25); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.5); font-weight: 700; }
.table-custom { width: 100%; border-collapse: collapse; margin: 12px 0 20px 0; font-size: 13px; }
.table-custom th { background: rgba(255,255,255,0.06); text-align: left; padding: 10px; color: #9ca3af; font-weight: 600; }
.table-custom td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); color: #e5e7eb; }
.mom-content { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); padding: 16px; border-radius: 8px; color: #d1d5db; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.btn-view { display: inline-block; background: #4f46e5; color: #ffffff !important; font-weight: 600; font-size: 14px; padding: 10px 20px; border-radius: 6px; text-decoration: none; margin-top: 20px; }
.email-footer { border-top: 1px solid rgba(255,255,255,0.08); padding: 16px 24px; text-align: center; color: #6b7280; font-size: 12px; }
</style>
</head>
<body>
<div class="email-card">
<div class="email-header">
<h1>SingleLogin AI Meeting Intelligence</h1>
<p>Minutes of Meeting (MoM) & AI Call Summary</p>
</div>
<div class="email-body">
<p style="font-size: 15px; margin-top: 0;">Hello <strong>{{ $recipientName }}</strong>,</p>
<p style="font-size: 14px; color: #d1d5db;">
Here is the automated AI-generated Minutes of Meeting (MoM) for <strong>{{ $callNote->client->project_name ?? 'Client Call' }}</strong> with <strong>{{ $callNote->client->client_name ?? 'Client' }}</strong>.
</p>
<div style="margin: 16px 0; display: flex; align-items: center; gap: 10px;">
<span style="font-size: 13px; color: #9ca3af;">Detected Client Sentiment:</span>
@php
$sentiment = strtolower($callNote->detected_sentiment ?? 'neutral');
$badgeClass = match($sentiment) {
'happy' => 'badge-happy',
'sad' => 'badge-sad',
'angry' => 'badge-angry',
default => 'badge-neutral',
};
$emoji = match($sentiment) {
'happy' => '😊 Happy / Satisfied',
'sad' => '😟 Concerned / Sad',
'angry' => '😡 Frustrated / Angry',
default => '😐 Neutral / Professional',
};
@endphp
<span class="badge {{ $badgeClass }}">{{ $emoji }}</span>
</div>
<div class="section-title">Executive Summary</div>
<div class="summary-box">
{{ $callNote->summary ?? 'Meeting completed successfully.' }}
</div>
@if(!empty($callNote->action_items) && count($callNote->action_items) > 0)
<div class="section-title">Action Items & Deliverables</div>
<table class="table-custom">
<thead>
<tr>
<th>Task / Action Item</th>
<th>Assignee</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($callNote->action_items as $item)
<tr>
<td>{{ is_array($item) ? ($item['task'] ?? $item['action'] ?? json_encode($item)) : $item }}</td>
<td>{{ is_array($item) ? ($item['owner'] ?? 'Team') : 'Team' }}</td>
<td><span style="color: #34d399;">{{ is_array($item) ? ($item['status'] ?? 'Assigned') : 'Assigned' }}</span></td>
</tr>
@endforeach
</tbody>
</table>
@endif
@if(!empty($callNote->key_decisions) && count($callNote->key_decisions) > 0)
<div class="section-title">Key Decisions Made</div>
<ul style="color: #cbd5e1; font-size: 13px; line-height: 1.6; margin: 10px 0 20px 20px;">
@foreach($callNote->key_decisions as $decision)
<li>{{ is_array($decision) ? ($decision['decision'] ?? json_encode($decision)) : $decision }}</li>
@endforeach
</ul>
@endif
<div class="section-title">Full Minutes of Meeting (MoM)</div>
<div class="mom-content">{!! nl2br(e($callNote->mom_content)) !!}</div>
<div style="text-align: center; margin-top: 24px;">
<a href="{{ route('client-calls.show', $callNote->client_id) }}" class="btn-view" target="_blank">
🔍 Open Client Hub & Complete Profile
</a>
</div>
</div>
<div class="email-footer">
<p>This automated summary was generated by SingleLogin AI Notes Engine. Saved to client profile archive.</p>
</div>
</div>
</body>
</html>