Promociones
This commit is contained in:
@ -1,9 +1,21 @@
|
||||
@extends('layout.base')
|
||||
|
||||
@section('page_title')
|
||||
@hasSection('promotions_title')
|
||||
Promoción - @yield('promotions_title')
|
||||
@else
|
||||
Promociones
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('page_content')
|
||||
<div class="ui container">
|
||||
<h2 class="ui header">
|
||||
Promociones
|
||||
@hasSection('promotions_header')
|
||||
Promoción - @yield('promotions_header')
|
||||
@else
|
||||
Promociones
|
||||
@endif
|
||||
</h2>
|
||||
@yield('promotions_content')
|
||||
</div>
|
||||
|
84
app/resources/views/ventas/promotions/show.blade.php
Normal file
84
app/resources/views/ventas/promotions/show.blade.php
Normal file
@ -0,0 +1,84 @@
|
||||
@extends('ventas.promotions.base')
|
||||
|
||||
@section('promotions_title')
|
||||
{{ $promotion->description }}
|
||||
@endsection
|
||||
|
||||
@section('promotions_header')
|
||||
{{ $promotion->description }}
|
||||
@endsection
|
||||
|
||||
@section('promotions_content')
|
||||
<div class="ui card">
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
<p>
|
||||
{{ ucwords($promotion->type->name()) }} {{ ($promotion->type === Incoviba\Model\Venta\Promotion\Type::FIXED) ? $format->ufs($promotion->amount) : $format->percent($promotion->amount, 2, true) }}
|
||||
</p>
|
||||
<p>
|
||||
{{ $promotion->startDate->format('d-m-Y') }} -> {!! $promotion->endDate?->format('d-m-Y') ?? '∞' !!}
|
||||
</p>
|
||||
<p>Válido hasta: {!! $promotion->validUntil?->format('d-m-Y') ?? '∞' !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="ui table" id="contracts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Proyecto</th>
|
||||
<th>Operador</th>
|
||||
<th class="center aligned" colspan="2">Unidad</th>
|
||||
<th class="right aligned">
|
||||
<button class="ui tertiary green icon button" id="add_button">
|
||||
<i class="plus icon"></i>
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"></th>
|
||||
<th>Tipo</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($promotion->projects()) > 0)
|
||||
@foreach ($promotion->projects() as $project)
|
||||
<tr>
|
||||
<td>{{ $project->descripcion }}</td>
|
||||
<td>Todos los Operadores</td>
|
||||
<td colspan="2">Todas las Unidades</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if (count($promotion->contracts()) > 0)
|
||||
@foreach($promotion->contracts() as $contract)
|
||||
<tr>
|
||||
<td>{{ $contract->project->descripcion }}</td>
|
||||
<td>{{ $contract->broker->name }}</td>
|
||||
<td colspan="2">Todas las Unidades</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if (count($promotion->units()) > 0)
|
||||
@foreach($promotion->units() as $unit)
|
||||
<tr>
|
||||
<td>{{ $unit->project->descripcion }}</td>
|
||||
<td>Todos los Operadores</td>
|
||||
<td>{{ $unit->proyectoTipoUnidad->tipoUnidad->descripcion }}</td>
|
||||
<td>{{ $unit->descripcion }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if (count($promotion->contractUnits()) > 0)
|
||||
@foreach($promotion->contractUnits() as $contractUnit)
|
||||
<tr>
|
||||
<td>{{ $contractUnit->contract->project->descripcion }}</td>
|
||||
<td>{{ $contractUnit->contract->broker->name }}</td>
|
||||
<td>{{ $contractUnit->unidad->proyectoTipoUnidad->tipoUnidad->descripcion }}</td>
|
||||
<td>{{ $contractUnit->unidad->descripcion }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
@endsection
|
@ -0,0 +1,2 @@
|
||||
<div class="ui modal" id="add_connection_modal">
|
||||
</div>
|
Reference in New Issue
Block a user