added initial looping

This commit is contained in:
piratefinn 2017-12-18 17:20:38 +00:00
parent f882ad64dd
commit f4c9724097

View file

@ -116,14 +116,26 @@
</div><!--/.row--> </div><!--/.row-->
<div class="chart-wrapper"> <div class="chart-wrapper">
<ul class="icons-list"> <ul class="icons-list">
<li> <!-- New loop -->
<i [ngClass]="sectorIcons [sectorLetters[0]] || 'icon-question'" class="bg-primary"></i> <li *ngFor="let sector of sectorLetters; let i=index">
<i [ngClass]="sectorIcons [sector] || 'icon-question'" class="bg-primary"></i>
<div class="desc"> <div class="desc">
<div class="title">Sector {{ sectorLetters[0] || 'N/A' }}</div> <div class="title">{{ sectorNames [sector] || 'N/A' }}</div>
<div><small>{{ sectorNames [sectorLetters[0]] }}</small></div>
</div> </div>
<div class="value"> <div class="value">
<div class="small text-muted">Bought from Sector</div> <div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[i] || 'N/A' }}</strong>
</div>
</li>
<!-- Old code -->
<!-- <li>
<i [ngClass]="sectorIcons [sectorLetters[0]] || 'icon-question'" class="bg-primary"></i>
<div class="desc">
<div class="title">{{ sectorNames [sectorLetters[0]] }}</div>
</div>
<div class="value">
<div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[0] || 'N/A' }}</strong> <strong>{{ sectorPurchases[0] || 'N/A' }}</strong>
</div> </div>
</li> </li>
@ -134,7 +146,7 @@
<small>{{ sectorNames [sectorLetters[1]] || 'N/A' }}</small> <small>{{ sectorNames [sectorLetters[1]] || 'N/A' }}</small>
</div> </div>
<div class="value"> <div class="value">
<div class="small text-muted">Bought from Sector</div> <div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[1] || 'N/A' }}</strong> <strong>{{ sectorPurchases[1] || 'N/A' }}</strong>
</div> </div>
</li> </li>
@ -145,7 +157,7 @@
<small>{{ sectorNames [sectorLetters[2]] || 'N/A' }}</small> <small>{{ sectorNames [sectorLetters[2]] || 'N/A' }}</small>
</div> </div>
<div class="value"> <div class="value">
<div class="small text-muted">Bought from Sector</div> <div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[2] || 'N/A' }}</strong> <strong>{{ sectorPurchases[2] || 'N/A' }}</strong>
</div> </div>
</li> </li>
@ -156,7 +168,7 @@
<small>{{ sectorNames [sectorLetters[3]] || 'N/A' }}</small> <small>{{ sectorNames [sectorLetters[3]] || 'N/A' }}</small>
</div> </div>
<div class="value"> <div class="value">
<div class="small text-muted">Bought from Sector</div> <div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[3] || 'N/A' }}</strong> <strong>{{ sectorPurchases[3] || 'N/A' }}</strong>
</div> </div>
</li> </li>
@ -167,7 +179,7 @@
<small>{{ sectorNames [sectorLetters[4]] || 'N/A' }}</small> <small>{{ sectorNames [sectorLetters[4]] || 'N/A' }}</small>
</div> </div>
<div class="value"> <div class="value">
<div class="small text-muted">Bought from Sector</div> <div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[4] || 'N/A' }}</strong> <strong>{{ sectorPurchases[4] || 'N/A' }}</strong>
</div> </div>
</li> </li>
@ -178,7 +190,7 @@
<small>{{ sectorNames [sectorLetters[5]] || 'N/A' }}</small> <small>{{ sectorNames [sectorLetters[5]] || 'N/A' }}</small>
</div> </div>
<div class="value"> <div class="value">
<div class="small text-muted">Bought from Sector</div> <div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[5] || 'N/A' }}</strong> <strong>{{ sectorPurchases[5] || 'N/A' }}</strong>
</div> </div>
</li> </li>
@ -189,10 +201,10 @@
<small>{{ sectorNames [sectorLetters[6]] || 'N/A' }}</small> <small>{{ sectorNames [sectorLetters[6]] || 'N/A' }}</small>
</div> </div>
<div class="value"> <div class="value">
<div class="small text-muted">Bought from Sector</div> <div class="small text-muted">Bought</div>
<strong>{{ sectorPurchases[6] || 'N/A' }}</strong> <strong>{{ sectorPurchases[6] || 'N/A' }}</strong>
</div> </div>
</li> </li> -->
</ul> </ul>
</div> </div>
</div> </div>