@ -1,129 +1,105 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%>
<%@page import="com.liferay.portal.kernel.util.HttpUtil"%>
<%@page import="com.liferay.portal.kernel.util.HttpUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Comune"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.model.FineLavori"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%>
<%@page import="it.tref.liferay.portos.bo.model.Soggetto"%>
<%@page import="it.tref.liferay.portos.bo.model.Territorio"%>
<%@page import="it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.FineLavori"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.servlet.ServletContextPool"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.util.Delegh eUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Soggetto"%>
<%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Comune"%>
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%>
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Territorio"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@ include file="/html/fascicolofe/init.jsp" %>
<%@ include file="/html/fascicolofe/init.jsp" %>
<%
<%
String backURL = ParamUtil.getString(request, "backURL");
String backURL = ParamUtil.getString(request, "backURL");
long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId",0l );
long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId", 0L);
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId);
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId);
if( Validator.isNull(fineLavori) ){
if (Validator.isNull(fineLavori)) {
long intPraticaIdParam = ParamUtil.getLong(request, "intPraticaId");
long intPraticaIdParam = ParamUtil.getLong(request, "intPraticaId");
fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaIdParam);
fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaIdParam);
fineLavoriId = fineLavori.getFineLavoriId();
fineLavoriId = fineLavori.getFineLavoriId();
}
}
boolean openVerifyUrl = ParamUtil.getBoolean(request, "openVerifyUrl");
boolean openVerifyUrl = ParamUtil.getBoolean(request, "openVerifyUrl");
long intPraticaId = fineLavori.getIntPraticaId();
boolean showHistory = ParamUtil.getBoolean(request, "showHistory", true);
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
long intPraticaId = fineLavori.getIntPraticaId();
if (dettPratica == null) {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
if(dettPratica == null){
dettPratica = DettPraticaServiceUtil.getLastEditableByIntPratica(intPraticaId);
dettPratica = DettPraticaServiceUtil.getLastEditableByIntPratica(intPraticaId);
}
}
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
Soggetto direttoreLavori = null;
List<Soggetto> direttori = SoggettoLocalServiceUtil.findByIntPratica_CodiceFiscale(intPraticaId,
Soggetto direttoreLavori = null;
dettPratica.getCodiceFiscaleDelegatoFineLavori());
List<Soggetto> direttori = SoggettoLocalServiceUtil.findByIntPratica_CodiceFiscale(intPraticaId, dettPratica.getCodiceFiscaleDelegatoFineLavori());
if (!direttori.isEmpty()) {
if(!direttori.isEmpty()){
direttoreLavori = direttori.get(0);
direttoreLavori = direttori.get(0);
}
}
String fmName = "fmFineLavori";
String formName = "fmFineLavori";
boolean disabledEditing = fineLavori.getCompletata();
request.setAttribute("bean.fineLavori", fineLavori);
boolean disabledEditing = fineLavori.getCompletata();
request.setAttribute("bean.fineLavori", fineLavori);
boolean isNewFineLavori = ParamUtil.getBoolean(request, "isNewFineLavori");
%>
%>
<liferay-portlet:actionURL name="saveFineLavori" var="saveFineLavoriURL" >
<liferay-portlet:actionURL name="saveFineLavori" var="saveFineLavoriURL" >
<liferay-portlet:param name="fineLavoriId" value="<%=String.valueOf(fineLavori.getFineLavori Id() ) %>"/>
<liferay-portlet:param name="fineLavoriId" value="<%= String.valueOf(fineLavoriId) %>"/>
<liferay-portlet:param name="backURL" value="<%=backURL %>"/>
<liferay-portlet:param name="backURL" value="<%= backURL %>"/>
<liferay-portlet:param name="successURL" value="<%=currentURL %>"/>
<liferay-portlet:param name="successURL" value="<%= currentURL %>"/>
</liferay-portlet:actionURL>
</liferay-portlet:actionURL>
<aui:form name="<%= fmName %>" onSubmit="preventDefault();" action="<%= saveFineLavoriURL %>">
<aui:form name="<%= formName %>" onSubmit="preventDefault();" action="<%= saveFineLavoriURL %>">
<aui:model-context bean="<%= fineLavori %>" model="<%= FineLavori.class %>" />
<aui:model-context bean="<%= fineLavori %>" model="<%=FineLavori.class %>"></aui:model-context>
<aui:input type="hidden" name="bozza" />
<aui:input type="hidden" name="bozza" />
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<div class="row">
<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 ">
<div class="col-xs-9">
<%
<%
String label = StringPool.BLANK;
String label = StringPool.BLANK;
if(disabledEditing){
if (disabledEditing) {
label = "view-fine-lavori";
label = "view-fine-lavori";
}else if(Validator.isNull(fineLavori.getFineLavoriId())){
} else if (Validator.isNull(fineLavori.getFineLavoriId())) {
label = "new-fine-lavori";
label = "new-fine-lavori";
} else {
} else {
label = "edit-fine-lavori";
label = "edit-fine-lavori";
}
}
%>
%>
<liferay-ui:header
<liferay-ui:header title='<%= LanguageUtil.get(pageContext, label) + " #" + dettPratica.getTitle() %>'
title='<%= LanguageUtil.get(pageContext, label)+" #"+dettPratica.getTitle() %>'
localizeTitle="false" backURL="<%= backURL %>" />
localizeTitle="<%= false %>"
backURL="<%= backURL %>"
/>
</div>
</div>
<c:if test="<%= !disabledEditing %>">
<c:if test="<%= !disabledEditing %>">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 ">
<div class="col-xs-3">
<div class="pull-right" >
<div class="pull-right" >
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<liferay-ui:icon-menu showWhenSingleIcon="false" extended="false" showExpanded="true"
cssClass="inline_toolbar" >
<liferay-ui:icon
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza"
iconCssClass="fa fa-save"
url="javascript:saveFineLavori(true);" linkCssClass="btn" />
message="salva-bozza"
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-conferma"
url="javascript:saveFineLavori(true);"
url="javascript:saveFineLavori(false);" linkCssClass="btn btn-primary" />
linkCssClass="btn"
/>
<liferay-ui:icon
iconCssClass="fa fa-check-square"
message="salva-conferma"
url="javascript:saveFineLavori(false);"
linkCssClass="btn btn-primary"
/>
</liferay-ui:icon-menu>
</liferay-ui:icon-menu>
</div>
</div>
</div>
</div>
</c:if>
</c:if>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="module-group">
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="Inizio lavori">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<%= dateFormatDate.format(dettPratica.getDataInizioLavoriOpera()) %>
</div>
</div>
</div>
</liferay-ui:panel>
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fl">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fl">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<div class="row">
@ -131,13 +107,13 @@
<%= LanguageUtil.get(pageContext, "fl-prov") %>
<%= LanguageUtil.get(pageContext, "fl-prov") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%=BeanPropertiesUtil.getString(provincia, "provincia")%></strong>
<strong><%= BeanPropertiesUtil.getString(provincia, "provincia") %></strong>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-comune") %>
<%= LanguageUtil.get(pageContext, "fl-comune") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%=BeanPropertiesUtil.getString(comune, "denominazione")%></strong>
<strong><%= BeanPropertiesUtil.getString(comune, "denominazione") %></strong>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row">
@ -159,7 +135,8 @@
<%= LanguageUtil.get(pageContext, "fl-range") %>
<%= LanguageUtil.get(pageContext, "fl-range") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%= BeanPropertiesUtil.getString(territorio, "agMin") %> - <%= BeanPropertiesUtil.getString(territorio, "agMax") %></strong>
<strong><%= BeanPropertiesUtil.getString(territorio, "agMin") %> -
<%= BeanPropertiesUtil.getString(territorio, "agMax") %></strong>
</div>
</div>
</div>
</div>
<hr>
<hr>
@ -168,7 +145,7 @@
<%= LanguageUtil.get(pageContext, "fl-desc-interv") %>
<%= LanguageUtil.get(pageContext, "fl-desc-interv") %>
</div>
</div>
<div class="col-sm-6 col-md-9">
<div class="col-sm-6 col-md-9">
<strong><%=BeanPropertiesUtil.getString(dettPratica, "descLongIntervento") %></strong>
<strong><%= BeanPropertiesUtil.getString(dettPratica, "descLongIntervento") %></strong>
</div>
</div>
</div>
</div>
<hr>
<hr>
@ -178,12 +155,14 @@
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%
<%
List<Soggetto> committenti = SoggettoLocalServiceUtil.findByIntPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.COMMITTENTE);
List<Soggetto> committenti = SoggettoLocalServiceUtil
if(!committenti.isEmpty()){
.findByIntPratica_TipologiaSoggetto(intPraticaId,
TipoSoggettoUtil.COMMITTENTE);
if (!committenti.isEmpty()) {
%>
%>
<ul>
<ul>
<%
<%
for(Soggetto committente : committenti){
for (Soggetto committente : committenti) {
%>
%>
<li><strong>
<li><strong>
<%= committente.getDescrizioneCompleta() %>
<%= committente.getDescrizioneCompleta() %>
@ -201,7 +180,8 @@
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<aui:input name="direttoreLavori" value="<%= direttoreLavori.getCodiceFiscale() %>" type="hidden" />
<aui:input name="direttoreLavori" value="<%= direttoreLavori.getCodiceFiscale() %>"
type="hidden" />
<strong>
<strong>
<%= direttoreLavori.getDescrizioneCompleta() %>
<%= direttoreLavori.getDescrizioneCompleta() %>
</strong>
</strong>
@ -213,7 +193,8 @@
<%= LanguageUtil.get(pageContext, "fl-tipo-dom") %>
<%= LanguageUtil.get(pageContext, "fl-tipo-dom") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%= LanguageUtil.get(pageContext, "tipo-pratica-"+intPratica.getTipoPratica()) %></strong>
<strong><%= LanguageUtil.get(pageContext, "tipo-pratica-"
+ intPratica.getTipoPratica()) %></strong>
</div>
</div>
</div>
</div>
<hr>
<hr>
@ -222,17 +203,22 @@
<%= LanguageUtil.get(pageContext, "fl-tipo") %>
<%= LanguageUtil.get(pageContext, "fl-tipo") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<aui:select label="" name="tipoFineLavori" showEmptyOption="true" disabled="<%= disabledEditing %>" >
<aui:select label="" name="tipoFineLavori" showEmptyOption="true"
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_PARZIALE)%>">
disabled="<%= disabledEditing %>" >
<aui:option label='Parziale' value="<%= true %>" selected="<%= Validator.isNotNull(fineLavori) && fineLavori.getParziale() %>"/>
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(),
AzioniPraticheUtil.ACTION_FL_PARZIALE) %>">
<aui:option label='Parziale' value="true" selected="<%= Validator.isNotNull(fineLavori)
&& fineLavori.getParziale() %>"/>
</c:if>
</c:if>
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_TOTALE)%>">
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(),
<aui:option label='Totale' value="<%= false %>" selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
AzioniPraticheUtil.ACTION_FL_TOTALE)%>">
<aui:option label='Totale' value="false" selected="<%= Validator.isNotNull(fineLavori)
&& !fineLavori.getParziale() %>"/>
</c:if>
</c:if>
<c:if test="<%= !AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_PARZIALE) &&
<c:if test="<%= !AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_PARZIALE) &&
!AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_TOTALE) %>">
!AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_TOTALE) %>">
<aui:option label='Parziale' disabled="<%= true %> " value="<%= true %> " selected="<%= Validator.isNotNull(fineLavori) && fineLavori.getParziale() %>"/>
<aui:option label='Parziale' disabled="true" value="true" selected="<%= Validator.isNotNull(fineLavori) && fineLavori.getParziale() %>"/>
<aui:option label='Totale' disabled="<%= true %> " value="<%= false %> " selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
<aui:option label='Totale' disabled="true" value="false" selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
</c:if>
</c:if>
</aui:select>
</aui:select>
</div>
</div>
@ -242,13 +228,20 @@
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<liferay-util:include page="/html/common/input_date_time.jsp" servletContext="<%= application %>">
<liferay-util:include page="/html/common/input_date_time.jsp" servletContext="<%= application %>">
<liferay-util:param name="field" value="dataFineLavori" />
<liferay-util:param name="field" value="dataFineLavori" />
<liferay-util:param name="for mName" value="<%= for mName %>" />
<liferay-util:param name="fmName" value="<%= fmName %>" />
<liferay-util:param name="bean" value="bean.fineLavori" />
<liferay-util:param name="bean" value="bean.fineLavori" />
<liferay-util:param name="disabled" value="<%= String.valueOf(disabledEditing) %>" />
<liferay-util:param name="disabled" value="<%= String.valueOf(disabledEditing) %>" />
</liferay-util:include>
</liferay-util:include>
</div>
</div>
</div>
</div>
<hr>
<hr>
<div class="row">
<div class="col-xs-12">
<aui:input name="richiestaAttestazione" label="fl-attestazione" />
* <%= LanguageUtil.get(pageContext, "fl-attestazione-note") %>
</div>
</div>
<hr>
<div class="row">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<aui:input name="normEsenteBollo" label="fl-esente-bollo" disabled="<%= disabledEditing %>"/>
<aui:input name="normEsenteBollo" label="fl-esente-bollo" disabled="<%= disabledEditing %>"/>
@ -264,99 +257,35 @@
<div class="col-sm-12 col-md-12 container-varianti-integrazioni__dettagli">
<div class="col-sm-12 col-md-12 container-varianti-integrazioni__dettagli">
<liferay-ui:search-container emptyResultsMessage="no-varianti-integrazioni">
<liferay-ui:search-container emptyResultsMessage="no-varianti-integrazioni">
<liferay-ui:search-container-results
<liferay-ui:search-container-results
results="<%= DettPraticaServiceUtil.findCompletedByIntPraticaAndTipoPratica(intPraticaId, Arrays.asList(new String[]{TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE}))%>"
results="<%= DettPraticaServiceUtil
total="<%= DettPraticaServiceUtil.countCompletedByIntPraticaAndTipoPratica(intPraticaId, Arrays.asList(new String[]{TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE})) %>"
.findCompletedByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.VARIANTE,
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) %>"
total="<%= DettPraticaServiceUtil.countCompletedByIntPraticaAndTipoPratica(
intPraticaId, Arrays.asList(TipoIntegrazioneUtil.VARIANTE,
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) %>"
/>
/>
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.DettPratica"
<liferay-ui:search-container-row modelVar="dettPraticaExtra"
modelVar="dettPraticaExtra">
className="it.tref.liferay.portos.bo.model.DettPratica">
<%
<%
String tipoIntegrazione = Validator.isNotNull(dettPraticaExtra.getTipoIntegrazione()) ? LanguageUtil.get(pageContext, "label-integrazione-"+dettPraticaExtra.getTipoIntegrazione()) : "";
String tipoIntegrazione = Validator.isNull(dettPraticaExtra
.getTipoIntegrazione()) ? StringPool.BLANK : LanguageUtil.get(
pageContext,
"label-integrazione-" + dettPraticaExtra.getTipoIntegrazione());
%>
%>
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap"
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap" value='<%= Validator.isNotNull(dettPraticaExtra.getDataEffettuazione()) ? dateFormatDate.format(dettPraticaExtra.getDataEffettuazione()) : ""%>' />
value='<%= Validator.isNull(dettPraticaExtra.getDataEffettuazione())
? StringPool.BLANK
: dateFormatDate.format(dettPraticaExtra
.getDataEffettuazione()) %>' />
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
<%= intPratica.getTitle(locale,true) %>
<%= intPratica.getTitle(locale,true) %>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Tipo Pratica" cssClass="text-nowrap">
<liferay-ui:search-container-column-text name="Tipo Pratica" cssClass="text-nowrap">
<%= tipoIntegrazione %>
<%= tipoIntegrazione %>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-column-text>
<%-- <c:if test="<%= showHistory %>">
<liferay-ui:search-container-column-text>
<%
String buttonId = "dettagliButton_"+index;
String contentId = "dettagliContent_"+index;
String titleId = "Dettagli "+tipoIntegrazione+" #"+dettPraticaExtra.getDettPraticaId();
%>
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<liferay-ui:icon
id='<%=buttonId %>'
iconCssClass="fa fa-info-circle"
message="detail"
url="javascript:void(0)"
linkCssClass="btn btn-action"
/>
</liferay-ui:icon-menu>
<div id="<portlet:namespace /><%= contentId %>" class="hide" >
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-12">
<%
if(dettPraticaExtra.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)){
%>
<liferay-util:include page="/html/fascicolo/navigator/view_dettagli_varianti.jsp" servletContext='<%= ServletContextPool.get("portos-bo-portlet") %>'>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"></liferay-util:param>
</liferay-util:include>
<%
} else if(dettPraticaExtra.getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)){
%>
<liferay-util:include page="/html/fascicolo/navigator/view_dettagli_varianti.jsp" servletContext='<%= ServletContextPool.get("portos-bo-portlet") %>'>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"></liferay-util:param>
</liferay-util:include>
<%
}
%>
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fascicolo_title_soggetti">
<liferay-util:include page="/html/soggettipratica/view_valida_fino.jsp" servletContext='<%= application %>'>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="comingFrom" value="page_va_soggetti"></liferay-util:param>
</liferay-util:include>
</liferay-ui:panel>
</div>
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fascicolo_title_allegati">
<div class="container-fluid">
<liferay-util:include page="/html/allegatipratica/view_accordion.jsp" servletContext='<%= application %>'>
<liferay-util:param name="classPk" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"/>
<liferay-util:param name="className" value="<%=DettPratica.class.getName() %>"/>
<liferay-util:param name="comingFrom" value="page_va_allegati"/>
<liferay-util:param name="full" value="false"/>
</liferay-util:include>
</div>
</liferay-ui:panel>
</div>
</div>
</div>
</div>
</div>
<liferay-util:include page="/html/common/confirm_window.jsp" servletContext="<%= application %>" >
<liferay-util:param name="titolo" value="<%= titleId %>"></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonId%>"></liferay-util:param>
<liferay-util:param name="contentDiv" value="<%=contentId%>"></liferay-util:param>
<liferay-util:param name="width" value="900"></liferay-util:param>
</liferay-util:include>
</liferay-ui:search-container-column-text>
</c:if> --%>
</liferay-ui:search-container-row>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="<%= false % >" />
<liferay-ui:search-iterator paginate="false>" />
</liferay-ui:search-container>
</liferay-ui:search-container>
</div>
</div>
</div>
</div>
@ -364,22 +293,29 @@
<div class="col-sm-12 col-md-12 container-fine-lavori__dettagli">
<div class="col-sm-12 col-md-12 container-fine-lavori__dettagli">
<liferay-ui:search-container emptyResultsMessage="no-fine-lavori-parziali">
<liferay-ui:search-container emptyResultsMessage="no-fine-lavori-parziali">
<liferay-ui:search-container-results
<liferay-ui:search-container-results
results='<%= FineLavoriLocalServiceUtil.findByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId, intPraticaId, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null) %>'
results='<%= FineLavoriLocalServiceUtil
total='<%= FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId, intPraticaId, true) %>'
.findByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId,
/>
intPraticaId, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
null) %>'
total='<%= FineLavoriLocalServiceUtil
.countByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId,
intPraticaId, true) %>' />
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.FineLavori"
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.FineLavori"
modelVar="fineLavoriParziale">
modelVar="fineLavoriParziale">
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap"
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap" value='<%= Validator.isNotNull(fineLavoriParziale.getDataEffettuazione()) ? dateFormatDate.format(fineLavoriParziale.getDataEffettuazione()) : ""%>' />
value='<%= Validator.isNull(fineLavoriParziale.getDataEffettuazione())
? StringPool.BLANK
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
: dateFormatDate.format(fineLavoriParziale
<%= intPratica.getTitle(locale,true) %>
.getDataEffettuazione()) %>' />
<liferay-ui:search-container-column-text name="n-progetto"
cssClass="text-nowrap">
<%= intPratica.getTitle(locale, true) %>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Tipo Pratica"
<liferay-ui:search-container-column-text name="Tipo Pratica" cssClass="text-nowrap" value='<%= "Fine Lavori "+ (fineLavoriParziale.getParziale() ? "Parziale" : "Totale") %>'></liferay-ui:search-container-column-text>
cssClass="text-nowrap" value='<%= "Fine Lavori " + (fineLavoriParziale
.getParziale() ? "Parziale" : "Totale") %>' />
</liferay-ui:search-container-row>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="<%= false %> " />
<liferay-ui:search-iterator paginate="false" />
</liferay-ui:search-container>
</liferay-ui:search-container>
</div>
</div>
</div>
</div>
@ -387,7 +323,9 @@
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<p>
<p>
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-dichiaraz-direttore"), direttoreLavori.getNome(), direttoreLavori.getCognome()) %>
<%= MessageFormat.format(LanguageUtil.get(pageContext,
"fl-dichiaraz-direttore"), direttoreLavori.getNome(),
direttoreLavori.getCognome()) %>
</p>
</p>
</c:if>
</c:if>
</div>
</div>
@ -395,23 +333,28 @@
<hr>
<hr>
<div class="row altro_check">
<div class="row altro_check">
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<aui:input name="altro_checkbox" label="fl-altro" type="checkbox" disabled="<%= disabledEditing %>" checked="<%= Validator.isNotNull(fineLavori.getComunicazioneDirettoreLavori()) && !disabledEditing %>"/>
<aui:input name="altro_checkbox" label="fl-altro" type="checkbox"
disabled="<%= disabledEditing %>" checked="<%= Validator.isNotNull(fineLavori
.getComunicazioneDirettoreLavori()) && !disabledEditing %>"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<aui:input name="comunicazioneDirettoreLavori" label="" type="textarea" disabled="<%= disabledEditing %>"/>
<aui:input name="comunicazioneDirettoreLavori" label="" type="textarea"
disabled="<%= disabledEditing %>"/>
</div>
</div>
</div>
</div>
<hr>
<hr>
<div class="row">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<c:if test="<%=!dettPratica.getCollaudoStatico() %>">
<c:if test="<%= !dettPratica.getCollaudoStatico() %>">
<liferay-util:include page="/html/common/help_message.jsp" servletContext="<%= application %>">
<liferay-util:include page="/html/common/help_message.jsp"
<liferay-util:param name="message" value="Selezione disabilitata perché la pratica prevede l\'esecuzione del collaudo statico"></liferay-util:param>
servletContext="<%= application %>">
<liferay-util:param name="message" value="Selezione disabilitata perché la pratica prevede l\'esecuzione del collaudo statico" />
</liferay-util:include>
</liferay-util:include>
</c:if>
</c:if>
<aui:input name="normEsenteCollaudo" label="fl-collaudo" disabled="<%= disabledEditing || !dettPratica.getCollaudoStatico() %>"/>
<aui:input name="normEsenteCollaudo" label="fl-collaudo" disabled="<%= disabledEditing
|| !dettPratica.getCollaudoStatico() %>"/>
</div>
</div>
</div>
</div>
</div>
</div>
@ -424,7 +367,9 @@
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<p>
<p>
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-firma-direttore"), direttoreLavori.getNome(), direttoreLavori.getCognome(), direttoreLavori.getCodiceFiscale()) %>
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-firma-direttore"),
direttoreLavori.getNome(), direttoreLavori.getCognome(),
direttoreLavori.getCodiceFiscale()) %>
</p>
</p>
</c:if>
</c:if>
</div>
</div>
@ -440,124 +385,97 @@
%>
%>
<aui:script use="aui-base">
<aui:script use="aui-base">
var allegatiEdit = false;
var allegatiEdit = false;
Liferay.on('popupReady',function(event) {
Liferay.on('popupReady', function (event) {
var modalName = event._event.details[0].windowName;
var modalName = event._event.details[0].windowName;
var modalWin = Liferay.Util.Window.getById(modalName);
var modalWin = Liferay.Util.Window.getById(modalName);
modalWin.after('visibleChange', function(event) {
modalWin.after('visibleChange', function (event) {
if(event.prevVal){
if (event.prevVal) {
if(allegatiEdit){
if (allegatiEdit) {
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
Liferay.Portlet.refresh(
"#p_p_id_<%= PortletKeys.ALLEGATI %>_INSTANCE_<%= comingFrom %>_"
);
}
}
}
}
});
});
modalWin.after('hide', function(event) {
modalWin.after('hide', function (event) {
if(allegatiEdit){
if (allegatiEdit) {
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
Liferay.Portlet.refresh(
"#p_p_id_<%= PortletKeys.ALLEGATI %>_INSTANCE_<%= comingFrom %>_"
);
}
}
});
});
modalWin.after('destroy', function(event) {
modalWin.after('destroy', function (event) {
if(allegatiEdit){
if (allegatiEdit) {
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
Liferay.Portlet.refresh(
"#p_p_id_<%= PortletKeys.ALLEGATI %>_INSTANCE_<%= comingFrom %>_"
);
}
}
});
});
});
});
Liferay.on('allegati-<%=comingFrom%>-open',function(event) {
Liferay.on('allegati-<%= comingFrom %>-open', function (event) {
allegatiEdit=true;
allegatiEdit = true;
});
});
Liferay.on('allegati-<%=comingFrom%>-ready',function(event) {
Liferay.on('allegati-<%= comingFrom %>-ready', function (event) {
if(allegatiEdit){
allegatiEdit = false;
allegatiEdit=false;
}
});
});
</aui:script>
</aui:script>
<liferay-portlet:runtime portletName='<%= PortletKeys.ALLEGATI + "_INSTANCE_" + comingFrom %>'
<liferay-portlet:runtime portletName='<%=PortletKeys.ALLEGATI+"_INSTANCE_"+comingFrom %>' queryString='<%="&classPk="+fineLavori.getFineLavoriId()+"&className="+FineLavori.class.getName()+"&comingFrom="+comingFrom+"&disabled="+disabledEditing+"&inBO="+disabledEditing%>' ></liferay-portlet:runtime>
queryString='<%= "&classPk=" + fineLavori.getFineLavoriId() + "&className="
+ FineLavori.class.getName() + "&comingFrom=" + comingFrom + "&disabled="
+ disabledEditing + "&inBO=" + disabledEditing %>' />
</div>
</div>
</div>
</div>
</div>
</div>
</aui:form>
</aui:form>
<c:if test="<%= openVerifyUrl %>">
<c:if test="<%=openVerifyUrl %>">
<liferay-portlet:renderURL var="verifyRenderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:renderURL var="verifyRenderURL" windowState="<%=LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fine-lavori.jsp" />
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fine-lavori.jsp" />
<liferay-portlet:param name="intPraticaId" value="<%=String.valueOf(intPraticaId)%>" />
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>" />
<liferay-portlet:param name="fineLavoriId" value="<%=String.valueOf(fineLavoriId)%>" />
<liferay-portlet:param name="fineLavoriId" value="<%= String.valueOf(fineLavoriId) %>" />
</liferay-portlet:renderURL>
</liferay-portlet:renderURL>
<aui:script use="aui-base">
<aui:script use="aui-base">
Liferay.Util.openWindow(
Liferay.Util.openWindow({
{
id: '<portlet:namespace />openVerificaFineLavori',
id: '<portlet:namespace />openVerificaFineLavori',
title: 'Verifica Fine Lavori',
title: 'Verifica Fine Lavori',
uri: '<%=verifyRenderURL%>'
uri: '<%= verifyRenderURL %>',
}
});
);
</aui:script>
</aui:script>
</c:if>
</c:if>
<liferay-portlet:renderURL var="editEntryURL" copyCurrentRenderParameters="true" />
<liferay-portlet:renderURL var="editEntryURL" copyCurrentRenderParameters="true" />
<%
<%
String refreshURL = HttpUtil.removeParameter(editEntryURL.toString(), "_"+PortletKeys.FASCICOLOFE+"_openVerifyUrl");
String refreshURL = HttpUtil.removeParameter(editEntryURL.toString(), "_" + PortletKeys.FASCICOLOFE + "_openVerifyUrl");
%>
%>
<aui:script use="aui-base">
<aui:script use="aui-base">
var verifyPopupReady = false;
Liferay.on('popupReady',function (event) {
/* SDB: disabilitato. Il checkbox arriva disabilitato se il dettPratica da cui si fa il fine lavori ha collaudo statico false.
* se sarà necessario questo listener disabilita il checkbox al momento che viene dececcato.
*/
if(false){
AUI().one('#<portlet:namespace />normEsenteCollaudoCheckbox').on('click', function(event){
if(confirm("ATTENZIONE:\n rimuovendo la selezione non sarà possibile riattivarla in queste fase.")){
if (!this.attr('checked')){
this.addClass('disabled');
this.set('disabled', true);
}
} else {
this.set('checked',true);
this.set('value',true);
Liferay.Util.updateCheckboxValue(this);
}
});
}
var verifyPopupReady = false;
Liferay.on('popupReady',function(event) {
var modalName = event._event.details[0].windowName;
var modalName = event._event.details[0].windowName;
var modalWin = Liferay.Util.Window.getById(modalName);
var modalWin = Liferay.Util.Window.getById(modalName);
modalWin.after('visibleChange', function (event) {
modalWin.after('visibleChange', function(event) {
if (event.prevVal && verifyPopupReady) {
if(event.prevVal && verifyPopupReady){
window.location.href = "<%= refreshURL %>"
window.location.href = "<%= refreshURL %>"
}
}
});
});
modalWin.after('hide', function(event) {
modalWin.after('hide', function (event) {
if(verifyPopupReady){
if (verifyPopupReady) {
window.location.href = "<%= refreshURL %>"
window.location.href = "<%= refreshURL %>"
}
}
});
});
modalWin.after('destroy', function(event) {
modalWin.after('destroy', function (event) {
if(verifyPopupReady){
if(verifyPopupReady){
window.location.href = "<%= refreshURL %>"
window.location.href = "<%= refreshURL %>"
}
}
});
});
});
});
Liferay.on('verifyPopup-ready',function(event) {
Liferay.on('verifyPopup-ready', function (event) {
verifyPopupReady=true;
verifyPopupReady = true;
});
});
Liferay.provide(
Liferay.provide(
window,
window,
'saveFineLavori',
'saveFineLavori',
function(bozza) {
function (bozza) {
AUI().one('#<portlet:namespace />bozza').set('value',bozza);
AUI().one('#<portlet:namespace />bozza').set('value', bozza);
submitForm(document.<portlet:namespace /><%= for mName %>);
submitForm(document.<portlet:namespace /><%= fmName %>);
},
},
['aui-base']
['aui-base']
);
);
</aui:script>
</aui:script>