Chore: Cleaned up imports to use Modules.
Feature: Added an eslint rule to sort component imports
This commit is contained in:
@ -1,24 +1,12 @@
|
||||
import { CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatButton, MatAnchor } from '@angular/material/button';
|
||||
import { MatCard, MatCardHeader, MatCardTitleGroup, MatCardTitle, MatCardContent } from '@angular/material/card';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import {
|
||||
MatTable,
|
||||
MatColumnDef,
|
||||
MatHeaderCellDef,
|
||||
MatHeaderCell,
|
||||
MatCellDef,
|
||||
MatCell,
|
||||
MatHeaderRowDef,
|
||||
MatHeaderRow,
|
||||
MatRowDef,
|
||||
MatRow,
|
||||
} from '@angular/material/table';
|
||||
import { CdkDragDrop, moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
import { MenuCategory } from '../../core/menu-category';
|
||||
import { Table } from '../../core/table';
|
||||
import { ToasterService } from '../../core/toaster.service';
|
||||
import { TableService } from '../table.service';
|
||||
@ -29,32 +17,10 @@ import { TableListDataSource } from './table-list-datasource';
|
||||
selector: 'app-table-list',
|
||||
templateUrl: './table-list.component.html',
|
||||
styleUrls: ['./table-list.component.css'],
|
||||
imports: [
|
||||
MatCard,
|
||||
MatCardHeader,
|
||||
MatCardTitleGroup,
|
||||
MatCardTitle,
|
||||
MatButton,
|
||||
MatAnchor,
|
||||
RouterLink,
|
||||
MatIcon,
|
||||
MatCardContent,
|
||||
MatTable,
|
||||
CdkDropList,
|
||||
MatColumnDef,
|
||||
MatHeaderCellDef,
|
||||
MatHeaderCell,
|
||||
MatCellDef,
|
||||
MatCell,
|
||||
MatHeaderRowDef,
|
||||
MatHeaderRow,
|
||||
MatRowDef,
|
||||
MatRow,
|
||||
CdkDrag,
|
||||
],
|
||||
imports: [DragDropModule, MatButtonModule, MatCardModule, MatIconModule, MatTableModule, RouterLink],
|
||||
})
|
||||
export class TableListComponent implements OnInit {
|
||||
@ViewChild('table', { static: true }) table?: MatTable<MenuCategory>;
|
||||
// @ViewChild('table', { static: true }) table?: MatTable<Table>;
|
||||
data: BehaviorSubject<Table[]> = new BehaviorSubject<Table[]>([]);
|
||||
dataSource: TableListDataSource = new TableListDataSource(this.data);
|
||||
list: Table[] = [];
|
||||
|
||||
Reference in New Issue
Block a user