Commit 7f043105 by Adarsh K

Merge branch 'master' into adarsh

parents 5d7c72bf 8f97676b
......@@ -415,12 +415,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -435,17 +437,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -575,6 +580,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -589,6 +595,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -700,7 +707,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -712,6 +720,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -833,6 +842,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -1446,11 +1456,18 @@
}
},
"@ionic-native/geolocation": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@ionic-native/geolocation/-/geolocation-5.0.0.tgz",
"integrity": "sha512-gU3GNCEJgh+2KpK0Tg9l85HDMRkUWO9FAszF4UDnqAUihTQGCM0Nl+hpmEQowkM9+Him8FJ83rT82pPmnGERCA==",
"version": "5.16.0",
"resolved": "https://registry.npmjs.org/@ionic-native/geolocation/-/geolocation-5.16.0.tgz",
"integrity": "sha512-SiXjwOQ1dCfP092Op8D0naMv1fDj595MdtQRxo3Qd1w8KH49O+VFmWwJzMZ6jLAxs7x9fEqnSVO3PImFZetihg==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/google-plus": {
......@@ -1459,11 +1476,18 @@
"integrity": "sha512-YEV8Br1vWN3jLFQ8qIYOEAGqvd13f63brRfSf1EhFG2uvR3iLH6rJ2LfGrr4BUmczgdi1NDzMSpwVSK80xPffg=="
},
"@ionic-native/native-geocoder": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@ionic-native/native-geocoder/-/native-geocoder-5.0.0.tgz",
"integrity": "sha512-bL9foHNMhRHGP0oiH9jVwVhSpuGXwUdGI6in3ZDOL7QMXOHOhogua4PCpPlHMkk6w7U8ZTITp6eu/4xcZ9pUQA==",
"version": "5.16.0",
"resolved": "https://registry.npmjs.org/@ionic-native/native-geocoder/-/native-geocoder-5.16.0.tgz",
"integrity": "sha512-PzKYiQU9D0gkhzk4PjGR+RhhH4thRO9oygU3Vi4JVuq2A2b6jiOhLg6pqI4W1SrStBqYX4jwArF+bNI1qWxVMQ==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/splash-screen": {
......@@ -7087,8 +7111,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -9710,6 +9733,11 @@
"tslib": "^1.9.0"
}
},
"rxjs-compat": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.5.3.tgz",
"integrity": "sha512-BIJX2yovz3TBpjJoAZyls2QYuU6ZiCaZ+U96SmxQpuSP/qDUfiXPKOVLbThBB2WZijNHkdTTJXKRwvv5Y48H7g=="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
......@@ -12023,7 +12051,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -12123,12 +12152,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......
......@@ -100,4 +100,4 @@
"android"
]
}
}
\ No newline at end of file
}
......@@ -16,7 +16,7 @@
<div class="sidemenu_list">
<ul>
<ion-menu-toggle>
<li (click)="vieworder('home')">Shop</li>
<li (click)="vieworder('home')">Shop</li>
</ion-menu-toggle>
<li>About us</li>
<ion-menu-toggle>
......@@ -51,22 +51,22 @@
</ion-app>
<div class="common_tab" [hidden]="getState()">
<ul>
<li>
<li (click)="goToPage('home')">
<div class="icon_sec m1_icon" [class.m1_icon_act]="sec_active1" (click)="setActive1()"></div>
</li>
<li>
<li (click)="goToPage('catagory')">
<div class="icon_sec m2_icon" [class.m2_icon_act]="sec_active2" (click)="setActive2()"></div>
</li>
<li>
<li (click)="goToPage('catagory')">
<div class="icon_sec m3_icon" [class.m3_icon_act]="sec_active3" (click)="setActive3()"></div>
</li>
<li>
<!-- <li (click)="goToPage('cart')">
<div class="icon_sec m4_icon" [class.m4_icon_act]="sec_active4" (click)="setActive4()"></div>
</li>
<li>
</li> -->
<li (click)="goToPage('myorder')">
<div class="icon_sec m5_icon" [class.m5_icon_act]="sec_active5" (click)="setActive5()"></div>
</li>
<li>
<li (click)="goToPage('profile')">
<div class="icon_sec m6_icon" [class.m6_icon_act]="sec_active6" (click)="setActive6()"></div>
</li>
</ul>
......
......@@ -104,7 +104,7 @@
li {
list-style: none;
display: inline-block;
width: 16.666%;
width: 20%;
height: 100%;
text-align: center;
background-repeat: no-repeat;
......
......@@ -11,13 +11,13 @@ import { AuthService } from './../config/auth.service';
import { ServiceService } from './../config/service.service';
import { CategoriesService } from './../config/category.service';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.scss']
selector: "app-root",
templateUrl: "app.component.html",
styleUrls: ["app.component.scss"]
})
export class AppComponent {
sec_active1 = true;
sec_active2 = false;
sec_active3 = false;
......@@ -25,9 +25,9 @@ export class AppComponent {
sec_active5 = false;
sec_active6 = false;
menuw:number;
menuw: number;
constructor(
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
......@@ -36,13 +36,13 @@ export class AppComponent {
public modalController: ModalController,
public authService: AuthService,
public service: ServiceService,
public categoryService: CategoriesService
public categoryService: CategoriesService,
private route: ActivatedRoute
) {
this.initializeApp();
this.orderState();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
......@@ -59,7 +59,13 @@ export class AppComponent {
return await modal.present();
}
setActive1(){
goToPage(path, data = null) {
this.service.set("params", data);
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
setActive1() {
this.sec_active1 = !this.sec_active1;
this.sec_active2 = false;
this.sec_active3 = false;
......@@ -106,7 +112,6 @@ export class AppComponent {
this.sec_active3 = false;
this.sec_active4 = false;
this.sec_active5 = false;
}
getState() {
......@@ -114,19 +119,22 @@ export class AppComponent {
}
orderState() {
console.log('called');
const custId = 'WwHnLICVY2dvZGUHuKqasiTB91a2';
firebase.firestore().collection('orders').where('custId', '==', custId)
.onSnapshot((snapData) => {
snapData.docChanges().forEach((change) => {
if (change.type === 'modified') {
const data = change.doc.data();
if (data.orderStatus === 7) {
this.finishpop(data);
console.log("called");
const custId = "WwHnLICVY2dvZGUHuKqasiTB91a2";
firebase
.firestore()
.collection("orders")
.where("custId", "==", custId)
.onSnapshot(snapData => {
snapData.docChanges().forEach(change => {
if (change.type === "modified") {
const data = change.doc.data();
if (data.orderStatus === 7) {
this.finishpop(data);
}
}
}
});
});
});
/*
......@@ -145,19 +153,10 @@ export class AppComponent {
}
});
}); */
}
vieworder(path, data = null) {
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
goToPage(path, data = null) {
this.service.set('params', data);
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
}
......@@ -9,6 +9,7 @@
<h4>CART</h4>
</div>
<button class="nav_btn floatRight">
</button>
<div class="clear"></div>
</div>
......
......@@ -29,6 +29,7 @@
width: 20%;
display: inline-block;
font-weight: 700;
font-size: 13px;
hr {
height: 0px;
border-top: none;
......
......@@ -4,8 +4,17 @@
</button>
</ion-menu-toggle>
<div class="nav_title floatLeft">
<input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..."> </div>
<div class="nav_title floatLeft relative">
<input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()">
<div class="search_item_list" [hidden]="searchShow">
<ul>
<li>Listing 1</li>
<li>Listing 2</li>
<li>Listing 3</li>
<li>Listing 4</li>
</ul>
</div>
</div>
<button class="nav_btn nav_search floatRight">
</button>
<div class="clear"></div>
......@@ -22,7 +31,7 @@
<p class="floatRight" (click)="istoggle()">Territory Queens</p>
</ion-col>
</ion-row>
</div>
</div>
<ion-slides pager="true" *ngIf="centerService.centers && centerService.centers.length > 0">
<ion-slide *ngFor="let center of centerService.centers">
<div class="banner_slide" (click)="goToPage('storelist', center)">
......@@ -69,8 +78,8 @@
<div class="nearby_shop_list">
<ul *ngIf="centerService.nearcenters && centerService.nearcenters.length > 0">
<li *ngFor="let center of centerService.nearcenters" (click)="goToPage('storelist', center)">
<div class="nearby_image">
<div class="nearby_image">
<img [src]="center.centerImg" onerror="this.src='./../../assets/getmi_malls/mall_298/mall2.png'">
</div>
<div class="nearby_detail">
......
.search_item_list {
position: absolute;
background-color: #fff;
left: 0px;
right: 0px;
width: 100%;
margin: 0px;
top: 50px;
ul {
margin: 0px;
padding: 0px;
li {
list-style: none;
color: rgba(59, 57, 77, 1);
text-align: left;
list-style: none;
padding: 10px;
border-bottom: 1px solid #ddd;
&:hover {
background-color: rgba(59, 57, 77, 1);
color: #fff;
}
&:focus {
background-color: rgba(59, 57, 77, 1);
color: #fff;
}
}
}
}
.home_wrapper {
width: 100%;
.home_banner {
......
......@@ -10,24 +10,24 @@ import { ServiceService } from './../../config/service.service';
import { from } from 'rxjs';
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
styleUrls: ['./home.page.scss'],
selector: "app-home",
templateUrl: "./home.page.html",
styleUrls: ["./home.page.scss"],
animations: [
trigger('slideInOut', [
transition(':enter', [
style({ transform: 'translateY(100%)' }),
animate('200ms ease-in', style({ transform: 'translateY(0%)' }))
trigger("slideInOut", [
transition(":enter", [
style({ transform: "translateY(100%)" }),
animate("200ms ease-in", style({ transform: "translateY(0%)" }))
]),
transition(':leave', [
animate('200ms ease-out', style({ transform: 'translateY(100%)' }))
transition(":leave", [
animate("200ms ease-out", style({ transform: "translateY(100%)" }))
])
])
]
})
export class HomePage implements OnInit {
isShow = false;
searchShow = true;
public lat = 51.678418;
public lng = 7.809007;
......@@ -44,19 +44,23 @@ export class HomePage implements OnInit {
public shopperService: ShoppersService,
public categoriesService: CategoriesService,
public service: ServiceService
) { }
) {}
ngOnInit() {
this.menuCtrl.enable(true);
}
clickSearch() {
this.searchShow = !this.searchShow;
}
ionViewWillEnter() {
this.menuCtrl.enable(true);
}
goToPage(path, data = null) {
console.log(data);
this.service.set('params', data);
this.service.set("params", data);
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
......@@ -68,6 +72,5 @@ export class HomePage implements OnInit {
istoggle() {
this.isShow = !this.isShow;
}
}
......@@ -5,6 +5,7 @@
<div class="nav_title floatLeft">
</div>
<button class="nav_btn nav_cart floatRight" (click)="goToPage('cart')">
<div class="not">1</div>
</button>
<div class="clear"></div>
</div>
......@@ -20,8 +21,8 @@
<ion-col size="8">
<h3>{{product.prodName}}</h3>
<p><strong><span><img src="../assets/Path61_2.png"></span>0</strong>&nbsp; {{product.category}}, {{product.subCate}}
<br/>
<span *ngFor="let tag of product.tag">#{{tag}}</span>
<br/>
<span *ngFor="let tag of product.tag">#{{tag}}</span>
</p>
</ion-col>
<ion-col size="4">
......
......@@ -30,7 +30,7 @@
<li *ngFor="let product of prodService.product; let i = index">
<div class="product_image">
<img [src]="product.image" onerror="this.src='../assets/[email protected]'" (click)="prodDetails(i)">
<div class="fav_icon" (click)="changeFav(product.prodId)" *ngIf="checkFavStatus(product.prodId)">
<div class="fav_fill" (click)="changeFav(product.prodId)" *ngIf="checkFavStatus(product.prodId)">
</div>
<div class="featured_badge" *ngIf="product.featured">Featured</div>
</div>
......
......@@ -92,6 +92,18 @@
background-repeat: no-repeat;
background-size: 24px;
}
.fav_fill {
position: absolute;
top: 10px;
right: 10px;
font-size: 27px;
width: 30px;
height: 30px;
background-image: url("../../assets/fav_fill.png");
background-position: center;
background-repeat: no-repeat;
background-size: 24px;
}
img {
width: 100%;
height: 100%;
......@@ -127,10 +139,10 @@
}
}
.ellipse {
white-space: nowrap;
white-space: nowrap;
width: 180px;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
}
......
......@@ -419,6 +419,20 @@ app-deliverypop {
background-position: center;
background-repeat: no-repeat;
background-size: 25px;
position: relative;
}
.not {
background-color: rgba(59, 57, 77, 1);
color: #fff;
width: 20px;
height: 20px;
border-radius: 50%;
position: absolute;
top: 0px;
right: 0px;
font-size: 13px;
padding: 3px;
}
.nav_title {
......
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