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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
90 deletions
+60
-90
addaddresss.page.ts
src/app/addaddresss/addaddresss.page.ts
+5
-5
app.component.html
src/app/app.component.html
+4
-3
cart.page.html
src/app/cart/cart.page.html
+38
-77
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
...
...
@@ -71,7 +71,7 @@ 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
));
});
}
...
...
@@ -84,7 +84,7 @@ export class AddaddresssPage implements OnInit {
console
.
log
(
this
.
geoAddress
);
})
.
catch
((
error
:
any
)
=>
{
alert
(
'Error getting location'
+
JSON
.
stringify
(
error
));
console
.
log
(
'Error getting location'
+
JSON
.
stringify
(
error
));
});
}
...
...
@@ -102,9 +102,9 @@ export class AddaddresssPage implements OnInit {
}
}
return
address
.
slice
(
0
,
-
2
);
}
}
onAddrss
(
form
:
NgForm
)
{
onAddrss
(
form
:
NgForm
)
{
this
.
submitted
=
true
;
console
.
log
(
form
.
value
);
if
(
form
.
valid
)
{
...
...
@@ -113,6 +113,6 @@ onAddrss(form: NgForm) {
}
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
...
...
@@ -86,14 +86,10 @@
<h5>
<span
class=
"floatLeft"
>
ITEMS
</span>
<span
class=
"floatRight"
*
ngIf=
"cartService.cartTotal"
>
A$
{{service.formatNumber(cartService.cartTotal.toFixed(2))}}
</span
>
{{service.formatNumber(cartService.cartTotal.toFixed(2))}}
</span>
<div
class=
"clear"
></div>
</h5>
<ion-grid
class=
"p0"
*
ngIf=
"cartService.carts && cartService.carts.length > 0"
>
<ion-grid
class=
"p0"
*
ngIf=
"cartService.carts && cartService.carts.length > 0"
>
<ion-row
*
ngFor=
"let carts of cartService.carts"
>
<ion-col
size=
"6"
class=
"p0"
>
<h6
class=
"textLeft"
>
{{unEscape(carts.prodName)}}
</h6>
...
...
@@ -118,10 +114,11 @@
<ion-row>
<ion-col
class=
"p0"
>
<h6>
{{addressService.custAddress.building}},
<span
*
ngIf=
"addressService.custAddress.landmark && addressService.custAddress.landmark!==''"
>
{{addressService.custAddress.landmark}},
</span
>
<br
/>
{{addressService.custAddress.address}}
{{addressService.custAddress.building}}
<span
*
ngIf=
"addressService.custAddress.landmark && addressService.custAddress.landmark!==''"
>
,
{{addressService.custAddress.landmark}}
</span>
<!-- <br />
{{addressService.custAddress.address}} -->
</h6>
</ion-col>
</ion-row>
...
...
@@ -133,13 +130,15 @@
<div
class=
"clear"
></div>
</h5>
<div
class=
"payment_method"
>
<input
type=
"radio"
name=
"payments"
id=
"cod"
name=
"radio-group"
checked=
"true"
(
click
)="
getwaycod
()"
/>
<input
type=
"radio"
name=
"payments"
id=
"cod"
name=
"radio-group"
checked=
"true"
(
click
)="
getwaycod
()"
/>
<label
for=
"cod"
>
<p>
Credit Card
</p>
</label>
</div>
<div
class=
"payment_method"
>
<input
type=
"radio"
name=
"payments"
id=
"paypal"
name=
"radio-group"
(
click
)="
getwaypaypal
()"
/>
<input
type=
"radio"
name=
"payments"
id=
"paypal"
name=
"radio-group"
(
click
)="
getwaypaypal
()"
/>
<label
for=
"paypal"
>
<p>
PayPal
</p>
</label>
...
...
@@ -148,7 +147,8 @@
<input class="card_no borderNone widthFull" placeholder="PayPal ID" />
</div> -->
<div
class=
"payment_method"
>
<input
type=
"radio"
name=
"payments"
id=
"afterpay"
name=
"radio-group"
(
click
)="
getwayafterpay
()"
/>
<input
type=
"radio"
name=
"payments"
id=
"afterpay"
name=
"radio-group"
(
click
)="
getwayafterpay
()"
/>
<label
for=
"afterpay"
>
<p>
AfterPay
</p>
</label>
...
...
@@ -158,7 +158,8 @@
<input class="cv_number" placeholder="CVV" />
</div> -->
<div
class=
"payment_method"
>
<input
type=
"radio"
name=
"payments"
id=
"payk"
name=
"radio-group"
(
click
)="
getwaypayk
()"
/>
<input
type=
"radio"
name=
"payments"
id=
"payk"
name=
"radio-group"
(
click
)="
getwaypayk
()"
/>
<label
for=
"payk"
>
<p>
PayK
</p>
</label>
...
...
@@ -184,14 +185,14 @@
<hr
/>
<div
class=
"coupon_code"
>
<div
class=
"promo-row"
>
<input
class=
""
placeholder=
"COUPON CODE: GET50"
#
promo
/><button
class=
"add_btn apply_btn"
(
click
)="
promoApply
(
promo
.
value
)"
>
<input
class=
""
placeholder=
"COUPON CODE: GET50"
#
promo
/><button
class=
"add_btn apply_btn"
(
click
)="
promoApply
(
promo
.
value
)"
>
APPLY
</button>
</div>
<span
*
ngIf=
"discountApplied == 1"
class=
"promo-success"
>
Promocode applied successfully
</span>
<span
*
ngIf=
"discountApplied == 2"
class=
"promo-error"
>
Invalid Promocode
</span
>
<span
*
ngIf=
"discountApplied == 2"
class=
"promo-error"
>
Invalid Promocode
</span>
</div>
<br
/>
...
...
@@ -199,29 +200,25 @@
<h6>
<span
class=
"floatLeft"
>
PRODUCT COST
</span>
<span
class=
"floatRight"
*
ngIf=
"cartService.cartTotal"
>
A$
{{service.formatNumber(cartService.cartTotal.toFixed(2))}}
</span
>
{{service.formatNumber(cartService.cartTotal.toFixed(2))}}
</span>
<div
class=
"clear"
></div>
</h6>
<h6>
<span
class=
"floatLeft"
>
DELIVERY CHARGE
</span>
<span
class=
"floatRight"
*
ngIf=
"cartService.cartTotal"
>
A$
{{service.formatNumber(getDeliveryCharge(cartService.cartTotal))}}
</span
>
{{service.formatNumber(getDeliveryCharge(cartService.cartTotal))}}
</span>
<div
class=
"clear"
></div>
</h6>
<h6>
<span
class=
"floatLeft"
>
GST/TAX
</span>
<span
class=
"floatRight"
*
ngIf=
"cartService.cartTotal"
>
A$
{{service.formatNumber(getTax(cartService.cartTotal))}}
</span
>
{{service.formatNumber(getTax(cartService.cartTotal))}}
</span>
<div
class=
"clear"
></div>
</h6>
<h6
*
ngIf=
"discountApplied"
>
<span
class=
"floatLeft"
>
DISCOUNT
</span>
<span
class=
"floatRight"
>
(-) A$ {{service.formatNumber(discount)}}
</span
>
<span
class=
"floatRight"
>
(-) A$ {{service.formatNumber(discount)}}
</span>
<div
class=
"clear"
></div>
</h6>
<hr
/>
...
...
@@ -248,8 +245,7 @@
<h3>
Your order is due for delivery in
</h3>
<h1>
{{deliveryTime}}
</h1>
<button
class=
"view_order"
(
click
)="
goToPage
('
myorder
')"
>
VIEW ORDERS
</button
><br
/>
VIEW ORDERS
</button><br
/>
<button
class=
"home_btn"
(
click
)="
goToPage
('
home
')"
>
HOME
</button>
</div>
</ion-slide>
...
...
@@ -259,22 +255,14 @@
</div>
</ion-content>
<ion-footer
class=
"hide-on-keyboard-open"
>
<div
class=
"footer_btnbay"
*
ngIf=
"cartService.carts && cartService.carts.length > 0"
[
hidden
]="
currentIndex
!=
0
"
>
<div
class=
"footer_btnbay"
*
ngIf=
"cartService.carts && cartService.carts.length > 0"
[
hidden
]="
currentIndex
!=
0
"
>
<div
class=
"continue"
(
click
)="
goToPage
('
productlist
')"
>
CONTINUE SHOPPING
</div>
<div
class=
"checkout"
(
click
)="
next
(
1
)"
>
CHECKOUT
</div>
</div>
<div
class=
"footer_btn"
*
ngIf=
"cartService.carts && cartService.carts.length > 0"
[
hidden
]="
currentIndex
!=
1
"
(
click
)="
next
(
2
);"
>
<div
class=
"footer_btn"
*
ngIf=
"cartService.carts && cartService.carts.length > 0"
[
hidden
]="
currentIndex
!=
1
"
(
click
)="
next
(
2
);"
>
PAY
</div>
</ion-footer>
...
...
@@ -304,71 +292,44 @@
</ion-grid>
</div>
<ion-content
class=
"sort_wrappper"
>
<agm-map
[
zoom
]="
20
"
[
latitude
]="
lat
"
[
longitude
]="
lng
"
[
disableDefaultUI
]="
false
"
[
zoomControl
]="
false
"
[
backgroundColor
]="'
rgba
(
29
,
27
,
130
,
0
.
2
)'"
>
<agm-marker
[
latitude
]="
lat
"
[
longitude
]="
lng
"
[
iconUrl
]="
<agm-map
[
zoom
]="
20
"
[
latitude
]="
lat
"
[
longitude
]="
lng
"
[
disableDefaultUI
]="
false
"
[
zoomControl
]="
false
"
[
backgroundColor
]="'
rgba
(
29
,
27
,
130
,
0
.
2
)'"
>
<agm-marker
[
latitude
]="
lat
"
[
longitude
]="
lng
"
[
iconUrl
]="
{
url:
'./
assets
/
pin-2
.
svg
',
scaledSize:
{
width:
28
,
height:
40
}}"
></agm-marker>
}}"
></agm-marker>
</agm-map>
<div
class=
"add_address_wrapper"
>
<h5>
<span
class=
"floatLeft"
>
SELECT ADDRESS
</span>
<span
class=
"floatRight"
(
click
)="
istoggle
();
goToPage
('
nearby
')"
>
ADD NEW
</span
>
<span
class=
"floatRight"
(
click
)="
istoggle
();
goToPage
('
nearby
')"
>
ADD NEW
</span>
<div
class=
"clear"
></div>
</h5>
<ul
*
ngIf=
"addressService.addressList && addressService.addressList.length > 0"
>
<li
*
ngFor=
"let address of addressService.addressList; let i = index"
[
ngClass
]="{'
no-devlivery
'
:
!
address
.
nearest
}"
>
<ul
*
ngIf=
"addressService.addressList && addressService.addressList.length > 0"
>
<li
*
ngFor=
"let address of addressService.addressList; let i = index"
[
ngClass
]="{'
no-devlivery
'
:
!
address
.
nearest
}"
>
<h4
*
ngIf=
"address.nearest === true"
>
DELIVERS TO
</h4>
<h4
*
ngIf=
"address.nearest === false"
>
DOES NOT DELIVER TO
</h4>
<div>
{{address.default}}
<input
class=
"styled-checkbox"
name=
"addressId"
id=
"styled-checkbox-{{i}}"
type=
"radio"
(
click
)="
setDefault
(
address
.
addressId
,
i
)"
[
value
]="
address
.
addressId
"
#
addressType
/>
<input
class=
"styled-checkbox"
name=
"addressId"
id=
"styled-checkbox-{{i}}"
type=
"radio"
(
click
)="
setDefault
(
address
.
addressId
,
i
)"
[
value
]="
address
.
addressId
"
#
addressType
/>
<label
for=
"styled-checkbox-{{i}}"
>
{{address.addressType}}
</label>
</div>
<div>
<p>
{{address.building}},
<span
*
ngIf=
"address.landmark && address.landmark!==''"
>
{{address.landmark}},
</span
>
<span
*
ngIf=
"address.landmark && address.landmark!==''"
>
{{address.landmark}},
</span>
<!-- {{address.address}} -->
</p>
</div>
<div
class=
"clear"
></div>
</li>
</ul>
<div
class=
"textCenter"
*
ngIf=
"addressService.addressList && addressService.addressList.length === 0"
>
<div
class=
"textCenter"
*
ngIf=
"addressService.addressList && addressService.addressList.length === 0"
>
No Address Found
</div>
</div>
...
...
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