| import { Component } from '@angular/core'; |
| import { ContactsSandbox } from '@pages/contacts/contacts.sandbox'; |
| import { CONTACTS_COLDEF } from '@pages/contacts/contacts-list/contacts-list-column-definition'; |
| import { BaseList } from '@shared/components/base-components/base.list'; |
| import { SetFilterComponent } from '@app/shared/filters/ag-grid/set-filter/set-filter.component'; |
| import { ToastrService } from 'ngx-toastr'; |
| import { Router } from '@angular/router'; |
| |
| @Component({ |
| selector: 'app-contacts-list', |
| templateUrl: './contacts-list.component.html', |
| styleUrls: ['./contacts-list.component.scss'], |
| }) |
| export class ContactsListComponent extends BaseList { |
| public columnDefinition: any = CONTACTS_COLDEF; |
| public frameworkComponents: { setFilterComponent: any }; |
| |
| |
| constructor(public contactsSandbox: ContactsSandbox, public router: Router, protected toastr: ToastrService) { |
| super(); |
| this.frameworkComponents = { setFilterComponent: SetFilterComponent }; |
| |
| this.toastr.success('Hello world!', 'Toastr fun!'); |
| } |
| |
| ngOnInit() { |
| this.gridOptions = { |
| ...this.gridOptions, |
| localeText: { |
| contains: 'enthält', |
| notContains: 'enthält nicht', |
| startsWith: 'beginnt mit', |
| endsWith: 'endet mit', |
| andCondition: 'UND', |
| orCondition: 'ODER', |
| equals: 'ist gleich', |
| notEqual: 'ist nicht gleich', |
| } |
| }; |
| } |
| |
| public navigateTo(url) { |
| this.router.navigate([url]); |
| } |
| } |