<div ng-controller="ocorrenciasController">
    <div class="modal-header">
        <h3>Encaminhamento</h3>
    </div>
    <div class="modal-body">
        <div class="row">
            <div class="col-md-6">
                <label>De Gestor</label>
                <br />
                <select class="form-control" ng-init="carregarResponsaveisUtilizadorOrigem(selected.item.FkResponsavel)"
                        ng-change="selected.item.FkResponsavel=selectedResponsavelOrigem.Pk_Responsavel; selected.item.NomeResponsavel=selectedResponsavelOrigem.Nome"
                        ng-model="selectedResponsavelOrigem"
                        ng-options="e.Nome for e in lstResponsaveisOrigem"></select>

                <br />
                <label>Para Gestor</label>
                <br />
                <select class="form-control" ng-init="carregarResponsaveisUtilizador(selected.item.FkResponsavelDestino)"
                        ng-change="selected.item.FkResponsavelDestino=selectedResponsavelEnc.Pk_Responsavel; selected.item.NomeRespDestino=selectedResponsavelEnc.Nome"
                        ng-model="selectedResponsavelEnc"
                        ng-options="e.Nome for e in lstResponsaveisEnc"></select>

                <br />
                
                <label>Inicio</label>
                <br />
                <input type="text"
                       class="date form-control readonly simple-field-data-mask"
                       data-mask="0000-00-00"
                       ng-model="selected.item.DataInicioStr"
                       placeholder="____-__-__" />
                <br />
                <label>Fim</label>
                <br />
                <input type="text"
                       class="date form-control readonly simple-field-data-mask"
                       data-mask="0000-00-00"
                       ng-model="selected.item.DataFimStr"
                       placeholder="____-__-__" />
                <br />
                               
                
            </div>
            <div class="col-md-6">

            </div>
        </div>

    </div>
    <div class="modal-footer">
        <button class="btn btn-primary"
                ng-click="validaDadosFecha(validaDadosEncaminhamento,[selected.item])"
                ng-disabled="selected.item.perm.PCriar==false">
            Guardar
        </button>
        <button class="btn btn-warning" ng-click="cancel()" id="btnModalFechar">Fechar</button>
    </div>

</div>
<script>
    $(document).ready(function () {
        $('.date').mask('0000-00-00');

    });
</script>
