2019-08-30 16:50:19 +01:00
< div class = "animated fadeIn" >
< div class = "row" >
2020-10-17 18:39:59 +01:00
< div class = "col-lg-6 col-md-8" >
2019-08-30 16:50:19 +01:00
< div class = "card" >
< div class = "card-header" >
2019-09-09 19:52:38 +01:00
< h4 > Search Suppliers< / h4 >
2019-08-30 16:50:19 +01:00
< / div >
2019-09-09 19:52:38 +01:00
< div * ngIf = "supplierListAvailable" class = "card-block" >
< div class = "input-group" >
< input class = "form-control" type = "text" name = "search" [ ( ngModel ) ] = " searchText " autocomplete = "off"
placeholder="Search by Name or Postcode" (keydown.enter)="searchSuppliers()">
< div class = "input-group-append" >
< button class = "btn btn-primary" ( click ) = " searchSuppliers ( ) " > Search< / button >
2019-08-30 16:50:19 +01:00
< / div >
< / div >
2019-09-09 19:52:38 +01:00
< / div >
2019-08-30 16:50:19 +01:00
< / div >
< / div >
< / div >
< / div >
2019-07-04 15:34:42 +01:00
< div class = "animated fadeIn" >
2019-07-12 20:18:28 +01:00
< div class = "row" >
2020-10-17 18:39:59 +01:00
< div class = "col-lg-6 col-md-8" >
2019-07-12 20:18:28 +01:00
< div class = "card" >
< div class = "card-header" >
2019-09-09 19:52:38 +01:00
< h4 > List of Suppliers< / h4 >
< div class = "small" > Click on Column Headers to change Sort Order< / div >
2019-07-12 20:18:28 +01:00
< / div >
< div * ngIf = "supplierListAvailable" class = "card-block" >
< table class = "table table-striped table-hover" >
< thead >
2019-09-09 19:52:38 +01:00
< tr >
< th ( click ) = " sortName ( ) " > Name < span class = "fa-stack" >
2019-07-12 20:18:28 +01:00
< i * ngIf = "sortBy !== 'name' || sortDir == 'asc'" class = "fa fa-sort-up fa-stack-1x" > < / i >
< i * ngIf = "sortBy !== 'name' || sortDir == 'desc'" class = "fa fa-sort-down fa-stack-1x" > < / i >
< / span > < / th >
2019-09-09 19:52:38 +01:00
< th ( click ) = " sortPostcode ( ) " > Postcode < span class = "fa-stack" >
2019-07-12 20:18:28 +01:00
< i * ngIf = "sortBy !== 'postcode' || sortDir == 'asc'" class = "fa fa-sort-up fa-stack-1x" > < / i >
< i * ngIf = "sortBy !== 'postcode' || sortDir == 'desc'" class = "fa fa-sort-down fa-stack-1x" > < / i >
< / span > < / th >
2019-09-09 19:52:38 +01:00
< th ( click ) = " sortSpend ( ) " > Spend < span class = "fa-stack" >
2019-07-12 20:18:28 +01:00
< i * ngIf = "sortBy !== 'spend' || sortDir == 'asc'" class = "fa fa-sort-up fa-stack-1x" > < / i >
< i * ngIf = "sortBy !== 'spend' || sortDir == 'desc'" class = "fa fa-sort-down fa-stack-1x" > < / i >
< / span > < / th >
2019-09-09 19:52:38 +01:00
< / tr >
2019-07-12 20:18:28 +01:00
< / thead >
< tbody >
2019-09-09 19:52:38 +01:00
< tr supplier-result * ngFor = "let supplier of supplierList | paginate: paginateConfig"
[supplier]="supplier">< / tr >
2019-07-12 20:18:28 +01:00
< / tbody >
< / table >
< pagination-template # p = "paginationApi"
2019-09-09 19:52:38 +01:00
[id]="paginateConfig.id"
(pageChange)="loadSuppliers($event)">
< ul class = "pagination" >
< li class = "page-item" [ class . disabled ] = " p . isFirstPage ( ) " >
< a class = "page-link clickable" * ngIf = "!p.isFirstPage()" ( click ) = " p . previous ( ) " > Prev< / a >
< / li >
< li * ngFor = "let page of p.pages" class = "page-item" [ class . active ] = " p . getCurrent ( ) = = = page . value " >
2019-07-12 20:18:28 +01:00
< a class = "page-link clickable" ( click ) = " p . setCurrent ( page . value ) " * ngIf = "p.getCurrent() !== page.value" >
2019-09-09 19:52:38 +01:00
< span > {{ page.label }}< / span >
2019-07-12 20:18:28 +01:00
< / a >
< div class = "page-link" * ngIf = "p.getCurrent() === page.value" >
2019-09-09 19:52:38 +01:00
< span > {{ page.label }}< / span >
2019-07-12 20:18:28 +01:00
< / div >
2019-09-09 19:52:38 +01:00
< / li >
< li class = "page-item" [ class . disabled ] = " p . isLastPage ( ) " >
< a class = "page-link clickable" * ngIf = "!p.isLastPage()" ( click ) = " p . next ( ) " > Next< / a >
< / li >
< / ul >
2019-07-12 20:18:28 +01:00
< / pagination-template >
< / div >
< div * ngIf = "!supplierListAvailable" class = "card-block" >
No Suppliers available.
< / div >
< / div >
< / div >
2019-07-04 16:10:50 +01:00
< / div >
2019-07-12 20:18:28 +01:00
< / div >