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 frontend/main/src/app/about.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Router } from '@angular/router';
})
export class AboutService {

readonly API:string = "http://localhost:8080/aboutus"
readonly API:string = "http://35.199.78.13:8080/aboutus"

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

Expand Down
4 changes: 0 additions & 4 deletions frontend/main/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import { HomeComponent } from './home/home.component';
import { InsightComponent } from './insight/insight.component';
import { LoginComponent } from './login/login.component';
import { LoginserviceService } from './loginservice.service';
import { PackregComponent } from './packreg/packreg.component';
import { PacktrackComponent } from './packtrack/packtrack.component';
import { RctQtComponent } from './rct-qt/rct-qt.component';
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';
Expand All @@ -24,10 +22,8 @@ const routes: Routes = [
{ path: '', component: LoginComponent },
{ path: 'users', component: UsersComponent, canActivate: [LoginserviceService] },
{ path: 'carriers', component: CarriersComponent, canActivate: [LoginserviceService] },
{ path: 'pack-register', component: PackregComponent, canActivate: [LoginserviceService] },
{ path: 'pack-track', component: PacktrackComponent, canActivate: [LoginserviceService] },
{ path: 'finance', component: FinanceComponent, canActivate: [LoginserviceService] },
{ path: 'receipt', component: ReceiptComponent, canActivate: [LoginserviceService] },
{ path: 'ship-quote', component: ShipQtComponent, canActivate: [LoginserviceService] },
{ path: 'recent-quote', component: RctQtComponent, canActivate: [LoginserviceService] },
{ path: 'edit', component: EditComponent, canActivate: [LoginserviceService] },
Expand Down
5 changes: 0 additions & 5 deletions frontend/main/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { InsightComponent } from './insight/insight.component';
Expand All @@ -11,10 +10,8 @@ import { FooterComponent } from './footer/footer.component';
import { LoginComponent } from './login/login.component';
import { UsersComponent } from './users/users.component';
import { CarriersComponent } from './carriers/carriers.component';
import { PackregComponent } from './packreg/packreg.component';
import { PacktrackComponent } from './packtrack/packtrack.component';
import { FinanceComponent } from './finance/finance.component';
import { ReceiptComponent } from './receipt/receipt.component';
import { ShipQtComponent } from './ship-qt/ship-qt.component';
import { RctQtComponent } from './rct-qt/rct-qt.component';
import { EditComponent } from './edit/edit.component';
Expand All @@ -34,10 +31,8 @@ import { VisitsComponent } from './visits/visits.component';
LoginComponent,
UsersComponent,
CarriersComponent,
PackregComponent,
PacktrackComponent,
FinanceComponent,
ReceiptComponent,
ShipQtComponent,
RctQtComponent,
EditComponent,
Expand Down
7 changes: 3 additions & 4 deletions frontend/main/src/app/body/body.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { LoginserviceService } from '../loginservice.service';
import { HttpClient } from '@angular/common/http';
import { Router } from '@angular/router';
import { catchError, Observable } from 'rxjs';
import { NotificationService } from '../notification.service';

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

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

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

birthnow!: string
birthmonth!: string
Expand All @@ -29,7 +28,7 @@ export class BodyComponent implements OnInit {
birth!: string
document!: string

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

ngOnInit(): void {

Expand Down
10 changes: 5 additions & 5 deletions frontend/main/src/app/carrier.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Router } from '@angular/router';
})
export class CarrierService {

apiURL:string = 'http://localhost:8080/carriers'
apiURL:string = 'http://35.199.78.13:8080/carriers'

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

Expand All @@ -21,9 +21,9 @@ export class CarrierService {
this.http.post(this.apiURL,object)
.subscribe((response)=>{


console.log(response);

})


Expand All @@ -33,8 +33,8 @@ export class CarrierService {

return this.http.get(this.apiURL+'/'+id)




}

Expand Down
14 changes: 6 additions & 8 deletions frontend/main/src/app/carriers/carriers.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ <h2 class="text-uppercase">New Carrier</h2>
<button class="btn btn-danger mr-2" (click)="deletar(carrier.id)">Delet</button>


<button class="btn btn-primary" (click)="openModalEdit()">Edit</button>
<button class="btn btn-primary" (click)="openModalEdit(this.carrier.id, this.carrier.razao, this.carrier.taxa, this.carrier.email, this.carrier.cnpj)">Edit</button>
</td>

</tr>
</tbody>

<div class="portfolio-modal modal fade show" id="modal3" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
Expand Down Expand Up @@ -180,10 +184,4 @@ <h2 class="text-uppercase">Edit Carrier</h2>





</td>

</tr>
</tbody>
</table>
</table>
53 changes: 30 additions & 23 deletions frontend/main/src/app/carriers/carriers.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class CarriersComponent implements OnInit {
catchError((error)=>{
return error
})

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

console.log(response);
Expand Down Expand Up @@ -86,65 +86,72 @@ export class CarriersComponent implements OnInit {
deletar(id:number){

console.log(id);
this.http.delete('http://localhost:8080/carriers/'+id).subscribe();

this.http.delete('http://35.199.78.13:8080/carriers/'+id).subscribe();

setTimeout(() => {
this.ngOnInit();
}, 500);

}

alterar(){

}

openModal(){

var modal = document.getElementById('modal2')

modal?.setAttribute('style', 'display:block;')

modal?.setAttribute('class', 'portfolio-modal modal fade show')
modal?.removeAttribute('aria-hidden')

modal?.setAttribute('arial-modal', 'true')

}

closeModal(){
var modal = document.getElementById('modal2')

modal?.setAttribute('class', 'portfolio-modal modal fade')
setTimeout(()=>{
modal?.setAttribute('style', 'display:none;')
},500)

}


openModalEdit(){
openModalEdit(id:number,razao:string, taxa:string, email:string, cnpj:string){

this.id = id
this.razao = razao
this.taxa = taxa
this.email = email
this.cnpj = cnpj

var modal = document.getElementById('modal3')

modal?.setAttribute('style', 'display:block;')

modal?.setAttribute('class', 'portfolio-modal modal fade show')
modal?.removeAttribute('aria-hidden')

modal?.setAttribute('arial-modal', 'true')

}

closeModalEdit(){
var modal = document.getElementById('modal3')



modal?.setAttribute('class', 'portfolio-modal modal fade')
setTimeout(()=>{
modal?.setAttribute('style', 'display:none;')
},500)

}


}
2 changes: 1 addition & 1 deletion frontend/main/src/app/finance/finance.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { LoginserviceService } from '../loginservice.service';
})
export class FinanceComponent implements OnInit {

readonly packAPI: string = "http://localhost:8080/quote/packs/user/"
readonly packAPI: string = "http://35.199.78.13:8080/quote/packs/user/"

totalCost: number = 0
recentCost: number = 0
Expand Down
2 changes: 1 addition & 1 deletion frontend/main/src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="main-footer">
<div class="float-right d-none d-sm-block"><b>Version</b> 0.0.1</div>
<div class="float-right d-none d-sm-block"><b>Version</b> 1.0.0</div>
<strong>Copyright &copy; 2022
<a href="https://team-roxo.github.io">TMS Project</a>.</strong>
All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { LoginserviceService } from '../loginservice.service';
})
export class ForgetPasswordComponent implements OnInit {

readonly TMSLoginAPI: string = "http://localhost:8080"
readonly TMSLoginAPI: string = "http://35.199.78.13:8080"




user!:string
password!:string
Expand All @@ -34,4 +34,4 @@ export class ForgetPasswordComponent implements OnInit {
this.loginService.progress = false

}
}}
}}
8 changes: 4 additions & 4 deletions frontend/main/src/app/insight/insight.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { Observable } from 'rxjs';
})
export class InsightComponent implements OnInit {

readonly APICountUsers: string = "http://localhost:8080/user/countClients"
readonly APICountUsers: string = "http://35.199.78.13:8080/user/countClients"

readonly APICountVisits:string = "http://localhost:8080/user/countVisitors"
readonly APICountVisits:string = "http://35.199.78.13:8080/user/countVisitors"

readonly APICountPackages:string = "http://localhost:8080/quote/go"
readonly APICountPackages:string = "http://35.199.78.13:8080/quote/go"

readonly APICountBounce:string = "http://localhost:8080/user/bounce"
readonly APICountBounce:string = "http://35.199.78.13:8080/user/bounce"

countClient!: number
countVisitors!: number
Expand Down
2 changes: 1 addition & 1 deletion frontend/main/src/app/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { LoginserviceService } from '../loginservice.service';
})
export class LoginComponent implements OnInit {

readonly TMSLoginAPI: string = "http://localhost:8080"
readonly TMSLoginAPI: string = "http://35.199.78.13:8080"

emailReg!:string
nameReg!:string
Expand Down
5 changes: 2 additions & 3 deletions frontend/main/src/app/loginservice.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTr
import { catchError, Observable } from 'rxjs';
import { BodyComponent } from './body/body.component';
import { LoginComponent } from './login/login.component';
import { NotificationService } from './notification.service';

@Injectable({
providedIn: 'root'
})

export class LoginserviceService implements CanActivate {

readonly TMSLoginAPI: string = "http://localhost:8080"
readonly APIBounceInit: string = "http://localhost:8080/login/init"
readonly TMSLoginAPI: string = "http://35.199.78.13:8080"
readonly APIBounceInit: string = "http://35.199.78.13:8080/login/init"

//DADOS BÁSICOS
nome!: string
Expand Down
16 changes: 0 additions & 16 deletions frontend/main/src/app/notification.service.spec.ts

This file was deleted.

20 changes: 0 additions & 20 deletions frontend/main/src/app/notification.service.ts

This file was deleted.

Empty file.
Loading