Unfinished Company Component
This commit is contained in:
parent
c1e2ce73e7
commit
c13acc6ce3
9 changed files with 82 additions and 18 deletions
|
@ -7,6 +7,7 @@ module.exports = function (config) {
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||||
plugins: [
|
plugins: [
|
||||||
require('karma-jasmine'),
|
require('karma-jasmine'),
|
||||||
|
require("readable-stream");
|
||||||
require('karma-chrome-launcher'),
|
require('karma-chrome-launcher'),
|
||||||
require('karma-jasmine-html-reporter'),
|
require('karma-jasmine-html-reporter'),
|
||||||
require('karma-coverage-istanbul-reporter'),
|
require('karma-coverage-istanbul-reporter'),
|
||||||
|
|
|
@ -46,7 +46,6 @@ import { SuppliersComponent } from './dashboard/suppliers.component';
|
||||||
import { MoreStuffComponent } from './dashboard/more-graphs-and-tables.component';
|
import { MoreStuffComponent } from './dashboard/more-graphs-and-tables.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
@ -73,6 +72,7 @@ import { MoreStuffComponent } from './dashboard/more-graphs-and-tables.component
|
||||||
MoreStuffComponent,
|
MoreStuffComponent,
|
||||||
P404Component,
|
P404Component,
|
||||||
P500Component,
|
P500Component,
|
||||||
|
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
AuthGuard,
|
AuthGuard,
|
||||||
|
|
|
@ -179,5 +179,44 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!--/.col-->
|
</div><!--/.col-->
|
||||||
|
<div class="col-xl-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-block">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<h4 class="card-title float-left mb-0">Spend by company and industrial sector</h4>
|
||||||
|
</div><!--/.col-->
|
||||||
|
</div><!--/.row-->
|
||||||
|
<div class="chart-wrapper">
|
||||||
|
<canvas baseChart class="chart"
|
||||||
|
[datasets]="barChartDataCategory"
|
||||||
|
[labels]="barChartLabelsCategory"
|
||||||
|
[options]="barChartOptionsCategory"
|
||||||
|
[legend]="barChartLegendCategory"
|
||||||
|
[chartType]="barChartTypeCategory"
|
||||||
|
(chartHover)="chartHovered($event)"
|
||||||
|
(chartClick)="chartClicked($event)"></canvas>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="showTotalCategoryList" class="chart-wrapper">
|
||||||
|
<ul class="icons-list">
|
||||||
|
<!-- New loop -->
|
||||||
|
<li *ngFor="let category of totalCategoryList | slice:0:totalCategoryLimit; let i=index">
|
||||||
|
<i [ngClass]="['icon-' + category.icon, getBootstrapColour(i)]"></i>
|
||||||
|
<div class="desc">
|
||||||
|
<div class="title">{{ category.category || 'N/A' }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="value">
|
||||||
|
<div class="small text-muted">Bought</div>
|
||||||
|
<strong>{{ category.value || 'N/A' }}</strong>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li *ngIf="totalCategoryList.length > totalCategoryLimit && disableCategoryButton == false" class="divider text-center">
|
||||||
|
<button type="button" class="btn btn-sm btn-link text-muted" (click)="categoryLoadMore()"><i class="icon-options"></i></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/.col-->
|
||||||
</div><!--/.row-->
|
</div><!--/.row-->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -101,6 +101,8 @@ export class DashboardCustomerComponent implements OnInit {
|
||||||
public barChartDataCategory:any[]=[];
|
public barChartDataCategory:any[]=[];
|
||||||
public barChartLabelsCategory:string[] = [];
|
public barChartLabelsCategory:string[] = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
weekPurchaseList = {
|
weekPurchaseList = {
|
||||||
first: 0,
|
first: 0,
|
||||||
second: 0,
|
second: 0,
|
||||||
|
|
|
@ -87,6 +87,7 @@ export class TransactionLogComponent implements OnInit {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
recurringTransactionDetails(clicked, template: TemplateRef<any>) {
|
recurringTransactionDetails(clicked, template: TemplateRef<any>) {
|
||||||
this.clickedRecur = clicked;
|
this.clickedRecur = clicked;
|
||||||
this.updatedTime = moment(this.clickedRecur.display_time, 'llll').format('YYYY-MM-DD[T]HH:mm');
|
this.updatedTime = moment(this.clickedRecur.display_time, 'llll').format('YYYY-MM-DD[T]HH:mm');
|
||||||
|
|
|
@ -103,21 +103,21 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/more-graphs-and-tables']">
|
<a class="nav-link" routerLinkActive="active" [routerLink]="['/more-graphs-and-tables']">
|
||||||
<div class="row no-gutters align-items-center">
|
<div class="row no-gutters align-items-center">
|
||||||
<div class="col-2"><i class="icon-map"></i></div>
|
<div class="col-2"><i class="icon-map"></i></div>
|
||||||
<div class="col-10">More Stuff</div>
|
<div class="col-10">Bubble Charts</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="accountType == 'organisation'" class="nav-item">
|
<li *ngIf="accountType == 'organisation'" class="nav-item">
|
||||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/payroll-log']">
|
<a class="nav-link" routerLinkActive="active" [routerLink]="['/payroll-log']">
|
||||||
<div class="row no-gutters align-items-center">
|
<div class="row no-gutters align-items-center">
|
||||||
<div class="col-2"><i class="icon-basket"></i></div>
|
<div class="col-2"><i class="icon-basket"></i></div>
|
||||||
<div class="col-10">Payroll Log</div>
|
<div class="col-10">Payroll Log</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -133,6 +133,27 @@ export class ApiService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LCC data
|
||||||
|
public externalTransactions() {
|
||||||
|
const key = this.sessionKey;
|
||||||
|
return this.http.post<any>(
|
||||||
|
this.apiUrl + '/v1/organisation/external/transactions',
|
||||||
|
{
|
||||||
|
session_key : key,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public externalSuppliers() {
|
||||||
|
const key = this.sessionKey;
|
||||||
|
return this.http.post<any>(
|
||||||
|
this.apiUrl + '/organisation/external/suppliers',
|
||||||
|
{
|
||||||
|
session_key : key,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Searches organisations used for transaction submission
|
// Searches organisations used for transaction submission
|
||||||
|
|
||||||
public search(data) {
|
public search(data) {
|
||||||
|
|
Reference in a new issue