latest
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<img src="/image/creditcard.png" class="img-responsive" />
|
||||
<img src="../../../assets/image/creditcard.png" class="img-responsive" />
|
||||
<br/>
|
||||
<div class="form-group">
|
||||
<label for="cardType">* Select Card Type:</label>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
}
|
||||
}
|
||||
16
store-front/src/app/services/payment.service.spec.ts
Normal file
16
store-front/src/app/services/payment.service.spec.ts
Normal file
@@ -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();
|
||||
}));
|
||||
});
|
||||
14
store-front/src/app/services/payment.service.ts
Normal file
14
store-front/src/app/services/payment.service.ts
Normal file
@@ -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() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user