|
|
|
|
@ -446,20 +446,20 @@ public class ListaPlanos extends AbstractPageBean {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u = getSessionBean1().getCurrentUser();
|
|
|
|
|
if(u.getTipo().intValue() == Global.DIRECTOR_SIPRP || u.getTipo().intValue() == Global.RH || u.getTipo().intValue() == Global.DIRECTOR_GERAL_RH || u.getTipo().intValue() == Global.GESTOR)
|
|
|
|
|
{
|
|
|
|
|
gridActual.setRendered(false);
|
|
|
|
|
tableRowGroup2.setEmptyDataMsg("Sem registos");
|
|
|
|
|
tableRowGroup3.setEmptyDataMsg("Sem registos");
|
|
|
|
|
}
|
|
|
|
|
if(u.getTipo().intValue() == Global.DIRECTOR_SIPRP || u.getTipo().intValue() == Global.RH || u.getTipo().intValue() == Global.DIRECTOR_GERAL_RH || u.getTipo().intValue() == Global.GESTOR)
|
|
|
|
|
{
|
|
|
|
|
gridActual.setRendered(false);
|
|
|
|
|
tableRowGroup2.setEmptyDataMsg("Sem registos");
|
|
|
|
|
tableRowGroup3.setEmptyDataMsg("Sem registos");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(u.getTipo().intValue() != Global.DIRECTOR_SIPRP && u.getTipo().intValue() != Global.RH && u.getTipo().intValue() != Global.DIRECTOR_GERAL_RH)
|
|
|
|
|
{
|
|
|
|
|
getSessionBean1().setDisableMenuUtilizadores(true);
|
|
|
|
|
tableRowGroup1.setEmptyDataMsg("Sem registos");
|
|
|
|
|
tableRowGroup2.setEmptyDataMsg("Sem registos");
|
|
|
|
|
tableRowGroup3.setEmptyDataMsg("Sem registos");
|
|
|
|
|
}
|
|
|
|
|
if(u.getTipo().intValue() != Global.DIRECTOR_SIPRP && u.getTipo().intValue() != Global.RH && u.getTipo().intValue() != Global.DIRECTOR_GERAL_RH)
|
|
|
|
|
{
|
|
|
|
|
getSessionBean1().setDisableMenuUtilizadores(true);
|
|
|
|
|
tableRowGroup1.setEmptyDataMsg("Sem registos");
|
|
|
|
|
tableRowGroup2.setEmptyDataMsg("Sem registos");
|
|
|
|
|
tableRowGroup3.setEmptyDataMsg("Sem registos");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Column para desactivar plano - mostra se o utilizador for DIRECTOR SIPRP
|
|
|
|
|
@ -587,20 +587,25 @@ public class ListaPlanos extends AbstractPageBean {
|
|
|
|
|
return "ver_plano";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String goImprimirPlano_action() {
|
|
|
|
|
// TODO: Process the action. Return value is a navigation
|
|
|
|
|
// case name where null will return to the same page.
|
|
|
|
|
PlanoActuacao p = getTableActivosRowData();
|
|
|
|
|
PlanoActuacaoPDFCreator pdfCreator = new PlanoActuacaoPDFCreator();
|
|
|
|
|
private void createPdf( Integer pID )
|
|
|
|
|
{
|
|
|
|
|
PlanoActuacaoPDFCreator pdfCreator = new PlanoActuacaoPDFCreator();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
byte[] pdf = pdfCreator.createPDF(p.getId(), true);
|
|
|
|
|
showPdf(pdf);
|
|
|
|
|
byte[] pdf = pdfCreator.createPDF( pID, true );
|
|
|
|
|
showPdf( pdf );
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String goImprimirPlano_action() {
|
|
|
|
|
// TODO: Process the action. Return value is a navigation
|
|
|
|
|
// case name where null will return to the same page.
|
|
|
|
|
PlanoActuacao p = getTableActivosRowData();
|
|
|
|
|
createPdf( p.getId() );
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@ -609,16 +614,7 @@ public class ListaPlanos extends AbstractPageBean {
|
|
|
|
|
// TODO: Process the action. Return value is a navigation
|
|
|
|
|
// case name where null will return to the same page.
|
|
|
|
|
PlanoActuacao p = getTableSeguimentoRowData();
|
|
|
|
|
PlanoActuacaoPDFCreator pdfCreator = new PlanoActuacaoPDFCreator();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
byte[] pdf = pdfCreator.createPDF(p.getId(), true);
|
|
|
|
|
showPdf(pdf);
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
createPdf( p.getId() );
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@ -626,18 +622,11 @@ public class ListaPlanos extends AbstractPageBean {
|
|
|
|
|
public String goImprimirPlanoFromConcluidos_action() {
|
|
|
|
|
// TODO: Process the action. Return value is a navigation
|
|
|
|
|
// case name where null will return to the same page.
|
|
|
|
|
PlanoActuacao p = getTableConcluidosRowData();
|
|
|
|
|
PlanoActuacaoPDFCreator pdfCreator = new PlanoActuacaoPDFCreator();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
byte[] pdf = pdfCreator.createPDF(p.getId(), true);
|
|
|
|
|
showPdf(pdf);
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PlanoActuacao p = getTableConcluidosRowData();
|
|
|
|
|
if ( ! p.getConcluidoPorDesactivacao() )
|
|
|
|
|
{
|
|
|
|
|
createPdf( p.getId() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|