-

+
diff --git a/store-front/src/app/components/my-profile/my-profile.component.ts b/store-front/src/app/components/my-profile/my-profile.component.ts
index aaf8aa7..cbd2811 100644
--- a/store-front/src/app/components/my-profile/my-profile.component.ts
+++ b/store-front/src/app/components/my-profile/my-profile.component.ts
@@ -31,7 +31,9 @@ export class MyProfileComponent implements OnInit {
private user: User = new User();
private userPayment: UserPayment = new UserPayment();
- private userBilling: UserBilling = new UserBilling();
+ private userBilling: UserBilling = new UserBilling();
+ private userPaymentList: UserPayment[] = [];
+ private stateList: string[] = [];
constructor (private loginService: LoginService, private userService: UserService, private router: Router){
}
@@ -102,11 +104,15 @@ export class MyProfileComponent implements OnInit {
res => {
console.log(res.json());
this.user=res.json();
+ this.userPaymentList = this.user.userPaymentList;
},
error => {
console.log(error);
}
);
+ for (let s in AppConst.usStates) {
+ this.stateList.push(s);
+ }
}
}
diff --git a/store-front/src/app/constants/app-const.ts b/store-front/src/app/constants/app-const.ts
index 76931c1..c50dd40 100644
--- a/store-front/src/app/constants/app-const.ts
+++ b/store-front/src/app/constants/app-const.ts
@@ -1,3 +1,76 @@
-export class AppConst {
+export class AppConst implements OnInit {
public static serverPath='http://127.0.0.1:8181';
+
+ public static usStates = {
+ "AL": "Alabama",
+ "AK": "Alaska",
+ "AS": "American Samoa",
+ "AZ": "Arizona",
+ "AR": "Arkansas",
+ "CA": "California",
+ "CO": "Colorado",
+ "CT": "Connecticut",
+ "DE": "Delaware",
+ "DC": "District Of Columbia",
+ "FM": "Federated States Of Micronesia",
+ "FL": "Florida",
+ "GA": "Georgia",
+ "GU": "Guam",
+ "HI": "Hawaii",
+ "ID": "Idaho",
+ "IL": "Illinois",
+ "IN": "Indiana",
+ "IA": "Iowa",
+ "KS": "Kansas",
+ "KY": "Kentucky",
+ "LA": "Louisiana",
+ "ME": "Maine",
+ "MH": "Marshall Islands",
+ "MD": "Maryland",
+ "MA": "Massachusetts",
+ "MI": "Michigan",
+ "MN": "Minnesota",
+ "MS": "Mississippi",
+ "MO": "Missouri",
+ "MT": "Montana",
+ "NE": "Nebraska",
+ "NV": "Nevada",
+ "NH": "New Hampshire",
+ "NJ": "New Jersey",
+ "NM": "New Mexico",
+ "NY": "New York",
+ "NC": "North Carolina",
+ "ND": "North Dakota",
+ "MP": "Northern Mariana Islands",
+ "OH": "Ohio",
+ "OK": "Oklahoma",
+ "OR": "Oregon",
+ "PW": "Palau",
+ "PA": "Pennsylvania",
+ "PR": "Puerto Rico",
+ "RI": "Rhode Island",
+ "SC": "South Carolina",
+ "SD": "South Dakota",
+ "TN": "Tennessee",
+ "TX": "Texas",
+ "UT": "Utah",
+ "VT": "Vermont",
+ "VI": "Virgin Islands",
+ "VA": "Virginia",
+ "WA": "Washington",
+ "WV": "West Virginia",
+ "WI": "Wisconsin",
+ "WY": "Wyoming"
+}
+ constructor () {
+ console.log("test");
+ for (let s in this.usStates) {
+ this.stateList.push(s);
+ console.log(s);
+ }
+ }
+
+ ngOnInit() {
+
+ }
}
\ No newline at end of file
diff --git a/store-front/src/app/services/payment.service.spec.ts b/store-front/src/app/services/payment.service.spec.ts
new file mode 100644
index 0000000..114ec06
--- /dev/null
+++ b/store-front/src/app/services/payment.service.spec.ts
@@ -0,0 +1,16 @@
+/* tslint:disable:no-unused-variable */
+
+import { TestBed, async, inject } from '@angular/core/testing';
+import { PaymentService } from './payment.service';
+
+describe('PaymentService', () => {
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [PaymentService]
+ });
+ });
+
+ it('should ...', inject([PaymentService], (service: PaymentService) => {
+ expect(service).toBeTruthy();
+ }));
+});
diff --git a/store-front/src/app/services/payment.service.ts b/store-front/src/app/services/payment.service.ts
new file mode 100644
index 0000000..ff5cdbd
--- /dev/null
+++ b/store-front/src/app/services/payment.service.ts
@@ -0,0 +1,14 @@
+import { Injectable } from '@angular/core';
+import {AppConst} from '../constants/app-const';
+import {Http, Headers} from '@angular/http';
+
+@Injectable()
+export class PaymentService {
+ private serverPath:string = AppConst.serverPath;
+
+ constructor(private http:Http) { }
+
+ getUserPaymentlist() {
+
+ }
+}
\ No newline at end of file