@extends('layouts.app') @section('title', 'Manajemen Paket MCU - MCU Klinik Mustika') @section('breadcrumb')

Manajemen Paket MCU

@endsection @section('content')
{{-- Tombol header tabel sesuai DESIGN.md §3 --}}
@canRoute ('mcu-packages.sync-lab-tests') @endcanRoute @canRoute ('mcu-packages.create') Tambah Paket MCU @endcanRoute
@include('partials.tables.filters', ['paginator' => $packages, 'tableFilters' => ['sort', 'direction']]) {{-- Kolom Aksi: wajib text-center + style RdataTB override (DESIGN.md §3) --}} @forelse ($packages as $package) {{-- Sel Aksi: text-center dengan d-flex justify-content-center, hapus title="..." (DESIGN.md §3) --}} @empty @endforelse
No. @include('partials.tables.sort_link', ['column' => 'code', 'label' => 'Kode']) @include('partials.tables.sort_link', ['column' => 'name', 'label' => 'Nama Paket']) @include('partials.tables.sort_link', ['column' => 'package_type', 'label' => 'Tipe']) @include('partials.tables.sort_link', ['column' => 'price', 'label' => 'Harga']) @include('partials.tables.sort_link', ['column' => 'description', 'label' => 'Deskripsi']) @include('partials.tables.sort_link', ['column' => 'is_active', 'label' => 'Status']) Aksi
{{ $packages->firstItem() + $loop->index }} {{ $package->code }}
{{ $package->name }}
@if ($package->companies->isNotEmpty()) {{ $package->companies->first()->name }} @endif @if ($package->package_notes) {{ Str::limit($package->package_notes, 50) }} @endif
@if ($package->package_type === 'custom') Custom @else {{ $package->package_type }} @endif @php $baseMalePrice = $package->getBaseMalePrice(); $baseFemalePrice = $package->getBaseFemalePrice(); $addOns = $package->getAddOnsPrice(); $currentMalePrice = $package->male_price ?? $baseMalePrice; $currentFemalePrice = $package->female_price ?? $baseFemalePrice; // Untuk custom package tanpa gender pricing, gunakan price sebagai current price if ($package->package_type === 'custom' && !$package->hasGenderBasedPricing()) { $currentMalePrice = $package->price; $currentFemalePrice = $package->price; } @endphp
@if ($package->hasGenderBasedPricing()) {{-- Rincian Harga Laki-laki --}}
♂ Laki-laki:
Dasar: Rp {{ number_format($baseMalePrice, 0, ',', '.') }} @if ($addOns['total'] > 0) @foreach ($addOns['items'] as $addOnName => $addOnPrice)
+ {{ $addOnName }}: Rp {{ number_format($addOnPrice, 0, ',', '.') }} @endforeach @endif
Total: Rp {{ number_format($currentMalePrice, 0, ',', '.') }}
{{-- Rincian Harga Perempuan --}}
♀ Perempuan:
Dasar: Rp {{ number_format($baseFemalePrice, 0, ',', '.') }} @if ($addOns['total'] > 0) @foreach ($addOns['items'] as $addOnName => $addOnPrice)
+ {{ $addOnName }}: Rp {{ number_format($addOnPrice, 0, ',', '.') }} @endforeach @endif
Total: Rp {{ number_format($currentFemalePrice, 0, ',', '.') }}
@else {{-- Rincian Harga Tunggal --}}
Dasar: Rp {{ number_format($baseMalePrice, 0, ',', '.') }} @if ($addOns['total'] > 0) @foreach ($addOns['items'] as $addOnName => $addOnPrice)
+ {{ $addOnName }}: Rp {{ number_format($addOnPrice, 0, ',', '.') }} @endforeach @endif
Total: Rp {{ number_format($currentMalePrice, 0, ',', '.') }}
@endif
{{ Str::limit($package->description ?? '-', 30) }} @if ($package->is_active) Aktif @else Tidak Aktif @endif
@canRoute ('mcu-packages.show') @endcanRoute @canRoute ('mcu-packages.edit') @endcanRoute @canRoute ('mcu-packages.destroy')
@csrf @method ('DELETE')
@endcanRoute
Tidak ada data yang cocok dengan pencarian.
{{ $packages->links('partials.tables.pagination') }}
@endsection @push('scripts') @endpush