From 2b31a59830d80bcfb3aa95b7fd7fcef29c3e6ea3 Mon Sep 17 00:00:00 2001 From: Gaurav Daharia <59254@hexaware.com> Date: Sun, 19 Sep 2021 15:15:56 +0530 Subject: [PATCH 1/4] minor routing changed and css --- Angular-UrbanBazaar/angular.json | 6 ++++-- Angular-UrbanBazaar/proxy.config.json | 19 +++++++++++++++++++ .../app/components/cart/cart.component.css | 13 +++++-------- .../app/components/cart/cart.component.html | 10 +++++----- .../app/components/home/home.component.css | 1 + .../src/app/services/cart.service.ts | 2 +- .../src/app/services/member-user.service.ts | 2 +- .../src/app/services/orders.service.ts | 2 +- .../app/services/product-category.service.ts | 2 +- .../src/app/services/product.service.ts | 2 +- .../src/app/services/user.service.ts | 2 +- 11 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 Angular-UrbanBazaar/proxy.config.json diff --git a/Angular-UrbanBazaar/angular.json b/Angular-UrbanBazaar/angular.json index 063ac34..5e7a85b 100644 --- a/Angular-UrbanBazaar/angular.json +++ b/Angular-UrbanBazaar/angular.json @@ -69,10 +69,12 @@ "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "browserTarget": "Angular-UrbanBazaar:build:production" + "browserTarget": "Angular-UrbanBazaar:build:production", + "proxyConfig": "proxy.config.json" }, "development": { - "browserTarget": "Angular-UrbanBazaar:build:development" + "browserTarget": "Angular-UrbanBazaar:build:development", + "proxyConfig": "proxy.config.json" } }, "defaultConfiguration": "development" diff --git a/Angular-UrbanBazaar/proxy.config.json b/Angular-UrbanBazaar/proxy.config.json new file mode 100644 index 0000000..14dded7 --- /dev/null +++ b/Angular-UrbanBazaar/proxy.config.json @@ -0,0 +1,19 @@ +{ + "/products":{ + "target":"http://10.3.117.7:8002", + "secure":false + }, + "/user":{ + "target":"http://10.3.117.7:8006", + "secure":false + }, + "/orders":{ + "target":"http://10.3.117.7:8003", + "secure":false + }, + "/cart":{ + "target":"http://10.3.117.7:8004", + "secure":false + } + +} \ No newline at end of file diff --git a/Angular-UrbanBazaar/src/app/components/cart/cart.component.css b/Angular-UrbanBazaar/src/app/components/cart/cart.component.css index cb78379..69ce603 100644 --- a/Angular-UrbanBazaar/src/app/components/cart/cart.component.css +++ b/Angular-UrbanBazaar/src/app/components/cart/cart.component.css @@ -29,11 +29,8 @@ h4,h6{ align-items: center; } -/* .center .btn{ - font-size: 14px !important; - margin-top: 20px !important; - font-weight: 400; - padding: 12px 72px; - border-radius: 3px !important; - -} */ +.CartButtons{ + border-radius: 15px; + border-color:antiquewhite ; + background-color: beige; +} \ No newline at end of file diff --git a/Angular-UrbanBazaar/src/app/components/cart/cart.component.html b/Angular-UrbanBazaar/src/app/components/cart/cart.component.html index b5224d4..a9bd096 100644 --- a/Angular-UrbanBazaar/src/app/components/cart/cart.component.html +++ b/Angular-UrbanBazaar/src/app/components/cart/cart.component.html @@ -18,14 +18,14 @@ {{c.productname}} {{c.productprice}} - + - - - + + + Grand Total : Rs.{{grandTotal}} @@ -46,7 +46,7 @@ alt="">

Your cart is empty!

Add item to it now
- + \ No newline at end of file diff --git a/Angular-UrbanBazaar/src/app/components/home/home.component.css b/Angular-UrbanBazaar/src/app/components/home/home.component.css index e0e2b2c..340a3f9 100644 --- a/Angular-UrbanBazaar/src/app/components/home/home.component.css +++ b/Angular-UrbanBazaar/src/app/components/home/home.component.css @@ -39,4 +39,5 @@ body { display: flex; justify-content: space-between; flex-grow:1; + flex-wrap: wrap; } \ No newline at end of file diff --git a/Angular-UrbanBazaar/src/app/services/cart.service.ts b/Angular-UrbanBazaar/src/app/services/cart.service.ts index 9c57534..56dcc78 100644 --- a/Angular-UrbanBazaar/src/app/services/cart.service.ts +++ b/Angular-UrbanBazaar/src/app/services/cart.service.ts @@ -9,7 +9,7 @@ import { Cart } from '../models/cart'; }) export class CartService { - private _url : String = "http://localhost:9000"; + private _url : String = "http://localhost:4405/cart"; constructor(private _http : HttpClient) { } // public showAllOrder():Observable diff --git a/Angular-UrbanBazaar/src/app/services/member-user.service.ts b/Angular-UrbanBazaar/src/app/services/member-user.service.ts index e7ba94e..a5e6fe7 100644 --- a/Angular-UrbanBazaar/src/app/services/member-user.service.ts +++ b/Angular-UrbanBazaar/src/app/services/member-user.service.ts @@ -8,7 +8,7 @@ import { MemberUser } from '../models/member-user'; }) export class MemberUserService { - private _url : String = "http://localhost:8001/user"; + private _url : String = "http://localhost:4405/user"; constructor(private _http : HttpClient) { } diff --git a/Angular-UrbanBazaar/src/app/services/orders.service.ts b/Angular-UrbanBazaar/src/app/services/orders.service.ts index 749f7ea..5c84bbf 100644 --- a/Angular-UrbanBazaar/src/app/services/orders.service.ts +++ b/Angular-UrbanBazaar/src/app/services/orders.service.ts @@ -8,7 +8,7 @@ import { Orders } from '../models/orders'; }) export class OrdersService { - private _url : String = "http://localhost:8003/orders"; + private _url : String = "http://localhost:4405/orders"; constructor(private _http : HttpClient) { } diff --git a/Angular-UrbanBazaar/src/app/services/product-category.service.ts b/Angular-UrbanBazaar/src/app/services/product-category.service.ts index c250024..f6730a7 100644 --- a/Angular-UrbanBazaar/src/app/services/product-category.service.ts +++ b/Angular-UrbanBazaar/src/app/services/product-category.service.ts @@ -8,7 +8,7 @@ import { ProductCategory } from '../models/product-category'; }) export class ProductCategoryService { - private _url : String = "http://localhost:8002/products"; + private _url : String = "http://localhost:4405/products"; constructor(private _http : HttpClient) { } diff --git a/Angular-UrbanBazaar/src/app/services/product.service.ts b/Angular-UrbanBazaar/src/app/services/product.service.ts index 435bbde..b47ae52 100644 --- a/Angular-UrbanBazaar/src/app/services/product.service.ts +++ b/Angular-UrbanBazaar/src/app/services/product.service.ts @@ -8,7 +8,7 @@ import {map} from 'rxjs/operators'; providedIn: 'root' }) export class ProductService { - private _url : String = "http://localhost:8002/products"; + private _url : String = "http://localhost:4405/products"; search : string; constructor(private _http : HttpClient) { } diff --git a/Angular-UrbanBazaar/src/app/services/user.service.ts b/Angular-UrbanBazaar/src/app/services/user.service.ts index 083caae..eba6ae2 100644 --- a/Angular-UrbanBazaar/src/app/services/user.service.ts +++ b/Angular-UrbanBazaar/src/app/services/user.service.ts @@ -9,7 +9,7 @@ import { User } from '../models/user'; }) export class UserService { - private _url : String = "http://localhost:8001/user"; + private _url : String = "http://localhost:4405/user"; currentUser : User; constructor(private _http : HttpClient) { } From 9f60411dfe5d0c78f9b600ae87f2ed5eddeb1eef Mon Sep 17 00:00:00 2001 From: Gowrisankar Date: Mon, 20 Sep 2021 10:17:42 +0530 Subject: [PATCH 2/4] Update 'grocery_db_tables.sql' --- grocery_db_tables.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/grocery_db_tables.sql b/grocery_db_tables.sql index 023e238..9b624ff 100644 --- a/grocery_db_tables.sql +++ b/grocery_db_tables.sql @@ -140,9 +140,10 @@ SELECT * FROM orders; -- Members Table Schema create table `members`( - `UserID` int(11) NOT NULL, - `MemberID` int(11) not null, + `UserID` int(11) NOT NULL, + `MemberID` int(11) not null, `MemberName` varchar(20) not null, + `MemberDoorNumber` int(4) not null, `TotalItems` int(3) not null default 0, `MemberPhone` varchar(15) not null, `MemberTotalAmount` float not null default 0, @@ -158,7 +159,7 @@ select * from members; -- Cart Table Schema CREATE TABLE IF NOT EXISTS `cart` ( - `CartID` int NOT NULL, + `CartID` int NOT NULL, `UserID` int NOT NULL, `OrderID` int NOT NULL, `ProductName` varchar(50) NOT NULL, From dbaa329141f72dc53555f39d16f9421275c0caa4 Mon Sep 17 00:00:00 2001 From: Gowrisankar Date: Mon, 20 Sep 2021 12:12:46 +0530 Subject: [PATCH 3/4] Update 'grocery_db_tables.sql' --- grocery_db_tables.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grocery_db_tables.sql b/grocery_db_tables.sql index 9b624ff..ed358bd 100644 --- a/grocery_db_tables.sql +++ b/grocery_db_tables.sql @@ -141,7 +141,7 @@ SELECT * FROM orders; -- Members Table Schema create table `members`( `UserID` int(11) NOT NULL, - `MemberID` int(11) not null, + `MemberID` int(11) not null AUTO_INCREMENT, `MemberName` varchar(20) not null, `MemberDoorNumber` int(4) not null, `TotalItems` int(3) not null default 0, @@ -159,7 +159,7 @@ select * from members; -- Cart Table Schema CREATE TABLE IF NOT EXISTS `cart` ( - `CartID` int NOT NULL, + `CartID` int NOT NULL AUTO_INCREMENT, `UserID` int NOT NULL, `OrderID` int NOT NULL, `ProductName` varchar(50) NOT NULL, From ba5b138becf569fbed712f3ba8c31e6cace7310c Mon Sep 17 00:00:00 2001 From: Gowrisankar Date: Mon, 20 Sep 2021 13:21:09 +0530 Subject: [PATCH 4/4] Update 'grocery_db_tables.sql' --- grocery_db_tables.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/grocery_db_tables.sql b/grocery_db_tables.sql index ed358bd..c46ee33 100644 --- a/grocery_db_tables.sql +++ b/grocery_db_tables.sql @@ -163,6 +163,7 @@ CREATE TABLE IF NOT EXISTS `cart` ( `UserID` int NOT NULL, `OrderID` int NOT NULL, `ProductName` varchar(50) NOT NULL, + `ProductPrice` int(5) NOT NULL, `Quantity` int NOT NULL, PRIMARY KEY (`CartID`), FOREIGN KEY (`UserID`) REFERENCES users(`UserID`)