Commit 016250bb by Adarsh K

new changes

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