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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<summary><b>3.1 - GOOGLE CLOUD</b></summary>
<br>

<a href="#">Clique aqui para aprender a configurar o Google Cloud</a>
<a href="">Clique aqui para aprender a configurar o Google Cloud</a>

>## <b id="google_api"> 3.1.1 - Google API </b>
>>### <b id="directions"> 3.1.1.1 - Directions API </b>
Expand Down
2 changes: 2 additions & 0 deletions assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# <b>CONFIGURANDO GOOGLE CLOUD PARA DEPLOY E SERVICES</b>

Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public long numberClients() {
}

@GetMapping("/countVisitors")
public long numberVisitors() {
return countVisitorsRepository.count();
public List<CountVisitors> numberVisitors() {
return countVisitorsRepository.findAll();
}

@GetMapping("/birthnow")
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
4 changes: 3 additions & 1 deletion frontend/main/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { ReceiptComponent } from './receipt/receipt.component';
import { ShipQtComponent } from './ship-qt/ship-qt.component';
import { UserClientComponent } from './user-client/user-client.component';
import { UsersComponent } from './users/users.component';
import { VisitsComponent } from './visits/visits.component';

const routes: Routes = [
{ path: 'home', component:HomeComponent, canActivate:[LoginserviceService]},
Expand All @@ -36,7 +37,8 @@ const routes: Routes = [
{ path: 'edit', component:EditComponent, canActivate:[LoginserviceService]},
{ path: 'about', component:AboutComponent, canActivate:[LoginserviceService]},
{ path: 'forgetPassword', component:ForgetPasswordComponent},
{ path: "user-client", component:UserClientComponent, canActivate:[LoginserviceService]}
{ path: "user-client", component:UserClientComponent, canActivate:[LoginserviceService]},
{ path: "visits", component:VisitsComponent, canActivate:[LoginserviceService]}
];

@NgModule({
Expand Down
4 changes: 3 additions & 1 deletion frontend/main/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { AboutComponent } from './about/about.component';
import { HttpClientModule } from "@angular/common/http";
import { ForgetPasswordComponent } from './forget-password/forget-password.component';
import { UserClientComponent } from './user-client/user-client.component';
import { VisitsComponent } from './visits/visits.component';

@NgModule({
declarations: [
Expand All @@ -46,7 +47,8 @@ import { UserClientComponent } from './user-client/user-client.component';
EditComponent,
AboutComponent,
ForgetPasswordComponent,
UserClientComponent
UserClientComponent,
VisitsComponent
],
imports: [
BrowserModule,
Expand Down
51 changes: 17 additions & 34 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">
Titulo
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">Descrição</p>
<p class="text-sm text-muted">
<i class="far fa-clock mr-1"></i> Quando...
<p class="text-sm">Parabéns:</p>
<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 @@ -34,12 +34,12 @@ <h3 class="dropdown-item-title">
<div class="media">
<div class="media-body">
<h3 class="dropdown-item-title">
Titulo
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">Descrição</p>
<p class="text-sm text-muted">
<i class="far fa-clock mr-1"></i> Quando...
<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 All @@ -64,32 +64,7 @@ <h3 class="dropdown-item-title">
</div>
</li>

<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="far fa-bell"></i>
<span class="badge badge-warning navbar-badge">3</span>
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<span class="dropdown-item dropdown-header">15 Notifications</span>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<i class="fas fa-envelope mr-2"></i> 4 new messages
<span class="float-right text-muted text-sm">3 mins</span>
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<i class="fas fa-users mr-2"></i> 8 friend requests
<span class="float-right text-muted text-sm">12 hours</span>
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<i class="fas fa-file mr-2"></i> 3 new reports
<span class="float-right text-muted text-sm">2 days</span>
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
</div>
</li>

</ul>
</nav>

Expand Down Expand Up @@ -196,6 +171,14 @@ <h3 class="dropdown-item-title">
</p>
</a>
</li>
<li class="nav-item">
<a href="#" routerLink="visits" class="nav-link">
<i class="nav-icon fas fa-building"></i>
<p>
Visits
</p>
</a>
</li>
</ul>
</nav>
</div>
Expand Down
52 changes: 46 additions & 6 deletions frontend/main/src/app/body/body.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { LoginComponent } from '../login/login.component';
import { LoginserviceService } from '../loginservice.service';
import { HttpClient } from '@angular/common/http';
import { Router } from '@angular/router';
import { Observable } from 'rxjs';

@Component({
selector: 'app-body',
Expand All @@ -9,18 +12,55 @@ import { LoginserviceService } from '../loginservice.service';
})
export class BodyComponent implements OnInit {

constructor(public loginService:LoginserviceService) { }
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
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) => {

sair(){
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.loginService.succeed = false;
});

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

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})

}

});

}

}
sair(){

this.loginService.succeed = false;}}
7 changes: 4 additions & 3 deletions frontend/main/src/app/carrier.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ export class CarrierService {

findName(id: number):any{

this.http.get(this.apiURL+`/`+id).subscribe((response)=>{
return response
})
return this.http.get(this.apiURL+'/'+id)




}

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>
Loading