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
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public Optional<Pessoa> list(@PathVariable int id){
}

@GetMapping("/countClients")
public long numberClients() {
return pessoaRepository.count();
public List<Pessoa> numberClients() {
return pessoaRepository.findAll();
}

@GetMapping("/countVisitors")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import org.springframework.beans.factory.annotation.Autowired;
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 Down Expand Up @@ -45,6 +46,11 @@ public List<RecentQuote> recentQuote(@PathVariable("id") int id){
return recentQuoteRepository.findOwnQuote(id);
}

@DeleteMapping("/recent/{id}")
public void deleteQuote(@PathVariable("id") int id){
recentQuoteRepository.deleteById(id);
}

@GetMapping("/go")
public int goingPackages() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package br.com.entra21.teamroxo.TMSProject.interfaces;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
Expand Down
12 changes: 6 additions & 6 deletions frontend/main/src/app/body/body.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<div class="media">
<div class="media-body">
<h3 class="dropdown-item-title">
Relatório: Aniversantes do dia
Relatório: Aniversantes do dia
<span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span>
</h3>
<p class="text-sm">Parabéns:</p>
<p class="text-sm text-muted">
<i class="far fa-clock mr-1" *ngFor="let aniversariante of birthnow; let i = index;">{{aniversariante}}</i>
<p class="text-sm text-muted" *ngFor="let aniversariante of aniversariantes; let i = index;">
<i class="fas fa-birthday-cake mr-1" ></i>{{aniversariante.nome}}
</p>
</div>
</div>
Expand All @@ -37,9 +37,9 @@ <h3 class="dropdown-item-title">
Relatório: Aniversariantes do mês
<span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span>
</h3>
<p class="text-sm">{{birthmonth}}</p>
<p class="text-sm text-muted">
<i class="far fa-clock mr-1"></i>
<p class="text-sm"></p>
<p class="text-sm text-muted" *ngFor="let aniversariante of aniversariantesMes; let i = index;">
<i class="fas fa-birthday-cake mr-1"></i>{{aniversariante.nome}}
</p>
</div>
</div>
Expand Down
33 changes: 27 additions & 6 deletions frontend/main/src/app/body/body.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,51 @@ import { Observable } from 'rxjs';
})
export class BodyComponent implements OnInit {

readonly APIBirthNow: string = "http://localhost:8080/user/birthnow"
readonly APIBirthMonth: string = "http://localhost:8080/user/birthmonth"
readonly APIBirthNow: string = "http://localhost:8080/user/birthnow"

readonly APIBirthMonth: string = "http://localhost:8080/user/birthmonth"

birthnow! : string
birthmonth! : string
aniversariantes!: Array<any>
aniversariantesMes!: Array<any>
id!: number
nome!: string
email!: string
email!: string
birth!: Date
document!: string

constructor(public loginService:LoginserviceService, private router:Router, private http:HttpClient) { }

ngOnInit(): void {

this.aniversariantes = new Array()
this.aniversariantesMes = new Array()

this.http.get(this.APIBirthNow)
.subscribe((resultado:any) => {
this.birthnow = resultado

var count = Object.keys(resultado).length

for(let i=0;i<count;i++){

this.aniversariantes.push({id: resultado[i].id ,nome: resultado[i].nome, email: resultado[i].email, birth: resultado[i].birth, document: resultado[i].document})

}

});

this.http.get(this.APIBirthMonth)
.subscribe((resultado:any) => {
this.birthmonth=resultado

var count = Object.keys(resultado).length

for(let i=0;i<count;i++){

this.aniversariantesMes.push({id: resultado[i].id ,nome: resultado[i].nome, email: resultado[i].email, birth: resultado[i].birth, document: resultado[i].document})

}

});

}
Expand Down
46 changes: 46 additions & 0 deletions frontend/main/src/app/finance/finance.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#graph{
padding-bottom: 40px;
width: 600px;
height: 400px;
}

h2{
padding-top: 20px;
}

body {
font-family: 'open sans', sans-serif;
font-size: 3rem;
background-size: cover;
height: 100%;
}

svg {
margin: 0 auto;
text-align: center;
width: 100%;
padding-top: 30px;
}

polyline {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: dash 5s ease-in forwards;
}

@keyframes dash{
to {
stroke-dashoffset: 0;
}
}


p {
font-size: 2rem;
text-align:center;
color: #efefef;
}
.name {
font-size: .8rem;
font-weight: light;
}
82 changes: 81 additions & 1 deletion frontend/main/src/app/finance/finance.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,81 @@
<p>finance works!</p>
<div class="card bg-gray text-center" id="graph">
<h2>LUCRO</h2>
<svg class='container' width="529px" height="320px" viewBox="30 27 529 286" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="graph-copy" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(30.000000, 27.000000)">
<g id="y_axis" font-size="16" font-family=".HelveticaNeueDeskInterface-Regular, .Helvetica Neue DeskInterface" fill="#FFFFFF" opacity="0.4" font-weight="normal">
<text id="0">
<tspan x="25.3008249" y="264.333333">0</tspan>
</text>
<text id="400">
<tspan x="12.7757572" y="201">25</tspan>
</text>
<text id="800">
<tspan x="12.7757572" y="137.666667">50</tspan>
</text>
<text id="1200">
<tspan x="6.51322328" y="74.3333333">75</tspan>
</text>
<text id="1600">
<tspan x="6.51322328" y="11">100</tspan>
</text>
</g>
<g id="GRAPHS" transform="translate(64.000000, 16.000000)" stroke-linecap="round" stroke-width="8" stroke-linejoin="round">
<polyline id="Banks" stroke="#5BCAC1" points="0 1 88.0438662 1 128.985782 137 180.170616 137 224.189573 182 256.947867 91 301.990521 137 346.009479 91 392.087202 91 429.952607 179"></polyline>
<polyline id="Bridge" stroke="#81DEFF" points="2.04739336 183 54.2559242 227 96.2274882 47 133.080569 1 302.018438 1 346.680361 44.6280822 386.957346 0 427.905213 43"></polyline>
<polyline id="PayPal" stroke="#F6F5A6" points="2.04739336 245 53.273159 245 99.2985782 245 137.175355 245 219.077488 245 256.947867 245 301.990521 245 349.080569 245 398.228672 245 432 245"></polyline>
</g>
<g id="x_axis" transform="translate(71.974046, 271.541667)" font-size="11.0833333" font-family=".HelveticaNeueDeskInterface-Regular, .Helvetica Neue DeskInterface" fill="#FFFFFF" opacity="0.4" font-weight="normal">
<text id="1">
<tspan x="0.396183206" y="11">1</tspan>
</text>
<text id="2">
<tspan x="39.2603361" y="11">2</tspan>
</text>
<text id="3">
<tspan x="78.8786567" y="11">3</tspan>
</text>
<text id="4">
<tspan x="118.496977" y="11">4</tspan>
</text>
<text id="5">
<tspan x="158.115298" y="11">5</tspan>
</text>
<text id="6">
<tspan x="197.733619" y="11">6</tspan>
</text>
<text id="7">
<tspan x="237.351939" y="11">7</tspan>
</text>
<text id="8">
<tspan x="276.97026" y="11">8</tspan>
</text>
<text id="9">
<tspan x="316.58858" y="11">9</tspan>
</text>
<text id="10">
<tspan x="359.229833" y="11">10</tspan>
</text>
<text id="11">
<tspan x="400.036703" y="11">11</tspan>
</text>
<text id="12">
<tspan x="438.466474" y="11">12</tspan>
</text>
</g>
<g id="grid" transform="translate(46.618321, 4.750000)" stroke="#FFFFFF" stroke-linecap="square" opacity="0.0800000057">
<path d="M0.396183206,1.1875 L478.991396,1.1875" id="Line"></path>
<path d="M0.396183206,32.8541667 L478.991396,32.8541667" id="Line"></path>
<path d="M0.396183206,64.5208333 L478.991396,64.5208333" id="Line"></path>
<path d="M0.396183206,96.1875 L478.991396,96.1875" id="Line"></path>
<path d="M0.396183206,127.854167 L478.991396,127.854167" id="Line"></path>
<path d="M0.396183206,159.520833 L478.991396,159.520833" id="Line"></path>
<path d="M0.396183206,191.1875 L478.991396,191.1875" id="Line"></path>
<path d="M0.396183206,222.854167 L478.991396,222.854167" id="Line"></path>
<path d="M0.396183206,254.520833 L478.991396,254.520833" id="Line"></path>
</g>
</g>
</svg>
</div>
1 change: 0 additions & 1 deletion frontend/main/src/app/quote.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export class QuoteService {
regPackage(object:any){
this.http.post(this.apiURL2+'/register',object)
.subscribe((response)=>{

console.log(response);

})
Expand Down
2 changes: 0 additions & 2 deletions frontend/main/src/app/rct-qt/rct-qt.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<table class="table table-bordered">
<thead>
<th>Ação</th>

<th>Preço do frete</th>
<th>Prazo</th>
<th>Transportadora</th>
<th>Origem</th>
<th>Destino</th>
<th>Peso cubado</th>
<th>Usuário</th>

</thead>
<tbody>
<tr *ngFor="let recQuote of recQuotes;let i = index;">
Expand Down