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
5ef7866a
Commit
5ef7866a
authored
Feb 14, 2020
by
Adarsh K
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codes-changes
parent
e14d56c1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
59 additions
and
16 deletions
+59
-16
app.module.ts
src/app/app.module.ts
+4
-1
catagory.page.ts
src/app/catagory/catagory.page.ts
+18
-1
home.page.ts
src/app/home/home.page.ts
+2
-0
productdetail.page.html
src/app/productdetail/productdetail.page.html
+3
-3
productdetail.page.ts
src/app/productdetail/productdetail.page.ts
+1
-0
productlist.page.html
src/app/productlist/productlist.page.html
+1
-1
searchmodal.page.html
src/app/searchmodal/searchmodal.page.html
+1
-2
searchmodal.page.ts
src/app/searchmodal/searchmodal.page.ts
+2
-0
order.service.ts
src/config/order.service.ts
+7
-7
safehtml.ts
src/config/safehtml.ts
+16
-0
shopper.ts
src/config/services/shopper.ts
+1
-0
shopper.service.ts
src/config/shopper.service.ts
+3
-0
index.html
src/index.html
+0
-1
No files found.
src/app/app.module.ts
View file @
5ef7866a
...
@@ -30,6 +30,8 @@ import { FormsModule } from '@angular/forms';
...
@@ -30,6 +30,8 @@ import { FormsModule } from '@angular/forms';
import
{
SearchmodalPageModule
}
from
'./searchmodal/searchmodal.module'
;
import
{
SearchmodalPageModule
}
from
'./searchmodal/searchmodal.module'
;
import
{
SocialSharing
}
from
'@ionic-native/social-sharing/ngx'
;
import
{
SocialSharing
}
from
'@ionic-native/social-sharing/ngx'
;
import
{
CallNumber
}
from
'@ionic-native/call-number/ngx'
;
import
{
CallNumber
}
from
'@ionic-native/call-number/ngx'
;
import
{
sanitizeHtmlPipe
}
from
'./../config/safehtml'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
AppComponent
],
declarations
:
[
AppComponent
],
entryComponents
:
[],
entryComponents
:
[],
...
@@ -57,7 +59,8 @@ import { CallNumber } from '@ionic-native/call-number/ngx';
...
@@ -57,7 +59,8 @@ import { CallNumber } from '@ionic-native/call-number/ngx';
ServiceService
,
ServiceService
,
AuthService
,
AuthService
,
GooglePlus
,
GooglePlus
,
SocialSharing
SocialSharing
,
sanitizeHtmlPipe
],
],
bootstrap
:
[
AppComponent
]
bootstrap
:
[
AppComponent
]
})
})
...
...
src/app/catagory/catagory.page.ts
View file @
5ef7866a
...
@@ -3,6 +3,10 @@ import { Router, ActivatedRoute } from '@angular/router';
...
@@ -3,6 +3,10 @@ import { Router, ActivatedRoute } from '@angular/router';
import
{
Location
}
from
'@angular/common'
;
import
{
Location
}
from
'@angular/common'
;
import
{
CategoriesService
}
from
'./../../config/category.service'
;
import
{
CategoriesService
}
from
'./../../config/category.service'
;
import
{
ServiceService
}
from
'./../../config/service.service'
;
import
{
ServiceService
}
from
'./../../config/service.service'
;
import
{
SearchmodalPage
}
from
'../searchmodal/searchmodal.page'
;
import
{
SubjectService
}
from
'./../../config/subject.service'
;
import
{
ModalController
}
from
'@ionic/angular'
;
@
Component
({
@
Component
({
selector
:
'app-catagory'
,
selector
:
'app-catagory'
,
...
@@ -15,7 +19,9 @@ export class CatagoryPage implements OnInit {
...
@@ -15,7 +19,9 @@ export class CatagoryPage implements OnInit {
public
router
:
Router
,
public
router
:
Router
,
public
location
:
Location
,
public
location
:
Location
,
public
categoriesService
:
CategoriesService
,
public
categoriesService
:
CategoriesService
,
public
service
:
ServiceService
public
service
:
ServiceService
,
private
subjectService
:
SubjectService
,
public
modalController
:
ModalController
)
{
)
{
this
.
service
.
get
(
'params'
).
then
((
val
)
=>
{
this
.
service
.
get
(
'params'
).
then
((
val
)
=>
{
this
.
data
=
val
;
this
.
data
=
val
;
...
@@ -35,4 +41,15 @@ export class CatagoryPage implements OnInit {
...
@@ -35,4 +41,15 @@ export class CatagoryPage implements OnInit {
this
.
location
.
back
();
this
.
location
.
back
();
}
}
async
searchModal
()
{
this
.
subjectService
.
setTabData
(
false
);
const
modal
=
await
this
.
modalController
.
create
({
component
:
SearchmodalPage
});
modal
.
onDidDismiss
().
then
(
dataReturned
=>
{
this
.
subjectService
.
setTabData
(
true
);
});
return
await
modal
.
present
();
}
}
}
src/app/home/home.page.ts
View file @
5ef7866a
...
@@ -77,10 +77,12 @@ export class HomePage implements OnInit {
...
@@ -77,10 +77,12 @@ export class HomePage implements OnInit {
}
}
private
setCurrentLocation
()
{
private
setCurrentLocation
()
{
const
This
=
this
;
if
(
'geolocation'
in
navigator
)
{
if
(
'geolocation'
in
navigator
)
{
navigator
.
geolocation
.
getCurrentPosition
(
position
=>
{
navigator
.
geolocation
.
getCurrentPosition
(
position
=>
{
this
.
lat
=
position
.
coords
.
latitude
;
this
.
lat
=
position
.
coords
.
latitude
;
this
.
lng
=
position
.
coords
.
longitude
;
this
.
lng
=
position
.
coords
.
longitude
;
this
.
centerService
.
getNearBy
(
this
.
lat
,
this
.
lng
,
10
);
this
.
getAddress
(
this
.
lat
,
this
.
lng
);
this
.
getAddress
(
this
.
lat
,
this
.
lng
);
});
});
}
}
...
...
src/app/productdetail/productdetail.page.html
View file @
5ef7866a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<div
class=
"product_header"
>
<div
class=
"product_header"
>
<ion-row>
<ion-row>
<ion-col
size=
"8"
>
<ion-col
size=
"8"
>
<h3
>
{{product.prodName}}
</h3>
<h3
[
innerHTML
]="
product
.
prodName
"
>
</h3>
<p>
<p>
<strong
<strong
><span><img
src=
"../assets/Path61_2.png"
/></span
><span><img
src=
"../assets/Path61_2.png"
/></span
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
</ul>
</ul>
</div> -->
</div> -->
<h5>
Description
</h5>
<h5>
Description
</h5>
<p
>
{{product.prodDesc}}
</p>
<p
[
innerHTML
]="
product
.
prodDesc
"
>
</p>
<!--<h5>
<!--<h5>
<span class="floatLeft">Reviews</span><span class="floatRight" (click)="goToPage('reviewlist')">MORE</span>
<span class="floatLeft">Reviews</span><span class="floatRight" (click)="goToPage('reviewlist')">MORE</span>
<div class="clear"></div>
<div class="clear"></div>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
(
click
)="
changeFav
(
similar
.
prodId
)"
(
click
)="
changeFav
(
similar
.
prodId
)"
></div>
></div>
</div>
</div>
<h5
>
{{similar.prodName}}
</h5>
<h5
[
innerHTML
]="
similar
.
prodName
"
>
</h5>
<p>
{{similar.price}}
</p>
<p>
{{similar.price}}
</p>
</li>
</li>
</ion-slide>
</ion-slide>
...
...
src/app/productdetail/productdetail.page.ts
View file @
5ef7866a
...
@@ -11,6 +11,7 @@ import { ServiceService } from "./../../config/service.service";
...
@@ -11,6 +11,7 @@ import { ServiceService } from "./../../config/service.service";
import
{
SocialSharing
}
from
"@ionic-native/social-sharing/ngx"
;
import
{
SocialSharing
}
from
"@ionic-native/social-sharing/ngx"
;
import
{
map
}
from
"rxjs/operators"
;
import
{
map
}
from
"rxjs/operators"
;
@
Component
({
@
Component
({
selector
:
"app-productdetail"
,
selector
:
"app-productdetail"
,
templateUrl
:
"./productdetail.page.html"
,
templateUrl
:
"./productdetail.page.html"
,
...
...
src/app/productlist/productlist.page.html
View file @
5ef7866a
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
></div>
></div>
<div
class=
"featured_badge"
*
ngIf=
"product.featured"
>
Featured
</div>
<div
class=
"featured_badge"
*
ngIf=
"product.featured"
>
Featured
</div>
</div>
</div>
<h5
class=
"ellipse"
(
click
)="
prodDetails
(
i
)"
>
{{product.prodName}}
</h5>
<h5
class=
"ellipse"
(
click
)="
prodDetails
(
i
)"
[
innerHTML
]="
product
.
prodName
"
>
</h5>
<p
(
click
)="
prodDetails
(
i
)"
>
<p
(
click
)="
prodDetails
(
i
)"
>
A$ {{product.price}}
<span
class=
"offer"
*
ngIf=
"product.discount > 0"
A$ {{product.price}}
<span
class=
"offer"
*
ngIf=
"product.discount > 0"
>
-{{product.discount}}%
</span
>
-{{product.discount}}%
</span
...
...
src/app/searchmodal/searchmodal.page.html
View file @
5ef7866a
...
@@ -17,8 +17,7 @@
...
@@ -17,8 +17,7 @@
<li
<li
*
ngFor=
"let search of searchService.searchList"
*
ngFor=
"let search of searchService.searchList"
(
click
)="
viewPage
(
search
)"
(
click
)="
viewPage
(
search
)"
>
[
innerHTML
]="
search
.
text
"
>
{{search.text}}
</li>
</li>
</ul>
</ul>
</div>
</div>
src/app/searchmodal/searchmodal.page.ts
View file @
5ef7866a
...
@@ -69,5 +69,7 @@ export class SearchmodalPage implements OnInit {
...
@@ -69,5 +69,7 @@ export class SearchmodalPage implements OnInit {
this
.
searchShow
=
false
;
this
.
searchShow
=
false
;
}
}
}
}
src/config/order.service.ts
View file @
5ef7866a
...
@@ -32,7 +32,7 @@ export class OrdersService {
...
@@ -32,7 +32,7 @@ export class OrdersService {
this
.
size
=
'small'
;
this
.
size
=
'small'
;
this
.
color
=
'Blue'
;
this
.
color
=
'Blue'
;
this
.
custId
=
''
;
this
.
custId
=
''
;
this
.
service
.
get
(
'user'
).
then
(
data
=>
{
this
.
service
.
get
(
'user
Data
'
).
then
(
data
=>
{
if
(
data
)
{
if
(
data
)
{
data
=
JSON
.
parse
(
data
);
data
=
JSON
.
parse
(
data
);
this
.
users
=
data
;
this
.
users
=
data
;
...
@@ -132,15 +132,15 @@ export class OrdersService {
...
@@ -132,15 +132,15 @@ export class OrdersService {
// console.log(cartCount);
// console.log(cartCount);
const
promise
=
new
Promise
(
resolve
=>
{
const
promise
=
new
Promise
(
resolve
=>
{
distinctShops
.
forEach
(
item
=>
{
distinctShops
.
forEach
(
item
=>
{
//
console.log(item);
console
.
log
(
item
);
this
.
afs
this
.
afs
.
collection
(
'orders'
)
.
collection
(
'orders'
)
.
add
({
.
add
({
shopper
:
firebase
.
firestore
().
doc
(
'/shoppers/'
+
item
),
bookDate
:
firebase
.
firestore
.
FieldValue
.
serverTimestamp
()
bookDate
:
firebase
.
firestore
.
FieldValue
.
serverTimestamp
()
})
})
.
then
(
docRef
=>
{
.
then
(
docRef
=>
{
const
neworderId
=
docRef
.
id
;
const
neworderId
=
docRef
.
id
;
const
delivery
=
new
firebase
.
firestore
.
GeoPoint
(
10.0237
,
76.3116
);
const
pickup
=
new
firebase
.
firestore
.
GeoPoint
(
10.7231
,
76.1234
);
const
pickup
=
new
firebase
.
firestore
.
GeoPoint
(
10.7231
,
76.1234
);
const
products
=
{};
const
products
=
{};
const
cartItem
=
cartGroup
[
item
];
const
cartItem
=
cartGroup
[
item
];
...
@@ -168,13 +168,13 @@ export class OrdersService {
...
@@ -168,13 +168,13 @@ export class OrdersService {
shopper
:
product
.
shopper
,
shopper
:
product
.
shopper
,
deliveryAddress
:
otherCharge
.
custAddress
,
deliveryAddress
:
otherCharge
.
custAddress
,
deliveryCharge
:
'A$ '
+
otherCharge
.
deliveryCharge
,
deliveryCharge
:
'A$ '
+
otherCharge
.
deliveryCharge
,
deliveryLocation
:
delivery
,
deliveryLocation
:
otherCharge
.
custAddress
.
latLng
,
bookDate
:
firebase
.
firestore
.
FieldValue
.
serverTimestamp
(),
bookDate
:
firebase
.
firestore
.
FieldValue
.
serverTimestamp
(),
orderDate
:
Math
.
floor
(
Date
.
now
()
/
1000
),
orderDate
:
Math
.
floor
(
Date
.
now
()
/
1000
),
orderCode
:
this
.
orderCode
(),
orderCode
:
this
.
orderCode
(),
orderId
:
neworderId
,
orderId
:
neworderId
,
orderStatus
:
1
,
orderStatus
:
1
,
pickupAddress
:
'
GetMi, Canberra, AUS
'
,
pickupAddress
:
''
,
pickupLocation
:
pickup
,
pickupLocation
:
pickup
,
promoId
:
null
,
promoId
:
null
,
rider
:
firebase
rider
:
firebase
...
@@ -184,10 +184,10 @@ export class OrdersService {
...
@@ -184,10 +184,10 @@ export class OrdersService {
custId
:
this
.
custId
,
custId
:
this
.
custId
,
riderId
:
'qbTKza18mWVzYG9NLIbmjMbrYjG2'
,
riderId
:
'qbTKza18mWVzYG9NLIbmjMbrYjG2'
,
shopperId
:
product
.
shopperId
,
shopperId
:
product
.
shopperId
,
custName
:
'Jone Doe'
,
custName
:
this
.
users
.
name
,
riderName
:
'John'
,
riderName
:
'John'
,
shopperState
:
0
,
shopperState
:
0
,
shopperName
:
'
Witchery
'
,
shopperName
:
''
,
product
:
products
,
product
:
products
,
discount
:
'A$ '
+
otherCharge
.
discount
,
discount
:
'A$ '
+
otherCharge
.
discount
,
promoApplied
:
otherCharge
.
discountApplied
,
promoApplied
:
otherCharge
.
discountApplied
,
...
...
src/config/safehtml.ts
0 → 100644
View file @
5ef7866a
import
{
Pipe
,
PipeTransform
}
from
'@angular/core'
;
import
{
DomSanitizer
,
SafeHtml
}
from
'@angular/platform-browser'
;
@
Pipe
({
name
:
'sanitizeHtml'
})
export
class
sanitizeHtmlPipe
implements
PipeTransform
{
constructor
(
private
_sanitizer
:
DomSanitizer
)
{
}
transform
(
value
:
string
):
SafeHtml
{
value
=
value
.
replace
(
"�"
,
"'"
);
console
.
log
(
value
);
return
this
.
_sanitizer
.
bypassSecurityTrustHtml
(
value
);
}
}
\ No newline at end of file
src/config/services/shopper.ts
View file @
5ef7866a
...
@@ -4,6 +4,7 @@ export interface Shopper {
...
@@ -4,6 +4,7 @@ export interface Shopper {
phone
:
string
;
phone
:
string
;
caption
:
string
;
caption
:
string
;
profilePhoto
:
string
;
profilePhoto
:
string
;
location
:
any
;
status
:
boolean
;
status
:
boolean
;
uid
:
string
;
uid
:
string
;
shopName
:
string
;
shopName
:
string
;
...
...
src/config/shopper.service.ts
View file @
5ef7866a
...
@@ -48,6 +48,7 @@ export class ShoppersService {
...
@@ -48,6 +48,7 @@ export class ShoppersService {
workingHours
:
item
.
workingHours
,
workingHours
:
item
.
workingHours
,
caption
:
item
.
caption
,
caption
:
item
.
caption
,
centre
:
item
.
centre
,
centre
:
item
.
centre
,
location
:
item
.
location
,
rate
:
item
.
rate
,
rate
:
item
.
rate
,
centerId
:
item
.
centerId
centerId
:
item
.
centerId
};
};
...
@@ -88,6 +89,7 @@ export class ShoppersService {
...
@@ -88,6 +89,7 @@ export class ShoppersService {
workingHours
:
item
.
workingHours
,
workingHours
:
item
.
workingHours
,
caption
:
item
.
caption
,
caption
:
item
.
caption
,
centre
:
item
.
centre
,
centre
:
item
.
centre
,
location
:
item
.
location
,
rate
:
item
.
rate
,
rate
:
item
.
rate
,
centerId
:
item
.
centerId
centerId
:
item
.
centerId
};
};
...
@@ -147,6 +149,7 @@ export class ShoppersService {
...
@@ -147,6 +149,7 @@ export class ShoppersService {
workingHours
:
item
.
workingHours
,
workingHours
:
item
.
workingHours
,
caption
:
item
.
caption
,
caption
:
item
.
caption
,
centre
:
item
.
centre
,
centre
:
item
.
centre
,
location
:
item
.
location
,
rate
:
item
.
rate
,
rate
:
item
.
rate
,
centerId
:
item
.
centerId
centerId
:
item
.
centerId
};
};
...
...
src/index.html
View file @
5ef7866a
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<title>
Ionic App
</title>
<title>
Ionic App
</title>
<base
href=
"/"
/>
<base
href=
"/"
/>
<meta
name=
"viewport"
content=
"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta
name=
"viewport"
content=
"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta
name=
"format-detection"
content=
"telephone=no"
/>
<meta
name=
"format-detection"
content=
"telephone=no"
/>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
/>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
/>
...
...
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