git-svn-id: https://svn.coded.pt/svn/SIPRP@735 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
Tiago Simão 18 years ago
parent 53ff4dcc71
commit 5a280212b8

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<driver project-version="3.0" class="org.postgresql.Driver"> <driver project-version="3.0" class="org.postgresql.Driver">
<url value="jdbc:postgresql://10.158.2.2:5432/siprp_local"/> <url value="jdbc:postgresql://10.158.2.2:5432/siprp_local"/>
<!-- url value="jdbc:postgresql://storage:5432/siprp_local"/--> <!--url value="jdbc:postgresql://storage:5432/siprp_local"/-->
<!--url value="jdbc:postgresql://localhost:5432/siprp_local"/-->
<connectionPool min="1" max="1"/> <connectionPool min="1" max="1"/>
<login userName="postgres" password="Typein" encoderClass="org.apache.cayenne.conf.PlainTextPasswordEncoder" passwordLocation="model" passwordSource="Not Applicable"/> <login userName="postgres" password="Typein" encoderClass="org.apache.cayenne.conf.PlainTextPasswordEncoder" passwordLocation="model" passwordSource="Not Applicable"/>
</driver> </driver>

@ -242,9 +242,15 @@ public class LeafInputField<ObjClass extends Object> extends JPanel implements F
if( !editable ) if( !editable )
{ {
setMouseOver( false ); setMouseOver( false );
removeBold();
} }
repaint(); repaint();
} }
private void removeBold()
{
}
public boolean isEditable() public boolean isEditable()
{ {
@ -421,11 +427,11 @@ public class LeafInputField<ObjClass extends Object> extends JPanel implements F
{ {
if( object instanceof Date ) if( object instanceof Date )
{ {
thiz = new JLabel( sdf.format( object ) ); thiz = new JTextArea( sdf.format( object ) );
} }
else if( object instanceof Map ) else if( object instanceof Map )
{ {
thiz = new JLabel( " " ); thiz = new JTextArea( " " );
setSelectedObject( selectedOption ); setSelectedObject( selectedOption );
} }
else if( object instanceof OrderedMap && collapseOptions ) else if( object instanceof OrderedMap && collapseOptions )
@ -456,7 +462,7 @@ public class LeafInputField<ObjClass extends Object> extends JPanel implements F
{ {
toString = " "; toString = " ";
} }
thiz = new JLabel( toString ); thiz = new JTextArea( toString );
} }
} }
else else

@ -120,7 +120,7 @@ public class LeafOptionDialog<KeyClass extends Object> extends JDialog
setupComponents( map == null ? orderedMap.iterator() : map.keySet().iterator(), map == null ? orderedMap.rows() : map.keySet().size(), map == null ? true : false ); setupComponents( map == null ? orderedMap.iterator() : map.keySet().iterator(), map == null ? orderedMap.rows() : map.keySet().size(), map == null ? true : false );
setUndecorated( true ); setUndecorated( true );
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG); getRootPane().setWindowDecorationStyle(JRootPane.NONE);
setSize( getLayout().minimumLayoutSize( getRootPane() ) ); setSize( getLayout().minimumLayoutSize( getRootPane() ) );
setLocationRelativeTo( getParent() ); setLocationRelativeTo( getParent() );
setModal( true ); setModal( true );

@ -112,7 +112,7 @@ public class SIPRPDataLoader implements CompanyDataLoader
// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" ); // Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" );
// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" ); // Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
//
// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" ); // Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" ); // Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
// Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" ); // Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );

@ -396,7 +396,7 @@ public class LembretesDataProvider
Empresas empresa = estabelecimento.getToEmpresas(); Empresas empresa = estabelecimento.getToEmpresas();
criarLembreteConsulta( tipoID, criarLembreteConsulta( tipoID,
new Date(), new Date(),
MedicinaConstants.LEMBRETE_RENOVACAO_FICHA_APTIDAO_STRING , MedicinaConstants.LEMBRETE_RENOVACAO_FICHA_APTIDAO_STRING,
null, null,
empresa.getId(), empresa.getId(),
estabelecimento.getId(), estabelecimento.getId(),

@ -35,6 +35,7 @@ import com.evolute.utils.ui.DialogException;
*/ */
public class TratarExternoAction extends AbstractAction public class TratarExternoAction extends AbstractAction
{ {
private static final long serialVersionUID = 1L;
private LembretesDataProvider lembretesProvider; private LembretesDataProvider lembretesProvider;
private SIPRPTracker tracker; private SIPRPTracker tracker;
@ -64,17 +65,12 @@ public class TratarExternoAction extends AbstractAction
{ {
tracker = (SIPRPTracker) Singleton.getInstance( SingletonConstants.SIPRP_TRACKER ); tracker = (SIPRPTracker) Singleton.getInstance( SingletonConstants.SIPRP_TRACKER );
Lembrete lembrete = lembretesProvider.getLembreteByID( lembreteID ); Lembrete lembrete = lembretesProvider.getLembreteByID( lembreteID );
boolean irParaProcessos = false;
if( lembrete == null ) if( lembrete == null )
{ {
JOptionPane.showMessageDialog( null, "Este lembrete j\u00e1 foi tratado.", "J\u00e1 tratado", JOptionPane.WARNING_MESSAGE ); JOptionPane.showMessageDialog( null, "Este lembrete j\u00e1 foi tratado.", "J\u00e1 tratado", JOptionPane.WARNING_MESSAGE );
return; return;
} }
else else
{
irParaProcessos = JOptionPane.showConfirmDialog( null, "Deseja visualizar os processos deste trabalhador?", "Abrir Processos", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE ) == JOptionPane.OK_OPTION;
}
if( irParaProcessos )
{ {
Trabalhadores trabalhador = null; Trabalhadores trabalhador = null;
Estabelecimentos estabelecimento = null; Estabelecimentos estabelecimento = null;

@ -79,6 +79,6 @@ public interface MedicinaConstants
public static final String LEMBRETE_DESMARCOU_SIPRP_STRING = "SIPRP Desmarcou"; public static final String LEMBRETE_DESMARCOU_SIPRP_STRING = "SIPRP Desmarcou";
public static final String LEMBRETE_DESMARCOU_TRABALHADOR_STRING = "Trabalhador Desmarcou"; public static final String LEMBRETE_DESMARCOU_TRABALHADOR_STRING = "Trabalhador Desmarcou";
public static final String LEMBRETE_FALTOU_TRABALHADOR_STRING = "Trabalhador Faltou"; public static final String LEMBRETE_FALTOU_TRABALHADOR_STRING = "Trabalhador Faltou";
public static final String LEMBRETE_RENOVACAO_FICHA_APTIDAO_STRING = "Renova" + ccedil + atilde + "o da Ficha"; public static final String LEMBRETE_RENOVACAO_FICHA_APTIDAO_STRING = "Marcar novos Exames";
} }

@ -191,11 +191,19 @@ public class MedicinaProcessoWindow extends LeafWindow
if( date != null && date.getTime() != 0 ) if( date != null && date.getTime() != 0 )
{ {
String text = new LeafTextDialog( this, null, "", true ).getText(); String text = new LeafTextDialog( this, null, "", true ).getText();
if( text != null ) if( text != null && !text.trim().equals( "" ) )
{ {
lembrete.setData( date ); lembrete.setData( date );
lembrete.setDescricao( text ); lembrete.setDescricao( text );
} }
else
{
abortAction( true );
}
}
else
{
abortAction( true );
} }
} }
} }

Loading…
Cancel
Save