upgrade dependencies and migrate
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Sort } from '@angular/material/sort';
|
||||
import { I18nService } from '../../services/i18n.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'app-services-table',
|
||||
templateUrl: './servicestable.component.html',
|
||||
styleUrls: [ './servicestable.component.scss' ]
|
||||
styleUrls: ['./servicestable.component.scss']
|
||||
})
|
||||
export class ServicesTableComponent implements OnInit {
|
||||
|
||||
@Input() services;
|
||||
serviceColumns = [ "icon", "name", "text" ];
|
||||
serviceColumns = ["icon", "name", "text"];
|
||||
|
||||
constructor(private i18n: I18nService) { }
|
||||
|
||||
@@ -34,9 +35,9 @@ export class ServicesTableComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
compare(a: number | string , b: number | string , isAsc: boolean) {
|
||||
compare(a: number | string, b: number | string, isAsc: boolean) {
|
||||
if (typeof a === 'string' && typeof b === 'string') {
|
||||
return a.localeCompare(b,undefined, { sensitivity: 'accent' } ) * (isAsc ? 1 : -1);
|
||||
return a.localeCompare(b, undefined, { sensitivity: 'accent' }) * (isAsc ? 1 : -1);
|
||||
}
|
||||
return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user