@extends('layouts.ownerLayout') @section('title', 'Paquetes') @section('page-script') @vite('resources/assets/js/owner-price-rules.js') @endsection @php $giftIncludedOptions = $giftOptions->where('type', 'included')->values(); $giftAdditionalOptions = $giftOptions->where('type', 'additional')->values(); $giftRuleCatalog = $giftOptions->map(function ($item) { return [ 'code' => $item->code, 'name' => $item->name, 'type' => $item->type, 'internal_cost' => (float) $item->internal_cost, 'base_price' => (float) $item->base_price, ]; })->values()->all(); $artistRuleCatalog = $artistOptions->map(function ($item) { return [ 'code' => $item->code, 'name' => $item->name, 'internal_cost' => (float) $item->internal_cost, 'base_price' => (float) $item->base_price, ]; })->values()->all(); $otherCostRuleCatalog = $otherCostOptions->map(function ($item) { return [ 'code' => $item->code, 'name' => $item->name, 'internal_cost' => (float) $item->internal_cost, 'base_price' => (float) $item->base_price, ]; })->values()->all(); @endphp @section('content') @if($currentGroup)
Los paquetes, obsequios, artistas y otros costos ya se administran por grupo mariachi.
Administra paquetes por ciudad y define costo interno, comisión y precio final.
| Nombre | Ciudad | Costo interno | Comisión | Precio paquete | Incluye | Estado | Orden | Acciones |
|---|---|---|---|---|---|---|---|---|
| {{ $item->name }} @if($item->is_default) Por defecto @endif | {{ $item->city }} | ${{ number_format((float) $item->internal_cost, 0, ',', '.') }} | ${{ number_format((float) $item->commission_amount, 0, ',', '.') }} | ${{ number_format((float) $item->base_price, 0, ',', '.') }} |
Obsequios: {{ count($item->gift_codes ?? []) }} Artistas: {{ count($item->artist_codes ?? []) }} Otros costos: {{ count($item->other_cost_codes ?? []) }} |
{{ $item->is_active ? 'Activo' : 'Inactivo' }} | {{ $item->sort_order }} |
@php
$packagePayload = json_encode([
'id' => (int) $item->id,
'name' => (string) $item->name,
'city' => (string) $item->city,
'internal_cost' => (float) $item->internal_cost,
'commission_amount' => (float) $item->commission_amount,
'base_price' => (float) $item->base_price,
'sort_order' => (int) $item->sort_order,
'is_active' => (bool) $item->is_active,
'is_default' => (bool) $item->is_default,
'gift_codes' => array_values($item->gift_codes ?? []),
'artist_codes' => array_values($item->artist_codes ?? []),
'other_cost_codes' => array_values($item->other_cost_codes ?? []),
], JSON_UNESCAPED_UNICODE);
$packagePayloadEncoded = base64_encode($packagePayload);
@endphp
|
| No hay paquetes creados. | ||||||||