Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers_angular
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
16
Issues
16
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
Tobin
dcarfixers_angular
Commits
08ba2501
Commit
08ba2501
authored
May 30, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixing and design issues
parent
2b1a4830
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
29 deletions
+49
-29
addaddress.component.ts
src/app/purchase/addaddress/addaddress.component.ts
+26
-9
address.component.html
src/app/purchase/address/address.component.html
+1
-1
orders.component.html
src/app/purchase/orders/orders.component.html
+3
-3
orders.component.ts
src/app/purchase/orders/orders.component.ts
+6
-0
productdetails.component.html
...app/purchase/productdetails/productdetails.component.html
+7
-7
productdetails.component.ts
src/app/purchase/productdetails/productdetails.component.ts
+0
-1
purchase-home.component.html
src/app/purchase/purchase-home/purchase-home.component.html
+6
-6
summary.component.ts
src/app/purchase/summary/summary.component.ts
+0
-1
track.component.ts
src/app/purchase/track/track.component.ts
+0
-1
No files found.
src/app/purchase/addaddress/addaddress.component.ts
View file @
08ba2501
...
@@ -42,12 +42,6 @@ export class AddaddressComponent implements OnInit {
...
@@ -42,12 +42,6 @@ export class AddaddressComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
prdtData
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'productDetails'
));
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
});
this
.
checkProductId
(
this
.
prdtData
[
'product_id'
]);
this
.
route
.
params
.
subscribe
(
val
=>
{
this
.
route
.
params
.
subscribe
(
val
=>
{
this
.
route
.
queryParams
.
subscribe
(
params
=>
{
this
.
route
.
queryParams
.
subscribe
(
params
=>
{
this
.
address_id
=
params
[
'address_id'
];
this
.
address_id
=
params
[
'address_id'
];
...
@@ -56,6 +50,9 @@ export class AddaddressComponent implements OnInit {
...
@@ -56,6 +50,9 @@ export class AddaddressComponent implements OnInit {
if
(
this
.
address_id
!=
''
){
if
(
this
.
address_id
!=
''
){
this
.
getUserAddressById
(
this
.
address_id
);
this
.
getUserAddressById
(
this
.
address_id
);
}
}
this
.
checkUserLogin
();
this
.
checkProductId
();
this
.
buildAddressForm
();
this
.
buildAddressForm
();
}
}
...
@@ -72,14 +69,34 @@ export class AddaddressComponent implements OnInit {
...
@@ -72,14 +69,34 @@ export class AddaddressComponent implements OnInit {
});
});
}
}
checkProductId
(
product_id
){
// checkProductId(product_id){
if
(
product_id
>
0
){
// if(product_id > 0){
this
.
product_id
=
product_id
;
// this.product_id = product_id;
// }else{
// this.goToPage('purchaseHome','');
// }
// }
checkProductId
(){
this
.
prdtData
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'productDetails'
));
if
(
this
.
prdtData
&&
this
.
prdtData
[
'product_id'
]
>
0
){
this
.
product_id
=
this
.
prdtData
[
'product_id'
];
}
else
{
}
else
{
this
.
goToPage
(
'purchaseHome'
,
''
);
this
.
goToPage
(
'purchaseHome'
,
''
);
}
}
}
}
checkUserLogin
(){
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
if
(
!
this
.
loginDetails
){
this
.
goToPage
(
'purchaseHome'
,
''
);
}
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
});
}
addressFormSubmit
(
data
){
addressFormSubmit
(
data
){
if
(
this
.
addaddressForm
.
invalid
){
if
(
this
.
addaddressForm
.
invalid
){
return
false
;
return
false
;
...
...
src/app/purchase/address/address.component.html
View file @
08ba2501
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</ng-template>
</ng-template>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<h2>
$ {{prdtData.total_amount}}
</h2>
<h2
*
ngIf=
"prdtData"
>
$ {{prdtData.total_amount}}
</h2>
<!-- <h5>Delivery expected by Thur 1 May 2019</h5> -->
<!-- <h5>Delivery expected by Thur 1 May 2019</h5> -->
</div>
</div>
...
...
src/app/purchase/orders/orders.component.html
View file @
08ba2501
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<h5>
{{prdt.product_name}}
</h5>
<h5>
{{prdt.product_name}}
</h5>
<p>
{{prdt.short_description}}
</p>
<p>
{{prdt.short_description}}
</p>
<div
class=
"star_ratting"
>
<div
class=
"star_ratting"
>
<fieldset
class=
"rating
"
*
ngIf=
"prdt.rating > 0
"
>
<fieldset
class=
"rating
prevent-click
"
>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'thirdStar_'+prdt.product_id+'_5'" [attr.name]="'thirdStarName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"thirdStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'thirdStar_'+prdt.product_id+'_5'" [attr.name]="'thirdStarName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"thirdStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"thirdStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"thirdStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"thirdStar4"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"thirdStar4"
></label>
...
@@ -70,11 +70,11 @@
...
@@ -70,11 +70,11 @@
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"thirdStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"thirdStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"thirdStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"thirdStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"thirdStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"thirdStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"0.5"
/><label
class=
"half"
for=
"thirdStarhalf"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
&&
prdt
.
rating
>
= 0.25
) ? 'true':''" [attr.id]="'thirdStar_'+prdt.product_id+'_half'" [attr.name]="'thirdStarName_'+prdt.product_id" value="0.5" />
<label
class=
"half"
for=
"thirdStarhalf"
></label>
</fieldset>
</fieldset>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
<p>
{{
prdt.reviews}} Reviews
</p>
<p>
{{
(prdt.reviews > 0)?prdt.reviews+' Reviews':'Be the first one to review.'}}
</p>
</div>
</div>
</div>
</div>
</li>
</li>
...
...
src/app/purchase/orders/orders.component.ts
View file @
08ba2501
...
@@ -41,9 +41,15 @@ export class OrdersComponent implements OnInit {
...
@@ -41,9 +41,15 @@ export class OrdersComponent implements OnInit {
checkUserLogin
(){
checkUserLogin
(){
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
if
(
!
this
.
loginDetails
){
this
.
goToPage
(
'purchaseHome'
,
''
);
}
}
}
getMyOrders
(){
getMyOrders
(){
if
(
!
this
.
loginDetails
){
this
.
goToPage
(
'purchaseHome'
,
''
);
}
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'getMyOrders'
,{
"customer_id"
:
this
.
loginDetails
.
customer_id
,
'page'
:
this
.
page
}).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'getMyOrders'
,{
"customer_id"
:
this
.
loginDetails
.
customer_id
,
'page'
:
this
.
page
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
if
(
response
.
status
==
'success'
){
...
...
src/app/purchase/productdetails/productdetails.component.html
View file @
08ba2501
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.75
&&
productDetails.rating
<
2
.
25
)
?
'
true
'
:
''"
id=
"firstStar2"
name=
"firstRating"
value=
"2"
/><label
class =
"full"
for=
"firstStar2"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.75
&&
productDetails.rating
<
2
.
25
)
?
'
true
'
:
''"
id=
"firstStar2"
name=
"firstRating"
value=
"2"
/><label
class =
"full"
for=
"firstStar2"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.25
&&
productDetails.rating
<
1
.
75
)
?
'
true
'
:
''"
id=
"firstStar1half"
name=
"firstRating"
value=
"1.5"
/><label
class=
"half"
for=
"firstStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.25
&&
productDetails.rating
<
1
.
75
)
?
'
true
'
:
''"
id=
"firstStar1half"
name=
"firstRating"
value=
"1.5"
/><label
class=
"half"
for=
"firstStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 0.75
&&
productDetails.rating
<
1
.
25
)
?
'
true
'
:
''"
id=
"firstStar1"
name=
"firstRating"
value=
"1"
/><label
class =
"full"
for=
"firstStar1"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 0.75
&&
productDetails.rating
<
1
.
25
)
?
'
true
'
:
''"
id=
"firstStar1"
name=
"firstRating"
value=
"1"
/><label
class =
"full"
for=
"firstStar1"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
<
0
.
75
)
?
'
true
'
:
''"
id=
"firstStarhalf"
name=
"firstRating"
value=
"0.5"
/><label
class=
"half"
for=
"firstStarhalf"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
<
0
.
75
&&
productDetails
.
rating
>
= 0.25
) ? 'true':''" id="firstStarhalf" name="firstRating" value="0.5" />
<label
class=
"half"
for=
"firstStarhalf"
></label>
</fieldset>
</fieldset>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.75
&&
productDetails.rating
<
2
.
25
)
?
'
true
'
:
''"
id=
"secondStar2"
name=
"secondRating"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.75
&&
productDetails.rating
<
2
.
25
)
?
'
true
'
:
''"
id=
"secondStar2"
name=
"secondRating"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.25
&&
productDetails.rating
<
1
.
75
)
?
'
true
'
:
''"
id=
"secondStar1half"
name=
"secondRating"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 1.25
&&
productDetails.rating
<
1
.
75
)
?
'
true
'
:
''"
id=
"secondStar1half"
name=
"secondRating"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 0.75
&&
productDetails.rating
<
1
.
25
)
?
'
true
'
:
''"
id=
"secondStar1"
name=
"secondRating"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
>
= 0.75
&&
productDetails.rating
<
1
.
25
)
?
'
true
'
:
''"
id=
"secondStar1"
name=
"secondRating"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
<
0
.
75
)
?
'
true
'
:
''"
id=
"secondStarhalf"
name=
"secondRating"
value=
"0.5"
/><label
class=
"half"
for=
"secondStarhalf"
></label>
<input
type=
"radio"
[
checked
]="(
productDetails
.
rating
<
0
.
75
&&
productDetails
.
rating
>
= 0.25
) ? 'true':''" id="secondStarhalf" name="secondRating" value="0.5" />
<label
class=
"half"
for=
"secondStarhalf"
></label>
</fieldset>
</fieldset>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
<input
type=
"radio"
[
checked
]="(
revws
.
rating
>
= 1.75
&&
revws.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
revws
.
id
+'
_2
'"
[
attr
.
name
]="'
usrReviewName_
'+
revws
.
id
"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
revws
.
rating
>
= 1.75
&&
revws.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
revws
.
id
+'
_2
'"
[
attr
.
name
]="'
usrReviewName_
'+
revws
.
id
"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
revws
.
rating
>
= 1.25
&&
revws.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
revws
.
id
+'
_1half
'"
[
attr
.
name
]="'
usrReviewName_
'+
revws
.
id
"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
revws
.
rating
>
= 1.25
&&
revws.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
revws
.
id
+'
_1half
'"
[
attr
.
name
]="'
usrReviewName_
'+
revws
.
id
"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
revws
.
rating
>
= 0.75
&&
revws.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
revws
.
id
+'
_1
'"
[
attr
.
name
]="'
usrReviewName_
'+
revws
.
id
"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
revws
.
rating
>
= 0.75
&&
revws.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
revws
.
id
+'
_1
'"
[
attr
.
name
]="'
usrReviewName_
'+
revws
.
id
"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
revws
.
rating
<
0
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
revws
.
id
+'
_half
'"
[
attr
.
name
]="'
usrReviewName_
'+
revws
.
id
"
value=
"0.5"
/><label
class=
"half"
for=
"secondStarhalf"
></label>
<input
type=
"radio"
[
checked
]="(
revws
.
rating
<
0
.
75
&&
revws
.
rating
>
= 0.25
) ? 'true':''" [attr.id]="'usrReviewId_'+revws.id+'_half'" [attr.name]="'usrReviewName_'+revws.id" value="0.5" />
<label
class=
"half"
for=
"secondStarhalf"
></label>
</fieldset>
</fieldset>
</div>
</div>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
...
@@ -117,8 +117,8 @@
...
@@ -117,8 +117,8 @@
</div>
</div>
<h5>
{{prdt.product_name}}
</h5>
<h5>
{{prdt.product_name}}
</h5>
<p>
{{prdt.short_description}}
</p>
<p>
{{prdt.short_description}}
</p>
<div
class=
"star_ratting"
>
<div
class=
"star_ratting
prevent-click
"
>
<fieldset
class=
"rating"
*
ngIf=
"prdt.rating > 0"
>
<fieldset
class=
"rating"
>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'thirdStar_'+prdt.product_id+'_5'" [attr.name]="'thirdStarName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"thirdStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'thirdStar_'+prdt.product_id+'_5'" [attr.name]="'thirdStarName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"thirdStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"thirdStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"thirdStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"thirdStar4"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"thirdStar4"
></label>
...
@@ -128,11 +128,11 @@
...
@@ -128,11 +128,11 @@
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"thirdStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"thirdStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"thirdStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"thirdStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"thirdStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"thirdStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
thirdStar_
'+
prdt
.
product_id
+'
_half
'"
[
attr
.
name
]="'
thirdStarName_
'+
prdt
.
product_id
"
value=
"0.5"
/><label
class=
"half"
for=
"thirdStarhalf"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
&&
prdt
.
rating
>
= 0.25
) ? 'true':''" [attr.id]="'thirdStar_'+prdt.product_id+'_half'" [attr.name]="'thirdStarName_'+prdt.product_id" value="0.5" />
<label
class=
"half"
for=
"thirdStarhalf"
></label>
</fieldset>
</fieldset>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
<p>
{{
prdt.reviews}} Reviews
</p>
<p>
{{
(prdt.reviews > 0)?prdt.reviews+' Reviews':'Be the first one to review.'}}
</p>
</div>
</div>
</div>
</div>
</li>
</li>
...
...
src/app/purchase/productdetails/productdetails.component.ts
View file @
08ba2501
...
@@ -88,7 +88,6 @@ export class ProductdetailsComponent implements OnInit {
...
@@ -88,7 +88,6 @@ export class ProductdetailsComponent implements OnInit {
this
.
productDetails
=
response
.
data
;
this
.
productDetails
=
response
.
data
;
this
.
reviewArray
=
response
.
data
.
reviews
.
data
;
this
.
reviewArray
=
response
.
data
.
reviews
.
data
;
this
.
total_page
=
response
.
data
.
reviews
.
meta
.
total_pages
;
this
.
total_page
=
response
.
data
.
reviews
.
meta
.
total_pages
;
console
.
log
(
response
.
data
)
if
(
this
.
productDetails
.
images
.
length
>
0
){
if
(
this
.
productDetails
.
images
.
length
>
0
){
thisObj
.
productDetails
.
images
.
forEach
(
function
(
data
)
{
thisObj
.
productDetails
.
images
.
forEach
(
function
(
data
)
{
image
=
thisObj
.
imageServer
+
data
.
image
;
image
=
thisObj
.
imageServer
+
data
.
image
;
...
...
src/app/purchase/purchase-home/purchase-home.component.html
View file @
08ba2501
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<h5>
{{prdt.product_name}}
</h5>
<h5>
{{prdt.product_name}}
</h5>
<p>
{{prdt.short_description}}
</p>
<p>
{{prdt.short_description}}
</p>
<div
class=
"star_ratting"
>
<div
class=
"star_ratting"
>
<fieldset
class=
"rating
"
*
ngIf=
"prdt.rating > 0
"
>
<fieldset
class=
"rating
prevent-click
"
>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'usrStar_'+prdt.product_id+'_5'" [attr.name]="'usrStarName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"secondStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'usrStar_'+prdt.product_id+'_5'" [attr.name]="'usrStarName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"secondStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"secondStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"secondStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"secondStar4"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"secondStar4"
></label>
...
@@ -40,11 +40,11 @@
...
@@ -40,11 +40,11 @@
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrStar_
'+
prdt
.
product_id
+'
_half
'"
[
attr
.
name
]="'
usrStarName_
'+
prdt
.
product_id
"
value=
"0.5"
/><label
class=
"half"
for=
"secondStarhalf"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
&&
prdt
.
rating
>
= 0.25
) ? 'true':''" [attr.id]="'usrStar_'+prdt.product_id+'_half'" [attr.name]="'usrStarName_'+prdt.product_id" value="0.5" />
<label
class=
"half"
for=
"secondStarhalf"
></label>
</fieldset>
</fieldset>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
<p>
{{
prdt.reviews}} Reviews
</p>
<p>
{{
(prdt.reviews > 0)?prdt.reviews+' Reviews':'Be the first one to review.'}}
</p>
</div>
</div>
</div>
</div>
</li>
</li>
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
<h5>
{{prdt.product_name}}
</h5>
<h5>
{{prdt.product_name}}
</h5>
<p>
{{prdt.short_description}}
</p>
<p>
{{prdt.short_description}}
</p>
<div
class=
"star_ratting"
>
<div
class=
"star_ratting"
>
<fieldset
class=
"rating
"
*
ngIf=
"prdt.rating > 0
"
>
<fieldset
class=
"rating
prevent-click
"
>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_5'" [attr.name]="'usrReviewName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"secondStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_5'" [attr.name]="'usrReviewName_'+prdt.product_id" value="5" />
<label
class =
"full"
for=
"secondStar5"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"secondStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 4.25
&&
prdt.rating
<
4
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_4half
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"4.5"
/><label
class=
"half"
for=
"secondStar4half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"secondStar4"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 3.75
&&
prdt.rating
<
4
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_4
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"4"
/><label
class =
"full"
for=
"secondStar4"
></label>
...
@@ -81,11 +81,11 @@
...
@@ -81,11 +81,11 @@
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.75
&&
prdt.rating
<
2
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_2
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"2"
/><label
class =
"full"
for=
"secondStar2"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 1.25
&&
prdt.rating
<
1
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_1half
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"1.5"
/><label
class=
"half"
for=
"secondStar1half"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
>
= 0.75
&&
prdt.rating
<
1
.
25
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_1
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"1"
/><label
class =
"full"
for=
"secondStar1"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
)
?
'
true
'
:
''"
[
attr
.
id
]="'
usrReviewId_
'+
prdt
.
product_id
+'
_half
'"
[
attr
.
name
]="'
usrReviewName_
'+
prdt
.
product_id
"
value=
"0.5"
/><label
class=
"half"
for=
"secondStarhalf"
></label>
<input
type=
"radio"
[
checked
]="(
prdt
.
rating
<
0
.
75
&&
prdt
.
rating
>
= 0.25
) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_half'" [attr.name]="'usrReviewName_'+prdt.product_id" value="0.5" />
<label
class=
"half"
for=
"secondStarhalf"
></label>
</fieldset>
</fieldset>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<span
class=
"floatRight"
>
$ {{prdt.amount}}
</span>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
<p>
{{
prdt.reviews}} Reviews
</p>
<p>
{{
(prdt.reviews > 0)?prdt.reviews+' Reviews':'Be the first one to review.'}}
</p>
</div>
</div>
</div>
</div>
</li>
</li>
...
...
src/app/purchase/summary/summary.component.ts
View file @
08ba2501
...
@@ -76,7 +76,6 @@ export class SummaryComponent implements OnInit {
...
@@ -76,7 +76,6 @@ export class SummaryComponent implements OnInit {
this
.
webService
.
post_data
(
'SingleProductSearch'
,{
'product_id'
:
this
.
product_id
}).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'SingleProductSearch'
,{
'product_id'
:
this
.
product_id
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
if
(
response
.
status
==
'success'
){
this
.
productDetails
=
response
.
data
;
this
.
productDetails
=
response
.
data
;
console
.
log
(
this
.
productDetails
)
}
else
{
}
else
{
this
.
productDetails
=
false
;
this
.
productDetails
=
false
;
}
}
...
...
src/app/purchase/track/track.component.ts
View file @
08ba2501
...
@@ -126,7 +126,6 @@ export class TrackComponent implements OnInit {
...
@@ -126,7 +126,6 @@ export class TrackComponent implements OnInit {
const
thisObj
=
this
;
const
thisObj
=
this
;
this
.
orderDetails
=
response
.
data
;
this
.
orderDetails
=
response
.
data
;
this
.
userReviewed
=
(
this
.
orderDetails
.
review_id
<=
0
&&
(
this
.
orderDetails
.
odr_status
==
'5'
||
this
.
orderDetails
.
odr_status
==
'6'
||
this
.
orderDetails
.
odr_status
==
'7'
))?
false
:
true
;
this
.
userReviewed
=
(
this
.
orderDetails
.
review_id
<=
0
&&
(
this
.
orderDetails
.
odr_status
==
'5'
||
this
.
orderDetails
.
odr_status
==
'6'
||
this
.
orderDetails
.
odr_status
==
'7'
))?
false
:
true
;
console
.
log
(
this
.
userReviewed
);
if
(
this
.
orderDetails
.
images
.
length
>
0
){
if
(
this
.
orderDetails
.
images
.
length
>
0
){
thisObj
.
orderDetails
.
images
.
forEach
(
function
(
data
)
{
thisObj
.
orderDetails
.
images
.
forEach
(
function
(
data
)
{
image
=
thisObj
.
imageServer
+
data
.
image
;
image
=
thisObj
.
imageServer
+
data
.
image
;
...
...
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