Skip to content
Merged

Dash #28

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
29 changes: 15 additions & 14 deletions frontend/main/src/app/insight/insight.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@


<div class="small-box bg-gradient-success">
<div class="inner" >

<p>10</p>


<p>New Registers Packages</p>

<div class="inner">
<p>New packages</p>

</div>
<div class="icon">
<i class="ion ion-bag"></i>
Expand All @@ -22,23 +18,26 @@

<div class="small-box bg-gradient-yellow">
<div class="inner">
<h1 teste></h1>
<h1></h1>
<h3>12<sup style="font-size: 20px">%</sup></h3>
<p>Bounce Rate</p>

</div>
<div class="icon">
<i class="ion ion-stats-bars"></i>
</div>
<a class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
<a (click)="register()" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>

<div class="col-lg-3 col-6">

<div class="small-box bg-gradient-blue">
<div class="inner">
<h3>4</h3>
<p>User Registrations</p>

<h3>{{countClient}}</h3>
<p>Registered Users</p>

</div>
<div class="icon">
<i class="ion ion-person-add"></i>
Expand All @@ -51,13 +50,13 @@ <h3>4</h3>

<div class="small-box bg-gradient-primary">
<div class="inner">
<h3>40</h3>
<h3>{{countVisitors/2}}</h3>
<p>Visitors</p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
<a class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
<a (click)="register()" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>

Expand All @@ -83,6 +82,7 @@ <h3 class="card-title">

</div>


<div class="card-body pt-0">

<div id="calendar" style="width: 100%">
Expand Down Expand Up @@ -152,7 +152,8 @@ <h3 class="card-title">
<td data-action="selectDay" data-day="09/21/2022" class="day">21</td>
<td data-action="selectDay" data-day="09/22/2022" class="day">22</td>
<td data-action="selectDay" data-day="09/23/2022" class="day">23</td>
<td data-action="selectDay active" data-day="09/24/2022" class="day weekend">24
<td data-action="selectDay active" data-day="09/24/2022"
class="day weekend">24
</td>
</tr>
<tr>
Expand Down
43 changes: 28 additions & 15 deletions frontend/main/src/app/insight/insight.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,39 @@ import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { RctQtComponent } from '../rct-qt/rct-qt.component';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';

@Component({
selector: 'app-insight',
templateUrl: './insight.component.html',
styleUrls: ['./insight.component.css']
})
export class InsightComponent implements OnInit {
count: any;

constructor(private router:Router) { }
readonly TMSLoginAPI: string = "http://localhost:8080/user/countClients"

readonly apiURL:string = "http://localhost:8080/user/countVisitors"

countClient!: number
countVisitors!: number

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

}

ngOnInit(): void {

this.http.get(this.TMSLoginAPI)
.subscribe((resultado:any) => {
this.countClient=resultado
});

this.http.get(this.apiURL)
.subscribe((resultado:any) => {
this.countVisitors=resultado
});


}

register(){
Expand All @@ -24,21 +45,13 @@ export class InsightComponent implements OnInit {
this.router.navigateByUrl('users')
}

// countClients() {
// this.http.get(`${this.TMSLoginAPI}/countClients`).subscribe(resultado => console.log(resultado));
// return ;

// public get countVisitors() : any {
// return this.countVisitors
// }

// contador(){
// this.countVisitors
// console.log(this.countVisitors);

// countVisitors(){
// this.http.get(`${this.apiURL}/countVisitors`).subscribe(resultado => console.log(resultado));
// }







}