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
f6b936e8
Commit
f6b936e8
authored
5 years ago
by
muhsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed search bar issue, initial userdata issue
parent
0e941d48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
256 additions
and
163 deletions
+256
-163
app.component.html
src/app/app.component.html
+8
-10
app.component.ts
src/app/app.component.ts
+19
-8
changedetails.page.ts
src/app/changedetails/changedetails.page.ts
+2
-2
home.page.html
src/app/home/home.page.html
+0
-0
productlist.page.html
src/app/productlist/productlist.page.html
+109
-67
searchmodal.page.html
src/app/searchmodal/searchmodal.page.html
+21
-13
storelist.page.html
src/app/storelist/storelist.page.html
+80
-56
auth.service.ts
src/config/auth.service.ts
+1
-0
subject.service.ts
src/config/subject.service.ts
+16
-7
global.scss
src/global.scss
+0
-0
No files found.
src/app/app.component.html
View file @
f6b936e8
...
...
@@ -3,17 +3,14 @@
<ion-menu>
<ion-content>
<div
class=
"side_menu_wrapper"
>
<
<<<<<<
HEAD
<
ion-menu-toggle
>
<div
class=
"top_banner"
(
click
)="
goToPage
('
profile
')"
>
=======
<ion-menu-toggle
*
ngIf=
"userData"
>
<div
class=
"top_banner"
>
>>>>>>> b35f226916e6e5b4feacc30b355445f087230416
<div
class=
"top_image"
></div>
<div
class=
"top_image"
>
<img
[
src
]="
userData
.
profilePhoto
"
/>
</div>
<div
class=
"top_detail"
>
<h4>
{{
userData.name
}}
</h4>
<p>
{{
userData.emailId
}}
</p>
<h4>
{{
userData.name
}}
</h4>
<p>
{{
userData.emailId
}}
</p>
</div>
<div
class=
"clear"
></div>
</div>
...
...
@@ -62,7 +59,7 @@
</ion-split-pane>
</ion-app>
<div
class=
"common_tab"
[
hidden
]="
fetchCase
()
===
true
"
>
<div
class=
"common_tab"
[
hidden
]="
fetchCase
()
===
true
"
*
ngIf=
"!isSearchOpen"
>
<ul>
<li
(
click
)="
goToPage
('
home
')"
>
<div
...
...
@@ -100,7 +97,8 @@
class=
"icon_sec m6_icon"
[
class
.
m6_icon_act
]="
sec_active6
"
(
click
)="
setActive6
()"
menuClose
></div>
menuClose
></div>
</li>
</ul>
</div>
This diff is collapsed.
Click to expand it.
src/app/app.component.ts
View file @
f6b936e8
...
...
@@ -23,6 +23,8 @@ import { SearchmodalPage } from './searchmodal/searchmodal.page';
styleUrls
:
[
'app.component.scss'
]
})
export
class
AppComponent
{
isSearchOpen
=
false
;
sec_active1
=
true
;
sec_active2
=
false
;
sec_active3
=
false
;
...
...
@@ -56,7 +58,7 @@ export class AppComponent {
this
.
state
=
loginData
;
});
this
.
s
ervice
.
get
(
'userData'
).
then
(
userData
=>
{
this
.
s
ubjectService
.
getUserData
().
subscribe
(
userData
=>
{
if
(
userData
)
{
this
.
userData
=
JSON
.
parse
(
userData
);
console
.
log
(
userData
);
...
...
@@ -109,7 +111,7 @@ export class AppComponent {
}
setActive1
()
{
this
.
sec_active1
=
!
this
.
sec_active1
;
this
.
sec_active1
=
true
;
this
.
sec_active2
=
false
;
this
.
sec_active3
=
false
;
this
.
sec_active4
=
false
;
...
...
@@ -117,7 +119,7 @@ export class AppComponent {
this
.
sec_active6
=
false
;
}
setActive2
()
{
this
.
sec_active2
=
!
this
.
sec_active2
;
this
.
sec_active2
=
true
;
this
.
sec_active1
=
false
;
this
.
sec_active3
=
false
;
this
.
sec_active4
=
false
;
...
...
@@ -125,7 +127,7 @@ export class AppComponent {
this
.
sec_active6
=
false
;
}
setActive3
()
{
this
.
sec_active3
=
!
this
.
sec_active3
;
this
.
sec_active3
=
true
;
this
.
sec_active1
=
false
;
this
.
sec_active2
=
false
;
this
.
sec_active4
=
false
;
...
...
@@ -133,7 +135,7 @@ export class AppComponent {
this
.
sec_active6
=
false
;
}
setActive4
()
{
this
.
sec_active4
=
!
this
.
sec_active4
;
this
.
sec_active4
=
true
;
this
.
sec_active1
=
false
;
this
.
sec_active2
=
false
;
this
.
sec_active3
=
false
;
...
...
@@ -141,7 +143,7 @@ export class AppComponent {
this
.
sec_active6
=
false
;
}
setActive5
()
{
this
.
sec_active5
=
!
this
.
sec_active5
;
this
.
sec_active5
=
true
;
this
.
sec_active1
=
false
;
this
.
sec_active2
=
false
;
this
.
sec_active3
=
false
;
...
...
@@ -149,7 +151,7 @@ export class AppComponent {
this
.
sec_active6
=
false
;
}
setActive6
()
{
this
.
sec_active6
=
!
this
.
sec_active6
;
this
.
sec_active6
=
true
;
this
.
sec_active1
=
false
;
this
.
sec_active2
=
false
;
this
.
sec_active3
=
false
;
...
...
@@ -199,10 +201,19 @@ export class AppComponent {
}
async
searchModal
()
{
// Hides Bottom navbar items
this
.
isSearchOpen
=
true
;
const
modal
=
await
this
.
modalController
.
create
({
component
:
SearchmodalPage
});
modal
.
onDidDismiss
().
then
(
dataReturned
=>
{});
// modal.onDidDismiss().then(dataReturned => {
//
// });
// Shows bottom navbar items on component unmount
modal
.
onWillDismiss
().
then
(()
=>
{
this
.
isSearchOpen
=
false
;
});
return
await
modal
.
present
();
}
}
This diff is collapsed.
Click to expand it.
src/app/changedetails/changedetails.page.ts
View file @
f6b936e8
...
...
@@ -58,13 +58,13 @@ export class ChangedetailsPage implements OnInit {
form
.
value
.
password
&&
form
.
value
.
password
!=
form
.
value
.
confirmPassword
)
{
this
.
register
.
updatePassword
(
form
.
value
.
password
);
//
this.register.updatePassword(form.value.password);
}
else
{
alert
(
'Password should match'
);
}
// Calls update user data fn
this
.
register
.
updateData
(
form
.
value
,
this
.
userData
.
uid
);
//
this.register.updateData(form.value, this.userData.uid);
console
.
log
(
'valid form values'
,
form
.
value
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/home/home.page.html
View file @
f6b936e8
This diff is collapsed.
Click to expand it.
src/app/productlist/productlist.page.html
View file @
f6b936e8
<div
class=
"nav_header"
>
<button
class=
"nav_btn nav_back floatLeft"
(
click
)="
goBack
()"
>
<img
src=
"../assets/Group17_2.png"
>
</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
()"
>
<img
src=
"../assets/Group17_2.png"
/>
</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"
(
click
)="
clickSearch
()"
></button>
<button
class=
"nav_btn nav_close floatRight"
*
ngIf=
"searchShow"
(
click
)="
searchClose
()"
></button>
<div
class=
"clear"
></div>
</div>
<ion-content>
<div
class=
"product_list"
>
<div
class=
"product_taskbar"
>
<div
class=
"filter floatLeft"
(
click
)="
istoggle
()"
>
</div>
<div
class=
"viewset floatRight"
>
<div
class=
"grid_view grid_act floatRight"
(
click
)="
gridToggle
()"
[
class
.
line_view
]="
onGrid
"
>
</div>
<div
class=
"clear"
></div>
</div>
<div
class=
"clear"
></div>
</div>
<div
class=
"product_title"
*
ngIf=
"data"
>
{{data.shopName}}
</div>
<ul
[
class
.
grid_view
]="
onGrid
"
*
ngIf=
"prodService.product && prodService.product.length > 0"
>
<li
*
ngFor=
"let product of prodService.product; let i = index"
>
<div
class=
"product_image"
>
<img
[
src
]="
product
.
image
"
onerror=
"this.src='../assets/model1@3x.png'"
(
click
)="
prodDetails
(
i
)"
>
<div
[
ngClass
]="
checkFavStatus
(
product
.
prodId
)"
(
click
)="
changeFav
(
product
.
prodId
)"
>
</div>
<div
class=
"featured_badge"
*
ngIf=
"product.featured"
>
Featured
</div>
</div>
<h5
class=
"ellipse"
(
click
)="
prodDetails
(
i
)"
>
{{product.prodName}}
</h5>
<p
(
click
)="
prodDetails
(
i
)"
>
A$ {{product.price}}
<span
class=
"offer"
*
ngIf=
"product.discount > 0"
>
-{{product.discount}}%
</span></p>
</li>
</ul>
<div
class=
"product_list"
>
<div
class=
"product_taskbar"
>
<div
class=
"filter floatLeft"
(
click
)="
istoggle
()"
></div>
<div
class=
"viewset floatRight"
>
<div
class=
"grid_view grid_act floatRight"
(
click
)="
gridToggle
()"
[
class
.
line_view
]="
onGrid
"
></div>
<div
class=
"clear"
></div>
</div>
<div
class=
"clear"
></div>
</div>
<div
class=
"product_title"
*
ngIf=
"data"
>
{{data.shopName}}
</div>
<div
class=
"sort_wrappper"
*
ngIf=
"isShow"
[@
slideInOut
]
>
<div
class=
"sort_inner"
>
<h4>
Sort By
</h4>
<ul>
<!-- <li>
<ul
[
class
.
grid_view
]="
onGrid
"
*
ngIf=
"prodService.product && prodService.product.length > 0"
>
<li
*
ngFor=
"let product of prodService.product; let i = index"
>
<div
class=
"product_image"
>
<img
[
src
]="
product
.
image
"
onerror=
"this.src='../assets/model1@3x.png'"
(
click
)="
prodDetails
(
i
)"
/>
<div
[
ngClass
]="
checkFavStatus
(
product
.
prodId
)"
(
click
)="
changeFav
(
product
.
prodId
)"
></div>
<div
class=
"featured_badge"
*
ngIf=
"product.featured"
>
Featured
</div>
</div>
<h5
class=
"ellipse"
(
click
)="
prodDetails
(
i
)"
>
{{product.prodName}}
</h5>
<p
(
click
)="
prodDetails
(
i
)"
>
A$ {{product.price}}
<span
class=
"offer"
*
ngIf=
"product.discount > 0"
>
-{{product.discount}}%
</span
>
</p>
</li>
</ul>
</div>
<div
class=
"sort_wrappper"
*
ngIf=
"isShow"
[@
slideInOut
]
>
<div
class=
"sort_inner"
>
<h4>
Sort By
</h4>
<ul>
<!-- <li>
<input class="styled-checkbox" id="styled-checkbox-1" type="radio" value="popular" name="sort" (click)="setValue($event.target.value)">
<label for="styled-checkbox-1">Popularity</label>
</li> -->
<!-- <li>
<!-- <li>
<input class="styled-checkbox" id="styled-checkbox-2" type="radio" value="relevance" name="sort" (click)="setValue($event.target.value)">
<label for="styled-checkbox-2">Relevence</label>
</li> -->
<li>
<input
class=
"styled-checkbox"
id=
"styled-checkbox-3"
type=
"radio"
value=
"low"
name=
"sort"
(
click
)="
setValue
($
event
.
target
.
value
)"
>
<label
for=
"styled-checkbox-3"
>
Price Low - High
</label>
</li>
<li>
<input
class=
"styled-checkbox"
id=
"styled-checkbox-4"
type=
"radio"
value=
"high"
name=
"sort"
(
click
)="
setValue
($
event
.
target
.
value
)"
>
<label
for=
"styled-checkbox-4"
>
Price High - Low
</label>
</li>
<!-- <li>
<li>
<input
class=
"styled-checkbox"
id=
"styled-checkbox-3"
type=
"radio"
value=
"low"
name=
"sort"
(
click
)="
setValue
($
event
.
target
.
value
)"
/>
<label
for=
"styled-checkbox-3"
>
Price Low - High
</label>
</li>
<li>
<input
class=
"styled-checkbox"
id=
"styled-checkbox-4"
type=
"radio"
value=
"high"
name=
"sort"
(
click
)="
setValue
($
event
.
target
.
value
)"
/>
<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>
</li> -->
</ul>
<div
class=
"sort_footer"
>
<button
class=
"cancel floatLeft"
(
click
)="
istoggle
()"
>
CANCEL
</button>
<button
class=
"submit floatRight"
(
click
)="
istoggle
();
submit
()"
>
SUBMIT
</button
>
<div
class=
"clear"
></div>
</div
>
</div>
</ul>
<div
class=
"sort_footer"
>
<button
class=
"cancel floatLeft"
(
click
)="
istoggle
()"
>
CANCEL
</button>
<button
class=
"submit floatRight"
(
click
)="
istoggle
();
submit
()"
>
SUBMIT
</button
>
<
div
class=
"clear"
><
/div>
</div>
</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>
\ No newline at end of file
<ul
*
ngIf=
"searchService.searchList"
>
<li
*
ngFor=
"let search of searchService.searchList"
(
click
)="
viewPage
(
search
)"
>
{{search.text}}
</li>
</ul>
</div>
This diff is collapsed.
Click to expand it.
src/app/searchmodal/searchmodal.page.html
View file @
f6b936e8
<div
class=
"nav_header"
>
<button
class=
"nav_btn nav_back floatLeft"
(
click
)="
closeModal
()"
>
</button>
<div
class=
"nav_title floatLeft relative"
>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
(
click
)="
clickSearch
()"
(
input
)="
searchFun
($
event
.
target
.
value
)"
#
searchText
>
</div>
<button
class=
"nav_btn nav_close floatRight"
(
click
)="
closeModal
()"
>
</button>
<div
class=
"clear"
></div>
<button
class=
"nav_btn nav_back floatLeft"
(
click
)="
closeModal
()"
></button>
<div
class=
"nav_title floatLeft relative"
>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
(
click
)="
clickSearch
()"
(
input
)="
searchFun
($
event
.
target
.
value
)"
#
searchText
/>
</div>
<button
class=
"nav_btn nav_close floatRight"
(
click
)="
closeModal
()"
></button>
<div
class=
"clear"
></div>
</div>
<div
class=
"search_item_list"
>
<ul
*
ngIf=
"searchService.searchList"
>
<li
*
ngFor=
"let search of searchService.searchList"
(
click
)="
viewPage
(
search
)"
>
{{search.text}}
</li>
</ul>
</div>
\ No newline at end of file
<ul
*
ngIf=
"searchService.searchList"
>
<li
*
ngFor=
"let search of searchService.searchList"
(
click
)="
viewPage
(
search
)"
>
{{search.text}}
</li>
</ul>
</div>
This diff is collapsed.
Click to expand it.
src/app/storelist/storelist.page.html
View file @
f6b936e8
<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"
(
click
)="
clickSearch
()"
></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.centerName}}
</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.centerName}}
</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>
</ion-content>
<div
class=
"search_item_list"
*
ngIf=
"searchShow"
[@
slideInOut
]
>
<ul>
<li>
sample
</li>
</ul>
</div>
\ No newline at end of file
<ul>
<li>
sample
</li>
</ul>
</div>
This diff is collapsed.
Click to expand it.
src/config/auth.service.ts
View file @
f6b936e8
...
...
@@ -150,6 +150,7 @@ export class AuthService {
};
this
.
loggedUser
=
userData
;
this
.
service
.
set
(
'userData'
,
JSON
.
stringify
(
this
.
loggedUser
));
this
.
subjectService
.
sendUserData
(
JSON
.
stringify
(
this
.
loggedUser
));
console
.
log
(
this
.
loggedUser
);
});
}
...
...
This diff is collapsed.
Click to expand it.
src/config/subject.service.ts
View file @
f6b936e8
...
...
@@ -6,13 +6,22 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject';
providedIn
:
'root'
})
export
class
SubjectService
{
private
loginState
=
new
BehaviorSubject
<
any
>
(
null
);
private
loginState
=
new
BehaviorSubject
<
any
>
(
null
);
private
DataState
=
new
BehaviorSubject
<
any
>
(
null
);
sendLoginData
(
state
:
any
)
{
this
.
loginState
.
next
(
state
);
}
sendLoginData
(
state
:
any
)
{
this
.
loginState
.
next
(
state
);
}
getLoginData
():
Observable
<
any
>
{
return
this
.
loginState
.
asObservable
();
}
getLoginData
():
Observable
<
any
>
{
return
this
.
loginState
.
asObservable
();
}
sendUserData
(
state
:
any
)
{
this
.
DataState
.
next
(
state
);
}
getUserData
():
Observable
<
any
>
{
return
this
.
DataState
.
asObservable
();
}
}
This diff is collapsed.
Click to expand it.
src/global.scss
View file @
f6b936e8
This diff is collapsed.
Click to expand it.
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