Tax done
This commit is contained in:
3
bookie/src/app/taxes/tax-detail/tax-detail.component.css
Normal file
3
bookie/src/app/taxes/tax-detail/tax-detail.component.css
Normal file
@ -0,0 +1,3 @@
|
||||
.right-align {
|
||||
text-align: right;
|
||||
}
|
||||
30
bookie/src/app/taxes/tax-detail/tax-detail.component.html
Normal file
30
bookie/src/app/taxes/tax-detail/tax-detail.component.html
Normal file
@ -0,0 +1,30 @@
|
||||
<div fxLayout="row" fxFlex="50%" fxLayoutAlign="space-around center" class="example-card">
|
||||
<mat-card fxFlex>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Tax</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" fxLayout="column">
|
||||
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px">
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #nameElement placeholder="Name" formControlName="name" (keyup.enter)="save()">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px">
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Rate</mat-label>
|
||||
<input matInput type="number" placeholder="Rate" formControlName="rate" class="right-align">
|
||||
<span matSuffix>%</span>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button [disabled]="item.isFixture" color="primary" (click)="save()">Save</button>
|
||||
<button mat-raised-button [disabled]="item.isFixture" color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
25
bookie/src/app/taxes/tax-detail/tax-detail.component.spec.ts
Normal file
25
bookie/src/app/taxes/tax-detail/tax-detail.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {TaxDetailComponent} from './tax-detail.component';
|
||||
|
||||
describe('TaxDetailComponent', () => {
|
||||
let component: TaxDetailComponent;
|
||||
let fixture: ComponentFixture<TaxDetailComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [TaxDetailComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TaxDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
76
bookie/src/app/taxes/tax-detail/tax-detail.component.ts
Normal file
76
bookie/src/app/taxes/tax-detail/tax-detail.component.ts
Normal file
@ -0,0 +1,76 @@
|
||||
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
|
||||
|
||||
import {TaxService} from '../tax.service';
|
||||
import {Tax} from '../../core/tax';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {ToasterService} from '../../core/toaster.service';
|
||||
import {FormBuilder, FormGroup} from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tax-detail',
|
||||
templateUrl: './tax-detail.component.html',
|
||||
styleUrls: ['./tax-detail.component.css']
|
||||
})
|
||||
export class TaxDetailComponent implements OnInit, AfterViewInit {
|
||||
@ViewChild('nameElement', { static: true }) nameElement: ElementRef;
|
||||
form: FormGroup;
|
||||
item: Tax;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: FormBuilder,
|
||||
private toaster: ToasterService,
|
||||
private ser: TaxService
|
||||
) {
|
||||
this.createForm();
|
||||
}
|
||||
|
||||
createForm() {
|
||||
this.form = this.fb.group({
|
||||
name: '',
|
||||
rate: ''
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { item: Tax }) => {
|
||||
this.showItem(data.item);
|
||||
});
|
||||
}
|
||||
|
||||
showItem(item: Tax) {
|
||||
this.item = item;
|
||||
this.form.setValue({
|
||||
name: this.item.name || '',
|
||||
rate: this.item.rate || ''
|
||||
});
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
setTimeout(() => {
|
||||
this.nameElement.nativeElement.focus();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
save() {
|
||||
this.ser.saveOrUpdate(this.getItem())
|
||||
.subscribe(
|
||||
(result) => {
|
||||
this.toaster.show('Success', '');
|
||||
this.router.navigateByUrl('/taxes');
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
getItem(): Tax {
|
||||
const formModel = this.form.value;
|
||||
this.item.name = formModel.name;
|
||||
this.item.rate = formModel.rate;
|
||||
return this.item;
|
||||
}
|
||||
}
|
||||
15
bookie/src/app/taxes/tax-list-resolver.service.spec.ts
Normal file
15
bookie/src/app/taxes/tax-list-resolver.service.spec.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import {inject, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {TaxListResolver} from './tax-list-resolver.service';
|
||||
|
||||
describe('TaxListResolverService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [TaxListResolver]
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject([TaxListResolver], (service: TaxListResolver) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
18
bookie/src/app/taxes/tax-list-resolver.service.ts
Normal file
18
bookie/src/app/taxes/tax-list-resolver.service.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot} from '@angular/router';
|
||||
import {Tax} from '../core/tax';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
import {TaxService} from './tax.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TaxListResolver implements Resolve<Tax[]> {
|
||||
|
||||
constructor(private ser: TaxService, private router: Router) {
|
||||
}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Tax[]> {
|
||||
return this.ser.list();
|
||||
}
|
||||
}
|
||||
59
bookie/src/app/taxes/tax-list/tax-list-datasource.ts
Normal file
59
bookie/src/app/taxes/tax-list/tax-list-datasource.ts
Normal file
@ -0,0 +1,59 @@
|
||||
import {DataSource} from '@angular/cdk/collections';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {merge, Observable, of as observableOf} from 'rxjs';
|
||||
import {Tax} from '../../core/tax';
|
||||
|
||||
export class TaxListDataSource extends DataSource<Tax> {
|
||||
|
||||
constructor(private paginator: MatPaginator, private sort: MatSort, public data: Tax[]) {
|
||||
super();
|
||||
}
|
||||
|
||||
connect(): Observable<Tax[]> {
|
||||
const dataMutations = [
|
||||
observableOf(this.data),
|
||||
this.paginator.page,
|
||||
this.sort.sortChange
|
||||
];
|
||||
|
||||
// Set the paginators length
|
||||
this.paginator.length = this.data.length;
|
||||
|
||||
return merge(...dataMutations).pipe(map(() => {
|
||||
return this.getPagedData(this.getSortedData([...this.data]));
|
||||
}));
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
}
|
||||
|
||||
private getPagedData(data: Tax[]) {
|
||||
const startIndex = this.paginator.pageIndex * this.paginator.pageSize;
|
||||
return data.splice(startIndex, this.paginator.pageSize);
|
||||
}
|
||||
|
||||
private getSortedData(data: Tax[]) {
|
||||
if (!this.sort.active || this.sort.direction === '') {
|
||||
return data;
|
||||
}
|
||||
|
||||
return data.sort((a, b) => {
|
||||
const isAsc = this.sort.direction === 'asc';
|
||||
switch (this.sort.active) {
|
||||
case 'name':
|
||||
return compare(a.name, b.name, isAsc);
|
||||
case 'id':
|
||||
return compare(+a.id, +b.id, isAsc);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** Simple sort comparator for example ID/Name columns (for client-side sorting). */
|
||||
function compare(a, b, isAsc) {
|
||||
return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||
}
|
||||
41
bookie/src/app/taxes/tax-list/tax-list.component.html
Normal file
41
bookie/src/app/taxes/tax-list/tax-list.component.html
Normal file
@ -0,0 +1,41 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Taxes</mat-card-title>
|
||||
<a mat-button [routerLink]="['/taxes', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><a [routerLink]="['/taxes', row.id]">{{row.name}}</a></mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.rate | percent:'1.2-2'}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="isFixture">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Is Fixture?</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.isFixture}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator #paginator
|
||||
[length]="dataSource.data.length"
|
||||
[pageIndex]="0"
|
||||
[pageSize]="50"
|
||||
[pageSizeOptions]="[25, 50, 100, 250]">
|
||||
</mat-paginator>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
23
bookie/src/app/taxes/tax-list/tax-list.component.spec.ts
Normal file
23
bookie/src/app/taxes/tax-list/tax-list.component.spec.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import {ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {TaxListComponent} from './tax-list.component';
|
||||
|
||||
describe('TaxListComponent', () => {
|
||||
let component: TaxListComponent;
|
||||
let fixture: ComponentFixture<TaxListComponent>;
|
||||
|
||||
beforeEach(fakeAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [TaxListComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TaxListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should compile', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
31
bookie/src/app/taxes/tax-list/tax-list.component.ts
Normal file
31
bookie/src/app/taxes/tax-list/tax-list.component.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import {TaxListDataSource} from './tax-list-datasource';
|
||||
import {Tax} from '../../core/tax';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tax-list',
|
||||
templateUrl: './tax-list.component.html',
|
||||
styleUrls: ['./tax-list.component.css']
|
||||
})
|
||||
export class TaxListComponent implements OnInit {
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
dataSource: TaxListDataSource;
|
||||
list: Tax[];
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'rate', 'isFixture'];
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { list: Tax[] }) => {
|
||||
this.list = data.list;
|
||||
});
|
||||
this.dataSource = new TaxListDataSource(this.paginator, this.sort, this.list);
|
||||
}
|
||||
}
|
||||
15
bookie/src/app/taxes/tax-resolver.service.spec.ts
Normal file
15
bookie/src/app/taxes/tax-resolver.service.spec.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import {inject, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {TaxResolver} from './tax-resolver.service';
|
||||
|
||||
describe('TaxResolver', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [TaxResolver]
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject([TaxResolver], (service: TaxResolver) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
19
bookie/src/app/taxes/tax-resolver.service.ts
Normal file
19
bookie/src/app/taxes/tax-resolver.service.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot} from '@angular/router';
|
||||
import {TaxService} from './tax.service';
|
||||
import {Tax} from '../core/tax';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TaxResolver implements Resolve<Tax> {
|
||||
|
||||
constructor(private ser: TaxService, private router: Router) {
|
||||
}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Tax> {
|
||||
const id = route.paramMap.get('id');
|
||||
return this.ser.get(id);
|
||||
}
|
||||
}
|
||||
15
bookie/src/app/taxes/tax.service.spec.ts
Normal file
15
bookie/src/app/taxes/tax.service.spec.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import {inject, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {TaxService} from './tax.service';
|
||||
|
||||
describe('TaxService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [TaxService]
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject([TaxService], (service: TaxService) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
65
bookie/src/app/taxes/tax.service.ts
Normal file
65
bookie/src/app/taxes/tax.service.ts
Normal file
@ -0,0 +1,65 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
|
||||
import {ErrorLoggerService} from '../core/error-logger.service';
|
||||
import {catchError} from 'rxjs/operators';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
import {Tax} from '../core/tax';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
const url = '/v1/taxes';
|
||||
const serviceName = 'TaxService';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TaxService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {
|
||||
}
|
||||
|
||||
get(id: string): Observable<Tax> {
|
||||
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
|
||||
return <Observable<Tax>>this.http.get<Tax>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
);
|
||||
}
|
||||
|
||||
list(): Observable<Tax[]> {
|
||||
const options = {params: new HttpParams().set('l', '')};
|
||||
return <Observable<Tax[]>>this.http.get<Tax[]>(url, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
}
|
||||
|
||||
save(tax: Tax): Observable<Tax> {
|
||||
return <Observable<Tax>>this.http.post<Tax>(`${url}/new`, tax, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
}
|
||||
|
||||
update(tax: Tax): Observable<Tax> {
|
||||
return <Observable<Tax>>this.http.put<Tax>(`${url}/${tax.id}`, tax, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'update'))
|
||||
);
|
||||
}
|
||||
|
||||
saveOrUpdate(tax: Tax): Observable<Tax> {
|
||||
if (!tax.id) {
|
||||
return this.save(tax);
|
||||
} else {
|
||||
return this.update(tax);
|
||||
}
|
||||
}
|
||||
|
||||
delete(id: string): Observable<Tax> {
|
||||
return <Observable<Tax>>this.http.delete<Tax>(`${url}/${id}`, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'delete'))
|
||||
);
|
||||
}
|
||||
}
|
||||
13
bookie/src/app/taxes/taxes-routing.module.spec.ts
Normal file
13
bookie/src/app/taxes/taxes-routing.module.spec.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import {TaxesRoutingModule} from './taxes-routing.module';
|
||||
|
||||
describe('TaxesRoutingModule', () => {
|
||||
let taxesRoutingModule: TaxesRoutingModule;
|
||||
|
||||
beforeEach(() => {
|
||||
taxesRoutingModule = new TaxesRoutingModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(taxesRoutingModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
61
bookie/src/app/taxes/taxes-routing.module.ts
Normal file
61
bookie/src/app/taxes/taxes-routing.module.ts
Normal file
@ -0,0 +1,61 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {TaxListResolver} from './tax-list-resolver.service';
|
||||
import {TaxResolver} from './tax-resolver.service';
|
||||
import {TaxListComponent} from './tax-list/tax-list.component';
|
||||
import {TaxDetailComponent} from './tax-detail/tax-detail.component';
|
||||
import {AuthGuard} from '../auth/auth-guard.service';
|
||||
|
||||
const taxesRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TaxListComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Taxes'
|
||||
},
|
||||
resolve: {
|
||||
list: TaxListResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'new',
|
||||
component: TaxDetailComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Taxes'
|
||||
},
|
||||
resolve: {
|
||||
item: TaxResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
component: TaxDetailComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Taxes'
|
||||
},
|
||||
resolve: {
|
||||
item: TaxResolver
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild(taxesRoutes)
|
||||
|
||||
],
|
||||
exports: [
|
||||
RouterModule
|
||||
],
|
||||
providers: [
|
||||
TaxListResolver,
|
||||
TaxResolver
|
||||
]
|
||||
})
|
||||
export class TaxesRoutingModule {
|
||||
}
|
||||
13
bookie/src/app/taxes/taxes.module.spec.ts
Normal file
13
bookie/src/app/taxes/taxes.module.spec.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import {TaxesModule} from './taxes.module';
|
||||
|
||||
describe('TaxesModule', () => {
|
||||
let taxesModule: TaxesModule;
|
||||
|
||||
beforeEach(() => {
|
||||
taxesModule = new TaxesModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(taxesModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
41
bookie/src/app/taxes/taxes.module.ts
Normal file
41
bookie/src/app/taxes/taxes.module.ts
Normal file
@ -0,0 +1,41 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
|
||||
import {TaxListComponent} from './tax-list/tax-list.component';
|
||||
import {TaxDetailComponent} from './tax-detail/tax-detail.component';
|
||||
import {TaxesRoutingModule} from './taxes-routing.module';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatSortModule } from '@angular/material/sort';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import {CdkTableModule} from '@angular/cdk/table';
|
||||
import {ReactiveFormsModule} from '@angular/forms';
|
||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
CdkTableModule,
|
||||
FlexLayoutModule,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatPaginatorModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatSortModule,
|
||||
MatTableModule,
|
||||
ReactiveFormsModule,
|
||||
TaxesRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
TaxListComponent,
|
||||
TaxDetailComponent
|
||||
]
|
||||
})
|
||||
export class TaxesModule {
|
||||
}
|
||||
Reference in New Issue
Block a user