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
43 changes: 42 additions & 1 deletion frontend/main/src/app/carriers/carriers.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
<p>carriers works!</p>
<table class="table table-bordered">
<thead>
<th>Razão social</th>
<th>E-mail</th>
<th>CNPJ</th>

</thead>
<tbody>
<tr>

<td><input type="text" [(ngModel)]="name"></td>
<td><input type="text" [(ngModel)]="email"></td>
<td><input type="text" [(ngModel)]="cnpj"></td>

</tr>
</tbody>
</table>

<button class="btn btn-success" (click)="adicionar()">Add</button>
<br>
<hr>
<table class="table table-bordered">
<thead>
<th>ID</th>
<th>Razão social</th>
<th>E-mail</th>
<th>CNPJ</th>
<th>Ações</th>
</thead>
<tbody>
<tr *ngFor="let carrier of carriers;let i = index;">
<td>{{i}}</td>
<td>{{carrier.name}}</td>
<td>{{carrier.email}}</td>
<td>{{carrier.cnpj}}</td>
<td>
<button class="btn btn-danger mr-2" (click)="deletar(i)">Deletar</button>
<button class="btn btn-primary mr-2" (click)="alterar(i)">Alterar</button>
</td>
</tr>
</tbody>
</table>
40 changes: 34 additions & 6 deletions frontend/main/src/app/carriers/carriers.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,38 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./carriers.component.css']
})
export class CarriersComponent implements OnInit {
carriers!:Array<any>
name!:string
email!:string
cnpj!:string

constructor() { }

ngOnInit(): void {
this.carriers = new Array()
this.carriers.push({name:"Total Express", email:"total@express.com", cnpj:"4564564566454655"})
this.carriers.push({name:"Jadlog", email:"jadlog@jadlog.com", cnpj:"4564664656565456"})
this.carriers.push({name:"Braspress", email:"braspress@braspress.com", cnpj:"1231323132312"})
this.carriers.push({name:"Correios", email:"correios@correios.com", cnpj:"7897987899789"})

}

adicionar(){
if(this.name){
this.carriers.push({name:this.name, email:this.email, cnpj:this.cnpj})
this.name =""
this.email=""
this.cnpj=""
}
}


deletar(index:number){
this.carriers.splice(index,1)
}

constructor() { }

ngOnInit(): void {
}

}
alterar(index:number){
// this.carriers.splice(index,1)
}

}
72 changes: 71 additions & 1 deletion frontend/main/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,75 @@
<main class="container-fluid">
<div class="row">
<p>Home</p>
<div class="col">
<div class="card bg-gray-dark mt-4">
<div class="card-body mt-2">
<h1>Welcome!!</h1>
<h3>Where do you want to go?</h3>
</div>
</div>
</div>
</div>


</main>
<div class="row">
<div class="col">
<div class="card bg-warning mr-2" style="max-width: 18rem">
<div class="card-body">
<h3 class="card-title">Dashboards</h3>
<p class="card-text mt-4"><br><br> Clique para ver os Dashboards <br></p>
</div>
</div>
</div>
<div class="col">
<div class="card bg-primary mr-2" style="max-width: 18rem">
<div class="card-body">
<h3 class="card-title">User</h3>
<p class="card-text mt-4"><br><br> Clique para ver User</p>
</div>
</div>
</div>
<div class="col">
<div class="card bg-olive" style="max-width: 18rem">
<div class="card-body">
<h3 class="card-title">Packages</h3>
<p class="card-text mt-4"><br><br> Clique para ver Packages</p>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col">
<div class="card bg-orange" style="max-width: 18rem">
<div class="card-body">
<h3 class="card-title">Finance</h3>
<p class="card-text mt-4"><br><br> Clique para ver Finance</p>
</div>
</div>
</div>
<div class="col">
<div class="card bg-info" style="max-width: 18rem">
<div class="card-body">
<h3 class="card-title">Quotes</h3>
<p class="card-text mt-4"><br><br> Clique para ver Quotes</p>
</div>
</div>
</div>
<div class="col">
<div class="card bg-success" style="max-width: 18rem">
<div class="card-body">
<h3 class="card-title">About us</h3>
<p class="card-text mt-4"><br><br> Clique para ver About Us</p>
</div>
</div>
</div>
</div>








49 changes: 48 additions & 1 deletion frontend/main/src/app/packreg/packreg.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
<p>packreg works!</p>
<table class="table table-bordered">
<thead>
<th>Centro de Distribuição</th>
<th>Origem</th>
<th>Destino</th>
<th>Dimensões</th>


</thead>
<tbody>
<tr>

<td><input type="text" [(ngModel)]="cd"></td>
<td><input type="text" [(ngModel)]="origem"></td>
<td><input type="text" [(ngModel)]="destino"></td>
<td><input type="text" [(ngModel)]="dimensao"></td>

</tr>
</tbody>
</table>




<button class="btn btn-success" (click)="adicionar()">Adicionar Pedido</button>
<br>
<hr>
<table class="table table-bordered">
<thead>
<th>Número de pedido</th>
<th>Centro de Distribuição</th>
<th>Origem</th>
<th>Destino</th>
<th>Dimensões</th>
<th>Ações</th>
</thead>
<tbody>
<tr *ngFor="let register of registers;let i = index;">
<td>{{i}}</td>
<td>{{register.cd}}</td>
<td>{{register.origem}}</td>
<td>{{register.destino}}</td>
<td>{{register.dimensao}}</td>
<td><button class="btn btn-danger mr-2" (click)="deletar(i)">Excluir pedido</button>
<button class="btn btn-primary mr-2" (click)="deletar(i)">Alterar pedido</button></td>
</tr>
</tbody>
</table>
27 changes: 27 additions & 0 deletions frontend/main/src/app/packreg/packreg.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,36 @@ import { Component, OnInit } from '@angular/core';
})
export class PackregComponent implements OnInit {

registers!:Array<any>
cd!:string
origem!:string
destino!:string
dimensao!:string

constructor() { }

ngOnInit(): void {
this.registers = new Array()
this.registers.push({cd:"Total Express", origem:"Blumenau", destino:"Fortaleza", dimensao:"Grande"})
this.registers.push({cd:"Jadlog", origem:"Florianópolis", destino:"Rio de Janeiro", dimensao:"Pequeno"})
this.registers.push({cd:"Braspress", origem:"São Paulo", destino:"Porto Alegre", dimensao:"Médio"})
this.registers.push({cd:"Correios", origem:"Brusque", destino:"Florianópolis", dimensao:"Pequeno"})

}

adicionar(){
if(this.cd){
this.registers.push({cd:this.cd, origem:this.origem, destino:this.destino, dimensao:this.dimensao})
this.cd =""
this.origem=""
this.destino=""
this.dimensao=""
}
}


deletar(index:number){
this.registers.splice(index,1)
}

}
46 changes: 45 additions & 1 deletion frontend/main/src/app/users/users.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,45 @@
<p>users works!</p>
<table class="table table-bordered">
<thead>
<th>Nome</th>
<th>E-mail</th>
<th>CPF</th>

</thead>
<tbody>
<tr>

<td><input type="text" [(ngModel)]="name"></td>
<td><input type="text" [(ngModel)]="email"></td>
<td><input type="text" [(ngModel)]="cpf"></td>

</tr>
</tbody>
</table>




<button class="btn btn-success" (click)="adicionar()">Add</button>
<br>
<hr>
<table class="table table-bordered">
<thead>
<th>ID</th>
<th>Nome</th>
<th>E-mail</th>
<th>CPF</th>
<th>Ações</th>
</thead>
<tbody>
<tr *ngFor="let user of users;let i = index;">
<td>{{i}}</td>
<td>{{user.name}}</td>
<td>{{user.email}}</td>
<td>{{user.cpf}}</td>
<td>
<button class="btn btn-danger mr-2" (click)="deletar(i)">Deletar</button>
<button class="btn btn-primary mr-2" (click)="alterar(i)">Alterar</button>
</td>
</tr>
</tbody>
</table>
29 changes: 29 additions & 0 deletions frontend/main/src/app/users/users.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,39 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./users.component.css']
})
export class UsersComponent implements OnInit {
users!:Array<any>
name!:string
email!:string
cpf!:string

constructor() { }

ngOnInit(): void {
this.users = new Array()
this.users.push({name:"Mateus Felipe", email:"mateusgoettems@gmail.com", cpf:"03215415454"})
this.users.push({name:"Bruno Roberto", email:"bruno@gmail.com", cpf:"03215415454"})
this.users.push({name:"Cristian Schaufer", email:"cristian@gmail.com", cpf:"03215415454"})
this.users.push({name:"Kalil", email:"kalil@gmail.com", cpf:"03215415454"})

}

adicionar(){
if(this.name){
this.users.push({name:this.name, email:this.email, cpf:this.cpf})
this.name =""
this.email=""
this.cpf=""
}
}


deletar(index:number){
this.users.splice(index,1)
}

alterar(index:number){
// this.users.splice(index,1)
}


}