<div data-ng-include="'views/header.html'"></div><style>
    .btnLinha {
        height: 30px;
        width: 100px;
        display: flex; 
        justify-content: center;
        align-items: center; 
    }

    .btnCancelar {
        background-color: red;
    }

    .alignMiddle {
        vertical-align: middle !important;
    }
</style><div class="container"><div my-title title="{{'Pedido_reuniao_dt' | translate}}" obs></div><div class="col-md-12" style="padding: 0;"><h3 style="margin-top: 0; margin-bottom: 0; color: black; font-size: 20px;">{{'Diretor_turma_do' | translate}} {{atendimento.matricula.Turma}}: {{atendimento.nomeDT}}</h3><br><h3 style="margin-top: 0; margin-bottom: 20px; color: black; font-size: 20px;">{{'Horario_atendimento' | translate}}: <span data-ng-if="atendimento.temAtendimento">{{atendimento.horarioAtendimento}}</span></h3><div class="switchBox" style="text-align:right; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;"><div style="display: flex; align-items: center;"><b translate="Incluir_datas_passadas" style="margin-right: 5px;"></b> <label class="switch" style="top: 0; margin-bottom: 0;"><input type="checkbox" data-ng-model="atendimento.incluirDatasPassadas" data-ng-change="atendimento.loadAtendimentosDT()"><div class="slider round"></div></label><div style="padding: 10px 15px;"><button type="button" id="btnPedirParaOutroMomento" class="btn btn-success pull-left" data-ng-click="atendimento.openModalObservacaoEE(null, true)"><span data-ng-if="!atendimento.atendimentos || atendimento.atendimentos.length == 0">Pedir</span> <span data-ng-if="atendimento.atendimentos && atendimento.atendimentos.length > 0">Pedir para<br>outro momento</span></button> <button type="button" class="btn btn-success pull-left" style="visibility: hidden; width: 100px; margin-left: 10px;"></button></div></div></div></div><div class="row"><div class="panel-group col-md-12" id="accordion" role="tablist" aria-multiselectable="false"><div class="panel panel-default" data-ng-style="{'background-color': at.EstadoReuniao == 3 ? '#a3d7ad' : '#e9e9e9'}" data-ng-repeat="at in atendimento.atendimentos"><div class="panel-heading" data-toggle="{{(at.EstadoReuniao != 1 && at.EstadoReuniao != 4 && at.EstadoReuniao != 5) ? 'collapse' : ''}}" data-target="#{{$index}}" style="cursor: pointer; min-height: 50px;" data-ng-style="{'background-color': at.EstadoReuniao == 3 ? '#a3d7ad' : '#e9e9e9'}" data-ng-click="(at.EstadoReuniao != 1 && at.EstadoReuniao != 4 && at.EstadoReuniao != 5) ? atendimento.verDetalhe(at.PkAtendimentoDT) : return;"><h4 class="panel-title col-md-4 col-sm-12" style="padding: 0; margin-top: 6px;"><span>{{ at.Data | date:'dd-MM-yyyy' }}</span> || <span>{{ at.Hora }}</span> || <span>{{ at.DiaSemana }}</span></h4><h4 class="panel-title col-md-4 col-sm-12 text-center" style="padding: 0; margin-top: 6px; margin-bottom: 6px;"><span data-ng-if="at.EstadoReuniao == 1"></span> <span data-ng-if="at.EstadoReuniao == 2"><b>{{'Pedida' | translate}}</b></span> <span data-ng-if="at.EstadoReuniao == 3"><b>{{'Agendada' | translate}}</b></span> <span data-ng-if="at.EstadoReuniao == 4"><b>{{'Recusada' | translate}}</b></span> <span data-ng-if="at.EstadoReuniao == 5"><b>{{'Cancelada' | translate}}</b></span></h4><div class="col-md-4 col-sm-12" style="display: flex; justify-content: flex-end; padding: 0; margin-bottom: 10px;"><button type="button" class="btn btn-success btnLinha" style="width: 123px;" data-ng-if="(at.EstadoReuniao == 1 || at.EstadoReuniao == 4 || at.EstadoReuniao == 5) && !at.IsDataPassada" data-ng-click="atendimento.openModalObservacaoEE(at.Data, false); $event.stopPropagation();">Pedir</button> <button type="button" class="btn blue btnLinha btnCancelar" style="width: 123px;" data-ng-click="atendimento.cancelarPedida(at.PkAtendimentoDT); $event.stopPropagation();" data-ng-if="at.EstadoReuniao == 2 && !at.IsDataPassada">{{'Cancelar' | translate}}</button> <button type="button" class="btn blue btnLinha btnCancelar" style="width: 123px;" data-ng-click="atendimento.cancelarAgendada(at.PkAtendimentoDT); $event.stopPropagation();" data-ng-if="at.EstadoReuniao == 3 && !at.IsDataPassada">{{'Cancelar' | translate}}</button> <button type="button" data-toggle="collapse" data-target="#{{$index}}" class="btn blue btnLinha" style="margin-left: 10px;" data-ng-style="{'visibility': (at.EstadoReuniao != 1 && at.EstadoReuniao != 4 && at.EstadoReuniao != 5) ? 'visible' : 'hidden'}" data-ng-click="atendimento.verDetalhe(at.PkAtendimentoDT)">Ver detalhe</button></div></div><div id="{{$index}}" class="panel-collapse collapse" data-parent="#accordion"><div class="panel-body" style="background-color: #f3f3f3; padding: 10px;"><h4 style="margin-top: 0;">{{'DETALHE_PEDIDO_DE' | translate}} {{atendimento.atendimentoDetalhe.Data | date:'dd-MM-yyyy HH:mm:ss'}}</h4><h5 style="margin-bottom: 0;">{{'Reuniao_solicitada' | translate}}</h5><span>{{atendimento.atendimentoDetalhe.ReuniaoSolicitada | date:'dd-MM-yyyy'}}</span><h5 style="margin-bottom: 0;">{{'Sala' | translate}}</h5><span>{{atendimento.atendimentoDetalhe.Sala}}</span><div data-ng-if="atendimento.atendimentoDetalhe.MostraQRCode"><h5 style="margin-bottom: 5px;">Código QR de acesso à reunião</h5><div style="display: flex; align-items: center;"><i tooltip="Visualizar" class="fa fa-lg fa-qrcode" aria-hidden="true" style="font-size: 2em; cursor: pointer; margin-right: 10px;" data-ng-click="atendimento.openModalQRCode()"></i> <i tooltip="Imprimir" class="fa fa-lg fa-file-pdf-o" aria-hidden="true" style="font-size: 1.7em; cursor: pointer; margin-right: 10px;" data-ng-click="atendimento.imprimirQRCode()"></i> <i tooltip="Enviar para o email" class="fa fa-envelope-o" aria-hidden="true" style="font-size: 1.7em; cursor: pointer;" data-ng-click="atendimento.enviarParaEmailQRCode()"></i></div></div><h5 style="margin-bottom: 0;">{{'Observacao' | translate}}</h5><span style="white-space: break-spaces;">{{atendimento.atendimentoDetalhe.Observacao}}</span><h5 style="margin-bottom: 0;">{{'Observacao_dt' | translate}}</h5><span style="white-space: break-spaces;">{{atendimento.atendimentoDetalhe.ObservacaoDT}}</span></div></div></div></div></div><div class="modal fade" id="modalObservacaoEE" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close" data-ng-click="atendimento.closeModalObservacaoEE()"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">{{'OBSERVACOES' | translate}}</h4></div><div class="modal-body"><div class="row" style="margin-bottom: 15px;" data-ng-if="atendimento.pedirParaOutroMomento"><div class="col-md-3"><label style="margin-right: 5px;">Data *</label> <input class="form-control" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" data-date-clear-btn="true" data-ng-model="atendimento.atendimentoData"></div><div class="col-md-3"><label style="margin-right: 5px;">Hora *</label> <input type="time" class="form-control" min="00:00" max="23:59" placeholder="HH:mm:ss" onclick="this.showPicker()" data-ng-model="atendimento.horarioAtendimentoToSave"></div></div><label>{{'TextoEnviarAoDT' | translate}}</label> <span><small style="color: #959595; font-weight: bold; font-size: 100%;">({{'CampoOpcional' | translate}})</small></span> <textarea class="form-control" rows="5" style="resize: none;" data-ng-model="atendimento.observacaoEE"></textarea></div><div class="modal-footer" style="display: flex; align-items: center; width: 100%;"><span style="color: #9f0000;" data-ng-if="atendimento.pedirParaOutroMomento">* campo de preenchimento obrigatório</span><my-btn-save click="atendimento.pedir()" style="margin-left: auto;" text="{{'Submeter' | translate}}"></my-btn-save></div></div></div></div><div class="modal fade" id="modalQRCode" tabindex="-1" role="dialog" aria-labelledby="myModalLabelQRCode" data-backdrop="static" data-keyboard="false"><div class="modal-dialog modal-lg" style="width: auto;" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close" data-ng-click="atendimento.closeModalQRCode()"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabelQRCode">Código QR</h4></div><div class="modal-body"><img width="300" src="{{atendimento.atendimentoDetalhe.QRCodeImgSource}}"></div></div></div></div></div>