Commit db9ff2d9 by Adarsh K

Merge branch 'adarsh' into 'master'

new changes See merge request !109
parents e8a8a769 016250bb
......@@ -33,3 +33,4 @@ package-lock.json
Thumbs.db
dist/
UserInterfaceState.xcuserstate
config.xml
......@@ -107,5 +107,4 @@
<plugin name="cordova-plugin-nativegeocoder" spec="3.2.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-ionic-keyboard" spec="2.2.0" />
<engine name="android" spec="8.1.0" />
</widget>
......@@ -8408,9 +8408,9 @@
}
},
"nopt": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
"integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
......@@ -11377,9 +11377,9 @@
"dev": true
},
"underscore": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz",
"integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ=="
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
"integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg=="
},
"union-value": {
"version": "1.0.1",
......
......@@ -38,7 +38,7 @@
"@types/googlemaps": "^3.39.2",
"agm-direction": "^0.7.9",
"call-number": "^1.0.1",
"cordova-android": "8.1.0",
"cordova-android": "^8.1.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-googleplus": "^8.4.0",
......
......@@ -138,10 +138,10 @@ export class CartPage implements OnInit {
}
getDeliveryCharge(amount) {
if (amount >= 150) {
if (amount >= this.service.minAmount) {
this.deliveryCharge = 0;
} else {
this.deliveryCharge = 2.99;
this.deliveryCharge = this.service.deliFee;
}
return this.deliveryCharge.toFixed(2);
}
......
......@@ -23,7 +23,7 @@
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom"
[backgroundColor]="'rgba(29, 27, 130,0.2)'" (mapReady)="mapReady($event)"
(centerChange)="centerChange($event)">
<agm-marker [markerDraggable]="true" (dragEnd)="markerDragEnd($event)" [iconUrl]="
<agm-marker [markerDraggable]="true" [iconUrl]="
{
url: './assets/pin.svg',
scaledSize: {
......
......@@ -11,6 +11,8 @@ export class ServiceService {
distance: any;
popupMsg: any;
popupSub: any;
deliFee: number;
minAmount: number;
constructor(
public storage: Storage,
public toastController: ToastController
......@@ -19,15 +21,21 @@ export class ServiceService {
this.popupSub = '';
this.state = true;
this.distance = 10;
this.deliFee = 7.99;
this.minAmount = 50;
this.storage.ready().then(() => {
this.get('user');
});
this.setting().then((data) => {
this.setting().then((data: any) => {
if (data) {
this.distance = data;
this.distance = data.distance;
this.minAmount = data.minAmount;
this.deliFee = data.deliFee;
}
}).catch(err => {
this.distance = 10;
this.deliFee = 7.99;
this.minAmount = 50;
});
}
......@@ -104,7 +112,9 @@ export class ServiceService {
if (doc.exists) {
const data = doc.data();
this.distance = data.distance;
resolve(this.distance);
this.deliFee = data.deliFee;
this.minAmount = data.minAmount;
resolve(data);
}
});
});
......
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