-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lukas Ruebbelke
committed
Jul 12, 2018
1 parent
cb4b05f
commit c3f0f33
Showing
35 changed files
with
403 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<div class="container"> | ||
<div class="col-50"> | ||
<app-items-total [items]="items"></app-items-total> | ||
<app-items-list [items]="items" [readonly]="true"></app-items-list> | ||
</div> | ||
|
||
<div class="col-50"> | ||
<app-widgets-total [widgets]="widgets"></app-widgets-total> | ||
<app-widgets-list [widgets]="widgets" [readonly]="true"></app-widgets-list> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
11 changes: 11 additions & 0 deletions
11
apps/dashboard/src/app/items/items-total/items-total.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<mat-card> | ||
<mat-card-header> | ||
<mat-card-title> | ||
<h1>Items Total</h1> | ||
</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-content> | ||
<app-totals [collection]="items"></app-totals> | ||
</mat-card-content> | ||
</mat-card> | ||
|
25 changes: 25 additions & 0 deletions
25
apps/dashboard/src/app/items/items-total/items-total.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ItemsTotalComponent } from './items-total.component'; | ||
|
||
describe('ItemsTotalComponent', () => { | ||
let component: ItemsTotalComponent; | ||
let fixture: ComponentFixture<ItemsTotalComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ItemsTotalComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ItemsTotalComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
17 changes: 17 additions & 0 deletions
17
apps/dashboard/src/app/items/items-total/items-total.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { Item } from '@workspace/common-data'; | ||
|
||
@Component({ | ||
selector: 'app-items-total', | ||
templateUrl: './items-total.component.html', | ||
styleUrls: ['./items-total.component.css'] | ||
}) | ||
export class ItemsTotalComponent implements OnInit { | ||
@Input() items: Item; | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
10 changes: 10 additions & 0 deletions
10
apps/dashboard/src/app/widgets/widgets-total/widgets-total.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<mat-card> | ||
<mat-card-header> | ||
<mat-card-title> | ||
<h1>Widgets Total</h1> | ||
</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-content> | ||
<app-totals [collection]="widgets"></app-totals> | ||
</mat-card-content> | ||
</mat-card> |
25 changes: 25 additions & 0 deletions
25
apps/dashboard/src/app/widgets/widgets-total/widgets-total.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { WidgetsTotalComponent } from './widgets-total.component'; | ||
|
||
describe('WidgetsTotalComponent', () => { | ||
let component: WidgetsTotalComponent; | ||
let fixture: ComponentFixture<WidgetsTotalComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ WidgetsTotalComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(WidgetsTotalComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
17 changes: 17 additions & 0 deletions
17
apps/dashboard/src/app/widgets/widgets-total/widgets-total.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { Widget } from '@workspace/common-data'; | ||
|
||
@Component({ | ||
selector: 'app-widgets-total', | ||
templateUrl: './widgets-total.component.html', | ||
styleUrls: ['./widgets-total.component.css'] | ||
}) | ||
export class WidgetsTotalComponent implements OnInit { | ||
@Input() widgets: Widget[]; | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export interface Item { | ||
id: number; | ||
name?: string; | ||
name: string; | ||
price: number; | ||
description?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export interface Widget { | ||
id: number; | ||
name?: string; | ||
name: string; | ||
price: number; | ||
description?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage-istanbul-reporter'), | ||
require('@angular-devkit/build-angular/plugins/karma') | ||
], | ||
client: { | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
coverageIstanbulReporter: { | ||
dir: require('path').join(__dirname, '../../coverage'), | ||
reports: ['html', 'lcovonly'], | ||
fixWebpackSourcePaths: true | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { TotalsViewModule } from './lib/totals-view.module'; | ||
export { TotalsComponent } from './lib/totals/totals.component'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { async, TestBed } from '@angular/core/testing'; | ||
import { TotalsViewModule } from './totals-view.module'; | ||
|
||
describe('TotalsViewModule', () => { | ||
beforeEach( | ||
async(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [TotalsViewModule] | ||
}).compileComponents(); | ||
}) | ||
); | ||
|
||
it('should create', () => { | ||
expect(TotalsViewModule).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { TotalsComponent } from './totals/totals.component'; | ||
|
||
@NgModule({ | ||
imports: [CommonModule], | ||
declarations: [TotalsComponent], | ||
exports: [TotalsComponent] | ||
}) | ||
export class TotalsViewModule { | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h3>{{total | currency}}</h3> |
Oops, something went wrong.