diff --git a/store-front/src/app/components/my-profile/my-profile.component.html b/store-front/src/app/components/my-profile/my-profile.component.html index 0794811..0a2755e 100644 --- a/store-front/src/app/components/my-profile/my-profile.component.html +++ b/store-front/src/app/components/my-profile/my-profile.component.html @@ -9,479 +9,489 @@
+
+
+
+ +
+
+
-
-
-
-
- - -
-
- Incorrect Password! Please enter the correct password for the current user. -
-
- Update Success! -
-
- -
User info updated.
-
-
-
- - -
-
- - +
+
+
+
+
+ + +
+
+ Incorrect Password! Please enter the correct password for the current user. +
+
+ Update Success! +
+ + +
User info updated.
+
+
+
+ + +
+
+ + +
-
-
-  Username already exists. Choose a different one. - -
-
- - -

Enter your current password to change the E-mail address or Password.

-
-
-  Email already exists. Choose a different one. - -

A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.

-
-
-   - -
-
- - -

To change the current user password, enter the new password in both fields.

-
- - -
- - -
-
- -
- - - - - - - - - - - -
Order DateOrder NumberTotalStatus
- +  Username already exists. Choose a different one. + + +
+ + +

Enter your current password to change the E-mail address or Password.

+
+
+  Email already exists. Choose a different one. + +

A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.

+
+
+   + +
+
+ + +

To change the current user password, enter the new password in both fields.

+
+ + + + + +
+
+
+ + + + + + + + + + + + - - - - - -
Order DateOrder NumberTotalStatus
+ {{order.orderDate}} - {{order.id}}{{order.orderTotal}}{{order.orderStatus}}
- -
-
-
-
-

Order Detail for purchase #{{order.id}}

-
-
-
-
-
-
Billing Details -
-
- {{order.billingAddress.billingAddressName}}
- {{order.billingAddress.billingAddressStreet1}} {{order.billingAddress.billingAddressStreet2}}
- {{order.billingAddress.billingAddressCity}}
- {{order.billingAddress.billingAddressState}}
- {{order.billingAddress.billingAddressZipcode}}
-
-
-
-
-
-
Payment Information -
-
- {{order.payment.holderName}}
- Visa
- {{order.payment.cardNumber}}
- Exp Date: {{order.payment.expiryMonth}}/{{order.payment.expiryYear}}
-
-
-
- -
-
-
Shipping Address -
-
- {{order.shippingAddress.shippingAddressName}}
- {{order.shippingAddress.shippingAddressStreet1}}' '{{order.shippingAddress.shippingAddressStreet2}}
- {{order.shippingAddress.shippingAddressCity}}
- {{order.shippingAddress.shippingAddressState}}
- {{order.shippingAddress.shippingAddressZipcode}}
-
-
-
-
-
-
-
-
-
-
-

Order summary

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Item NameItem PriceItem Quantity - Total
{{cartItem.book.title}} - {{cartItem.book.ourPrice}} - - {{cartItem.qty}} - {{cartItem.subtotal}} -
- Subtotal{{order.orderTotal}} -
Tax - {{order.orderTotal*0.06}} -
Total - {{order.orderTotal*1.06}} -
-
-
-
-
-
-
-
-
- -
-
- -
-
-
-

Default payment set successfully!

- - -
- - - - - - - - - - - - - + + +
DefaultCredit CardOperations
- - default - {{userPayment.cardName}} - - {{order.id}}{{order.orderTotal}}{{order.orderStatus}}
- -
-
- -
-
User info updated.
- -
-
* Give a name for your card:
- -
- -
-
-

Billing Address

-
-
- - -
-
- - -
-
- -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- -
-
-

Credit Card Information

-
-
-
- -
-
- - -
-
- - -
-
- -
- - +
+
+
+
+

Order Detail for purchase #{{order.id}}

-
-
-
-
-
-
- +
-
- +
+
+
Billing Details +
+
+ {{order.billingAddress.billingAddressName}} +
+ {{order.billingAddress.billingAddressStreet1}} {{order.billingAddress.billingAddressStreet2}} +
+ {{order.billingAddress.billingAddressCity}} +
+ {{order.billingAddress.billingAddressState}} +
+ {{order.billingAddress.billingAddressZipcode}} +
+
+
-
- +
+
+
Payment Information +
+
+ {{order.payment.holderName}} +
Visa +
+ {{order.payment.cardNumber}} +
+ Exp Date: {{order.payment.expiryMonth}}/{{order.payment.expiryYear}} +
+
+
+
+
+
+
Shipping Address +
+
+ {{order.shippingAddress.shippingAddressName}} +
+ {{order.shippingAddress.shippingAddressStreet1}}' '{{order.shippingAddress.shippingAddressStreet2}} +
+ {{order.shippingAddress.shippingAddressCity}} +
+ {{order.shippingAddress.shippingAddressState}} +
+ {{order.shippingAddress.shippingAddressZipcode}} +
+
+
-
-
- - +
+
+
+
+

Order summary

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Item NameItem PriceItem Quantity + Total
{{cartItem.book.title}} + {{cartItem.book.ourPrice}} + + {{cartItem.qty}} + {{cartItem.subtotal}} +
+ Subtotal{{order.orderTotal}} +
Tax + {{order.orderTotal*0.06}} +
Total + {{order.orderTotal*1.06}} +
+
+
+
-
- - - - -
- - -
-
-
-

Default shipping address set successfully!

- - -
- - - - - - - - - - - - - + + +
DefaultShipping AddressOperations
- - default - {{userShipping.userShippingStreet1}}, {{userShipping.userShippingCity}}, {{userShipping.userShippingState}} - + + + + +
+
+
+

Default payment set successfully!

+ + + + + + + + + + + + + + + + - - -
DefaultCredit CardOperations
+ + default + {{userPayment.cardName}} + - -
- - -
- -
- - -
-

Shipping Address

-
-
- - -
-
- - -
-
- -
-
-
-
- - +
+ + + + +
+
User info updated.
+ +
+
* Give a name for your card:
+ +
+ +
+
+

Billing Address

+
+
+ + +
+
+ + +
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
-
-
- - + +
+
+

Credit Card Information

+
+
+
+ +
+
+ + +
+
+ + +
+
+ +
+ + +
+
-
-
- - +
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ + +
-
-
- - - - -
- - +
+ + + + +
+ + +
+
+
+

Default shipping address set successfully!

+ + +
+ + + + + + + + + + + + + + + +
DefaultShipping AddressOperations
+ + default + {{userShipping.userShippingStreet1}}, {{userShipping.userShippingCity}}, {{userShipping.userShippingState}} + + +
+ +
+
+ +
+ + +
+

Shipping Address

+
+
+ + +
+
+ + +
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+ +
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 20e6297..203301b 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 @@ -21,6 +21,7 @@ import {Order} from '../../models/order'; export class MyProfileComponent implements OnInit { private serverPath = AppConst.serverPath; + private dataFetched=false; private loginError:boolean = false; private loggedIn = false; private credential = {'username':'', 'password':''}; @@ -260,6 +261,8 @@ export class MyProfileComponent implements OnInit { break; } } + + this.dataFetched=true; }, error => { console.log(error); @@ -304,5 +307,7 @@ export class MyProfileComponent implements OnInit { this.userShipping.userShippingState=""; this.defaultShippingSet=false; + + } }