|
|
@@ -6,16 +6,6 @@ import {ActivatedRoute, RouterLink, RouterLinkActive} from "@angular/router"; |
|
|
import {Subscription} from "rxjs"; |
|
|
import {Subscription} from "rxjs"; |
|
|
import {PartnerJsonld, PartnerService} from "@app/core/api/v1"; |
|
|
import {PartnerJsonld, PartnerService} from "@app/core/api/v1"; |
|
|
|
|
|
|
|
|
export interface PeriodicElement { |
|
|
|
|
|
pos: number; |
|
|
|
|
|
name: string; |
|
|
|
|
|
street: string; |
|
|
|
|
|
streetNo: string; |
|
|
|
|
|
zip: string; |
|
|
|
|
|
city: string; |
|
|
|
|
|
website: string; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
selector: 'app-partners', |
|
|
selector: 'app-partners', |
|
|
templateUrl: './partners.component.html', |
|
|
templateUrl: './partners.component.html', |
|
|
@@ -26,7 +16,6 @@ export interface PeriodicElement { |
|
|
export class PartnersComponent implements OnInit, AfterViewInit { |
|
|
export class PartnersComponent implements OnInit, AfterViewInit { |
|
|
@ViewChild(MatSort) sort; |
|
|
@ViewChild(MatSort) sort; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected partnersSub: Subscription; |
|
|
protected partnersSub: Subscription; |
|
|
protected partners: Array<PartnerJsonld> = []; |
|
|
protected partners: Array<PartnerJsonld> = []; |
|
|
|
|
|
|
|
|
@@ -52,11 +41,6 @@ export class PartnersComponent implements OnInit, AfterViewInit { |
|
|
this.partnersSub = this.partnerService.partnersGetCollection().subscribe( |
|
|
this.partnersSub = this.partnerService.partnersGetCollection().subscribe( |
|
|
data => { |
|
|
data => { |
|
|
this.partners = data["hydra:member"]; |
|
|
this.partners = data["hydra:member"]; |
|
|
// this.partners.sort((a, b) => { |
|
|
|
|
|
// const nameA = a.name ? a.name.toLowerCase() : ''; |
|
|
|
|
|
// const nameB = b.name ? b.name.toLowerCase() : ''; |
|
|
|
|
|
// return nameA.localeCompare(nameB); |
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
this.dataSource.data = this.partners; |
|
|
this.dataSource.data = this.partners; |
|
|
console.log(this.partners); |
|
|
console.log(this.partners); |
|
|
@@ -75,6 +59,7 @@ export class PartnersComponent implements OnInit, AfterViewInit { |
|
|
// multiple language, you would internationalize these strings. |
|
|
// multiple language, you would internationalize these strings. |
|
|
// Furthermore, you can customize the message to add additional |
|
|
// Furthermore, you can customize the message to add additional |
|
|
// details about the values being sorted. |
|
|
// details about the values being sorted. |
|
|
|
|
|
console.log(sortState); |
|
|
if (sortState.direction) { |
|
|
if (sortState.direction) { |
|
|
this._liveAnnouncer.announce(`Sorted ${sortState.direction}ending`); |
|
|
this._liveAnnouncer.announce(`Sorted ${sortState.direction}ending`); |
|
|
} else { |
|
|
} else { |
|
|
|