This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
FoodLoop-Web/src/app/dashboard/dashboard-customer.component.html

203 lines
9.9 KiB
HTML
Raw Normal View History

<div class="animated fadeIn">
<snippet-bar-cust></snippet-bar-cust>
<div class="row">
<div *ngFor="let widget of widgetList" class="col-sm-6 col-lg-3">
<widget-graph *ngIf="widget.type == 'graph'"
[graphName]="widget.name"
[graphTitle]="widget.title"
[graphIcon]="widget.icon"
[dataType]="widget.dataType">
</widget-graph>
</div><!--/.col-->
</div><!--/.row-->
<div class=row>
2017-12-14 20:14:47 +00:00
<div class="col-xl-4 col-md-6">
<panel-pie></panel-pie>
</div><!--/.col-->
2017-12-14 20:14:47 +00:00
<div class="col-xl-4 col-md-6">
<div class="card">
<div class="card-block">
<div class="row">
<div class="col-12">
<h4 class="card-title float-left mb-0">Purchases Per Week</h4>
</div><!--/.col-->
</div><!--/.row-->
<div class="chart-wrapper">
<ul class="horizontal-bars type-2">
<li>
<span class="title">This Week</span>
2017-12-14 20:14:47 +00:00
<span class="value">{{ (weekPurchaseList.week_0 || 0 ) }} <span
class="text-muted small">({{ (weekPurchaseList.week_0 || 0 ) / maxPurchase | percent:'1.0-0' }})</span></span>
<div class="bars">
2017-12-14 20:14:47 +00:00
<div class="progress" style="height: 6px;">
<div class="progress-bar bg-success" role="progressbar"
[style.width]="(weekPurchaseList.week_0 || 0 ) / maxPurchase | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</li>
<li>
<span class="title">Last Week</span>
2017-12-14 20:14:47 +00:00
<span class="value">{{ weekPurchaseList.week_1 || 0 }} <span
class="text-muted small">({{ (weekPurchaseList.week_1 || 0 ) / maxPurchase | percent:'1.0-0' }})</span></span>
<div class="bars">
2017-12-14 20:14:47 +00:00
<div class="progress" style="height: 6px;">
<div class="progress-bar bg-success" role="progressbar"
[style.width]="(weekPurchaseList.week_1 || 0 ) / maxPurchase | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</li>
<li>
<span class="title">2 Weeks Ago</span>
2017-12-14 20:14:47 +00:00
<span class="value">{{ weekPurchaseList.week_2 || 0 }} <span
class="text-muted small">({{ (weekPurchaseList.week_2 || 0 ) / maxPurchase | percent:'1.0-0' }})</span></span>
<div class="bars">
2017-12-14 20:14:47 +00:00
<div class="progress" style="height: 6px;">
<div class="progress-bar bg-success" role="progressbar"
[style.width]="(weekPurchaseList.week_2 || 0 ) / maxPurchase | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</li>
<li>
<span class="title">3 Weeks Ago</span>
2017-12-14 20:14:47 +00:00
<span class="value">{{ weekPurchaseList.week_3 || 0 }} <span
class="text-muted small">({{ (weekPurchaseList.week_3 || 0 ) / maxPurchase | percent:'1.0-0' }})</span></span>
<div class="bars">
2017-12-14 20:14:47 +00:00
<div class="progress" style="height: 6px;">
<div class="progress-bar bg-success" role="progressbar"
[style.width]="(weekPurchaseList.week_3 || 0 ) / maxPurchase | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</li>
<li>
<span class="title">4 Weeks Ago</span>
<span class="value">{{ weekPurchaseList.week_4 || 0 }} <span
class="text-muted small">({{ (weekPurchaseList.week_4 || 0 ) / maxPurchase | percent:'1.0-0' }})</span></span>
<div class="bars">
<div class="progress" style="height: 6px;">
<div class="progress-bar bg-success" role="progressbar"
[style.width]="(weekPurchaseList.week_4 || 0 ) / maxPurchase | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</li>
<li>
<span class="title">5 Weeks Ago</span>
<span class="value">{{ weekPurchaseList.week_5 || 0 }} <span
class="text-muted small">({{ (weekPurchaseList.week_5 || 0 ) / maxPurchase | percent:'1.0-0' }})</span></span>
<div class="bars">
<div class="progress" style="height: 6px;">
<div class="progress-bar bg-success" role="progressbar"
[style.width]="(weekPurchaseList.week_5 || 0 ) / maxPurchase | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</li>
<li>
<span class="title">6 Weeks Ago</span>
<span class="value">{{ weekPurchaseList.week_6 || 0 }} <span
class="text-muted small">({{ (weekPurchaseList.week_6 || 0 ) / maxPurchase | percent:'1.0-0' }})</span></span>
<div class="bars">
<div class="progress" style="height: 6px;">
<div class="progress-bar bg-success" role="progressbar"
[style.width]="(weekPurchaseList.week_6 || 0 ) / maxPurchase | percent:'1.0-0'" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div><!--/.col-->
2017-12-14 20:14:47 +00:00
<div class="col-xl-4">
<div class="card">
<div class="card-block">
<div class="row">
<div class="col-12">
<h4 class="card-title float-left mb-0">Sector Purchase Amounts</h4>
</div><!--/.col-->
</div><!--/.row-->
<div class="chart-wrapper">
<ul class="icons-list">
<li>
2017-12-15 17:20:18 +00:00
<i [ngClass]="sectorIcons [sectorLetters[0]] || 'icon-question'" class="bg-primary"></i>
<div class="desc">
2017-12-15 17:20:18 +00:00
<div class="title">Sector {{ sectorLetters[0] || 'N/A' }}</div>
<div><small>{{ sectorNames [sectorLetters[0]] }}</small></div>
</div>
<div class="value">
2017-12-14 20:14:47 +00:00
<div class="small text-muted">Bought from Sector</div>
2017-12-15 17:20:18 +00:00
<strong>{{ sectorPurchases[0] || 'N/A' }}</strong>
</div>
</li>
<li>
2017-12-15 17:20:18 +00:00
<i [ngClass]="sectorIcons [sectorLetters[1]] || 'icon-question'" class="bg-info"></i>
<div class="desc">
2017-12-15 17:20:18 +00:00
<div class="title">Sector {{ sectorLetters[1] || 'N/A' }}</div>
<small>{{ sectorNames [sectorLetters[1]] || 'N/A' }}</small>
</div>
<div class="value">
2017-12-14 20:14:47 +00:00
<div class="small text-muted">Bought from Sector</div>
2017-12-15 17:20:18 +00:00
<strong>{{ sectorPurchases[1] || 'N/A' }}</strong>
</div>
</li>
<li>
2017-12-15 17:20:18 +00:00
<i [ngClass]="sectorIcons [sectorLetters[2]] || 'icon-question'" class="bg-warning"></i>
<div class="desc">
2017-12-15 17:20:18 +00:00
<div class="title">Sector {{ sectorLetters[2] || 'N/A' }}</div>
<small>{{ sectorNames [sectorLetters[2]] || 'N/A' }}</small>
</div>
<div class="value">
2017-12-14 20:14:47 +00:00
<div class="small text-muted">Bought from Sector</div>
2017-12-15 17:20:18 +00:00
<strong>{{ sectorPurchases[2] || 'N/A' }}</strong>
</div>
</li>
<li>
2017-12-15 17:20:18 +00:00
<i [ngClass]="sectorIcons [sectorLetters[3]] || 'icon-question'" class="bg-danger"></i>
<div class="desc">
2017-12-15 17:20:18 +00:00
<div class="title">Sector {{ sectorLetters[3] || 'N/A' }}</div>
<small>{{ sectorNames [sectorLetters[3]] || 'N/A' }}</small>
</div>
<div class="value">
2017-12-14 20:14:47 +00:00
<div class="small text-muted">Bought from Sector</div>
2017-12-15 17:20:18 +00:00
<strong>{{ sectorPurchases[3] || 'N/A' }}</strong>
</div>
</li>
<li>
2017-12-15 17:20:18 +00:00
<i [ngClass]="sectorIcons [sectorLetters[4]] || 'icon-question'" class="bg-success"></i>
<div class="desc">
2017-12-15 17:20:18 +00:00
<div class="title">Sector {{ sectorLetters[4] || 'N/A' }}</div>
<small>{{ sectorNames [sectorLetters[4]] || 'N/A' }}</small>
</div>
<div class="value">
2017-12-14 20:14:47 +00:00
<div class="small text-muted">Bought from Sector</div>
2017-12-15 17:20:18 +00:00
<strong>{{ sectorPurchases[4] || 'N/A' }}</strong>
</div>
</li>
<li>
2017-12-15 17:20:18 +00:00
<i [ngClass]="sectorIcons [sectorLetters[5]] || 'icon-question'" class="bg-danger"></i>
<div class="desc">
2017-12-15 17:20:18 +00:00
<div class="title">Sector {{ sectorLetters[5] || 'N/A' }}</div>
<small>{{ sectorNames [sectorLetters[5]] || 'N/A' }}</small>
</div>
<div class="value">
2017-12-14 20:14:47 +00:00
<div class="small text-muted">Bought from Sector</div>
2017-12-15 17:20:18 +00:00
<strong>{{ sectorPurchases[5] || 'N/A' }}</strong>
</div>
</li>
<li>
2017-12-15 17:20:18 +00:00
<i [ngClass]="sectorIcons [sectorLetters[6]] || 'icon-question'" class="bg-warning"></i>
<div class="desc">
2017-12-15 17:20:18 +00:00
<div class="title">Sector {{ sectorLetters[6] || 'N/A' }}</div>
<small>{{ sectorNames [sectorLetters[6]] || 'N/A' }}</small>
</div>
<div class="value">
2017-12-14 20:14:47 +00:00
<div class="small text-muted">Bought from Sector</div>
2017-12-15 17:20:18 +00:00
<strong>{{ sectorPurchases[6] || 'N/A' }}</strong>
</div>
</li>
</ul>
</div>
</div>
</div>
</div><!--/.col-->
</div><!--/.row-->
</div>