This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| h1 { | |
| font-size: 30px; | |
| color: #fff; | |
| text-transform: uppercase; | |
| font-weight: 300; | |
| text-align: center; | |
| margin-bottom: 15px; | |
| } | |
| table { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div className="App"> | |
| <table> | |
| <thead | |
| app-header | |
| (search)="searchRecords($event)" | |
| (sort)="sortRecords()" | |
| ></thead> | |
| <tbody | |
| app-record | |
| *ngIf="records" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, Input, OnInit } from '@angular/core'; | |
| import { Record } from './models/Record'; | |
| import { AppService } from './app.service'; | |
| import { Observable } from 'rxjs'; | |
| import { Search } from './models/Search'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.scss'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { HttpClient } from '@angular/common/http'; | |
| import { Observable } from 'rxjs'; | |
| @Injectable({ | |
| providedIn: 'root', | |
| }) | |
| export class AppService { | |
| constructor(private http: HttpClient) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input | |
| type="search" | |
| className="search-field" | |
| placeholder="Search..." | |
| (keyup)="onInputChanged($event)" | |
| /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Search } from './../models/Search'; | |
| import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-search', | |
| templateUrl: './search.component.html', | |
| styleUrls: ['./search.component.scss'], | |
| }) | |
| export class SearchComponent implements OnInit { | |
| @Output() search = new EventEmitter<Search>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <tr | |
| [class]="getStatusColor(record)" | |
| *ngFor="let record of records" | |
| > | |
| <td>{{ record["Time"] }}</td> | |
| <td>{{ record["Side"] }}</td> | |
| <td>{{ record["OrderType"] }}</td> | |
| <td>{{ record["CcyPair"] }}</td> | |
| <td>{{ record["Price"] }}</td> | |
| <td>{{ record["Amount"] }}</td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Input } from '@angular/core'; | |
| import { Record } from '../models/Record'; | |
| import { Observable } from 'rxjs'; | |
| @Component({ | |
| selector: 'tbody[app-record]', | |
| templateUrl: './record.component.html', | |
| styleUrls: ['./record.component.scss'], | |
| }) | |
| export class RecordComponent implements OnInit { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <tr> | |
| <th (click)="onSort()"> | |
| Time | |
| <img | |
| src="assets/sort.svg" | |
| alt="Sort Icon" | |
| [ngStyle]="{ 'height.px': 20, 'width.px': 20, 'margin-left': 10 }" | |
| /> | |
| </th> | |
| <th>Side</th> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Output, EventEmitter } from '@angular/core'; | |
| import { Search } from '../models/Search'; | |
| @Component({ | |
| selector: 'thead[app-header]', | |
| templateUrl: './header.component.html', | |
| styleUrls: ['./header.component.scss'], | |
| }) | |
| export class HeaderComponent { | |
| @Output() search = new EventEmitter<Search>(); |