Skip to content

Commit 7e474e9

Browse files
committed
Updated timeline
1 parent 379c29c commit 7e474e9

7 files changed

+29
-19
lines changed

src/app/app.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ import { PasswordModule } from 'primeng/password';
8181
import { CheckboxModule } from 'primeng/checkbox';
8282
import { InputTextareaModule } from 'primeng/inputtextarea';
8383
import { PickListModule } from 'primeng/picklist';
84-
import {TimelineModule} from 'primeng/timeline';
84+
import { TimelineModule } from 'primeng/timeline';
85+
import { DataViewModule } from 'primeng/dataview';
8586

8687
@NgModule({
8788
declarations: [
@@ -158,6 +159,7 @@ import {TimelineModule} from 'primeng/timeline';
158159
InputTextareaModule,
159160
PickListModule,
160161
TimelineModule,
162+
DataViewModule,
161163
],
162164
providers: [
163165
BacktestService,

src/app/default-order-lists/default-order-lists.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ export class DefaultOrderListsComponent implements OnInit, OnChanges, OnDestroy
196196
.subscribe((data) => {
197197
this.updatedAmount(data.liquidationValue);
198198
this.isLoading = false;
199+
}, () => {
200+
this.isLoading = false;
199201
});
200202
}
201203

@@ -204,6 +206,8 @@ export class DefaultOrderListsComponent implements OnInit, OnChanges, OnDestroy
204206
this.machineDaytradingService.getPortfolioBalance().subscribe((data) => {
205207
this.updatedAmount(data.cashBalance || data.cashAvailableForTrading);
206208
this.isLoading = false;
209+
}, () => {
210+
this.isLoading = false;
207211
});
208212
}
209213

src/app/mini-card/mini-card.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
}
2323

2424
.card-content {
25-
width: 125px;
26-
height: 130px;
25+
width: 8em;
26+
height: 10em;
2727
}
2828

2929
.mini-card-button {

src/app/pokerhand/pokerhand.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="ui-g">
1+
<div class="ui-g poker-hand-list">
22
<div class="ui-g-2" *ngFor="let order of cartService.otherOrders" class="single-card"
33
[class.card-hover]="mouseOver === order.holding.symbol" (mouseover)="onHoverOver(order)" (mouseout)="onHoverAway()">
44
<app-mini-card [order]="order" [canEdit]="true" (delete)="delete(order)" (updatedOrder)="updateOrder(order)">

src/app/pokerhand/pokerhand.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88
.card-hover {
99
bottom: 1em;
1010
}
11+
12+
.poker-hand-list {
13+
max-height: 30em;
14+
overflow-y: scroll;
15+
}

src/app/portfolio-info/portfolio-info.component.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,16 @@ <h2>Portfolio Management</h2>
5252
<app-ai-picks></app-ai-picks>
5353

5454
<p-timeline [value]="daytradeEvents" align="alternate">
55-
<ng-template pTemplate="marker" let-event>
56-
<span class="custom-marker p-shadow-2" [style.backgroundColor]="event.color">
57-
<i [ngClass]="event.icon"></i>
58-
</span>
55+
<ng-template pTemplate="content" let-event>
56+
<small class="p-text-secondary">{{event.date}}</small>
5957
</ng-template>
6058
<ng-template pTemplate="content" let-event>
61-
<p-card [header]="event.status" [subheader]="event.date">
62-
<img *ngIf="event.image" [src]="'assets/showcase/images/demo/product/' + event.image" [alt]="event.name" width="200" class="p-shadow-2" />
63-
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt
64-
quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque quas!</p>
65-
<button pButton label="Read more" class="p-button-text"></button>
66-
</p-card>
59+
<p-card [header]="event.status" [subheader]="event.date">
60+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam
61+
deserunt
62+
quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque quas!
63+
</p>
64+
<button pButton label="Read more" class="p-button-text"></button>
65+
</p-card>
6766
</ng-template>
68-
</p-timeline>
67+
</p-timeline>

src/app/portfolio-info/portfolio-info.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ export class PortfolioInfoComponent implements OnInit, OnDestroy {
6363

6464
init() {
6565
this.daytradeEvents = [
66-
{ status: 'Ordered', date: '15/10/2020 10:30', icon: PrimeIcons.SHOPPING_CART, color: '#9C27B0', image: 'game-controller.jpg' },
67-
{ status: 'Processing', date: '15/10/2020 14:00', icon: PrimeIcons.COG, color: '#673AB7' },
68-
{ status: 'Shipped', date: '15/10/2020 16:15', icon: PrimeIcons.ENVELOPE, color: '#FF9800' },
69-
{ status: 'Delivered', date: '16/10/2020 10:00', icon: PrimeIcons.CHECK, color: '#607D8B' }
66+
{ status: 'Ordered', date: '15/10/2020 10:30' },
67+
{ status: 'Processing', date: '15/10/2020 14:00' },
68+
{ status: 'Shipped', date: '15/10/2020 16:15' },
69+
{ status: 'Delivered', date: '16/10/2020 10:00' }
7070
];
7171

7272
this.aiPicksService.mlSellResults

0 commit comments

Comments
 (0)