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
d0836db7
Commit
d0836db7
authored
Feb 04, 2020
by
Adarsh K
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'adarsh' into 'master'
comments See merge request
!53
parents
dba0e182
b79b7ad8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
268 additions
and
181 deletions
+268
-181
app.component.html
src/app/app.component.html
+1
-1
app.component.ts
src/app/app.component.ts
+6
-2
catstorelist.page.html
src/app/catstorelist/catstorelist.page.html
+80
-58
catstorelist.page.scss
src/app/catstorelist/catstorelist.page.scss
+0
-0
feedback.page.html
src/app/feedback/feedback.page.html
+12
-1
feedback.page.ts
src/app/feedback/feedback.page.ts
+7
-3
home.page.html
src/app/home/home.page.html
+0
-11
login.page.html
src/app/login/login.page.html
+1
-1
productlist.page.html
src/app/productlist/productlist.page.html
+12
-10
productlist.page.ts
src/app/productlist/productlist.page.ts
+3
-1
storelist.page.html
src/app/storelist/storelist.page.html
+4
-8
storelist.page.ts
src/app/storelist/storelist.page.ts
+6
-0
auth.service.ts
src/config/auth.service.ts
+8
-3
feedback.service.ts
src/config/feedback.service.ts
+20
-15
products.service.ts
src/config/products.service.ts
+13
-6
search.service.ts
src/config/search.service.ts
+4
-4
service.service.ts
src/config/service.service.ts
+30
-5
shopper.ts
src/config/services/shopper.ts
+34
-34
shopper.service.ts
src/config/shopper.service.ts
+20
-17
global.scss
src/global.scss
+7
-1
No files found.
src/app/app.component.html
View file @
d0836db7
...
...
@@ -20,7 +20,7 @@
</ion-menu-toggle>
<div
class=
"sidemenu_list"
>
<ul>
<ion-menu-toggle>
<ion-menu-toggle
(
click
)="
hideTab
()"
>
<li
(
click
)="
vieworder
('
home
')"
>
Shop
</li>
</ion-menu-toggle>
<!-- <li>About us</li> -->
...
...
src/app/app.component.ts
View file @
d0836db7
...
...
@@ -89,6 +89,10 @@ export class AppComponent {
});
}
hideTab
()
{
alert
(
'asdasdas'
);
}
async
finishpop
(
data
:
any
)
{
const
modal
=
await
this
.
modalController
.
create
({
component
:
DeliverypopPage
,
...
...
@@ -109,12 +113,12 @@ export class AppComponent {
'login'
,
'signup'
,
'address'
,
'forgot'
'forgot'
,
'feedback'
];
const
currentUrl
=
this
.
router
.
url
.
split
(
'/'
);
const
index
=
restrictedUrl
.
findIndex
(
x
=>
x
===
currentUrl
[
1
]);
// console.log(currentUrl[1], index, this.state);
console
.
log
(
this
.
tabData
);
if
(
index
>
-
1
||
this
.
tabData
===
false
)
{
return
true
;
}
else
{
...
...
src/app/catstorelist/catstorelist.page.html
View file @
d0836db7
<div
class=
"nav_header"
>
<button
class=
"nav_btn nav_back floatLeft"
(
click
)="
goBack
()"
>
</button>
<div
class=
"nav_title floatLeft"
>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
(
click
)="
clickSearch
()"
>
</div>
<button
class=
"nav_btn nav_search floatRight"
*
ngIf=
"!searchShow"
>
</button>
<button
class=
"nav_btn nav_close floatRight"
*
ngIf=
"searchShow"
(
click
)="
searchClose
()"
>
</button>
<div
class=
"clear"
></div>
<button
class=
"nav_btn nav_back floatLeft"
(
click
)="
goBack
()"
></button>
<div
class=
"nav_title floatLeft"
>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
(
click
)="
clickSearch
()"
/>
</div>
<button
class=
"nav_btn nav_search floatRight"
*
ngIf=
"!searchShow"
></button>
<button
class=
"nav_btn nav_close floatRight"
*
ngIf=
"searchShow"
(
click
)="
searchClose
()"
></button>
<div
class=
"clear"
></div>
</div>
<ion-content>
<div
class=
"home_wrapper"
>
<div
class=
"home_sub_header"
>
Featured Stores
</div>
<div
class=
"featured_slider"
>
<ion-slides
pager=
"false"
[
options
]="
slideOpts
"
*
ngIf=
"shopperService.activeshoppers && shopperService.activeshoppers.length > 0"
>
<ion-slide
*
ngFor=
"let shopper of shopperService.activeshoppers"
>
<div
class=
"feature_product"
(
click
)="
goToPage
('
productlist
',
shopper
)"
>
<img
[
src
]="
shopper
.
featuredImage
"
onerror=
"this.src='./../../assets/getmi_malls/featured/featured1.png'"
>
<div
class=
"feature_overlay"
>
<h5>
{{shopper.name}}
</h5>
<p>
{{shopper.caption}}
</p>
</div>
</div>
</ion-slide>
</ion-slides>
</div>
<div
class=
"home_sub_header"
*
ngIf=
"data"
>
{{data.catName}}
</div>
<div
class=
"nearby_shop_list"
>
<ul
*
ngIf=
"shopperService.shoppers && shopperService.shoppers.length > 0"
>
<li
*
ngFor=
"let shopper of shopperService.shoppers"
(
click
)="
goToPage
('
productlist
',
shopper
)"
>
<div
class=
"nearby_image"
>
<img
[
src
]="
shopper
.
profilePic
"
onerror=
"this.src='./../../assets/getmi_malls/store298/stores1.png'"
>
</div>
<div
class=
"nearby_detail"
>
<h5>
<span
class=
"floatLeft"
>
{{shopper.name}}
</span>
<span
class=
"floatRight"
>
0
<img
src=
"../assets/Path61_2.png"
>
</span>
<div
class=
"clear"
></div>
</h5>
<p>
{{shopper.caption}}
</p>
</div>
<div
class=
"clear"
></div>
</li>
</ul>
</div>
<div
class=
"home_wrapper"
>
<div
class=
"home_sub_header"
>
Featured Stores
</div>
<div
class=
"featured_slider"
>
<ion-slides
pager=
"false"
[
options
]="
slideOpts
"
*
ngIf=
"shopperService.activeshoppers && shopperService.activeshoppers.length > 0"
>
<ion-slide
*
ngFor=
"let shopper of shopperService.activeshoppers"
>
<div
class=
"feature_product"
(
click
)="
goToPage
('
productlist
',
shopper
)"
>
<img
[
src
]="
shopper
.
featuredImage
"
onerror=
"this.src='./../../assets/getmi_malls/featured/featured1.png'"
/>
<div
class=
"feature_overlay"
>
<h5>
{{shopper.name}}
</h5>
<p>
{{shopper.caption}}
</p>
</div>
</div>
</ion-slide>
</ion-slides>
</div>
<div
class=
"home_sub_header"
*
ngIf=
"data"
>
{{data.catName}}
</div>
<div
class=
"nearby_shop_list"
>
<ul
*
ngIf=
"shopperService.shoppers && shopperService.shoppers.length > 0"
>
<li
*
ngFor=
"let shopper of shopperService.shoppers"
(
click
)="
goToPage
('
productlist
',
shopper
)"
>
<div
class=
"nearby_image"
>
<img
[
src
]="
shopper
.
profilePic
"
onerror=
"this.src='./../../assets/getmi_malls/store298/stores1.png'"
/>
</div>
<div
class=
"nearby_detail"
>
<h5>
<span
class=
"floatLeft"
>
{{shopper.name}}
</span>
<span
class=
"floatRight"
>
0
<img
src=
"../assets/Path61_2.png"
/>
</span>
<div
class=
"clear"
></div>
</h5>
<p>
{{shopper.caption}}
</p>
</div>
<div
class=
"clear"
></div>
</li>
</ul>
<div
class=
"no-result-wrapper"
*
ngIf=
"shopperService.shoppers.length === 0"
>
<img
src=
"../../assets/basket.png"
/>
<h1>
No result found
</h1>
<button
(
click
)="
goToPage
('
home
')"
>
home
</button>
</div>
</div>
</div>
</ion-content>
<div
class=
"search_item_list"
*
ngIf=
"searchShow"
[@
slideInOut
]
>
<ul>
<li>
sample
</li>
</ul>
</div>
\ No newline at end of file
src/app/catstorelist/catstorelist.page.scss
View file @
d0836db7
This diff is collapsed.
Click to expand it.
src/app/feedback/feedback.page.html
View file @
d0836db7
...
...
@@ -59,10 +59,21 @@
</div>
</div>
<div
class=
"row"
>
<button
(
click
)="
onFeedbackSubmit
(
feedbackForm
)"
class=
"login_btn"
>
<button
(
click
)="
onFeedbackSubmit
(
feedbackForm
)"
class=
"login_btn"
[
disabled
]="
submitted
"
>
SENT
</button>
</div>
</div>
</form>
</ion-content>
<div
class=
"loader"
*
ngIf=
"feedService.loader"
>
<div
class=
"lds-ripple"
>
<div></div>
<div></div>
</div>
</div>
src/app/feedback/feedback.page.ts
View file @
d0836db7
...
...
@@ -4,7 +4,7 @@ import { SubjectService } from '../../config/subject.service';
import
{
NgForm
}
from
'@angular/forms'
;
import
{
FeedbackData
}
from
'../../config/services/feedback'
;
import
{
FeedbackService
}
from
'../../config/feedback.service'
;
import
{
ToastController
}
from
'@ionic/angular
'
;
import
{
ServiceService
}
from
'../../config/service.service
'
;
@
Component
({
selector
:
'app-feedback'
,
templateUrl
:
'./feedback.page.html'
,
...
...
@@ -24,7 +24,7 @@ export class FeedbackPage implements OnInit {
private
location
:
Location
,
public
subjectService
:
SubjectService
,
public
feedService
:
FeedbackService
,
public
toastController
:
ToastController
public
service
:
ServiceService
)
{
// Gets userdata
this
.
subjectService
.
getUserData
().
subscribe
(
userData
=>
{
...
...
@@ -39,8 +39,12 @@ export class FeedbackPage implements OnInit {
onFeedbackSubmit
(
form
:
NgForm
)
{
this
.
submitted
=
true
;
if
(
form
.
valid
)
{
console
.
log
(
form
.
value
);
if
(
form
.
valid
&&
form
.
value
.
message
!==
''
)
{
this
.
feedService
.
feedbackCreate
(
form
.
value
);
}
else
{
this
.
submitted
=
false
;
this
.
service
.
showToast
(
'Invalid request!'
,
'top'
,
'my-error'
,
1000
);
}
}
...
...
src/app/home/home.page.html
View file @
d0836db7
...
...
@@ -205,14 +205,3 @@
</div>
</ion-content>
</div>
<div
class=
"search_item_list"
*
ngIf=
"searchShow"
[@
slideInOut
]
>
<ul
*
ngIf=
"searchService.searchList"
>
<li
*
ngFor=
"let search of searchService.searchList"
(
click
)="
viewPage
(
search
)"
>
{{search.text}}
</li>
</ul>
</div>
src/app/login/login.page.html
View file @
d0836db7
...
...
@@ -66,7 +66,7 @@
<!-- <button (click)="goToPage('addaddresss')">Address</button> -->
</div>
</div>
<div
class=
"loader"
*
ngIf=
"loader"
>
<div
class=
"loader"
*
ngIf=
"
authService.
loader"
>
<div
class=
"lds-ripple"
>
<div></div>
<div></div>
...
...
src/app/productlist/productlist.page.html
View file @
d0836db7
...
...
@@ -112,6 +112,17 @@
<li>
<input
class=
"styled-checkbox"
id=
"styled-checkbox-5"
type=
"radio"
value=
"a-z"
name=
"sort"
(
click
)="
setValue
($
event
.
target
.
value
)"
/>
<label
for=
"styled-checkbox-5"
>
Name A - Z
</label>
</li>
<li>
<input
class=
"styled-checkbox"
id=
"styled-checkbox-3"
type=
"radio"
value=
"low"
...
...
@@ -131,6 +142,7 @@
/>
<label
for=
"styled-checkbox-4"
>
Price High - Low
</label>
</li>
<!-- <li>
<input class="styled-checkbox" id="styled-checkbox-5" type="radio" value="rate" name="sort" (click)="setValue($event.target.value)">
<label for="styled-checkbox-5">Rating</label>
...
...
@@ -152,13 +164,3 @@
</div>
</div>
</ion-content>
<div
class=
"search_item_list"
*
ngIf=
"searchShow"
[@
slideInOut
]
>
<ul
*
ngIf=
"searchService.searchList"
>
<li
*
ngFor=
"let search of searchService.searchList"
(
click
)="
viewPage
(
search
)"
>
{{search.text}}
</li>
</ul>
</div>
src/app/productlist/productlist.page.ts
View file @
d0836db7
...
...
@@ -32,6 +32,7 @@ export class ProductlistPage implements OnInit {
searchShow
=
false
;
sortValue
:
string
;
loader
:
boolean
;
shopperId
:
any
;
constructor
(
private
router
:
Router
,
...
...
@@ -46,6 +47,7 @@ export class ProductlistPage implements OnInit {
this
.
loader
=
true
;
this
.
service
.
get
(
'params'
).
then
(
val
=>
{
this
.
data
=
val
;
this
.
shopperId
=
this
.
data
.
uid
;
console
.
log
(
this
.
data
);
this
.
prodService
.
prodList
(
this
.
data
.
uid
);
setTimeout
(()
=>
{
...
...
@@ -117,7 +119,7 @@ export class ProductlistPage implements OnInit {
submit
()
{
console
.
log
(
this
.
sortValue
);
this
.
prodService
.
filterSearch
(
this
.
sortValue
);
this
.
prodService
.
filterSearch
(
this
.
sortValue
,
this
.
shopperId
);
}
checkFavStatus
(
index
)
{
...
...
src/app/storelist/storelist.page.html
View file @
d0836db7
...
...
@@ -28,9 +28,11 @@
<ion-slides
pager=
"false"
[
options
]="
slideOpts
"
*
ngIf=
"shopperService.activeshoppers &&
shopperService.activeshoppers
.length > 0"
*
ngIf=
"shopperService.activeshoppers &&
filterFunction(shopperService.activeshoppers)
.length > 0"
>
<ion-slide
*
ngFor=
"let shopper of shopperService.activeshoppers"
>
<ion-slide
*
ngFor=
"let shopper of filterFunction(shopperService.activeshoppers)"
>
<div
class=
"feature_product"
(
click
)="
goToPage
('
productlist
',
shopper
)"
...
...
@@ -85,9 +87,3 @@
</div>
</div>
</ion-content>
<div
class=
"search_item_list"
*
ngIf=
"searchShow"
[@
slideInOut
]
>
<ul>
<li>
sample
</li>
</ul>
</div>
src/app/storelist/storelist.page.ts
View file @
d0836db7
...
...
@@ -31,6 +31,7 @@ export class StorelistPage implements OnInit {
};
data
:
any
;
loader
:
boolean
;
centerId
:
any
;
constructor
(
public
router
:
Router
,
...
...
@@ -44,6 +45,7 @@ export class StorelistPage implements OnInit {
this
.
loader
=
true
;
this
.
service
.
get
(
'params'
).
then
(
val
=>
{
this
.
data
=
val
;
this
.
centerId
=
this
.
data
.
cId
;
this
.
shopperService
.
shopperList
(
this
.
data
.
cId
,
'centerId'
);
setTimeout
(()
=>
{
this
.
loader
=
false
;
...
...
@@ -82,4 +84,8 @@ export class StorelistPage implements OnInit {
searchClose
()
{
this
.
searchShow
=
false
;
}
filterFunction
(
featuredStore
):
any
[]
{
return
featuredStore
.
filter
(
store
=>
store
.
centerId
===
this
.
centerId
);
}
}
src/config/auth.service.ts
View file @
d0836db7
...
...
@@ -76,7 +76,7 @@ export class AuthService {
})
.
catch
(
error
=>
{
this
.
loader
=
false
;
window
.
alert
(
error
.
message
);
this
.
service
.
showToast
(
error
.
message
,
'bottom'
,
'my-error'
,
1000
);
});
}
...
...
@@ -100,7 +100,12 @@ export class AuthService {
this
.
router
.
navigateByUrl
(
'nearby'
);
}
else
{
this
.
loader
=
false
;
window
.
alert
(
'Please input valid OTP'
);
this
.
service
.
showToast
(
'Please input valid OTP'
,
'bottom'
,
'my-error'
,
1000
);
}
});
}
...
...
@@ -149,7 +154,7 @@ export class AuthService {
console
.
log
(
result
);
})
.
catch
(
err
=>
{
alert
(
err
.
message
);
this
.
service
.
showToast
(
err
.
message
,
'bottom'
,
'my-error'
,
1000
);
});
}
catch
(
error
)
{
This
.
loader
=
false
;
...
...
src/config/feedback.service.ts
View file @
d0836db7
...
...
@@ -5,21 +5,24 @@ import {
}
from
'@angular/fire/firestore'
;
import
{
take
}
from
'rxjs/operators'
;
import
{
FeedbackData
}
from
'./services/feedback'
;
import
{
ToastController
}
from
'@ionic/angular
'
;
import
{
ServiceService
}
from
'./service.service
'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
FeedbackService
{
loader
:
boolean
;
constructor
(
public
afs
:
AngularFirestore
,
public
toastController
:
ToastController
,
private
router
:
Router
)
{}
private
router
:
Router
,
private
service
:
ServiceService
)
{
this
.
loader
=
false
;
}
feedbackCreate
(
data
:
FeedbackData
)
{
console
.
log
(
data
)
;
this
.
loader
=
true
;
this
.
afs
.
collection
(
'feedback'
)
.
add
({})
...
...
@@ -30,19 +33,21 @@ export class FeedbackService {
.
doc
(
data
.
feedbackId
)
.
set
(
data
)
.
then
(()
=>
{
// SHows success toast
this
.
toastController
.
create
({
message
:
'Thank you for your Feedback!'
,
duration
:
2000
,
position
:
'top'
,
cssClass
:
'my-toast'
})
.
then
(
res
=>
{
res
.
present
();
this
.
service
.
showToast
(
'Thank you for your feedback!'
,
'top'
,
'my-toast'
,
2000
)
.
then
(()
=>
{
this
.
loader
=
false
;
setTimeout
(()
=>
{
this
.
router
.
navigateByUrl
(
'home'
);
},
2100
);
})
.
catch
(
err
=>
{
this
.
loader
=
false
;
});
});
});
...
...
src/config/products.service.ts
View file @
d0836db7
...
...
@@ -61,7 +61,10 @@ export class ProductsService {
const
prodRef
:
AngularFirestoreCollection
<
any
>
=
this
.
afs
.
collection
(
`products`
,
ref
=>
ref
.
where
(
'shopperId'
,
'=='
,
shopperId
).
where
(
'status'
,
'=='
,
state
)
ref
.
orderBy
(
'category'
,
'asc'
)
.
where
(
'shopperId'
,
'=='
,
shopperId
)
.
where
(
'status'
,
'=='
,
state
)
);
prodRef
.
valueChanges
().
subscribe
(
value
=>
{
this
.
product
=
[];
...
...
@@ -101,7 +104,7 @@ export class ProductsService {
});
}
public
async
filterSearch
(
sortValue
:
string
)
{
public
async
filterSearch
(
sortValue
:
string
,
shopperId
:
string
)
{
const
This
=
this
;
const
state
=
true
;
// console.log(sortValue);
...
...
@@ -117,15 +120,19 @@ export class ProductsService {
order
=
'desc'
;
}
if
(
sortValue
===
'
rate
'
)
{
// field = 'pric
e';
// order = 'de
sc';
if
(
sortValue
===
'
a-z
'
)
{
field
=
'prodNam
e'
;
order
=
'a
sc'
;
}
// tslint:disable-next-line:max-line-length
const
prodRef
:
AngularFirestoreCollection
<
any
>
=
this
.
afs
.
collection
(
`products`
,
ref
=>
ref
.
where
(
'status'
,
'=='
,
state
).
orderBy
(
field
,
order
)
ref
=>
ref
.
where
(
'status'
,
'=='
,
state
)
.
where
(
'shopperId'
,
'=='
,
shopperId
)
.
orderBy
(
field
,
order
)
);
prodRef
.
valueChanges
().
subscribe
(
value
=>
{
this
.
product
=
[];
...
...
src/config/search.service.ts
View file @
d0836db7
...
...
@@ -28,8 +28,8 @@ export class SearchService {
ref
=>
ref
.
where
(
'status'
,
'=='
,
state
)
.
orderBy
(
'
n
ame'
)
.
startAt
(
inputText
.
to
Upp
erCase
())
.
orderBy
(
'
searchN
ame'
)
.
startAt
(
inputText
.
to
Low
erCase
())
.
endAt
(
inputText
.
toLowerCase
()
+
'
\
uf8ff'
)
.
limit
(
5
)
);
...
...
@@ -55,7 +55,7 @@ export class SearchService {
ref
.
where
(
'status'
,
'=='
,
state
)
.
orderBy
(
'prodName'
)
.
startAt
(
inputText
.
to
Upp
erCase
())
.
startAt
(
inputText
.
to
Low
erCase
())
.
endAt
(
inputText
.
toLowerCase
()
+
'
\
uf8ff'
)
.
limit
(
5
)
);
...
...
@@ -82,7 +82,7 @@ export class SearchService {
ref
.
where
(
'status'
,
'=='
,
state
)
.
orderBy
(
'catName'
)
.
startAt
(
inputText
.
to
Upp
erCase
())
.
startAt
(
inputText
.
to
Low
erCase
())
.
endAt
(
inputText
.
toLowerCase
()
+
'
\
uf8ff'
)
.
limit
(
5
)
);
...
...
src/config/service.service.ts
View file @
d0836db7
import
{
Injectable
}
from
"@angular/core"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Storage
}
from
'@ionic/storage'
;
import
{
ToastController
}
from
'@ionic/angular'
;
@
Injectable
({
providedIn
:
"root"
providedIn
:
'root'
})
export
class
ServiceService
{
state
:
boolean
;
constructor
(
public
storage
:
Storage
)
{
constructor
(
public
storage
:
Storage
,
public
toastController
:
ToastController
)
{
this
.
state
=
true
;
}
...
...
@@ -25,7 +29,7 @@ export class ServiceService {
public
clear
()
{
this
.
storage
.
clear
().
then
(()
=>
{
console
.
log
(
"all keys cleared"
);
console
.
log
(
'all keys cleared'
);
});
}
...
...
@@ -48,4 +52,25 @@ export class ServiceService {
}
return
response
;
}
showToast
(
msg
,
positions
,
className
,
durations
=
2000
)
{
try
{
const
promise1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
toastController
.
create
({
message
:
msg
,
duration
:
durations
,
position
:
positions
,
cssClass
:
className
})
.
then
(
res
=>
{
res
.
present
();
resolve
(
true
);
});
});
return
promise1
;
}
catch
(
error
)
{
console
.
log
(
'error: '
+
error
);
}
}
}
src/config/services/shopper.ts
View file @
d0836db7
export
interface
Shopper
{
name
:
string
;
emailId
:
string
;
phone
:
string
;
caption
:
string
;
profilePhoto
:
string
;
status
:
boolean
;
uid
:
string
;
shopName
:
string
;
address
:
string
;
featured
:
boolean
;
shopStatus
:
boolean
;
centre
:
object
;
rate
:
any
;
workingHours
:
string
;
featuredImage
:
string
;
name
:
string
;
emailId
:
string
;
phone
:
string
;
caption
:
string
;
profilePhoto
:
string
;
status
:
boolean
;
uid
:
string
;
shopName
:
string
;
address
:
string
;
featured
:
boolean
;
shopStatus
:
boolean
;
centre
:
object
;
rate
:
any
;
workingHours
:
string
;
featuredImage
:
string
;
centerId
:
string
;
}
export
interface
ShopperData
{
centre
:
object
;
abn
:
string
;
category
:
object
;
name
:
string
;
address
:
string
;
emailId
:
string
;
phone
:
string
;
caption
:
string
;
featured
:
boolean
;
profilePic
:
any
;
featuredImage
:
string
;
shopStatus
:
boolean
;
centerId
:
string
;
uid
:
string
;
shopName
:
string
;
status
:
boolean
;
rate
:
any
;
workingHours
:
string
;
centre
:
object
;
abn
:
string
;
category
:
object
;
name
:
string
;
address
:
string
;
emailId
:
string
;
phone
:
string
;
caption
:
string
;
featured
:
boolean
;
profilePic
:
any
;
featuredImage
:
string
;
shopStatus
:
boolean
;
centerId
:
string
;
uid
:
string
;
shopName
:
string
;
status
:
boolean
;
rate
:
any
;
workingHours
:
string
;
}
src/config/shopper.service.ts
View file @
d0836db7
import
{
Injectable
}
from
"@angular/core"
;
import
{
AngularFireAuth
}
from
"@angular/fire/auth"
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
AngularFireAuth
}
from
'@angular/fire/auth'
;
import
{
AngularFirestore
,
AngularFirestoreDocument
,
AngularFirestoreCollection
}
from
"@angular/fire/firestore"
;
import
{
Shopper
}
from
"./services/shopper"
;
import
*
as
firebase
from
"firebase"
;
}
from
'@angular/fire/firestore'
;
import
{
Shopper
}
from
'./services/shopper'
;
import
*
as
firebase
from
'firebase'
;
@
Injectable
({
providedIn
:
"root"
providedIn
:
'root'
})
export
class
ShoppersService
{
shoppers
:
Shopper
[]
=
[];
...
...
@@ -24,8 +24,8 @@ export class ShoppersService {
const
This
=
this
;
const
state
=
true
;
const
orderRef
:
AngularFirestoreCollection
<
any
>
=
this
.
afs
.
collection
(
"shoppers"
,
ref
=>
ref
.
where
(
type
,
"=="
,
centerId
).
where
(
"status"
,
"=="
,
state
)
'shoppers'
,
ref
=>
ref
.
where
(
type
,
'=='
,
centerId
).
where
(
'status'
,
'=='
,
state
)
);
orderRef
.
valueChanges
().
subscribe
(
value
=>
{
this
.
shoppers
=
[];
...
...
@@ -48,7 +48,8 @@ export class ShoppersService {
workingHours
:
item
.
workingHours
,
caption
:
item
.
caption
,
centre
:
item
.
centre
,
rate
:
item
.
rate
rate
:
item
.
rate
,
centerId
:
item
.
centerId
};
this
.
shoppers
.
push
(
shopper
);
});
...
...
@@ -63,8 +64,8 @@ export class ShoppersService {
const
This
=
this
;
const
state
=
true
;
const
orderRef
:
AngularFirestoreCollection
<
any
>
=
this
.
afs
.
collection
(
"shoppers"
,
ref
=>
ref
.
where
(
"featured"
,
"=="
,
state
).
where
(
"status"
,
"=="
,
state
)
'shoppers'
,
ref
=>
ref
.
where
(
'featured'
,
'=='
,
state
).
where
(
'status'
,
'=='
,
state
)
);
orderRef
.
valueChanges
().
subscribe
(
value
=>
{
this
.
activeshoppers
=
[];
...
...
@@ -87,7 +88,8 @@ export class ShoppersService {
workingHours
:
item
.
workingHours
,
caption
:
item
.
caption
,
centre
:
item
.
centre
,
rate
:
item
.
rate
rate
:
item
.
rate
,
centerId
:
item
.
centerId
};
this
.
activeshoppers
.
push
(
shopper
);
});
...
...
@@ -117,12 +119,12 @@ export class ShoppersService {
greaterLon
);
const
orderRef
:
AngularFirestoreCollection
<
any
>
=
this
.
afs
.
collection
(
"shoppers"
,
'shoppers'
,
ref
=>
ref
.
where
(
"centre.latLng"
,
">"
,
lesserGeopoint
)
.
where
(
"centre.latLng"
,
"<"
,
greaterGeopoint
)
.
where
(
"status"
,
"=="
,
state
)
.
where
(
'centre.latLng'
,
'>'
,
lesserGeopoint
)
.
where
(
'centre.latLng'
,
'<'
,
greaterGeopoint
)
.
where
(
'status'
,
'=='
,
state
)
);
orderRef
.
valueChanges
().
subscribe
(
value
=>
{
this
.
nearshoppers
=
[];
...
...
@@ -145,7 +147,8 @@ export class ShoppersService {
workingHours
:
item
.
workingHours
,
caption
:
item
.
caption
,
centre
:
item
.
centre
,
rate
:
item
.
rate
rate
:
item
.
rate
,
centerId
:
item
.
centerId
};
this
.
nearshoppers
.
push
(
shopper
);
});
...
...
src/global.scss
View file @
d0836db7
...
...
@@ -417,7 +417,7 @@ app-deliverypop {
}
app-success
{
padding
:
0px
!
important
;
padding
:
0px
!
important
;
}
.nav_header
{
...
...
@@ -665,3 +665,9 @@ ion-header {
--border-radius
:
4px
;
--color
:
#fff
;
}
.my-error
{
--background
:
rgb
(
212
,
43
,
38
);
--border-radius
:
4px
;
--color
:
#fff
;
}
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