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
02813e62
Commit
02813e62
authored
Mar 06, 2020
by
Arjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android
parent
a49fe93e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
43 deletions
+42
-43
app.component.html
src/app/app.component.html
+1
-2
app.component.ts
src/app/app.component.ts
+10
-7
cart.page.html
src/app/cart/cart.page.html
+12
-24
cart.page.scss
src/app/cart/cart.page.scss
+4
-3
cart.page.ts
src/app/cart/cart.page.ts
+14
-6
productlist.page.scss
src/app/productlist/productlist.page.scss
+1
-1
No files found.
src/app/app.component.html
View file @
02813e62
...
...
@@ -28,8 +28,7 @@
<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>
...
...
src/app/app.component.ts
View file @
02813e62
...
...
@@ -3,6 +3,7 @@ import { Router, ActivatedRoute } from '@angular/router';
import
{
Platform
,
Events
}
from
'@ionic/angular'
;
import
{
SplashScreen
}
from
'@ionic-native/splash-screen/ngx'
;
import
{
StatusBar
}
from
'@ionic-native/status-bar/ngx'
;
import
{
AngularFirestore
,
AngularFirestoreDocument
,
...
...
@@ -16,7 +17,7 @@ import { ServiceService } from './../config/service.service';
import
{
SubjectService
}
from
'./../config/subject.service'
;
import
{
CategoriesService
}
from
'./../config/category.service'
;
import
{
SearchmodalPage
}
from
'./searchmodal/searchmodal.page'
;
import
{
Location
}
from
'@angular/common'
;
import
{
trigger
,
transition
,
animate
,
style
}
from
'@angular/animations'
;
import
{
NavigationBar
}
from
'@ionic-native/navigation-bar/ngx'
;
@
Component
({
...
...
@@ -67,11 +68,14 @@ export class AppComponent {
public
categoryService
:
CategoriesService
,
public
subjectService
:
SubjectService
,
private
route
:
ActivatedRoute
,
private
navigationBar
:
NavigationBar
private
navigationBar
:
NavigationBar
,
private
location
:
Location
,
private
events
:
Events
)
{
console
.
log
(
this
.
router
.
url
);
setInterval
(()
=>
{
console
.
log
(
window
.
location
.
href
);
},
1000
);
this
.
state
=
true
;
this
.
initializeApp
();
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
state
=
loginData
;
...
...
@@ -96,9 +100,7 @@ export class AppComponent {
});
}
ionViewWillEnter
()
{
alert
(
'enter'
);
}
ionViewDidEnter
()
{}
initializeApp
()
{
this
.
platform
.
ready
().
then
(()
=>
{
...
...
@@ -144,6 +146,7 @@ export class AppComponent {
'review'
];
const
currentUrl
=
this
.
router
.
url
.
split
(
'/'
);
console
.
log
(
currentUrl
);
const
index
=
restrictedUrl
.
findIndex
(
x
=>
x
===
currentUrl
[
1
]);
// console.log(currentUrl[1], index, this.state);
if
(
index
>
-
1
||
this
.
tabData
===
false
)
{
...
...
src/app/cart/cart.page.html
View file @
02813e62
...
...
@@ -59,8 +59,8 @@
<p
class=
"textLeft"
>
Total Price:
</p>
</ion-col>
<ion-col>
<p
class=
"textRight"
>
A$
{{service.formatNumber(cartService.cartTotal.toFixed(2))}}
</p>
<p
class=
"textRight"
>
A$
{{service.formatNumber(cartService.cartTotal.toFixed(2))}}
</p>
</ion-col>
</ion-row>
</div>
...
...
@@ -104,8 +104,7 @@
<ion-row>
<ion-col
class=
"p0"
>
<h6>
{{addressService.custAddress.building}},
<br
/>
{{addressService.custAddress.landmark}},
{{addressService.custAddress.building}},
<br
/>
{{addressService.custAddress.landmark}},
<br
/>
{{addressService.custAddress.address}}
</h6>
</ion-col>
...
...
@@ -125,8 +124,7 @@
</label>
</div> -->
<div
class=
"payment_method"
>
<input
type=
"radio"
name=
"payments"
id=
"paypal"
name=
"radio-group"
(
click
)="
getwaypaypal
()"
checked=
"true"
/>
<input
type=
"radio"
name=
"payments"
id=
"paypal"
name=
"radio-group"
(
click
)="
getwaypaypal
()"
checked=
"true"
/>
<label
for=
"paypal"
>
<p>
PayPal
</p>
</label>
...
...
@@ -135,8 +133,7 @@
<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>
...
...
@@ -146,8 +143,7 @@
<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>
...
...
@@ -173,8 +169,7 @@
<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>
...
...
@@ -247,13 +242,10 @@
</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>
<!-- <div class="footer_btn" [hidden]="currentIndex != 2" (click)="finishpop()">
FINISH
</div> -->
</ion-footer>
<div
class=
"loader"
*
ngIf=
"loader"
>
<div
class=
"lds-ripple"
>
...
...
@@ -273,8 +265,7 @@
<div
class=
"clear"
></div>
</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-map
[
zoom
]="
20
"
[
latitude
]="
lat
"
[
longitude
]="
lng
"
[
disableDefaultUI
]="
false
"
[
zoomControl
]="
false
"
[
backgroundColor
]="'
rgba
(
29
,
27
,
130
,
0
.
2
)'"
>
<agm-marker
[
latitude
]="
lat
"
[
longitude
]="
lng
"
></agm-marker>
</agm-map>
<div
class=
"add_address_wrapper"
>
...
...
@@ -287,9 +278,7 @@
<li
*
ngFor=
"let address of addressService.nearestList; let i = index"
>
<div
class=
"floatLeft"
>
{{address.default}}
<input
class=
"styled-checkbox"
name=
"addressId"
id=
"styled-checkbox-{{i}}"
type=
"radio"
(
click
)="
setDefault
(
address
.
addressId
,
i
)"
[
value
]="
address
.
addressId
"
#
addressType
[
checked
]="
address
.
defaultVal =
=
1
"
/>
<input
class=
"styled-checkbox"
name=
"addressId"
id=
"styled-checkbox-{{i}}"
type=
"radio"
(
click
)="
setDefault
(
address
.
addressId
,
i
)"
[
value
]="
address
.
addressId
"
#
addressType
[
checked
]="
address
.
defaultVal =
=
1
"
/>
<label
for=
"styled-checkbox-{{i}}"
>
{{address.addressType}}
</label>
</div>
<div
class=
"floatLeft"
>
...
...
@@ -300,8 +289,7 @@
<div
class=
"clear"
></div>
</li>
</ul>
<div
class=
"textCenter"
*
ngIf=
"addressService.nearestList && addressService.nearestList.length === 0"
>
No
Address Found in the nearest center
</div>
<div
class=
"textCenter"
*
ngIf=
"addressService.nearestList && addressService.nearestList.length === 0"
>
No Address Found in the nearest center
</div>
</div>
<!-- <div class="loader" *ngIf="loader">
...
...
src/app/cart/cart.page.scss
View file @
02813e62
.cart_wrapper
{
width
:
100%
;
height
:
100%
;
.cart_head
{
width
:
100%
;
height
:
220px
;
...
...
@@ -456,7 +457,7 @@
text-align
:
center
;
color
:
#fff
;
font-size
:
18px
;
padding
:
1
5
px
;
padding
:
1
0
px
;
font-weight
:
300
;
border-top-left-radius
:
15px
;
border-top-right-radius
:
15px
;
...
...
@@ -474,7 +475,7 @@
border-top-left-radius
:
15px
;
text-align
:
center
;
font-size
:
18px
;
padding
:
1
5
px
;
padding
:
1
0
px
;
font-weight
:
300
;
float
:
left
;
border-top
:
1px
solid
#d7d5e4
;
...
...
@@ -488,7 +489,7 @@
text-align
:
center
;
color
:
#fff
;
font-size
:
18px
;
padding
:
1
5
px
;
padding
:
1
0
px
;
font-weight
:
300
;
float
:
right
;
}
...
...
src/app/cart/cart.page.ts
View file @
02813e62
...
...
@@ -10,6 +10,7 @@ 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
{
Events
}
from
'@ionic/angular'
;
import
{
zip
}
from
'rxjs'
;
@
Component
({
...
...
@@ -60,7 +61,8 @@ export class CartPage implements OnInit {
public
orderService
:
OrdersService
,
public
modalController
:
ModalController
,
public
service
:
ServiceService
,
public
addressService
:
AddressService
public
addressService
:
AddressService
,
private
event
:
Events
)
{
console
.
log
(
'cart loaded'
);
this
.
bookDate
=
this
.
formatDate
();
...
...
@@ -95,7 +97,6 @@ export class CartPage implements OnInit {
setTimeout(() => {
this.setAddress();
}, 1000); */
}
ionViewWillEnter
()
{
...
...
@@ -159,6 +160,7 @@ export class CartPage implements OnInit {
}
goBack
()
{
this
.
event
.
publish
(
'home'
);
this
.
location
.
back
();
}
...
...
@@ -192,11 +194,15 @@ export class CartPage implements OnInit {
paymentMethod
:
this
.
paymentMethod
};
const
state
=
this
.
orderService
.
checkOut
(
this
.
cartService
.
carts
,
otherCharges
,
this
.
addressService
.
centerLoc
)
.
checkOut
(
this
.
cartService
.
carts
,
otherCharges
,
this
.
addressService
.
centerLoc
)
.
then
(
data
=>
{
this
.
cartService
.
cartCenter
=
''
;
const
cartCount
=
this
.
orderService
.
cartCount
;
const
timer
=
(
(
cartCount
-
1
)
*
20
)
+
60
;
const
timer
=
(
cartCount
-
1
)
*
20
+
60
;
const
totalTime
=
this
.
add_minutes
(
timer
);
console
.
log
(
'ready for slide'
);
this
.
timeinterval
=
setInterval
(()
=>
{
...
...
@@ -232,7 +238,7 @@ export class CartPage implements OnInit {
getTimeRemaining
(
endtime
,
currDate
)
{
const
t
=
Date
.
parse
(
endtime
)
-
Date
.
parse
(
currDate
);
const
hours
=
Math
.
floor
((
((
t
/
1000
)
/
60
)
/
60
)
%
60
);
const
hours
=
Math
.
floor
((
t
/
1000
/
60
/
60
)
%
60
);
const
seconds
=
Math
.
floor
((
t
/
1000
)
%
60
);
const
minutes
=
Math
.
floor
((
t
/
1000
/
60
)
%
60
);
return
{
...
...
@@ -290,7 +296,9 @@ export class CartPage implements OnInit {
if
(
value
[
0
].
type
===
1
)
{
const
rate
=
value
[
0
].
amount
;
const
upto
=
value
[
0
].
amount
;
const
percentage
=
Math
.
round
((
this
.
cartService
.
cartTotal
*
rate
)
/
100
).
toFixed
(
2
);
const
percentage
=
Math
.
round
(
(
this
.
cartService
.
cartTotal
*
rate
)
/
100
).
toFixed
(
2
);
this
.
discount
=
percentage
>
upto
?
upto
:
percentage
;
}
else
{
this
.
discount
=
value
[
0
].
amount
;
...
...
src/app/productlist/productlist.page.scss
View file @
02813e62
...
...
@@ -141,7 +141,7 @@
}
.ellipse
{
white-space
:
nowrap
;
width
:
1
8
0px
;
width
:
1
5
0px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
...
...
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