Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
getme
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amal
getme
Commits
2cbe65ee
Commit
2cbe65ee
authored
Mar 24, 2020
by
Adarsh K
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'adarsh' into 'master'
Adarsh See merge request
!106
parents
5b3e5c67
d1b4b96b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
29 deletions
+38
-29
addaddresss.page.ts
src/app/addaddresss/addaddresss.page.ts
+21
-21
app.component.html
src/app/app.component.html
+4
-3
cart.page.html
src/app/cart/cart.page.html
+0
-0
cart.page.ts
src/app/cart/cart.page.ts
+2
-0
changeaddress.page.ts
src/app/changeaddress/changeaddress.page.ts
+2
-0
nearby.page.ts
src/app/nearby/nearby.page.ts
+5
-5
service.service.ts
src/config/service.service.ts
+4
-0
No files found.
src/app/addaddresss/addaddresss.page.ts
View file @
2cbe65ee
...
...
@@ -19,7 +19,7 @@ export class AddaddresssPage implements OnInit {
geoLongitude
:
number
;
geoAccuracy
:
number
;
geoAddress
:
string
;
address
:
Address
=
{
address
:
Address
=
{
addressType
:
''
,
area
:
''
,
city
:
''
,
...
...
@@ -49,7 +49,7 @@ export class AddaddresssPage implements OnInit {
)
{
}
ngOnInit
()
{
}
goToPage
(
path
,
data
=
null
)
{
...
...
@@ -71,21 +71,21 @@ export class AddaddresssPage implements OnInit {
this
.
geoAccuracy
=
pos
.
coords
.
accuracy
;
this
.
getGeoencoder
(
this
.
geoLatitude
,
this
.
geoLongitude
);
}).
catch
(
err
=>
{
alert
(
'Error getting location'
+
JSON
.
stringify
(
err
));
console
.
log
(
'Error getting location'
+
JSON
.
stringify
(
err
));
});
}
getGeoencoder
(
latitude
,
longitude
)
{
console
.
log
(
'reached'
);
this
.
nativeGeocoder
.
reverseGeocode
(
latitude
,
longitude
,
this
.
geoencoderOptions
)
.
then
((
result
:
NativeGeocoderResult
[])
=>
{
console
.
log
(
result
);
this
.
geoAddress
=
this
.
generateAddress
(
result
[
0
]);
console
.
log
(
this
.
geoAddress
);
})
.
catch
((
error
:
any
)
=>
{
alert
(
'Error getting location'
+
JSON
.
stringify
(
error
));
});
.
then
((
result
:
NativeGeocoderResult
[])
=>
{
console
.
log
(
result
);
this
.
geoAddress
=
this
.
generateAddress
(
result
[
0
]);
console
.
log
(
this
.
geoAddress
);
})
.
catch
((
error
:
any
)
=>
{
console
.
log
(
'Error getting location'
+
JSON
.
stringify
(
error
));
});
}
generateAddress
(
addressObj
)
{
...
...
@@ -98,21 +98,21 @@ export class AddaddresssPage implements OnInit {
obj
.
reverse
();
for
(
const
val
in
obj
)
{
if
(
obj
[
val
].
length
)
{
address
+=
obj
[
val
]
+
', '
;
address
+=
obj
[
val
]
+
', '
;
}
}
return
address
.
slice
(
0
,
-
2
);
}
}
onAddrss
(
form
:
NgForm
)
{
this
.
submitted
=
true
;
console
.
log
(
form
.
value
);
if
(
form
.
valid
)
{
onAddrss
(
form
:
NgForm
)
{
this
.
submitted
=
true
;
console
.
log
(
form
.
value
);
this
.
register
.
createAddress
(
form
.
value
);
}
else
{
console
.
log
(
form
.
errors
);
if
(
form
.
valid
)
{
console
.
log
(
form
.
value
);
this
.
register
.
createAddress
(
form
.
value
);
}
else
{
console
.
log
(
form
.
errors
);
}
}
}
}
src/app/app.component.html
View file @
2cbe65ee
...
...
@@ -28,7 +28,8 @@
<div
class=
"sub_menu"
>
<ul
*
ngIf=
"categoryService.activecategories"
>
<ion-menu-toggle>
<li
*
ngFor=
"let category of categoryService.activecategories"
(
click
)="
goToPage
('
catstorelist
',
category
)"
>
<li
*
ngFor=
"let category of categoryService.activecategories"
(
click
)="
goToPage
('
catstorelist
',
category
)"
>
{{ category.catName }}
</li>
</ion-menu-toggle>
...
...
@@ -87,8 +88,8 @@
<img
src=
"../assets/basket.png"
alt=
"Product"
>
</div>
<div
class=
"content"
>
<h1>
Order Placed Successfully
</h1>
<p
*
ngIf=
"orderId"
>
Order ID {{orderId}}
, New Order has been successfully Placed.
</p>
<h1>
{{service.popupSub}}
</h1>
<p
*
ngIf=
"orderId"
>
Order ID {{orderId}}
, {{service.popupMsg}}
</p>
</div>
<span
(
click
)="
istoggle
();"
><img
src=
"../assets/close.png"
alt=
"Close"
></span>
...
...
src/app/cart/cart.page.html
View file @
2cbe65ee
This diff is collapsed.
Click to expand it.
src/app/cart/cart.page.ts
View file @
2cbe65ee
...
...
@@ -210,6 +210,8 @@ export class CartPage implements OnInit {
custAddress
:
this
.
addressService
.
custAddress
,
paymentMethod
:
this
.
paymentMethod
};
this
.
service
.
popupMsg
=
'New Order has been successfully Placed!'
;
this
.
service
.
popupSub
=
'Order Placed Successfully'
;
const
state
=
this
.
orderService
.
checkOut
(
this
.
cartService
.
carts
,
...
...
src/app/changeaddress/changeaddress.page.ts
View file @
2cbe65ee
...
...
@@ -211,6 +211,8 @@ export class ChangeaddressPage implements OnInit {
status
:
true
};
console
.
log
(
postData
,
orderId
);
this
.
service
.
popupMsg
=
'Order address has been changed successfully!'
;
this
.
service
.
popupSub
=
'Order Address changed'
;
This
.
addressService
.
changeAddress
(
postData
,
orderId
);
val
.
deliveryAddress
=
postData
;
This
.
service
.
set
(
'order'
,
val
);
...
...
src/app/nearby/nearby.page.ts
View file @
2cbe65ee
...
...
@@ -92,12 +92,12 @@ export class NearbyPage implements OnInit {
console
.
log
(
navigator
);
/* this.latitude = -33.87276;
this.longitude = 151.20534; */
this
.
zoom
=
24
;
this
.
zoom
=
16
;
this
.
getAddress
(
this
.
latitude
,
this
.
longitude
);
navigator
.
geolocation
.
getCurrentPosition
(
position
=>
{
this
.
latitude
=
position
.
coords
.
latitude
;
this
.
longitude
=
position
.
coords
.
longitude
;
this
.
zoom
=
24
;
this
.
zoom
=
16
;
this
.
getAddress
(
this
.
latitude
,
this
.
longitude
);
});
}
...
...
@@ -119,7 +119,7 @@ export class NearbyPage implements OnInit {
console
.
log
(
status
);
if
(
status
===
'OK'
)
{
if
(
results
[
0
])
{
this
.
zoom
=
24
;
this
.
zoom
=
16
;
this
.
address
=
results
[
0
].
formatted_address
;
console
.
log
(
this
.
address
);
}
else
{
...
...
@@ -158,8 +158,8 @@ export class NearbyPage implements OnInit {
this
.
loader
=
true
;
console
.
log
(
data
);
const
postData
:
Address
=
{
address
:
this
.
address
,
addressType
:
''
,
address
:
''
,
addressType
:
data
.
addressType
,
building
:
this
.
searchElementRef
.
nativeElement
.
value
,
landmark
:
data
.
landmark
!==
undefined
?
data
.
landmark
:
''
,
defaultVal
:
0
,
...
...
src/config/service.service.ts
View file @
2cbe65ee
...
...
@@ -9,10 +9,14 @@ import * as firebase from 'firebase';
export
class
ServiceService
{
state
:
boolean
;
distance
:
any
;
popupMsg
:
any
;
popupSub
:
any
;
constructor
(
public
storage
:
Storage
,
public
toastController
:
ToastController
)
{
this
.
popupMsg
=
''
;
this
.
popupSub
=
''
;
this
.
state
=
true
;
this
.
distance
=
10
;
this
.
storage
.
ready
().
then
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment