| Server IP : 54.233.248.239 / Your IP : 172.28.20.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/vinumday2_0/app/Modules/Confraria/Views/admin/ |
Upload File : |
@extends($current_template)
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Confraria Kits
<small>Listagem</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ url('admin') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">Confraria Kits</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="list-data-table" class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Confraria</th>
<th>Fundador</th>
<th>Data Meta Kit</th>
<th>Status</th>
<th>Oferta Kit</th>
<th>Pedido Kit</th>
<th class="th-action">Ação</th>
</tr>
</thead>
<tbody>
@foreach ($kits as $item)
<tr>
<td>{{ $item->id }}</td>
<td><a href="/admin/confraria/detalhe/{{ $item->confraria->slug }}">{{ $item->confraria->nome }}</a></td>
<td><a href="/admin/cadastro/detalhe/{{ $item->confraria->cadastro->slug }}">{{ $item->confraria->cadastro->nome . ' ' . $item->confraria->cadastro->sobrenome }}</a></td>
<td>{{ date('d/m/Y H:i', strtotime($item->data)) }}</td>
<td>{!! ($item->situacao == 'R' ? 'Reprovado' : ($item->situacao == 'A' ? '<span style="color:green; font-weight: bold;">Aprovado</p>' : 'Pendente')) !!}</td>
<td>{!! $item->oferta ? "{$item->oferta->titulo} {$item->oferta->sub_titulo}" : '<span style="color:red; font-weight: bold;">Aguardando Aprovação</span>' !!}</td>
<td><a href="/admin/pedido-venda/edit/{{ $item->pedido_venda_id }}" target="_blank">{{ $item->pedido_venda_id }}</a></td>
<td>
@if($current_role->hasAccess($current_module->nome_tabela.'.update'))
@if($item->situacao == 'P' && empty($item->oferta_id))
<a href="javascript:void(0)" data-id="{{ $item->id }}" class="btn btn-primary open-confraria-kit" title="Aprovar Kit"><i class="fa fa-bolt"></i></a>
@endif
<a href="/admin/confraria/detalhe/<?php echo $item->slug; ?>" class="btn btn-primary" title="Detalhes Confraria"><i class="fa fa-pencil-alt"></i></a>
@endif
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th>ID</th>
<th>Confraria</th>
<th>Fundador</th>
<th>Data Meta Kit</th>
<th>Status</th>
<th>Oferta Kit</th>
<th>Ação</th>
</tr>
</tfoot>
</table>
</div>
<!-- /.box-body -->
<div class="box-footer">
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<div id="modal-evento" class="modal fade">
<form method="/" id="formEvento" type="POST">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 id="time-label"></h4>
</div>
<div class="modal-body" id="conteudo-modal-evento">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</form>
</div>
<script>
$(document).on('click', '.open-confraria-kit', function(e){
e.preventDefault();
$.ajax({
url: '/admin/confraria/form-kit/' + $(this).data('id'),
type: 'GET',
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
$('.carregando').fadeOut();
$('#conteudo-modal-evento').html(data);
$('#modal-evento').modal('show');
}
});
});
</script>
@endsection