@extends('layouts.master') @section('css') @endsection @section('title') دليل العملاء الشامل @stop @section('page-header')
| # ID | اسم العميل / المؤسسة | تاريخ الاشتراك والمدة | رقم الجوال والتواصل | الرابط وبيانات الدخول | العقد |
|---|---|---|---|---|---|
| #{{ $customer->id }} | {{-- 2. اسم العميل --}}
{{ mb_substr($customer->name ?? 'ع', 0, 1, 'utf-8') }}
{{ $customer->name ?? '---' }}
@if($customer->address)
{{ $customer->address }}
@endif
|
{{-- 3. تاريخ الاشتراك --}}
@if($customer->subscription_date)
{{ \Carbon\Carbon::parse($customer->subscription_date)->format('Y-m-d') }}
@php
$startDate = \Carbon\Carbon::parse($customer->subscription_date);
$totalMonths = $startDate->diffInMonths(\Carbon\Carbon::now());
$years = round($totalMonths / 12);
if ($years == 0 && $totalMonths >= 6) {
$years = 1;
}
$yearsText = match(true) {
$years <= 0 => 'أقل من سنة',
$years == 1 => 'منذ سنة',
$years == 2 => 'منذ سنتين',
$years >= 3 && $years <= 10 => 'منذ ' . $years . ' سنوات',
default => 'منذ ' . $years . ' سنة'
};
@endphp
{{ $yearsText }}
@else
---
@endif
|
{{-- 4. رقم الجوال والتواصل --}}
{{-- 5. الرابط وبيانات الدخول --}} |
@if($customer->website_link)
{{-- للعميل السحابي الذي يمتلك رابط --}}
فتح النظام السحابي
@else
{{-- في حال عدم وجود رابط (عميل محلي) --}}
برنامج محلي
@endif
{{-- بيانات الدخول إن وجدت --}}
@if($customer->admin_credentials)
@elseif($customer->website_link)
(لا توجد بيانات دخول)
@endif
|
{{-- 6. إنشاء العقد --}}
العقد |
| لم يتم العثور على أي عملاء مسجلين يطابقون البحث. | |||||