Created
February 2, 2017 22:24
-
-
Save cpereiraweb/ac8dd58030e569afe4acc0183a7dae95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{-- views/tickets/index.blade.php --}} | |
@extends('layouts.adminlte') | |
@section('content') | |
<section class="invoice"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<h2 class="page-header"> | |
<i class="fa fa-ticket"></i> {{ $ticket->client->nome }} / {{ $ticket->location->nome }} | |
<small class="pull-right">Aberta em: {{ $ticket->data_abertura->format('d/m/Y H:i') }} por {{ $channels[$ticket->canal] }} <i>( {{ | |
$ticket->data_abertura->diffForHumans() }} )</i></small> | |
</h2> | |
</div> | |
<!-- /.col --> | |
</div> | |
<div class="row invoice-info"> | |
<div class="col-sm-4 col-md-4 invoice-col"> | |
<address> | |
<span class="lead">Endereço:</span><br /> | |
{{ $ticket->location->endereco }}<br /> | |
{{ $ticket->location->bairro }}<br /> | |
{{ $ticket->location->cidade }} - {{ $ticket->location->cep }}<br /> | |
{{ $ticket->complemento }} | |
</address> | |
<span class="lead">Responsável:</span><br /> | |
{{ $ticket->user->name }} | |
</div> | |
<div class="col-sm-4 col-md-4 invoice-col"> | |
<address> | |
<span class="lead">Contato:</span><br /> | |
{{ $ticket->contato }}<br /> | |
{{ $ticket->telefone_email }} | |
</address> | |
<span class="lead">Classificação:</span><br /> | |
Prioridade: {!! $tickets_badges[$ticket->prioridade] !!} {!! $priority_level[$ticket->prioridade] !!} <br /> | |
Gravidade: {!! $tickets_badges[$ticket->severidade] !!} {!! $severity_level[$ticket->severidade] !!} <br /> | |
</div> | |
<div class="col-sm-4 col-md-4 invoice-col"> | |
<address> | |
<span class="lead">Ocorrência:</span><br /> | |
{!! $ticket->ocorrencia !!} | |
</address> | |
<span class="lead">Finalizado</span><br /> | |
{{ ($ticket->finalizado ? 'Sim' : 'Não') }} | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-12 table-responsive"> | |
<table class="table table-striped table-bordered"> | |
<thead> | |
<tr> | |
<td align="center">Data</td> | |
<td align="center">Ação</td> | |
<td align="center">Responsável</td> | |
</tr> | |
</thead> | |
<tbody> | |
@foreach($ticket->action as $a) | |
<tr> | |
<td align="center">{{ $a->created_at->format('d/m/Y H:i') }}</td> | |
<td>{{ $a->acao }}</td> | |
<td align="center">{{ $a->user->name }}</td> | |
</tr> | |
@endforeach | |
@if(count($errors->all()) > 0) | |
<tr> | |
<td> | |
<div class="alert alert-danger alert-dismissible"> | |
<button class="close" type="button" data-dismiss="alert" aria-hidden="true">×</button> | |
<h4> | |
<i class="icon fa fa-ban"></i> | |
Atenção: | |
</h4> | |
<ul> | |
@foreach($errors->all() as $error) | |
<li>{{ $error }}</li> | |
@endforeach | |
</ul> | |
</div> | |
</td> | |
</tr> | |
@endif | |
<tr> | |
<td align="center" colspan="2">Nova Ação:</td> | |
<td> </td> | |
</tr> | |
<!-- form start --> | |
{!! Form::open(['route' => ['actions.store'], 'id' => 'formAction']) !!} | |
{!! Form::hidden('ticket_id', $ticket->id) !!} | |
<tr> | |
<td colspan="2"> | |
{!! Form::textarea('acao', null, ['rows' => 4, 'class' => 'form-control', 'placeholder' => 'Ações', 'id' => 'acao']) !!} | |
</td> | |
<td align="center"> | |
<button type="submit" class="btn btn-primary" id="btnSalvar">Salvar</button> | |
<br /> <br /> | |
<a class="btn btn-warning" href="{{ route('tickets.index') }}">Voltar</a> | |
</td> | |
</tr> | |
{!! Form::close() !!} | |
</tbody> | |
</table> | |
</div> | |
</div> | |
</section> | |
@stop | |
@section('scripts') | |
<script src="{{ asset('assets/js/moment-with-locales.min.js') }}"></script> | |
<script src="https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script> | |
<script> | |
$(function () { | |
CKEDITOR.replace('acao'); | |
}); | |
</script> | |
@stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment