analisar-peticao.xhtml
7.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
template="/templates/template.xhtml">
<ui:define name="body">
<style type="text/css">
.coluna5 {
border: 0 none !important;
font-size: 12px !important;
width: 5%;
line-height: 23px;
}
</style>
<h:outputScript target="head">
function handlePendencia(xhr, status, args) {
if( args.notValid || args.validationFailed ) {
statusDialog.hide();
return false;
} else {
confirmarPendente.hide();
statusDialog.hide();
}
}
</h:outputScript>
<h:form id="form-peticao" prependId="false">
<p:messages id="msgsPeticao" showSummary="true" showDetail="true" globalOnly="true"/>
<p:fieldset legend="Dados do peticionamento">
<h:panelGrid columns="2" columnClasses="coluna20,coluna80" width="100%">
<!--
<h:outputText value="Área:" />
<h:outputText value="#{analisarPeticaoBean.model.area.dscArea}"/>
<h:outputText value="Serviço:" />
<h:outputText value="#{analisarPeticaoBean.model.servico.dscServico}"/>
-->
<h:outputText value="Solicitação:" />
<h:outputText value="#{analisarPeticaoBean.model.solicitacao.dscSolicitacao}"/>
<h:outputText value="Em nome:" />
<h:outputText value="#{analisarPeticaoBean.model.proponente.pessoaProponente.nome}"
rendered="#{analisarPeticaoBean.model.empresa.id eq null}"/>
<h:outputText value="#{analisarPeticaoBean.model.empresa.pessoaTitular.razaoSocial}"
rendered="#{analisarPeticaoBean.model.empresa.id ne null}"/>
<h:outputText value="Protocolo existente?" />
<h:outputText value="#{analisarPeticaoBean.model.existeProtocolo ? 'Sim' : 'Não'}" />
<h:outputText value="Número do protocolo:" />
<h:outputText value="#{analisarPeticaoBean.model.numeroProcessoFormatado}" />
<h:outputText value="Assunto:" />
<h:outputText value="#{analisarPeticaoBean.model.assunto}" />
</h:panelGrid>
<br/>
<p:fieldset legend="Documentos">
<p:dataTable
id="dt-documentos"
value="#{analisarPeticaoBean.model.documentos}"
var="documento"
rowIndexVar="rowIx"
emptyMessage="#{analisarPeticaoBean.emptyMessage}"
rowStyleClass="#{empty rowIx or rowIx mod 2 ne 0 ? 'linhaImpar' : 'linhaPar'}">
<p:column headerText="Nome do arquivo">
<h:outputText value="#{documento.nome}"/>
</p:column>
<p:column headerText="Ação" style="text-align: center; width: 15%;">
<h:commandLink immediate="true">
<h:graphicImage library="design/imagem" name="icone-download.png" alt="Baixar arquivo" title="Baixar arquivo"/>
<f:setPropertyActionListener target="#{analisarPeticaoBean.documento}" value="#{documento}" />
<p:fileDownload value="#{analisarPeticaoBean.file}"/>
</h:commandLink>
</p:column>
</p:dataTable>
</p:fieldset>
<br/>
<h:panelGroup id="pg-info-pendente" layout="block">
<h:panelGrid columns="1" width="100%" rendered="#{analisarPeticaoBean.model.situacao.id eq 4}">
<h:outputText value="Pendência:" style="font-size: 12px; font-weight: bold;"/>
<h:outputText value="#{analisarPeticaoBean.model.pendencia}" style="font-size: 12px;"/>
<h:outputText value="Providência tomada:" style="font-size: 12px; font-weight: bold;"/>
<h:outputText value="#{analisarPeticaoBean.model.providencia}" style="font-size: 12px;"/>
</h:panelGrid>
</h:panelGroup>
</p:fieldset>
<br/>
<center>
<h:panelGrid id="pg-buttons" columns="4">
<p:commandButton id="aceitar" value="Sim" type="button" onclick="confirmarAceite.show()" disabled="#{!analisarPeticaoBean.situacaoAceitarRecusarLiberada}"/>
<p:commandButton id="recusar" value="Não" type="button" onclick="confirmarRecusa.show()" disabled="#{!analisarPeticaoBean.situacaoAceitarRecusarLiberada}"/>
<p:commandButton id="pendente" value="Pendente" oncomplete="confirmarPendente.show()" update="pg-enter-pendencia"
action="#{analisarPeticaoBean.limparPendente}" disabled="#{!analisarPeticaoBean.situacaoPendenteLiberada}"/>
<p:commandButton id="voltar" value="Voltar" ajax="false" action="listar-peticao.jsf?faces-redirect=true" immediate="true"/>
</h:panelGrid>
</center>
<br/>
<p:dialog modal="true" widgetVar="statusDialog" header="Processando..." draggable="false" closable="false" height="75" width="120">
<h:graphicImage library="design/imagem" name="aguarde.gif" />
</p:dialog>
<p:confirmDialog
widgetVar="confirmarAceite"
message="Tem certeza que deseja efetuar essa ação?<br />Esta operação não poderá ser desfeita!"
position="center"
header="Aceite"
severity="alert"
modal="true"
width="350">
<p:commandButton value="Não" onclick="confirmarAceite.hide()" type="button" />
<p:commandButton value="Sim" update="msgsPeticao pg-buttons pg-info-pendente" onclick="statusDialog.show(); confirmarAceite.hide()"
oncomplete="statusDialog.hide()" action="#{analisarPeticaoBean.aceitar}" />
</p:confirmDialog>
<p:confirmDialog
widgetVar="confirmarRecusa"
message="Tem certeza que deseja efetuar essa ação?<br />Esta operação não poderá ser desfeita!"
position="center"
header="Recusa"
severity="alert"
modal="true"
width="350">
<p:commandButton value="Não" onclick="confirmarRecusa.hide()" type="button" />
<p:commandButton value="Sim" update="msgsPeticao pg-buttons pg-info-pendente" onclick="statusDialog.show(); confirmarRecusa.hide()"
oncomplete="statusDialog.hide()" action="#{analisarPeticaoBean.recusar}" />
</p:confirmDialog>
<p:confirmDialog
widgetVar="confirmarPendente"
message="Tem certeza que deseja efetuar essa ação? Esta operação não poderá ser desfeita!"
position="center"
header="Recusa"
severity="alert"
modal="true"
width="700">
<h:panelGroup id="pg-enter-pendencia" layout="block">
<p:messages id="msgsPendencia" showSummary="true" showDetail="true" globalOnly="true"/>
<h:panelGrid id="pg-pendencia" columns="2" columnClasses="coluna20,coluna80" width="100%">
<h:outputText styleClass="icoObrigatorio" value="Descrever pendência:" />
<p:inputTextarea id="pendencia" maxlength="1000" value="#{analisarPeticaoBean.model.pendencia}" rows="5" cols="80" maxHeight="75" autoResize="false"/>
<h:outputText styleClass="icoObrigatorio" value="Providência tomada:" />
<p:inputTextarea id="providencia" maxlength="1000" value="#{analisarPeticaoBean.model.providencia}" rows="5" cols="80" maxHeight="75" autoResize="false"/>
</h:panelGrid>
</h:panelGroup>
<center>
<p:commandButton value="Não" onclick="confirmarPendente.hide()" type="button" />
<p:commandButton value="Sim" oncomplete="handlePendencia(xhr, status, args)" onclick="statusDialog.show()"
action="#{analisarPeticaoBean.pendente}" process="@form"/>
</center>
</p:confirmDialog>
</h:form>
</ui:define>
</ui:composition>