31 changed files with 389 additions and 92 deletions
Unified View
Diff Options
-
BINShopify-Cart/bin/src/main/java/com/shopify/cart/controller/CartController.class
-
BINShopify-Cart/bin/src/main/java/com/shopify/cart/controller/ProductController.class
-
BINShopify-Cart/bin/src/main/java/com/shopify/cart/controller/UserController.class
-
BINShopify-Cart/bin/src/main/java/com/shopify/cart/model/Product.class
-
BINShopify-Cart/bin/src/main/java/com/shopify/cart/repository/CartRepository.class
-
BINShopify-Cart/bin/src/main/java/com/shopify/cart/repository/ProductRepository.class
-
10Shopify-Cart/bin/src/main/resources/application.properties
-
2Shopify-Cart/src/main/resources/application.properties
-
6ShopifyUI/proxy.conf.json
-
9ShopifyUI/src/app/app-routing.module.ts
-
5ShopifyUI/src/app/app.component.html
-
4ShopifyUI/src/app/auth/login/login.component.html
-
13ShopifyUI/src/app/auth/service/auth-guard.service.ts
-
9ShopifyUI/src/app/auth/service/auth.service.ts
-
11ShopifyUI/src/app/auth/sign-up/sign-up.component.html
-
17ShopifyUI/src/app/auth/sign-up/sign-up.component.ts
-
9ShopifyUI/src/app/components/cart/cart.component.css
-
32ShopifyUI/src/app/components/cart/cart.component.html
-
12ShopifyUI/src/app/components/cart/cart.component.ts
-
18ShopifyUI/src/app/components/home/home.component.html
-
6ShopifyUI/src/app/components/home/home.component.ts
-
18ShopifyUI/src/app/components/payments/payments.component.html
-
20ShopifyUI/src/app/components/product-detail/product-detail.component.html
-
7ShopifyUI/src/app/components/product-detail/product-detail.component.ts
-
18ShopifyUI/src/app/components/products/products.component.html
-
6ShopifyUI/src/app/components/products/products.component.ts
-
33ShopifyUI/src/app/components/userprofile/userprofile.component.css
-
121ShopifyUI/src/app/components/userprofile/userprofile.component.html
-
75ShopifyUI/src/app/components/userprofile/userprofile.component.ts
-
5ShopifyUI/src/app/service/user.service.ts
-
15ShopifyUI/src/styles.css
@ -1,14 +1,14 @@ |
|||||
{ |
{ |
||||
"/api1": { |
"/api1": { |
||||
"target": "http://10.3.117.23:8001", |
|
||||
|
"target": "http://10.3.117.22:8001", |
||||
"secure": false |
"secure": false |
||||
}, |
}, |
||||
"/api2": { |
"/api2": { |
||||
"target": "http://10.3.117.23:8002", |
|
||||
|
"target": "http://10.3.117.22:8002", |
||||
"secure": false |
"secure": false |
||||
}, |
}, |
||||
"/api3": { |
"/api3": { |
||||
"target": "http://10.3.117.23:8003", |
|
||||
|
"target": "http://10.3.117.22:8003", |
||||
"secure": false |
"secure": false |
||||
} |
} |
||||
} |
} |
||||
@ -1 +1,6 @@ |
|||||
<router-outlet></router-outlet> |
<router-outlet></router-outlet> |
||||
|
<div class="row footerDiv"> |
||||
|
<div class="col-12 text-center"> |
||||
|
<p>E Commerce Application By Sanjith Sivapuram, Prachi Chauhan, Sreenivas Jayanth</p> |
||||
|
</div> |
||||
|
</div> |
||||
@ -1,9 +1,20 @@ |
|||||
import { Injectable } from '@angular/core'; |
import { Injectable } from '@angular/core'; |
||||
|
import { Router } from '@angular/router'; |
||||
|
import { AuthService } from './auth.service'; |
||||
|
|
||||
@Injectable({ |
@Injectable({ |
||||
providedIn: 'root' |
providedIn: 'root' |
||||
}) |
}) |
||||
export class AuthGuardService { |
export class AuthGuardService { |
||||
|
|
||||
constructor() { } |
|
||||
|
status: Boolean; |
||||
|
constructor(private authService: AuthService, private route: Router) { } |
||||
|
|
||||
|
canActivate(): Boolean { |
||||
|
this.status = this.authService.isAuthenticated(); |
||||
|
if (this.status == false) { |
||||
|
this.route.navigateByUrl("/login"); |
||||
|
} |
||||
|
return true; |
||||
|
} |
||||
} |
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
.activeBtn { |
||||
|
background-color: #1B4F72; |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
.container { |
||||
|
margin: 0px auto; |
||||
|
} |
||||
|
|
||||
|
.userData h5{ |
||||
|
color: #1B4F72; |
||||
|
border-bottom: 1px solid lightgray; |
||||
|
} |
||||
|
|
||||
|
.userData h6{ |
||||
|
color: #1B4F72; |
||||
|
} |
||||
|
|
||||
|
.user_Form input { |
||||
|
width: 100%; |
||||
|
height: 45px; |
||||
|
padding: 12px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.user_Form button { |
||||
|
border: none; |
||||
|
background-color: #1F618D; |
||||
|
color: white; |
||||
|
padding: 12px 16px; |
||||
|
float: right; |
||||
|
width: 20%; |
||||
|
} |
||||
@ -1 +1,120 @@ |
|||||
<p>userprofile works!</p> |
|
||||
|
<div class="row navbar text-right"> |
||||
|
<div class="col-1"></div> |
||||
|
<div class="col-5"> |
||||
|
<h2>Shopify</h2> |
||||
|
</div> |
||||
|
<div class="col-1"> |
||||
|
<a routerLink="/home"><i class="bi bi-house"></i></a> |
||||
|
</div> |
||||
|
<div class="col-1"> |
||||
|
<a routerLink="/products"><i class="bi bi-box-seam"></i></a> |
||||
|
</div> |
||||
|
<div class="col-1"> |
||||
|
<a routerLink="/cart/{{uid}}"><i class="bi bi-cart3"></i> {{cartNo}}</a> |
||||
|
</div> |
||||
|
<div class="col-3 loginbtn"> |
||||
|
<ng-container *ngIf="authcode == null;then loginmsg else logoutmsg"></ng-container> |
||||
|
<ng-template #logoutmsg> |
||||
|
<div ngbDropdown class="d-inline-block"> |
||||
|
<button class="btn dropBtn" id="dropdownBasic1" ngbDropdownToggle><i class="bi bi-person"></i>Welcome {{username}}</button> |
||||
|
<div ngbDropdownMenu aria-labelledby="dropdownBasic1"> |
||||
|
<button ngbDropdownItem disabled class="usernameBtn">Hello {{username}}</button> |
||||
|
<hr> |
||||
|
<button ngbDropdownItem routerLink="/personalDetails/{{uid}}" class="activeBtn">Personal details</button> |
||||
|
<button ngbDropdownItem>Orders</button> |
||||
|
<button ngbDropdownItem (click)="onLogout()">Logout</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</ng-template> |
||||
|
<ng-template #loginmsg> |
||||
|
<a routerLink="/login">Login To Continue</a> |
||||
|
</ng-template> |
||||
|
</div> |
||||
|
<div class="col-1"></div> |
||||
|
</div> |
||||
|
<br><br><br> |
||||
|
<div class="row container user_Form"> |
||||
|
<div class="col-12"> |
||||
|
<form [formGroup]='userForm' (submit)='onUserFormSubmit()'> |
||||
|
<div class="row userData"> |
||||
|
<div class="col-12"> |
||||
|
<h5>Personal Information</h5> |
||||
|
<br> |
||||
|
<h6>Name</h6> |
||||
|
<input type="text" placeholder="Enter Name" formControlName="name" /> |
||||
|
<div *ngIf="userForm.controls['name'].invalid && (userForm.controls['name'].touched || userForm.controls['name'].dirty)"> |
||||
|
<p>Invalid Name</p> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
<h6>Username</h6> |
||||
|
<input type="text" placeholder="Enter Username" formControlName="username" /> |
||||
|
<div *ngIf="userForm.controls['username'].invalid && (userForm.controls['username'].touched || userForm.controls['username'].dirty)"> |
||||
|
<p>Invalid Username</p> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
<h6>Mobile Number</h6> |
||||
|
<input type="text" placeholder="Enter Mobile Number" formControlName="mobileNumber" /> |
||||
|
<div *ngIf="userForm.controls['mobileNumber'].invalid && (userForm.controls['mobileNumber'].touched || userForm.controls['mobileNumber'].dirty)"> |
||||
|
<p>Invalid Mobile Number</p> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
<h6>Email</h6> |
||||
|
<input type="email" placeholder="Enter Email Id" formControlName="emailId" /> |
||||
|
<div *ngIf="userForm.controls['emailId'].invalid && (userForm.controls['emailId'].touched || userForm.controls['emailId'].dirty)"> |
||||
|
<p>Invalid Email</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
<div class="row userData"> |
||||
|
<div class="col-12"> |
||||
|
<h5>Location Details</h5> |
||||
|
<br> |
||||
|
<h6>Address</h6> |
||||
|
<input type="text" placeholder="Enter Address" formControlName="address" /> |
||||
|
<div *ngIf="userForm.controls['address'].invalid && (userForm.controls['address'].touched || userForm.controls['address'].dirty)"> |
||||
|
<p>Invalid Address</p> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
<div class="row"> |
||||
|
<div class="col-6"> |
||||
|
<h6>City</h6> |
||||
|
<input type="text" placeholder="Enter City" formControlName="city" /> |
||||
|
<div *ngIf="userForm.controls['city'].invalid && (userForm.controls['city'].touched || userForm.controls['city'].dirty)"> |
||||
|
<p>Invalid City</p> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
</div> |
||||
|
<div class="col-6"> |
||||
|
<h6>State</h6> |
||||
|
<input type="text" placeholder="Enter State" formControlName="state" /> |
||||
|
<div *ngIf="userForm.controls['state'].invalid && (userForm.controls['state'].touched || userForm.controls['state'].dirty)"> |
||||
|
<p>Invalid State</p> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-6"> |
||||
|
<h6>Country</h6> |
||||
|
<input type="text" placeholder="Enter Country" formControlName="country" /> |
||||
|
<div *ngIf="userForm.controls['country'].invalid && (userForm.controls['country'].touched || userForm.controls['country'].dirty)"> |
||||
|
<p>Invalid Country</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-6"> |
||||
|
<h6>PinCode</h6> |
||||
|
<input type="text" placeholder="Enter Pin Code" formControlName="pinCode" /> |
||||
|
<div *ngIf="userForm.controls['pinCode'].invalid && (userForm.controls['pinCode'].touched || userForm.controls['pinCode'].dirty)"> |
||||
|
<p>Invalid PinCode</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<BR><BR> |
||||
|
<button [disabled]='!userForm.valid'>Submit</button> |
||||
|
</form> |
||||
|
<br><br><br> |
||||
|
</div> |
||||
|
</div> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue