Commit 97cdb621 by Adarsh K

Merge branch 'arjunlatest' into 'master'

style fix See merge request !58
parents 0b541dde eb6d59e9
......@@ -397,8 +397,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
......@@ -419,14 +418,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -441,20 +438,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -584,7 +578,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -599,7 +592,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -607,14 +599,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -633,7 +623,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -714,8 +703,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -727,7 +715,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -813,8 +800,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -850,7 +836,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -870,7 +855,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -914,14 +898,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......@@ -6832,8 +6814,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
......@@ -6876,8 +6857,7 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
......@@ -6888,8 +6868,7 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -7006,8 +6985,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
......@@ -7019,7 +6997,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -7049,7 +7026,6 @@
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -7068,7 +7044,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -7162,7 +7137,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -7248,8 +7222,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -7285,7 +7258,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -7305,7 +7277,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -7349,14 +7320,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......@@ -11916,7 +11885,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -12510,8 +12478,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
......@@ -12554,8 +12521,7 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
......@@ -12566,8 +12532,7 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -12684,8 +12649,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
......@@ -12697,7 +12661,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -12727,7 +12690,6 @@
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -12746,7 +12708,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -12827,8 +12788,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -12840,7 +12800,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -12926,8 +12885,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -12963,7 +12921,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -12983,7 +12940,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -13027,14 +12983,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......
......@@ -108,4 +108,4 @@
"android"
]
}
}
\ No newline at end of file
}
......@@ -99,7 +99,8 @@ const routes: Routes = [
{ path: 'feedback', loadChildren: './feedback/feedback.module#FeedbackPageModule' },
{ path: 'address', loadChildren: './address/address.module#AddressPageModule' },
{ 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({
......
......@@ -111,7 +111,8 @@ export class AppComponent {
'address',
'forgot',
'feedback',
'wishlist'
'wishlist',
'preference'
];
const currentUrl = this.router.url.split('/');
const index = restrictedUrl.findIndex(x => x === currentUrl[1]);
......
import { Component, OnInit, ViewChild } from '@angular/core';
import { IonSlides } from '@ionic/angular';
import { Location } from '@angular/common';
import { Router, ActivatedRoute } from '@angular/router';
import { CartsService } from './../../config/cart.service';
import { OrdersService } from './../../config/order.service';
import { ModalController } from '@ionic/angular';
import { DeliverypopPage } from '../deliverypop/deliverypop.page';
import { ServiceService } from './../../config/service.service';
import { AddressService } from './../../config/address.service';
import { AddressList } from './../../config/services/address';
import { trigger, transition, animate, style } from '@angular/animations';
import { zip } from 'rxjs';
import { Component, OnInit, ViewChild } from "@angular/core";
import { IonSlides } from "@ionic/angular";
import { Location } from "@angular/common";
import { Router, ActivatedRoute } from "@angular/router";
import { CartsService } from "./../../config/cart.service";
import { OrdersService } from "./../../config/order.service";
import { ModalController } from "@ionic/angular";
import { DeliverypopPage } from "../deliverypop/deliverypop.page";
import { ServiceService } from "./../../config/service.service";
import { AddressService } from "./../../config/address.service";
import { AddressList } from "./../../config/services/address";
import { trigger, transition, animate, style } from "@angular/animations";
import { zip } from "rxjs";
@Component({
selector: 'app-cart',
templateUrl: './cart.page.html',
styleUrls: ['./cart.page.scss'],
selector: "app-cart",
templateUrl: "./cart.page.html",
styleUrls: ["./cart.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%)" }))
])
])
]
......@@ -37,6 +37,7 @@ export class CartPage implements OnInit {
loader = false;
custId: any;
custAddress: AddressList;
deliveryTime: any;
cartwizard = {
initialSlide: 0,
speed: 1000,
......@@ -60,7 +61,7 @@ export class CartPage implements OnInit {
public service: ServiceService,
public addressService: AddressService
) {
console.log('cart loaded');
console.log("cart loaded");
this.bookDate = this.formatDate();
this.currentIndex = 0;
this.count = 1;
......@@ -71,7 +72,7 @@ export class CartPage implements OnInit {
this.discount = 0;
// this.cartService.cartList();
this.loader = true;
const users = this.service.get('user').then(data => {
const users = this.service.get("user").then(data => {
if (data) {
data = JSON.parse(data);
this.custId = data.uid;
......@@ -89,7 +90,7 @@ export class CartPage implements OnInit {
}
ionViewWillEnter() {
const users = this.service.get('user').then(data => {
const users = this.service.get("user").then(data => {
if (data) {
data = JSON.parse(data);
this.cartService.cartList();
......@@ -181,7 +182,7 @@ export class CartPage implements OnInit {
const state = this.orderService
.checkOut(this.cartService.carts, otherCharges)
.then(data => {
console.log('ready for slide');
console.log("ready for slide");
const timeStamp = Math.floor(Date.now() / 1000);
this.timeinterval = setInterval(() => {
this.getDeliveryTime(timeStamp);
......@@ -189,7 +190,7 @@ export class CartPage implements OnInit {
this.slides.slideNext();
});
} else {
alert('Please choose delivery location');
alert("Please choose delivery location");
}
} else {
this.slides.slideNext();
......@@ -202,9 +203,9 @@ export class CartPage implements OnInit {
console.log(endDate);
endDate.setHours(endDate.getHours() + 1);
const t = this.getTimeRemaining(endDate, new Date());
const minutes = t.minutes < 10 ? '0' + t.minutes : t.minutes;
const seconds = t.seconds < 10 ? '0' + t.seconds : t.seconds;
this.deliveryTime = minutes + ' : ' + seconds;
const minutes = t.minutes < 10 ? "0" + t.minutes : t.minutes;
const seconds = t.seconds < 10 ? "0" + t.seconds : t.seconds;
this.deliveryTime = minutes + " : " + seconds;
if (t.t <= 0) {
clearInterval(this.timeinterval);
}
......@@ -284,33 +285,33 @@ export class CartPage implements OnInit {
formatDate() {
const date = new Date();
const months = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'June',
'July',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"June",
"July",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];
let hours = date.getHours();
const minutes = date.getMinutes();
const ampm = hours >= 12 ? 'PM' : 'AM';
const ampm = hours >= 12 ? "PM" : "AM";
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
const newminutes = minutes < 10 ? '0' + minutes : minutes;
const strTime = hours + ':' + newminutes + ' ' + ampm;
const newminutes = minutes < 10 ? "0" + minutes : minutes;
const strTime = hours + ":" + newminutes + " " + ampm;
return (
months[date.getMonth()] +
' ' +
" " +
date.getDate() +
',' +
"," +
date.getFullYear() +
' ' +
" " +
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