diff --git a/src/Web/WebSPA/Client/modules/app.component.ts b/src/Web/WebSPA/Client/modules/app.component.ts
index dffd344e7..37bba914b 100644
--- a/src/Web/WebSPA/Client/modules/app.component.ts
+++ b/src/Web/WebSPA/Client/modules/app.component.ts
@@ -18,7 +18,7 @@ import { ConfigurationService } from './shared/services/configuration.service';
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
- private Authenticated: boolean = false;
+ Authenticated: boolean = false;
subscription: Subscription;
constructor(private titleService: Title, private securityService: SecurityService, private configurationService: ConfigurationService) {
diff --git a/src/Web/WebSPA/Client/modules/basket/basket-status/basket-status.component.html b/src/Web/WebSPA/Client/modules/basket/basket-status/basket-status.component.html
index 7509a2281..b15127a60 100644
--- a/src/Web/WebSPA/Client/modules/basket/basket-status/basket-status.component.html
+++ b/src/Web/WebSPA/Client/modules/basket/basket-status/basket-status.component.html
@@ -3,7 +3,7 @@
[routerLink]="['basket']">
-
+
{{badge}}
diff --git a/src/Web/WebSPA/Client/modules/orders/orders-detail/orders-detail.component.ts b/src/Web/WebSPA/Client/modules/orders/orders-detail/orders-detail.component.ts
index 31da11594..c9c5c79c0 100644
--- a/src/Web/WebSPA/Client/modules/orders/orders-detail/orders-detail.component.ts
+++ b/src/Web/WebSPA/Client/modules/orders/orders-detail/orders-detail.component.ts
@@ -1,6 +1,6 @@
-import { Component, OnInit } from '@angular/core';
-import { OrdersService } from '../orders.service';
-import { IOrder } from '../../shared/models/order.model';
+import { Component, OnInit } from '@angular/core';
+import { OrdersService } from '../orders.service';
+import { IOrderDetail } from '../../shared/models/order-detail.model';
import { ActivatedRoute } from '@angular/router';
@Component({
@@ -9,7 +9,7 @@ import { ActivatedRoute } from '@angular/router';
templateUrl: './orders-detail.component.html'
})
export class OrdersDetailComponent implements OnInit {
- order = {}; // new order
+ public order: IOrderDetail =
{};
constructor(private service: OrdersService, private route: ActivatedRoute) { }
@@ -27,5 +27,4 @@ export class OrdersDetailComponent implements OnInit {
console.log(this.order);
});
}
-}
-
+}
\ No newline at end of file
diff --git a/src/Web/WebSPA/Client/modules/orders/orders-new/orders-new.component.ts b/src/Web/WebSPA/Client/modules/orders/orders-new/orders-new.component.ts
index 8f8a10eb0..4f6f82a9f 100644
--- a/src/Web/WebSPA/Client/modules/orders/orders-new/orders-new.component.ts
+++ b/src/Web/WebSPA/Client/modules/orders/orders-new/orders-new.component.ts
@@ -13,10 +13,10 @@ import { Router } from '@angular/router';
templateUrl: './orders-new.component.html'
})
export class OrdersNewComponent implements OnInit {
- private newOrderForm: FormGroup; // new order form
- private isOrderProcessing: Boolean;
- private errorReceived: Boolean;
- private order: IOrder;
+ newOrderForm: FormGroup; // new order form
+ isOrderProcessing: boolean;
+ errorReceived: boolean;
+ order: IOrder;
constructor(private service: OrdersService, fb: FormBuilder, private router: Router) {
// Obtain user profile information
diff --git a/src/Web/WebSPA/Client/modules/orders/orders.service.ts b/src/Web/WebSPA/Client/modules/orders/orders.service.ts
index 24991056a..355670cdd 100644
--- a/src/Web/WebSPA/Client/modules/orders/orders.service.ts
+++ b/src/Web/WebSPA/Client/modules/orders/orders.service.ts
@@ -4,6 +4,7 @@ import { Response } from '@angular/http';
import { DataService } from '../shared/services/data.service';
import { IOrder } from '../shared/models/order.model';
import { IOrderItem } from '../shared/models/orderItem.model';
+import { IOrderDetail } from "../shared/models/order-detail.model";
import { SecurityService } from '../shared/services/security.service';
import { ConfigurationService } from '../shared/services/configuration.service';
import { BasketWrapperService } from '../shared/services/basket.wrapper.service';
@@ -35,7 +36,7 @@ export class OrdersService {
});
}
- getOrder(id: number): Observable {
+ getOrder(id: number): Observable {
let url = this.ordersUrl + '/api/v1/orders/' + id;
return this.service.get(url).map((response: Response) => {
diff --git a/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html b/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html
index f15dda395..9dce33adc 100644
--- a/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html
+++ b/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html
@@ -12,7 +12,7 @@
*ngIf="authenticated">
{{userName}}
-
+
My orders
-
+
Log Out
-
+
diff --git a/src/Web/WebSPA/Client/modules/shared/components/identity/identity.ts b/src/Web/WebSPA/Client/modules/shared/components/identity/identity.ts
index 606249c0a..505cdc05d 100644
--- a/src/Web/WebSPA/Client/modules/shared/components/identity/identity.ts
+++ b/src/Web/WebSPA/Client/modules/shared/components/identity/identity.ts
@@ -10,7 +10,7 @@ import { SecurityService } from '../../services/security.service';
styleUrls: ['./identity.scss']
})
export class Identity implements OnInit {
- private authenticated: boolean = false;
+ authenticated: boolean = false;
private subscription: Subscription;
private userName: string = '';
diff --git a/src/Web/WebSPA/Client/modules/shared/models/order-detail.model.ts b/src/Web/WebSPA/Client/modules/shared/models/order-detail.model.ts
new file mode 100644
index 000000000..25a869f9c
--- /dev/null
+++ b/src/Web/WebSPA/Client/modules/shared/models/order-detail.model.ts
@@ -0,0 +1,14 @@
+import {IOrderItem} from './orderItem.model';
+
+export interface IOrderDetail {
+ ordernumber: string;
+ status: string;
+ street: string;
+ date: Date;
+ city: number;
+ state: string;
+ zipcode: string;
+ country: number;
+ total: number;
+ orderitems: IOrderItem[];
+}
diff --git a/src/Web/WebSPA/Client/modules/shared/shared.module.ts b/src/Web/WebSPA/Client/modules/shared/shared.module.ts
index 64441396f..da7667df6 100644
--- a/src/Web/WebSPA/Client/modules/shared/shared.module.ts
+++ b/src/Web/WebSPA/Client/modules/shared/shared.module.ts
@@ -16,6 +16,10 @@ import { StorageService } from './services/storage.service';
import { Pager } from './components/pager/pager';
import { Header } from './components/header/header';
import { Identity } from './components/identity/identity';
+import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
+
+// Pipes:
+import { UppercasePipe } from './pipes/uppercase.pipe';
@NgModule({
imports: [
@@ -31,7 +35,9 @@ import { Identity } from './components/identity/identity';
declarations: [
Pager,
Header,
- Identity
+ Identity,
+ PageNotFoundComponent,
+ UppercasePipe
],
exports: [
// Modules
@@ -43,7 +49,9 @@ import { Identity } from './components/identity/identity';
// Providers, Components, directive, pipes
Pager,
Header,
- Identity
+ Identity,
+ PageNotFoundComponent,
+ UppercasePipe
]
})
export class SharedModule {
diff --git a/src/Web/WebSPA/WebSPA.csproj b/src/Web/WebSPA/WebSPA.csproj
index db39dc0e3..e275ee51e 100644
--- a/src/Web/WebSPA/WebSPA.csproj
+++ b/src/Web/WebSPA/WebSPA.csproj
@@ -56,7 +56,7 @@
-
+
diff --git a/src/Web/WebSPA/package.json b/src/Web/WebSPA/package.json
index 0def49351..003f220ac 100644
--- a/src/Web/WebSPA/package.json
+++ b/src/Web/WebSPA/package.json
@@ -17,9 +17,11 @@
},
"scripts": {
"ng": "ng",
+ "rimraf": "rimraf",
+ "clean": "npm cache clean && npm run rimraf -- node_modules doc typings coverage wwwroot",
"start": "ng serve",
"build:dev": "ng build",
- "build:prod": "ng build",
+ "build:prod": "ng build --prod --aot --extract-css",
"lint:sass": "sass-lint -c .sass-lint.yml Client/**/*.scss --verbose",
"lint:ts": "tslint -c tslint.json Client/**/*.ts"
},
@@ -33,8 +35,6 @@
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.22",
- "aspnet-prerendering": "1.0.7",
- "aspnet-webpack": "1.0.24",
"bootstrap": "4.0.0-alpha.5",
"core-js": "^2.4.1",
"file-loader": "0.9.0",