Merge branch 'development' into TBSliver/Widget-Graph-Improvements
This commit is contained in:
commit
1b075cdff6
13 changed files with 203 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
|||
<label class="col-md-3 form-control-label" for="text-input"><strong>Organisation Search Results</strong></label>
|
||||
<div class="col-md-9">
|
||||
<span class="help-block"><strong>Select an Organisation from the table below</strong></span>
|
||||
<table class="table table-hover">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Organisation Name</th>
|
||||
|
|
3
src/app/shared/transaction-result.component.html
Normal file
3
src/app/shared/transaction-result.component.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<td>{{transaction.seller}}</td>
|
||||
<td>{{transaction.value | currency:'GBP':true:'1.2-2' }}</td>
|
||||
<td>{{transactionDate}}</td>
|
21
src/app/shared/transaction-result.component.ts
Normal file
21
src/app/shared/transaction-result.component.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import * as moment from 'moment';
|
||||
|
||||
interface TransactionData {
|
||||
seller: number;
|
||||
value: string;
|
||||
purchase_time: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: '[transaction-result]',
|
||||
templateUrl: 'transaction-result.component.html',
|
||||
})
|
||||
export class TransactionResultComponent implements OnInit {
|
||||
@Input() public transaction: TransactionData;
|
||||
public transactionDate: string;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.transactionDate = moment(this.transaction.purchase_time).format('llll');
|
||||
}
|
||||
}
|
Reference in a new issue