diff --git a/src/app/cart/cart.page.html b/src/app/cart/cart.page.html
index ae53192..9be4e88 100644
--- a/src/app/cart/cart.page.html
+++ b/src/app/cart/cart.page.html
@@ -14,49 +14,51 @@
-
- {{ getMallDetails(outlet.mall_id).mall.mall_name }} > {{ getOutletDetails(outlet).outlet_name }}
-
- -
- {{ i + 1 }}. {{ getItemDetails(item).menu_item_name }}
-
- -
-
- ₹ {{ item.total_price }}
-
- -
-
-
- {{ getFormatterDateTime(item.pickup_time, 'hh:mm a') }}
- Schedule time
-
-
-
-
-
-
- -
-
-
-
-
{{ item.quantity }}
-
-
-
- -
-
-
-
-
-
-
-
- Add on
-
-
+ 0">
+
+ {{ getMallDetails(outlet.mall_id).mall.mall_name }} > {{ getOutletDetails(outlet).outlet_name }}
+
+ -
+ {{ i + 1 }}. {{ getItemDetails(item).menu_item_name }}
+
+ -
+
+ ₹ {{ item.total_price }}
+
+ -
+
+
+ {{ getFormatterDateTime(item.pickup_time, 'hh:mm a') }}
+ Schedule time
+
+
+
+
+
+
+ -
+
+
+
+
{{ item.quantity }}
+
+
+
+ -
+
+
+
+
+
+
+
+ Add on
+
+
+
diff --git a/src/app/cart/cart.page.ts b/src/app/cart/cart.page.ts
index e769ea9..7358d23 100644
--- a/src/app/cart/cart.page.ts
+++ b/src/app/cart/cart.page.ts
@@ -5,6 +5,7 @@ import { OrderService } from '../services/order.service';
import { ToastService } from '../services/toast.service';
import { ModalController } from '@ionic/angular';
import { InAppBrowserPage } from '../in-app-browser/in-app-browser.page';
+import { MallService } from '../services/mall.service';
import * as moment from 'moment';
export type ICart = {
@@ -49,7 +50,8 @@ export class CartPage implements OnInit {
private orderService: OrderService,
private toastService: ToastService,
private router: Router,
- public modalController: ModalController
+ public modalController: ModalController,
+ private mallService: MallService
) { }
ngOnInit() {
@@ -62,8 +64,12 @@ export class CartPage implements OnInit {
}
ionViewDidEnter() {
- this.fetchCartItems();
- this.allMalls = JSON.parse(localStorage.allMalls);
+ this.fetchCartItems();
+ this.mallService.allMalls().then((response) => {
+ this.allMalls = response;
+ }, (error) => {
+ console.log(error);
+ });
}
fetchCartItems() {
diff --git a/src/app/forgot-password/forgot-password.page.ts b/src/app/forgot-password/forgot-password.page.ts
index 6893f0e..0fada57 100644
--- a/src/app/forgot-password/forgot-password.page.ts
+++ b/src/app/forgot-password/forgot-password.page.ts
@@ -49,7 +49,7 @@ export class ForgotPasswordPage implements OnInit {
resetPassword() {
let credentials = {
email: this.email,
- login_type: "user",
+ login_type: "USER",
password: this.newPassword,
reEnteredPassword: this.newPassword
};
diff --git a/src/app/malls/malls.page.html b/src/app/malls/malls.page.html
index e4d2c56..c51bd92 100644
--- a/src/app/malls/malls.page.html
+++ b/src/app/malls/malls.page.html
@@ -34,10 +34,14 @@
-
-
-
-
+
+
+
+
diff --git a/src/app/malls/malls.page.scss b/src/app/malls/malls.page.scss
index 5ebcdeb..b451279 100644
--- a/src/app/malls/malls.page.scss
+++ b/src/app/malls/malls.page.scss
@@ -87,12 +87,24 @@
background-color: transparent;
border: 0;
+ &.active {
+ ion-icon {
+ box-shadow: 0px 0px 5px var(--brand-blue);
+ border-color: var(--brand-blue);
+ }
+ span {
+ color: var(--brand-blue);
+ }
+ }
+
ion-icon {
background-color: white;
border-radius: 50%;
box-shadow: 0px 0px 5px var(--brand-grey);
padding: 10px;
font-size: 35px;
+ border: 2px solid transparent;
+ transition: box-shadow 0.3s, border-color 0.3s;
}
span {
@@ -101,6 +113,7 @@
color: var(--brand-grey);
margin-top: 10px;
letter-spacing: 0.5px;
+ transition: colo 0.3s;
}
}
}
diff --git a/src/app/malls/malls.page.ts b/src/app/malls/malls.page.ts
index 513da04..75ab682 100644
--- a/src/app/malls/malls.page.ts
+++ b/src/app/malls/malls.page.ts
@@ -17,6 +17,7 @@ export class MallsPage implements OnInit {
showSearchBar: boolean = false;
selected_sort: string = null;
searchTerm: string = '';
+ selectedFoodType: string = '';
constructor(
private mallService: MallService,
@@ -24,6 +25,32 @@ export class MallsPage implements OnInit {
private toastService: ToastService
) { }
+
+ getMallsByFoodType(type: string) {
+ this.selectedFoodType = type;
+ console.log(this.tempMalls);
+ this.mallService.mallsByTypes(type).then((mallsByTypes: Array
) => {
+ let malls: any = [];
+ if (mallsByTypes.length > 0) {
+ mallsByTypes.forEach((mallLocations) => {
+ mallLocations.location.forEach((mall) => {
+ malls.push(mall);
+ });
+ });
+
+ this.allMalls = malls;
+ this.tempMalls = malls;
+
+ } else {
+ this.toastService.presentToast("No Malls of the type " + this.selectedFoodType);
+ this.allMalls = [];
+ this.tempMalls = [];
+ }
+ }, () => {
+ this.toastService.presentToast("Failed to get malls of this food type", "warning");
+ });
+ }
+
ngOnInit() {
this.getMallsByLocation();
}
@@ -71,13 +98,7 @@ export class MallsPage implements OnInit {
window.navigator['share'](shareData);
}
- }
-
- getMallsByFoodType(type: string) {
- this.mallService.mallsByTypes(type).then((data) => {
- console.log(data);
- });
- }
+ }
getMallsByLocation() {
if (navigator.geolocation) {
diff --git a/src/app/onboarding/onboarding.page.ts b/src/app/onboarding/onboarding.page.ts
index c7907dd..a4f1fc1 100644
--- a/src/app/onboarding/onboarding.page.ts
+++ b/src/app/onboarding/onboarding.page.ts
@@ -107,7 +107,7 @@ export class OnboardingPage implements OnInit {
this.authService.authenticateUser({
username: this.credentials.username,
password: this.credentials.password,
- login_type: 'user'
+ login_type: 'USER'
}).then((data: any) => {
localStorage.userInfo = JSON.stringify(data);
localStorage.access_Token = data.access_Token;
diff --git a/src/app/orders/orders.component.html b/src/app/orders/orders.component.html
index afc9e8f..ecbd64f 100644
--- a/src/app/orders/orders.component.html
+++ b/src/app/orders/orders.component.html
@@ -4,7 +4,7 @@
- -
+
-
Order ID: {{ order.orderedlist_id }}
@@ -50,7 +50,7 @@
Reorder
- Rate & Review
+ Rate & Review
diff --git a/src/app/orders/orders.component.ts b/src/app/orders/orders.component.ts
index 8025bd0..3e87a20 100644
--- a/src/app/orders/orders.component.ts
+++ b/src/app/orders/orders.component.ts
@@ -12,7 +12,6 @@ import { ToastService } from '../services/toast.service';
})
export class OrdersComponent implements OnInit {
userOrders: any = [];
- selected_order: any;
userInfo: any;
userCart: ICart = {
orderedlist: []
@@ -38,6 +37,7 @@ export class OrdersComponent implements OnInit {
submitFeedbackForOrder() {
this.tempReview.app_user.user_id = this.userInfo.id;
this.selectedOrder.rating = this.tempReview;
+ console.log(this.selectedOrder);
this.orderService.updateOrder(this.selectedOrder).then(() => {
this.selectedOrder = null;
this.tempReview = {