sls/resources/views/components/chat-panel.blade.php
kushal.saha 1c84a162ac refactor(UI): interviewer panel
- overhaul the interviewer panel setup for more compact design
- assesment scheduling is now in a drawer
- replaced emojies with icon in candidate panel
2026-08-18 06:07:17 +00:00

45 lines
1.3 KiB
PHP

@props([
'warnings' => [],
'candidateName' => 'Candidate',
])
@php
$interviewerColors = [
'#6366f1', // Indigo
'#10b981', // Emerald
'#f59e0b', // Amber
'#ec4899', // Pink
'#8b5cf6', // Purple
'#06b6d4', // Cyan
'#f97316', // Orange
];
@endphp
<div {{ $attributes->twMerge(['class' => 'bg-[#0d1220] border border-[#1b2233] rounded-[9px] overflow-y-auto p-3 flex flex-col gap-2']) }}>
@if(count($warnings) > 0)
@foreach($warnings as $w)
@php
$isCand = is_null($w->sent_by);
$senderName = $isCand
? ($candidateName ?: 'Candidate')
: ($w->sender ? $w->sender->name : 'Interviewer');
$color = $isCand
? '#38bdf8'
: $interviewerColors[($w->sent_by ?? 1) % count($interviewerColors)];
@endphp
<x-chat-message
:senderName="$senderName"
:isCandidate="
:color="$color"
:message="$w->message"
:timestamp="$w->created_at"
/>
@endforeach
@else
<div class="h-full w-full flex items-center justify-center text-xs text-[#5b637a] italic">
No chat history. Send a message below.
</div>
@endif
</div>