made fixes to imports and supplier list
This commit is contained in:
parent
682cebef53
commit
17fc5b006b
4 changed files with 62 additions and 53 deletions
|
@ -9,7 +9,6 @@ import { CustBarSnippetComponent } from '../snippets/cust-snippet-bar.component'
|
|||
import { PiePanel } from '../panels/pie-panel.component';
|
||||
import { DataType } from '../shared/data-types.enum';
|
||||
import * as moment from 'moment';
|
||||
import { SuppliersComponent } from '../dashboard/suppliers.component';
|
||||
import { MoreStuffComponent } from '../dashboard/more-graphs-and-tables.component';
|
||||
// import { StackedBarChartComponent } from '../panels/stacked-bar.component';
|
||||
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<script type="text/javascript" charset="utf8" src=""></script>
|
||||
<div class="animated fadeIn">
|
||||
<div class="form-group row">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>List of Suppliers</strong>
|
||||
<small>This lists all suppliers that have been submitted.</small>
|
||||
</div>
|
||||
<div *ngIf="supplierListAvailable" class="card-block">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -43,4 +49,10 @@
|
|||
</ul>
|
||||
</pagination-template>
|
||||
</div>
|
||||
</div><!--/.col-->
|
||||
<div *ngIf="!supplierListAvailable" class="card-block">
|
||||
No Suppliers available.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,16 +3,12 @@ import { ApiService } from '../providers/api-service';
|
|||
import { AgmCoreModule } from '@agm/core';
|
||||
import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal';
|
||||
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||
|
||||
interface SuppliersComponent {
|
||||
name : string;
|
||||
}
|
||||
import { PaginationInstance } from 'ngx-pagination';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'suppliers.component.html',
|
||||
})
|
||||
export class SuppliersComponent implements OnInit, AfterViewInit {
|
||||
@Input() public recurList: Array<RecurSupplierData>;
|
||||
@Output() public onClick = new EventEmitter();
|
||||
@Input() public categories: any;
|
||||
|
||||
|
@ -44,9 +40,11 @@ export class SuppliersComponent implements OnInit, AfterViewInit {
|
|||
this.api.externalSuppliers(logPage, this.sortBy, this.sortDir).subscribe(
|
||||
result => {
|
||||
this.supplierList = result.suppliers;
|
||||
if (this.supplierList) {
|
||||
this.supplierListAvailable = true;
|
||||
}
|
||||
this.paginateConfig.totalItems = result.page_no;
|
||||
this.paginateConfig.currentPage = logPage;
|
||||
this.noTransactionList = false;
|
||||
},
|
||||
error => {
|
||||
console.log('Retrieval Error');
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|||
interface SupplierData {
|
||||
name: string;
|
||||
postcode: string;
|
||||
spend: number = 0;
|
||||
spend: number;
|
||||
}
|
||||
|
||||
@Component({
|
||||
|
|
Reference in a new issue