This repository has been archived by the owner on May 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder.service (1).ts
61 lines (54 loc) · 1.52 KB
/
order.service (1).ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { Injectable } from "@angular/core";
import { Order } from "./order.module"
@Injectable()
export class OrderService{
private orders: Order[] = [
new Order(
'001',
new Date(),
[{'companyName':'9Positions',
'firstName':'',
'lastName':'',
'address1':'123 ABC Lane',
'address2': '',
'suite':'Building A',
'city':'NYC',
'state':'NY',
'zipCode':'11003',
'country':'USA',
'shipCompany':'9Positions',
'shipFirstName':'',
'shipLastName':'',
'shipAddress1':'123 ABC Lane',
'shipAddress2': '',
'shipSuite':'Building A',
'shipCity':'NYC',
'shipState':'NY',
'shipZipCode':'11003',
'shipCountry':'USA'}],
[{
'modelSku':'9P243',
'modelName':'9P243 Wood Bat',
'modelFamily': 'Power Model',
'woodType':'Maple',
'batLength': '33"',
'quantity': 2,
'total': 180,
'cuppedBarrel':'yes',
'batStain': 'black/white',
'productionStatus':'new',
'personalization': 'My Bat',
'customerNotes': ''
}]
)
];
getOrders(){
return this.orders.slice();
}
getOrderDetail(index: number){
return this.orders[index];
}
getTotalOrderQuantity(){
return this.orders.length += 1;
}
}