{{-- resources/views/admin/services/show.blade.php --}} @extends('layouts.master') @section('title', 'عرض خدمة') @section('pages') {{ __('dashboard.home') }} @endsection @section('css') @endsection @section('content') @php $unitMap = ['days' => 'يوم', 'months' => 'شهر', 'years' => 'سنة']; $dayMap = [ 'sat' => 'السبت', 'sun' => 'الأحد', 'mon' => 'الإثنين', 'tue' => 'الثلاثاء', 'wed' => 'الأربعاء', 'thu' => 'الخميس', 'fri' => 'الجمعة', ]; $fmtTime = function ($t) { if (!$t) { return '—'; } $p = explode(':', $t); return sprintf('%02d:%02d', (int) ($p[0] ?? 0), (int) ($p[1] ?? 0)); }; $durText = $service->duration_value . ' ' . ($unitMap[$service->duration_unit] ?? $service->duration_unit); $settings = $service->settings ?? []; $on = function ($arr) { return is_array($arr) && ((isset($arr['enabled']) && (string) $arr['enabled'] === '1') || $arr['enabled'] === true); }; $pause = $settings['pause'] ?? null; $transfer = $settings['transfer'] ?? null; $renew = $settings['renew'] ?? null; $refund = $settings['refund'] ?? null; $days = $settings['days'] ?? null; @endphp