Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8808872
about us
mat-felipe Oct 7, 2022
6e8cb4b
Merge pull request #73 from Team-Roxo/mateus
mat-felipe Oct 7, 2022
9dd564d
Pequenas alterações
bruno-roberto Oct 8, 2022
7126d7a
AboutUs
mat-felipe Oct 8, 2022
fddb86a
Merge pull request #74 from Team-Roxo/mateus
mat-felipe Oct 8, 2022
6255bd4
Merge pull request #75 from Team-Roxo/bruno
kaka-jaques Oct 8, 2022
330d03b
sla
Cristian-Baade Oct 8, 2022
33cce4a
Merge pull request #76 from Team-Roxo/cristian
kaka-jaques Oct 8, 2022
f7a98ae
UPDATE MODAL
kaka-jaques Oct 8, 2022
5672044
Merge pull request #77 from Team-Roxo/kaka
kaka-jaques Oct 8, 2022
9209ae0
UPDATE
kaka-jaques Oct 8, 2022
2767c0f
Merge pull request #78 from Team-Roxo/kaka
kaka-jaques Oct 8, 2022
8d42841
Updated Cadastro por pop up, (user, carrier e ship quote)
mat-felipe Oct 8, 2022
3d48763
Merge pull request #79 from Team-Roxo/mateus
mat-felipe Oct 8, 2022
2b2adec
Delete User
mat-felipe Oct 8, 2022
4092354
Merge pull request #80 from Team-Roxo/mateus
mat-felipe Oct 8, 2022
daf2f75
Delete user
mat-felipe Oct 8, 2022
9be366d
Merge pull request #81 from Team-Roxo/mateus
kaka-jaques Oct 8, 2022
15b2191
Poucas alterações:
bruno-roberto Oct 9, 2022
ed66903
Delet Carriers
mat-felipe Oct 9, 2022
ccb3220
Merge pull request #82 from Team-Roxo/mateus
mat-felipe Oct 9, 2022
3f928e4
Edit Carrier and User, only frontend
mat-felipe Oct 9, 2022
3061352
Merge pull request #83 from Team-Roxo/mateus
mat-felipe Oct 9, 2022
3ed2a74
Button Save Ship Quote
mat-felipe Oct 9, 2022
0008714
Merge pull request #84 from Team-Roxo/mateus
mat-felipe Oct 9, 2022
3771465
Buttons ajust, new, edit, carriers and users
mat-felipe Oct 9, 2022
25ac0d8
Merge pull request #85 from Team-Roxo/mateus
mat-felipe Oct 9, 2022
46d0ab1
UPDATE!
kaka-jaques Oct 9, 2022
23eea2e
UPDATE
kaka-jaques Oct 9, 2022
1d46869
Merge branch 'quasela' into kaka
kaka-jaques Oct 9, 2022
5f7882e
Merge pull request #86 from Team-Roxo/kaka
kaka-jaques Oct 9, 2022
e6e919b
Merge branch 'quasela' into bruno
kaka-jaques Oct 9, 2022
d17b97d
Merge pull request #87 from Team-Roxo/bruno
kaka-jaques Oct 9, 2022
18aa688
Forget-Password casca
bruno-roberto Oct 10, 2022
20180be
Merge pull request #88 from Team-Roxo/bruno
bruno-roberto Oct 10, 2022
0fd56b6
UPDATE I THINK
kaka-jaques Oct 10, 2022
795b356
Merge branch 'quasela' into kaka
kaka-jaques Oct 10, 2022
b361788
Merge pull request #89 from Team-Roxo/kaka
kaka-jaques Oct 10, 2022
8fbe947
UPDATE
kaka-jaques Oct 10, 2022
bef3131
Merge pull request #90 from Team-Roxo/kaka
kaka-jaques Oct 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/img/backend_photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion backend/TMSProject/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
Expand Down Expand Up @@ -61,6 +60,11 @@
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.6.2</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package br.com.entra21.teamroxo.TMSProject.controllers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import br.com.entra21.teamroxo.TMSProject.interfaces.AboutUsRepository;
import br.com.entra21.teamroxo.TMSProject.template.AboutUs;





@RestController
@CrossOrigin(origins = "*")
@RequestMapping("/aboutus")
public class AboutUsController {

@Autowired
private AboutUsRepository aboutUsRepository;

@GetMapping()
public List<AboutUs> listAboutUs(){
return aboutUsRepository.findAll() ;

}

}

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
Expand Down Expand Up @@ -38,9 +40,17 @@ public Carriers carrier(@PathVariable("id") int id) {
@PostMapping()
@ResponseStatus(code = HttpStatus.CREATED)
public Carriers register(@RequestBody Carriers dados) {

return carriersRepository.save(dados);

}

@DeleteMapping("/{id}")
public void deleteCarrier(@PathVariable("id") int id){
carriersRepository.deleteById(id);
}

@PutMapping()
public Carriers attCarrier(@RequestBody Carriers body) {
return carriersRepository.save(body);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
Expand Down Expand Up @@ -63,6 +64,11 @@ public List<Login> listAll() {
return response;

}

@PutMapping()
public Login attLogin(@RequestBody Login body) {
return loginRepository.save(body);
}

@PostMapping("/init")
public CountVisitors bounce(@RequestBody CountVisitors visitor) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
package br.com.entra21.teamroxo.TMSProject.controllers;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.TemporalAdjuster;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.logging.SimpleFormatter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
Expand All @@ -27,13 +32,11 @@
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

import br.com.entra21.teamroxo.TMSProject.TmsProjectApplication;
import br.com.entra21.teamroxo.TMSProject.interfaces.CountVisitorsRepository;
import br.com.entra21.teamroxo.TMSProject.interfaces.PessoaRepository;
import br.com.entra21.teamroxo.TMSProject.template.CountVisitors;
import br.com.entra21.teamroxo.TMSProject.template.ItemNivel3;
import br.com.entra21.teamroxo.TMSProject.template.Pessoa;
import br.com.entra21.teamroxo.TMSProject.template.RegisterQuote;

@RestController
@CrossOrigin(origins = "*")
Expand Down Expand Up @@ -76,8 +79,7 @@ public List<Pessoa> birthNow(){

@GetMapping("/birthmonth")
public List<Pessoa> birthMonth(){
return pessoaRepository.findBirthMonth(LocalDate.now().withMonth(LocalDate.now().getMonthValue()).with(TemporalAdjusters.firstDayOfMonth()),
LocalDate.now().withMonth(LocalDate.now().getMonthValue()).with(TemporalAdjusters.lastDayOfMonth()));
return pessoaRepository.findBirthMonth(LocalDate.now());
}

@GetMapping("/bounce")
Expand All @@ -101,7 +103,17 @@ public boolean disBounce(@PathVariable("id") int id) {
public Pessoa register(@RequestBody Pessoa dados) {
return pessoaRepository.save(dados);
}


@PutMapping()
public Pessoa attPessoa(@RequestBody Pessoa body) {
return pessoaRepository.save(body);
}

@DeleteMapping("/{id}")
public void deletePessoa(@PathVariable("id") int id){
pessoaRepository.deleteById(id);
}

private List<Pessoa> obterListaCompleta() {

List<Pessoa> response = pessoaRepository.findAll();
Expand Down Expand Up @@ -140,5 +152,7 @@ private void setMaturidadeNivel3(Pessoa pessoa) {
}

}



}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,6 @@ public int goingPackages() {

}



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package br.com.entra21.teamroxo.TMSProject.interfaces;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import br.com.entra21.teamroxo.TMSProject.template.AboutUs;
import br.com.entra21.teamroxo.TMSProject.template.Carriers;


@Repository
@EnableJpaRepositories
public interface AboutUsRepository extends JpaRepository<AboutUs, String>{

@Query("FROM AboutUs")
public void AboutUs();

}


Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
@EnableJpaRepositories
public interface PessoaRepository extends JpaRepository<Pessoa, Integer> {

@Query("FROM Pessoa WHERE birth = :now")
@Query("FROM Pessoa WHERE MONTH(birth) = EXTRACT(MONTH FROM :now) AND DAY(birth) = EXTRACT(DAY FROM :now)")
List<Pessoa> findBirth (@Param("now") LocalDate now);

@Query("FROM Pessoa WHERE birth BETWEEN :firstDay and :lastDay")
List<Pessoa> findBirthMonth (@Param("firstDay") LocalDate first, @Param("lastDay") LocalDate last);
@Query("FROM Pessoa WHERE MONTH(birth) = EXTRACT(MONTH FROM :now)")
List<Pessoa> findBirthMonth (@Param("now") LocalDate now);

}
Loading