From 809a2372c43c8a32255a2c95638e5f4b30a28330 Mon Sep 17 00:00:00 2001 From: tareq89 Date: Sat, 20 Aug 2016 20:03:55 +0600 Subject: [PATCH] #115 added custom order option --- app/vendor-menu/vendor-menu.component.css | 12 +++++++++++- app/vendor-menu/vendor-menu.component.html | 13 ++++++++++++- app/vendor-menu/vendor-menu.component.ts | 18 +++++++++++------- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/app/vendor-menu/vendor-menu.component.css b/app/vendor-menu/vendor-menu.component.css index b21711f..c03abbb 100644 --- a/app/vendor-menu/vendor-menu.component.css +++ b/app/vendor-menu/vendor-menu.component.css @@ -37,6 +37,12 @@ } @media only screen and (max-width: 780px){ + + .vendor-name-div h1 { + padding: 0; + position: relative; + z-index: 2; + } .vendor-item-list { display: block; width: 100%; @@ -91,4 +97,8 @@ li a { .selected-item-img { width: 100%; margin-bottom: 20px; -} \ No newline at end of file +} + +textarea { + width: 100%; +} diff --git a/app/vendor-menu/vendor-menu.component.html b/app/vendor-menu/vendor-menu.component.html index a3265b4..7d52a2c 100644 --- a/app/vendor-menu/vendor-menu.component.html +++ b/app/vendor-menu/vendor-menu.component.html @@ -28,6 +28,18 @@

{{vendor.name}}

+
+

ADD YOUR CUSTOM ORDER

+
+
+ +
+
+ + +
+
+
@@ -55,5 +67,4 @@

{{selectedItem.Price}}

-
\ No newline at end of file diff --git a/app/vendor-menu/vendor-menu.component.ts b/app/vendor-menu/vendor-menu.component.ts index f17b46d..abe4e93 100644 --- a/app/vendor-menu/vendor-menu.component.ts +++ b/app/vendor-menu/vendor-menu.component.ts @@ -19,6 +19,7 @@ import { OrderCart } from '.././shared/model/order-cart'; export class VendorMenuComponent implements OnInit { vendor: any; selectedItem : PackageListModel; + customeOrder: string = ""; orderCart: OrderModel; @@ -35,6 +36,15 @@ export class VendorMenuComponent implements OnInit { } + addCustomOrder(){ + if(this.customeOrder){ + this.orderCart.Description = this.customeOrder; + } + } + + clear(){ + this.customeOrder = ""; + } @ViewChild('cartModal') cartModal: ModalComponent; @@ -51,9 +61,6 @@ export class VendorMenuComponent implements OnInit { this.selectedItem.Item = item.item; this.selectedItem.Price = item.price; this.selectedItem.Quantity = 1; - - console.log(this.orderCart.OrderCart.PackageList); - } addMore(){ @@ -78,12 +85,9 @@ export class VendorMenuComponent implements OnInit { addToCart(){ this.orderCart.OrderCart.PackageList.push(this.selectedItem); - this.closeCartModal(); this.selectedItem = new PackageListModel(); + this.closeCartModal(); } - - - } \ No newline at end of file