diff --git a/src/app/dashboard/more-graphs-and-tables.component.html b/src/app/dashboard/more-graphs-and-tables.component.html
index e65b41a..135d1ab 100644
--- a/src/app/dashboard/more-graphs-and-tables.component.html
+++ b/src/app/dashboard/more-graphs-and-tables.component.html
@@ -45,7 +45,7 @@
-
No Suppliers available.
diff --git a/src/app/dashboard/suppliers.component.ts b/src/app/dashboard/suppliers.component.ts
index e3cbf0f..c0cfa2d 100644
--- a/src/app/dashboard/suppliers.component.ts
+++ b/src/app/dashboard/suppliers.component.ts
@@ -11,6 +11,7 @@ import { PaginationInstance } from 'ngx-pagination';
export class SuppliersComponent implements OnInit, AfterViewInit {
@Output() public onClick = new EventEmitter();
@Input() public categories: any;
+ public perPage: number = 10;
supplierList: any;
supplierListAvailable = false;
@@ -19,7 +20,7 @@ export class SuppliersComponent implements OnInit, AfterViewInit {
public paginateConfig: PaginationInstance = {
id: 'transpaginate',
- itemsPerPage: 10,
+ itemsPerPage: this.perPage,
currentPage: 1,
totalItems: 0
};
@@ -37,7 +38,7 @@ export class SuppliersComponent implements OnInit, AfterViewInit {
}
loadSuppliers(logPage: number) {
- this.api.externalSuppliers(logPage, this.sortBy, this.sortDir).subscribe(
+ this.api.externalSuppliers(logPage, this.sortBy, this.sortDir, this.perPage).subscribe(
result => {
this.supplierList = result.suppliers;
if (this.supplierList) {
diff --git a/src/app/providers/api-service.ts b/src/app/providers/api-service.ts
index b09bcfd..5ac5c2a 100644
--- a/src/app/providers/api-service.ts
+++ b/src/app/providers/api-service.ts
@@ -144,7 +144,17 @@ export class ApiService {
);
}
- public externalSuppliers(data, sortBy, sortDir) {
+ public loadMiscUrl(extra_url) {
+ const key = this.sessionKey;
+ return this.http.post
(
+ this.apiUrl + '/v1/' + extra_url,
+ {
+ session_key : key,
+ }
+ );
+ }
+
+ public externalSuppliers(data, sortBy, sortDir, perPage) {
const key = this.sessionKey;
return this.http.post(
this.apiUrl + '/v1/organisation/external/suppliers',
@@ -152,7 +162,8 @@ export class ApiService {
session_key : key,
page : data,
sort_by : sortBy,
- sort_dir : sortDir
+ sort_dir : sortDir,
+ per_page : perPage
}
);
}