From eeca44d288a3f9a95e9887c06f70c9dfa295f372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Ferreira?= Date: Tue, 22 Jan 2019 17:51:20 -0200 Subject: [PATCH 1/8] Set theme jekyll-theme-slate --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..c741881 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-slate \ No newline at end of file From c0a4884babf512fec15f7c32e79936a9d38a467a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Ferreira?= Date: Thu, 21 Feb 2019 16:18:26 -0300 Subject: [PATCH 2/8] Create README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4be8d4e --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# gesthor +Gesthor - Gestão de Contratos Centralizados + +O Gesthor é uma webapp para gestão centralizada de contratos. Para maior informação, verifique o projeto e os cards de evolução do sistema. + From b611b9604b88bc88f88eb830f25fb1a3054b9dd3 Mon Sep 17 00:00:00 2001 From: marcio Date: Sun, 21 Apr 2019 23:31:09 -0300 Subject: [PATCH 3/8] rodar conforme ambiente selecionado --- Procfile | 2 +- src/main/resources/application-prd.properties | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/application-prd.properties diff --git a/Procfile b/Procfile index 15a3f9a..c3c0f04 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: java -Dserver.port=$PORT -jar target/gesthor.jar \ No newline at end of file +web: java -Dserver.port=$PORT spring.profiles.active=prd -jar target/gesthor.jar \ No newline at end of file diff --git a/src/main/resources/application-prd.properties b/src/main/resources/application-prd.properties new file mode 100644 index 0000000..a68e648 --- /dev/null +++ b/src/main/resources/application-prd.properties @@ -0,0 +1,13 @@ +spring.datasource.url=jdbc:postgresql://Host:Port/DatabaseName?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory +spring.datasource.username=User +spring.datasource.password=Password + +spring.h2.console.enabled=true +spring.h2.console.path=/console + +spring.jpa.hibernate.ddl-auto=update +spring.jpa.show-sql=true + +spring.thymeleaf.cache=true +server.port=8180 + From fc71f20a5c1a519707444feede7220d7d1acda5d Mon Sep 17 00:00:00 2001 From: marcio Date: Sun, 21 Apr 2019 23:36:21 -0300 Subject: [PATCH 4/8] ajuste --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index c3c0f04..1f25e1e 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: java -Dserver.port=$PORT spring.profiles.active=prd -jar target/gesthor.jar \ No newline at end of file +web: java -Dserver.port=$PORT -Dspring.profiles.active=prd -jar target/gesthor.jar \ No newline at end of file From dfb3343c12c0a9a60dfdc149a2488b6a234dd2de Mon Sep 17 00:00:00 2001 From: marcio Date: Sun, 21 Apr 2019 23:42:49 -0300 Subject: [PATCH 5/8] ajusted --- Procfile | 2 +- src/main/resources/application-prd.properties | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 1f25e1e..15a3f9a 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: java -Dserver.port=$PORT -Dspring.profiles.active=prd -jar target/gesthor.jar \ No newline at end of file +web: java -Dserver.port=$PORT -jar target/gesthor.jar \ No newline at end of file diff --git a/src/main/resources/application-prd.properties b/src/main/resources/application-prd.properties index a68e648..6f5de6a 100644 --- a/src/main/resources/application-prd.properties +++ b/src/main/resources/application-prd.properties @@ -1,3 +1,5 @@ +spring.profiles.active=prd + spring.datasource.url=jdbc:postgresql://Host:Port/DatabaseName?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory spring.datasource.username=User spring.datasource.password=Password @@ -5,6 +7,7 @@ spring.datasource.password=Password spring.h2.console.enabled=true spring.h2.console.path=/console +spring.jpa.database-platform=postgresql spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true From fc78eeebe0545ffc78ab104a47624d5124edc3ef Mon Sep 17 00:00:00 2001 From: marcio Date: Sun, 21 Apr 2019 23:48:47 -0300 Subject: [PATCH 6/8] ajuste para rodar no heroku --- Procfile | 2 +- pom.xml | 10 ++++++++-- src/main/resources/application-prd.properties | 5 ----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Procfile b/Procfile index 15a3f9a..1f25e1e 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: java -Dserver.port=$PORT -jar target/gesthor.jar \ No newline at end of file +web: java -Dserver.port=$PORT -Dspring.profiles.active=prd -jar target/gesthor.jar \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3f4fd88..276cb99 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 @@ -112,7 +113,12 @@ jigsaw 2.2.6 - + + + org.postgresql + postgresql + + diff --git a/src/main/resources/application-prd.properties b/src/main/resources/application-prd.properties index 6f5de6a..44704a7 100644 --- a/src/main/resources/application-prd.properties +++ b/src/main/resources/application-prd.properties @@ -1,12 +1,7 @@ -spring.profiles.active=prd - spring.datasource.url=jdbc:postgresql://Host:Port/DatabaseName?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory spring.datasource.username=User spring.datasource.password=Password -spring.h2.console.enabled=true -spring.h2.console.path=/console - spring.jpa.database-platform=postgresql spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true From 03b25f1ca11ed45136dd1fddb770452fbd19cbc0 Mon Sep 17 00:00:00 2001 From: marcio Date: Sun, 21 Apr 2019 23:56:05 -0300 Subject: [PATCH 7/8] ajuste --- src/main/resources/application-prd.properties | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application-prd.properties b/src/main/resources/application-prd.properties index 44704a7..92ab737 100644 --- a/src/main/resources/application-prd.properties +++ b/src/main/resources/application-prd.properties @@ -1,9 +1,12 @@ spring.datasource.url=jdbc:postgresql://Host:Port/DatabaseName?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory spring.datasource.username=User spring.datasource.password=Password +spring.datasource.driver-class-name=org.postgresql.Driver -spring.jpa.database-platform=postgresql + +spring.jpa.database=postgresql spring.jpa.hibernate.ddl-auto=update +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL95Dialect spring.jpa.show-sql=true spring.thymeleaf.cache=true From 97fa27baa98c1f4668e22e4aac50a3edb251e5dd Mon Sep 17 00:00:00 2001 From: Alvaro Barros Date: Mon, 22 Apr 2019 13:51:39 -0300 Subject: [PATCH 8/8] =?UTF-8?q?Implementa=C3=A7=C3=A3o=20do=20fiscal=20no?= =?UTF-8?q?=20contrato.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gesthor/modelo/Contrato.java | 278 ++++++++++-------- .../contrato/fragments/formulario.html | 21 +- .../resources/templates/contrato/lista.html | 2 + src/main/resources/templates/layout.html | 7 + 4 files changed, 185 insertions(+), 123 deletions(-) diff --git a/src/main/java/br/net/globotecnologia/gesthor/modelo/Contrato.java b/src/main/java/br/net/globotecnologia/gesthor/modelo/Contrato.java index 1e42cfd..7622e60 100644 --- a/src/main/java/br/net/globotecnologia/gesthor/modelo/Contrato.java +++ b/src/main/java/br/net/globotecnologia/gesthor/modelo/Contrato.java @@ -22,138 +22,172 @@ @Entity public class Contrato { - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; - @Column(unique = true, nullable = false, length = 7) - private Integer numero; + @Column(unique = true, nullable = false, length = 7) + private Integer numero; - @Column(length = 4, nullable = false) - private Integer ano; + @Column(length = 4, nullable = false) + private Integer ano; - @Column(nullable = false) - @Temporal(TemporalType.DATE) - @DateTimeFormat(pattern="dd/MM/yyyy") - private Date dataAssinatura; + @Column(nullable = false) + @Temporal(TemporalType.DATE) + @DateTimeFormat(pattern = "dd/MM/yyyy") + private Date dataAssinatura; - @Column(nullable = false) - @Temporal(TemporalType.DATE) - @DateTimeFormat(pattern="dd/MM/yyyy") - private Date inicioVigencia; + @Column(nullable = false) + @Temporal(TemporalType.DATE) + @DateTimeFormat(pattern = "dd/MM/yyyy") + private Date inicioVigencia; - @Column(nullable = false) - @Temporal(TemporalType.DATE) - @DateTimeFormat(pattern="dd/MM/yyyy") - private Date finalVigencia; + @Column(nullable = false) + @Temporal(TemporalType.DATE) + @DateTimeFormat(pattern = "dd/MM/yyyy") + private Date finalVigencia; - @Column(precision=2,scale=3, length = 10, columnDefinition="DECIMAL", nullable = false) - @NumberFormat(style=Style.NUMBER, pattern="#.###.###.###,##") - private BigDecimal valor; + @Column(precision = 2, scale = 3, length = 10, columnDefinition = "DECIMAL", nullable = false) + @NumberFormat(style = Style.NUMBER, pattern = "#.###.###.###,##") + private BigDecimal valor; - @Column(nullable = false) - @Enumerated(EnumType.STRING) - private Status status; - - @Column(nullable = false, length = 200) - private String objeto; - - @ManyToOne - @JoinColumn(nullable = false) - private Empresa empresa; - - @ManyToOne - @JoinColumn(nullable = false) - private Gestor gestor; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getNumero() { - return numero; - } - - public void setNumero(Integer numero) { - this.numero = numero; - } - - public Integer getAno() { - return ano; - } - - public void setAno(Integer ano) { - this.ano = ano; - } - - public Date getDataAssinatura() { - return dataAssinatura; - } - - public void setDataAssinatura(Date dataAssinatura) { - this.dataAssinatura = dataAssinatura; - } - - public Date getInicioVigencia() { - return inicioVigencia; - } - - public void setInicioVigencia(Date inicioVigencia) { - this.inicioVigencia = inicioVigencia; - } - - public Date getFinalVigencia() { - return finalVigencia; - } - - public void setFinalVigencia(Date finalVigencia) { - this.finalVigencia = finalVigencia; - } - - public BigDecimal getValor() { - return valor; - } - - public void setValor(BigDecimal valor) { - this.valor = valor; - } - - public Status getStatus() { - return status; - } + @Column(nullable = false) + @Enumerated(EnumType.STRING) + private Status status; - public void setStatus(Status status) { - this.status = status; - } - - public String getObjeto() { - return objeto; - } - - public void setObjeto(String objeto) { - this.objeto = objeto; - } - - public Empresa getEmpresa() { - return empresa; - } + @Column(nullable = false, length = 200) + private String objeto; - public void setEmpresa(Empresa empresa) { - this.empresa = empresa; - } + @ManyToOne + @JoinColumn(nullable = false) + private Empresa empresa; - public Gestor getGestor() { - return gestor; - } + @ManyToOne + @JoinColumn(nullable = false) + private Gestor gestor; - public void setGestor(Gestor gestor) { - this.gestor = gestor; - } - - + @ManyToOne + @JoinColumn(nullable = false) + private Gestor fiscal; + + public Long getId() { + + return this.id; + } + + public void setId(final Long id) { + + this.id = id; + } + + public Integer getNumero() { + + return this.numero; + } + + public void setNumero(final Integer numero) { + + this.numero = numero; + } + + public Integer getAno() { + + return this.ano; + } + + public void setAno(final Integer ano) { + + this.ano = ano; + } + + public Date getDataAssinatura() { + + return this.dataAssinatura; + } + + public void setDataAssinatura(final Date dataAssinatura) { + + this.dataAssinatura = dataAssinatura; + } + + public Date getInicioVigencia() { + + return this.inicioVigencia; + } + + public void setInicioVigencia(final Date inicioVigencia) { + + this.inicioVigencia = inicioVigencia; + } + + public Date getFinalVigencia() { + + return this.finalVigencia; + } + + public void setFinalVigencia(final Date finalVigencia) { + + this.finalVigencia = finalVigencia; + } + + public BigDecimal getValor() { + + return this.valor; + } + + public void setValor(final BigDecimal valor) { + + this.valor = valor; + } + + public Status getStatus() { + + return this.status; + } + + public void setStatus(final Status status) { + + this.status = status; + } + + public String getObjeto() { + + return this.objeto; + } + + public void setObjeto(final String objeto) { + + this.objeto = objeto; + } + + public Empresa getEmpresa() { + + return this.empresa; + } + + public void setEmpresa(final Empresa empresa) { + + this.empresa = empresa; + } + + public Gestor getGestor() { + + return this.gestor; + } + + public void setGestor(final Gestor gestor) { + + this.gestor = gestor; + } + + public Gestor getFiscal() { + + return this.fiscal; + } + + public void setFiscal(final Gestor fiscal) { + + this.fiscal = fiscal; + } } diff --git a/src/main/resources/templates/contrato/fragments/formulario.html b/src/main/resources/templates/contrato/fragments/formulario.html index 64bb1b1..0b271ac 100644 --- a/src/main/resources/templates/contrato/fragments/formulario.html +++ b/src/main/resources/templates/contrato/fragments/formulario.html @@ -4,6 +4,7 @@ xmlns:th="http://www.thymealeaf.org"> +
@@ -17,7 +18,7 @@ for="numero" class="">Número + maxlength="7" required />
@@ -45,6 +46,23 @@ + +
+ +
@@ -135,6 +153,7 @@ +
diff --git a/src/main/resources/templates/contrato/lista.html b/src/main/resources/templates/contrato/lista.html index 9158597..9bc07db 100644 --- a/src/main/resources/templates/contrato/lista.html +++ b/src/main/resources/templates/contrato/lista.html @@ -17,6 +17,7 @@ Número Ano Gestor + Fiscal Contratada Status Ações @@ -32,6 +33,7 @@ th:text="${contrato.numero}"> + diff --git a/src/main/resources/templates/layout.html b/src/main/resources/templates/layout.html index 7f9ad37..2effc42 100644 --- a/src/main/resources/templates/layout.html +++ b/src/main/resources/templates/layout.html @@ -68,6 +68,13 @@ } }); + $('#gestor').change(function(){ + var teste = $('#gestor').val(); + $("#fiscal option[value='"+teste+"']").remove(); + $("#divFical").show(); + $("#divFical").removeAttr("hidden"); + }); + });