Commit 6f5ef209 by Adarsh K

Merge branch 'master' into adarsh

parents ede6baa1 97cdb621
...@@ -397,8 +397,7 @@ ...@@ -397,8 +397,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -419,14 +418,12 @@ ...@@ -419,14 +418,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -441,20 +438,17 @@ ...@@ -441,20 +438,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -584,7 +578,6 @@ ...@@ -584,7 +578,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -599,7 +592,6 @@ ...@@ -599,7 +592,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -607,14 +599,12 @@ ...@@ -607,14 +599,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -633,7 +623,6 @@ ...@@ -633,7 +623,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -714,8 +703,7 @@ ...@@ -714,8 +703,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -727,7 +715,6 @@ ...@@ -727,7 +715,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -813,8 +800,7 @@ ...@@ -813,8 +800,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -850,7 +836,6 @@ ...@@ -850,7 +836,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -870,7 +855,6 @@ ...@@ -870,7 +855,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -914,14 +898,12 @@ ...@@ -914,14 +898,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -6832,8 +6814,7 @@ ...@@ -6832,8 +6814,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -6876,8 +6857,7 @@ ...@@ -6876,8 +6857,7 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
...@@ -6888,8 +6868,7 @@ ...@@ -6888,8 +6868,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -7006,8 +6985,7 @@ ...@@ -7006,8 +6985,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -7019,7 +6997,6 @@ ...@@ -7019,7 +6997,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -7049,7 +7026,6 @@ ...@@ -7049,7 +7026,6 @@
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -7068,7 +7044,6 @@ ...@@ -7068,7 +7044,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -7162,7 +7137,6 @@ ...@@ -7162,7 +7137,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -7248,8 +7222,7 @@ ...@@ -7248,8 +7222,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -7285,7 +7258,6 @@ ...@@ -7285,7 +7258,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -7305,7 +7277,6 @@ ...@@ -7305,7 +7277,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -7349,14 +7320,12 @@ ...@@ -7349,14 +7320,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -11916,7 +11885,6 @@ ...@@ -11916,7 +11885,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -12510,8 +12478,7 @@ ...@@ -12510,8 +12478,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -12554,8 +12521,7 @@ ...@@ -12554,8 +12521,7 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
...@@ -12566,8 +12532,7 @@ ...@@ -12566,8 +12532,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -12684,8 +12649,7 @@ ...@@ -12684,8 +12649,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -12697,7 +12661,6 @@ ...@@ -12697,7 +12661,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -12727,7 +12690,6 @@ ...@@ -12727,7 +12690,6 @@
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -12746,7 +12708,6 @@ ...@@ -12746,7 +12708,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -12827,8 +12788,7 @@ ...@@ -12827,8 +12788,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -12840,7 +12800,6 @@ ...@@ -12840,7 +12800,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -12926,8 +12885,7 @@ ...@@ -12926,8 +12885,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -12963,7 +12921,6 @@ ...@@ -12963,7 +12921,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -12983,7 +12940,6 @@ ...@@ -12983,7 +12940,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -13027,14 +12983,12 @@ ...@@ -13027,14 +12983,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
......
...@@ -99,7 +99,8 @@ const routes: Routes = [ ...@@ -99,7 +99,8 @@ const routes: Routes = [
{ path: 'feedback', loadChildren: './feedback/feedback.module#FeedbackPageModule' }, { path: 'feedback', loadChildren: './feedback/feedback.module#FeedbackPageModule' },
{ path: 'address', loadChildren: './address/address.module#AddressPageModule' }, { path: 'address', loadChildren: './address/address.module#AddressPageModule' },
{ path: 'success', loadChildren: './success/success.module#SuccessPageModule' }, { path: 'success', loadChildren: './success/success.module#SuccessPageModule' },
{ path: 'failed', loadChildren: './failed/failed.module#FailedPageModule' } { path: 'failed', loadChildren: './failed/failed.module#FailedPageModule' },
{ path: 'preference', loadChildren: './preference/preference.module#PreferencePageModule' }
]; ];
@NgModule({ @NgModule({
......
...@@ -111,7 +111,8 @@ export class AppComponent { ...@@ -111,7 +111,8 @@ export class AppComponent {
'address', 'address',
'forgot', 'forgot',
'feedback', 'feedback',
'wishlist' 'wishlist',
'preference'
]; ];
const currentUrl = this.router.url.split('/'); const currentUrl = this.router.url.split('/');
const index = restrictedUrl.findIndex(x => x === currentUrl[1]); const index = restrictedUrl.findIndex(x => x === currentUrl[1]);
......
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from "@angular/core";
import { IonSlides } from '@ionic/angular'; import { IonSlides } from "@ionic/angular";
import { Location } from '@angular/common'; import { Location } from "@angular/common";
import { Router, ActivatedRoute } from '@angular/router'; import { Router, ActivatedRoute } from "@angular/router";
import { CartsService } from './../../config/cart.service'; import { CartsService } from "./../../config/cart.service";
import { OrdersService } from './../../config/order.service'; import { OrdersService } from "./../../config/order.service";
import { ModalController } from '@ionic/angular'; import { ModalController } from "@ionic/angular";
import { DeliverypopPage } from '../deliverypop/deliverypop.page'; import { DeliverypopPage } from "../deliverypop/deliverypop.page";
import { ServiceService } from './../../config/service.service'; import { ServiceService } from "./../../config/service.service";
import { AddressService } from './../../config/address.service'; import { AddressService } from "./../../config/address.service";
import { AddressList } from './../../config/services/address'; import { AddressList } from "./../../config/services/address";
import { trigger, transition, animate, style } from '@angular/animations'; import { trigger, transition, animate, style } from "@angular/animations";
import { zip } from 'rxjs'; import { zip } from "rxjs";
@Component({ @Component({
selector: 'app-cart', selector: "app-cart",
templateUrl: './cart.page.html', templateUrl: "./cart.page.html",
styleUrls: ['./cart.page.scss'], styleUrls: ["./cart.page.scss"],
animations: [ animations: [
trigger('slideInOut', [ trigger("slideInOut", [
transition(':enter', [ transition(":enter", [
style({ transform: 'translateY(100%)' }), style({ transform: "translateY(100%)" }),
animate('200ms ease-in', style({ transform: 'translateY(0%)' })) animate("200ms ease-in", style({ transform: "translateY(0%)" }))
]), ]),
transition(':leave', [ transition(":leave", [
animate('200ms ease-out', style({ transform: 'translateY(100%)' })) animate("200ms ease-out", style({ transform: "translateY(100%)" }))
]) ])
]) ])
] ]
...@@ -37,6 +37,7 @@ export class CartPage implements OnInit { ...@@ -37,6 +37,7 @@ export class CartPage implements OnInit {
loader = false; loader = false;
custId: any; custId: any;
custAddress: AddressList; custAddress: AddressList;
deliveryTime: any;
cartwizard = { cartwizard = {
initialSlide: 0, initialSlide: 0,
speed: 1000, speed: 1000,
...@@ -61,7 +62,7 @@ export class CartPage implements OnInit { ...@@ -61,7 +62,7 @@ export class CartPage implements OnInit {
public service: ServiceService, public service: ServiceService,
public addressService: AddressService public addressService: AddressService
) { ) {
console.log('cart loaded'); console.log("cart loaded");
this.bookDate = this.formatDate(); this.bookDate = this.formatDate();
this.currentIndex = 0; this.currentIndex = 0;
this.count = 1; this.count = 1;
...@@ -72,7 +73,7 @@ export class CartPage implements OnInit { ...@@ -72,7 +73,7 @@ export class CartPage implements OnInit {
this.discount = 0; this.discount = 0;
// this.cartService.cartList(); // this.cartService.cartList();
this.loader = true; this.loader = true;
const users = this.service.get('user').then(data => { const users = this.service.get("user").then(data => {
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.custId = data.uid; this.custId = data.uid;
...@@ -90,7 +91,7 @@ export class CartPage implements OnInit { ...@@ -90,7 +91,7 @@ export class CartPage implements OnInit {
} }
ionViewWillEnter() { ionViewWillEnter() {
const users = this.service.get('user').then(data => { const users = this.service.get("user").then(data => {
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.cartService.cartList(); this.cartService.cartList();
...@@ -182,7 +183,7 @@ export class CartPage implements OnInit { ...@@ -182,7 +183,7 @@ export class CartPage implements OnInit {
const state = this.orderService const state = this.orderService
.checkOut(this.cartService.carts, otherCharges) .checkOut(this.cartService.carts, otherCharges)
.then(data => { .then(data => {
console.log('ready for slide'); console.log("ready for slide");
const timeStamp = Math.floor(Date.now() / 1000); const timeStamp = Math.floor(Date.now() / 1000);
this.timeinterval = setInterval(() => { this.timeinterval = setInterval(() => {
This.getDeliveryTime(timeStamp); This.getDeliveryTime(timeStamp);
...@@ -190,7 +191,7 @@ export class CartPage implements OnInit { ...@@ -190,7 +191,7 @@ export class CartPage implements OnInit {
this.slides.slideNext(); this.slides.slideNext();
}); });
} else { } else {
alert('Please choose delivery location'); alert("Please choose delivery location");
} }
} else { } else {
this.slides.slideNext(); this.slides.slideNext();
...@@ -203,9 +204,9 @@ export class CartPage implements OnInit { ...@@ -203,9 +204,9 @@ export class CartPage implements OnInit {
console.log(endDate); console.log(endDate);
endDate.setHours(endDate.getHours() + 1); endDate.setHours(endDate.getHours() + 1);
const t = this.getTimeRemaining(endDate, new Date()); const t = this.getTimeRemaining(endDate, new Date());
const minutes = t.minutes < 10 ? '0' + t.minutes : t.minutes; const minutes = t.minutes < 10 ? "0" + t.minutes : t.minutes;
const seconds = t.seconds < 10 ? '0' + t.seconds : t.seconds; const seconds = t.seconds < 10 ? "0" + t.seconds : t.seconds;
this.deliveryTime = minutes + ' : ' + seconds; this.deliveryTime = minutes + " : " + seconds;
if (t.t <= 0) { if (t.t <= 0) {
clearInterval(this.timeinterval); clearInterval(this.timeinterval);
} }
...@@ -285,33 +286,33 @@ export class CartPage implements OnInit { ...@@ -285,33 +286,33 @@ export class CartPage implements OnInit {
formatDate() { formatDate() {
const date = new Date(); const date = new Date();
const months = [ const months = [
'Jan', "Jan",
'Feb', "Feb",
'Mar', "Mar",
'Apr', "Apr",
'May', "May",
'June', "June",
'July', "July",
'Aug', "Aug",
'Sep', "Sep",
'Oct', "Oct",
'Nov', "Nov",
'Dec' "Dec"
]; ];
let hours = date.getHours(); let hours = date.getHours();
const minutes = date.getMinutes(); const minutes = date.getMinutes();
const ampm = hours >= 12 ? 'PM' : 'AM'; const ampm = hours >= 12 ? "PM" : "AM";
hours = hours % 12; hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12' hours = hours ? hours : 12; // the hour '0' should be '12'
const newminutes = minutes < 10 ? '0' + minutes : minutes; const newminutes = minutes < 10 ? "0" + minutes : minutes;
const strTime = hours + ':' + newminutes + ' ' + ampm; const strTime = hours + ":" + newminutes + " " + ampm;
return ( return (
months[date.getMonth()] + months[date.getMonth()] +
' ' + " " +
date.getDate() + date.getDate() +
',' + "," +
date.getFullYear() + date.getFullYear() +
' ' + " " +
strTime strTime
); );
} }
......
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { PreferencePage } from './preference.page';
const routes: Routes = [
{
path: '',
component: PreferencePage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [PreferencePage]
})
export class PreferencePageModule {}
<div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()">
<img src="../assets/Group17_2.png" />
</button>
<div class="nav_title floatLeft">
<h4>Preference</h4>
</div>
<div class="clear"></div>
</div>
<ion-content>
<div class="preference-wrapper">
<div class="pref-wrap-two">
<ion-grid>
<ion-row *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0">
<ion-col size="6" *ngFor="let categories of categoriesService.activecategories">
<div class="preference-box">
<input type="checkbox" class="preference" />
<img [src]="categories.catImage" onerror="this.src='../assets/handsome-man-outdoors-drinking-coffee-with-sunglasses-guy-with-beard-instagram-effect_1212-818@3x.png'">
<h1>{{categories.catName}}</h1>
</div>
</ion-col>
</ion-row>
</ion-grid>
</div>
<div class="bottom-button">
<button class="show-btn" (click)="goToPage('nearby')">
Continue
</button>
<span>SKIP</span>
</div>
</div>
</ion-content>
\ No newline at end of file
.preference-wrapper {
padding: 20px 20px 110px 20px;
.bottom-button {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
padding: 20px;
text-align: center;
z-index: 2;
button {
width: 100%;
background-color: #29285b;
color: #fff;
border-radius: 8px;
height: 45px;
font-size: 16px;
text-transform: uppercase;
}
span {
text-transform: uppercase;
font-size: 16px;
text-align: center;
margin-top: 10px;
display: inline-block;
font-weight: 600;
}
}
.pref-wrap-two {
.preference-box {
width: 100%;
position: relative;
img {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
object-fit: cover;
}
h1 {
color: #fff;
position: absolute;
bottom: 0px;
left: 14px;
font-size: 14px;
text-transform: uppercase;
z-index: 2;
}
.preference {
-webkit-appearance: none;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
width: 100%;
height: 90px;
padding: 17px;
outline: none;
-webkit-transition: all 0.6s ease-in-out;
transition: all 0.6s ease-in-out;
position: relative;
display: block;
z-index: 9;
}
&:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.46);
z-index: 1;
}
}
.preference:checked {
&:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
background-color: rgba(41, 40, 91, 0.52);
z-index: 9;
}
}
}
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PreferencePage } from './preference.page';
describe('PreferencePage', () => {
let component: PreferencePage;
let fixture: ComponentFixture<PreferencePage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PreferencePage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PreferencePage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from "@angular/core";
import { CategoriesService } from "./../../config/category.service";
import { ServiceService } from "./../../config/service.service";
@Component({
selector: "app-preference",
templateUrl: "./preference.page.html",
styleUrls: ["./preference.page.scss"]
})
export class PreferencePage implements OnInit {
constructor(
private categoriesService: CategoriesService,
private service: ServiceService
) {}
ngOnInit() {}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment