@extends('layouts.app') @section('title', 'Manajemen Paket MCU - MCU Klinik Mustika') @section('breadcrumb')
| 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']) | {{-- Kolom Aksi: wajib text-center + style RdataTB override (DESIGN.md §3) --}}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:
{{-- Rincian Harga Perempuan --}}
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, ',', '.') }}
♀ Perempuan:
@else
{{-- Rincian Harga Tunggal --}}
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, ',', '.') }}
Dasar: Rp {{ number_format($baseMalePrice, 0, ',', '.') }}
@if ($addOns['total'] > 0)
@foreach ($addOns['items'] as $addOnName => $addOnPrice)
@endif
+ {{ $addOnName }}: Rp {{ number_format($addOnPrice, 0, ',', '.') }} @endforeach @endif Total: Rp {{ number_format($currentMalePrice, 0, ',', '.') }} |
{{ Str::limit($package->description ?? '-', 30) }} | @if ($package->is_active) Aktif @else Tidak Aktif @endif | {{-- Sel Aksi: text-center dengan d-flex justify-content-center, hapus title="..." (DESIGN.md §3) --}}|
| Tidak ada data yang cocok dengan pencarian. | |||||||