Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Expand Up @@ -9,6 +9,7 @@
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 @@ -39,14 +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
Expand Up @@ -104,13 +104,16 @@ 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
3 changes: 1 addition & 2 deletions frontend/main/src/app/ship-qt/ship-qt.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class ShipQtComponent implements OnInit {

ngOnInit(): void {



//this.quotes.push({ precoFrete: 45.50, tempo: 3, trackid: "BR23154546TR", cepOrigem: 88058086, cepDestino: 88058086, comprimento: 50, largura: 50, altura: 50, peso: 10 })
//this.quotes.push({ precoFrete: 94.50, tempo: 6, trackid: "BR22315445TR", cepOrigem: 46513265, cepDestino: 65898454, comprimento: 100, largura: 200, altura: 10, peso: 25 })
Expand Down Expand Up @@ -79,7 +79,6 @@ export class ShipQtComponent implements OnInit {
catchError((error)=>{
return error
})

)
.subscribe((response: any) => {

Expand Down