@extends('emails.layout')
@section('content')
{{-- ملخص شهري للمشاريع الجديدة للمستقلين --}}
عزيزي
{{ $freelancer->name }}،
إليك ملخص المشاريع الجديدة التي تم نشرها خلال الشهر
من
{{ $weekStart->format('Y-m-d') }} إلى
{{ $weekEnd->format('Y-m-d') }}
📊 إحصائيات الشهر:
• إجمالي المشاريع الجديدة: {{ $projects->count() }}
@php
$avgPrice = $projects->map(function($p) {
return $p->price ?: (($p->price_from + $p->price_to) / 2);
})->filter()->avg();
$maxPrice = $projects->map(function($p) {
return $p->price ?: $p->price_to;
})->filter()->max();
@endphp
• متوسط قيمة المشروع: ${{ number_format($avgPrice ?? 0, 2) }}
• أعلى ميزانية: ${{ number_format($maxPrice ?? 0, 2) }}
@if($projects->count() > 0)
المشاريع الجديدة:
@foreach($projects->take(10) as $project)
{{ $project->title }}
@php
$projectPrice = $project->price ?: ($project->price_from && $project->price_to ? '$' . number_format($project->price_from, 0) . ' - $' . number_format($project->price_to, 0) : 'غير محدد');
if ($project->price) {
$projectPrice = '$' . number_format($project->price, 0);
}
@endphp
{{ $projectPrice }}
{{ Str::limit($project->description, 150) }}
@if($project->category)
📁 {{ $project->category->name }}
@endif
📅 {{ $project->created_at->format('M d') }}
@if($project->offers_count > 0)
💼 {{ $project->offers_count }} عرض
@endif
عرض التفاصيل →
@endforeach
@if($projects->count() > 10)
وهناك {{ $projects->count() - 10 }} مشروع آخر!
@endif
@else
لم يتم نشر مشاريع جديدة هذا الشهر.
تحقق مرة أخرى الشهر القادم!
@endif
💡 نصيحة الشهر:
{{ $weeklyTip }}