<%@ include file="/WEB-INF/templates/taglibs.jsp" %>

<style>
	/* #canvas-solicitacoes-por-servico {
		height: 300px !important;
	} */
</style>

<div id="solicitacoes-por-servico" class="solicitacoes-por-servico">
	<form id="formSolicitacoesPorServico" name="formSolicitacoesPorServico" action="${cit_ctx}/pages/smartDecisions/smartDecisions">
		<input type="hidden" id="idServicoNegocioSolicitacoesPorServico" name="idServicoNegocioSolicitacoesPorServico" value="" />
		
		<div class="filter dn clearfix">
			<div class="row">
				<div class="col-md-6">
					<label><fmt:message key="citcorpore.comum.periodo" /></label>
					<input type='text' name='dataInicioSolicitacoesPorServico' id='dataInicioSolicitacoesPorServico' maxlength="10" 
					ng-click="calendar.dataInicio.open()" 
					uib-datepicker-popup="{{calendar.dateFormat}}" 
					ng-model="calendar.dataInicio.model" 
					is-open="calendar.dataInicio.opened" 
					datepicker-options="calendar.dateOptions" 
					ng-required="true" 
					current-text='<fmt:message key="citcorpore.comum.hoje" />' clear-text='<fmt:message key="citcorpore.ui.botao.rotulo.Limpar" />' close-text='<fmt:message key="Citsmart.comum.fechar" />'
					class='Description[<fmt:message key="citcorpore.comum.periodo" />] Valid[Required] form-control' />
				</div>
				<div class="col-md-6">
					<label><fmt:message key="citcorpore.comum.periodo" /></label>
					<input type='text' name='dataFimSolicitacoesPorServico' id='dataFimSolicitacoesPorServico' maxlength="10" 
					ng-click="calendar.dataFim.open()" 
					uib-datepicker-popup="{{calendar.dateFormat}}" 
					ng-model="calendar.dataFim.model" 
					is-open="calendar.dataFim.opened" 
					datepicker-options="calendar.dateOptions" 
					ng-required="true" 
					current-text='<fmt:message key="citcorpore.comum.hoje" />' clear-text='<fmt:message key="citcorpore.ui.botao.rotulo.Limpar" />' close-text='<fmt:message key="Citsmart.comum.fechar" />'
					class='Description[<fmt:message key="citcorpore.comum.periodo" />] Valid[Required] form-control' />
				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<button type="button" class="btn btn-citsmart btn-sm pull-right" ng-class="{ 'disabled': loading }" ng-click="generate()"><fmt:message key="citcorpore.comum.gerarRelatorio" /></button>
				</div>
			</div>
		</div>
		
		<div class="progress" ng-if="loading">
			<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
		</div>
		<div class="solicitacoes-por-servico-content" ng-if="!loading && data.datasets != undefined && data.datasets.length > 0">
			<div class="row solicitacoes-por-servico-back" ng-if="showBackButton">
				<div class="col-md-12">
					<button type="button" class="btn btn-default btn-sm pull-right" ng-click="back()"><fmt:message key="citcorpore.comum.voltar" /></button>
				</div>
			</div>
			<canvas id="canvas-solicitacoes-por-servico"></canvas>
		</div>
		<div class="solicitacoes-por-servico-empty text-center" ng-if="!loading && data.datasets != undefined && data.datasets.length == 0"><fmt:message key="MSG04" /></div>
	</form>
</div>
