@extends('admin.admin_dashboard') @section('admin')

Send SMS to {{ ucfirst($recipientType) }}

{{-- Alert Messages --}} @if(session('success')) @endif @if(session('error')) @endif @if($errors->any()) @endif {{-- Recipient Information Card --}}
@if($recipientType === 'student') Student Photo @else Teacher Photo @endif
@if($recipientType === 'student')

{{ $recipient->student_name_english ?? 'N/A' }}

Admission Roll: {{ $recipient->admission_roll ?? 'N/A' }}

Class: {{ $recipient->classModel->name ?? 'N/A' }}

Father's Phone: {{ $recipient->father_phone ?? 'N/A' }}

Mother's Phone: {{ $recipient->mother_phone ?? 'N/A' }}

SMS Number: {{ $recipient->sms_number ?? 'Not Set' }}

@else

{{ $recipient->name ?? 'N/A' }}

Teacher Code: {{ $recipient->teacher_code ?? 'N/A' }}

Primary Subject: {{ $recipient->primary_subject ?? 'N/A' }}

Email: {{ $recipient->email ?? 'N/A' }}

Joining Date: {{ $recipient->date_of_joining ? \Carbon\Carbon::parse($recipient->date_of_joining)->format('d-m-Y') : 'N/A' }}

Phone Number: {{ $recipient->phone ?? 'Not Set' }}

@endif
{{-- SMS Form --}}
@csrf {{-- SMS Number Display --}}
@php $phoneNumber = $recipientType === 'student' ? $recipient->sms_number : $recipient->phone; @endphp @if($phoneNumber) SMS will be sent to this number @else
Warning: Phone number is not set for this {{ $recipientType }}. Please update {{ $recipientType }} information first.
@endif
{{-- SMS Template Selection --}}
Select a template to auto-fill the message box
{{-- Message Box --}}
Maximum 500 characters 0/500 characters
{{-- Action Buttons --}}
@endsection