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
54e31d19
Commit
54e31d19
authored
Jun 11, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index page and design issues
parent
7247e745
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
157 additions
and
91 deletions
+157
-91
package-lock.json
package-lock.json
+24
-41
index.component.html
src/app/home/index/index.component.html
+2
-2
index.component.ts
src/app/home/index/index.component.ts
+26
-13
navbar.component.html
src/app/navbar/navbar.component.html
+16
-4
navbar.component.scss
src/app/navbar/navbar.component.scss
+21
-0
navbar.component.ts
src/app/navbar/navbar.component.ts
+18
-2
addaddress.component.ts
src/app/purchase/addaddress/addaddress.component.ts
+4
-12
orders.component.html
src/app/purchase/orders/orders.component.html
+1
-1
productdetails.component.html
...app/purchase/productdetails/productdetails.component.html
+3
-3
productdetails.component.ts
src/app/purchase/productdetails/productdetails.component.ts
+6
-2
productlist.component.html
src/app/purchase/productlist/productlist.component.html
+3
-5
productlist.component.scss
src/app/purchase/productlist/productlist.component.scss
+1
-0
productlist.component.ts
src/app/purchase/productlist/productlist.component.ts
+11
-0
purchase-home.component.html
src/app/purchase/purchase-home/purchase-home.component.html
+4
-4
purchase-home.component.scss
src/app/purchase/purchase-home/purchase-home.component.scss
+1
-0
purchase-home.component.ts
src/app/purchase/purchase-home/purchase-home.component.ts
+1
-0
searchbar.component.html
src/app/purchase/searchbar/searchbar.component.html
+1
-1
searchbar.component.ts
src/app/purchase/searchbar/searchbar.component.ts
+14
-1
No files found.
package-lock.json
View file @
54e31d19
...
...
@@ -379,8 +379,7 @@
"ansi-regex"
:
{
"version"
:
"2.1.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"aproba"
:
{
"version"
:
"1.2.0"
,
...
...
@@ -401,14 +400,12 @@
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"brace-expansion"
:
{
"version"
:
"1.1.11"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"balanced-match"
:
"^1.0.0"
,
"concat-map"
:
"0.0.1"
...
...
@@ -423,20 +420,17 @@
"code-point-at"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"concat-map"
:
{
"version"
:
"0.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"console-control-strings"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"core-util-is"
:
{
"version"
:
"1.0.2"
,
...
...
@@ -553,8 +547,7 @@
"inherits"
:
{
"version"
:
"2.0.3"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"ini"
:
{
"version"
:
"1.3.5"
,
...
...
@@ -566,7 +559,6 @@
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"number-is-nan"
:
"^1.0.0"
}
...
...
@@ -581,7 +573,6 @@
"version"
:
"3.0.4"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"brace-expansion"
:
"^1.1.7"
}
...
...
@@ -595,7 +586,6 @@
"version"
:
"2.3.5"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"safe-buffer"
:
"^5.1.2"
,
"yallist"
:
"^3.0.0"
...
...
@@ -694,8 +684,7 @@
"number-is-nan"
:
{
"version"
:
"1.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"object-assign"
:
{
"version"
:
"4.1.1"
,
...
...
@@ -707,7 +696,6 @@
"version"
:
"1.4.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"wrappy"
:
"1"
}
...
...
@@ -793,8 +781,7 @@
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"safer-buffer"
:
{
"version"
:
"2.1.2"
,
...
...
@@ -830,7 +817,6 @@
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"code-point-at"
:
"^1.0.0"
,
"is-fullwidth-code-point"
:
"^1.0.0"
,
...
...
@@ -850,7 +836,6 @@
"version"
:
"3.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-regex"
:
"^2.0.0"
}
...
...
@@ -894,14 +879,12 @@
"wrappy"
:
{
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"yallist"
:
{
"version"
:
"3.0.3"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
}
}
},
...
...
@@ -2593,7 +2576,7 @@
},
"camelcase-keys"
:
{
"version"
:
"2.1.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz"
,
"integrity"
:
"sha1-MIvur/3ygRkFHvodkyITyRuPkuc="
,
"requires"
:
{
"camelcase"
:
"^2.0.0"
,
...
...
@@ -6398,7 +6381,7 @@
},
"load-json-file"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz"
,
"integrity"
:
"sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA="
,
"requires"
:
{
"graceful-fs"
:
"^4.1.2"
,
...
...
@@ -6410,7 +6393,7 @@
"dependencies"
:
{
"pify"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/pify/-/pify-2.3.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz"
,
"integrity"
:
"sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
...
...
@@ -6748,7 +6731,7 @@
},
"meow"
:
{
"version"
:
"3.7.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/meow/-/meow-3.7.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/meow/-/meow-3.7.0.tgz"
,
"integrity"
:
"sha1-cstmi0JSKCkKu/qFaJJYcwioAfs="
,
"requires"
:
{
"camelcase-keys"
:
"^2.0.0"
,
...
...
@@ -6765,7 +6748,7 @@
"dependencies"
:
{
"minimist"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz"
,
"integrity"
:
"sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
...
...
@@ -7175,7 +7158,7 @@
"dependencies"
:
{
"semver"
:
{
"version"
:
"5.3.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
,
"integrity"
:
"sha1-myzl094C0XxgEq0yaqa00M9U+U8="
}
}
...
...
@@ -7259,7 +7242,7 @@
},
"chalk"
:
{
"version"
:
"1.1.3"
,
"resolved"
:
"http
s
://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
,
"resolved"
:
"http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
,
"integrity"
:
"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg="
,
"requires"
:
{
"ansi-styles"
:
"^2.2.1"
,
...
...
@@ -7276,7 +7259,7 @@
},
"supports-color"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
,
"integrity"
:
"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
...
...
@@ -7571,7 +7554,7 @@
},
"os-locale"
:
{
"version"
:
"1.4.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz"
,
"integrity"
:
"sha1-IPnxeuKe00XoveWDsT0gCYA8FNk="
,
"requires"
:
{
"lcid"
:
"^1.0.0"
...
...
@@ -8437,7 +8420,7 @@
},
"pify"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/pify/-/pify-2.3.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/pify/-/pify-2.3.0.tgz"
,
"integrity"
:
"sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
...
...
@@ -8861,7 +8844,7 @@
"dependencies"
:
{
"source-map"
:
{
"version"
:
"0.4.4"
,
"resolved"
:
"http
s
://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz"
,
"resolved"
:
"http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz"
,
"integrity"
:
"sha1-66T12pwNyZneaAMti092FzZSA2s="
,
"requires"
:
{
"amdefine"
:
">=0.0.4"
...
...
@@ -10315,9 +10298,9 @@
"dev"
:
true
},
"uglify-js"
:
{
"version"
:
"3.
5.15
"
,
"resolved"
:
"https://registry.npmjs.org/uglify-js/-/uglify-js-3.
5.15
.tgz"
,
"integrity"
:
"sha512-
fe7aYFotptIddkwcm6YuA0HmknBZ52ZzOsUxZEdhhkSsz7RfjHDX2QDxwKTiv4JQ5t5NhfmpgAK+J7LiDhKSq
g=="
,
"version"
:
"3.
6.0
"
,
"resolved"
:
"https://registry.npmjs.org/uglify-js/-/uglify-js-3.
6.0
.tgz"
,
"integrity"
:
"sha512-
W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+y
g=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
...
...
src/app/home/index/index.component.html
View file @
54e31d19
...
...
@@ -265,7 +265,7 @@
<div
class=
"col-md-6"
>
<select
(
change
)="
get_model
($
event
.
target
.
value
)"
formControlName=
"maker"
[
ngClass
]="{'
input_error
'
:
!
vehicleDataForm
.
controls
['
maker
'].
valid
&&
vehicleDataFormSubmit
}"
>
<option
value=
""
class=
"hide"
>
MAKE
</option>
<option
*
ngFor=
"let car_date of carSearchJsonData; let key = index"
value=
"{{
key}}"
>
{{car_date.brand
}}
</option>
<option
*
ngFor=
"let car_date of carSearchJsonData; let key = index"
value=
"{{
car_date.veh_brand_id}}"
>
{{car_date.maker
}}
</option>
</select>
</div>
</div>
...
...
@@ -273,7 +273,7 @@
<div
class=
"col-md-6"
>
<select
formControlName=
"modelName"
[
ngClass
]="{'
input_error
'
:
!
vehicleDataForm
.
controls
['
modelName
'].
valid
&&
vehicleDataFormSubmit
}"
>
<option
value=
""
class=
"hide"
>
MODEL
</option>
<option
*
ngFor=
"let car_models of carModel"
>
{{car_models}}
</option>
<option
*
ngFor=
"let car_models of carModel"
>
{{car_models
.model
}}
</option>
</select>
</div>
<div
class=
"col-md-6"
>
...
...
src/app/home/index/index.component.ts
View file @
54e31d19
...
...
@@ -18,7 +18,6 @@ declare const google: any;
styleUrls
:
[
'./index.component.scss'
]
})
export
class
IndexComponent
implements
OnInit
{
public
featuredOn
:
NgxCarousel
;
public
carouselTile
:
NgxCarousel
;
...
...
@@ -119,9 +118,10 @@ export class IndexComponent implements OnInit {
modelName
:
new
FormControl
(
''
,
[
Validators
.
required
])
});
this
.
webService
.
get_stored_json
(
'car-list.json'
).
subscribe
((
response
:
any
)
=>
{
this
.
carSearchJsonData
=
response
;
});
// this.webService.get_stored_json('car-list.json').subscribe((response: any) => {
// this.carSearchJsonData = response;
// });
this
.
getVehicleBrand
();
let
currentYear
=
Number
((
new
Date
()).
getFullYear
());
let
startingYear
=
currentYear
-
50
;
...
...
@@ -155,8 +155,21 @@ export class IndexComponent implements OnInit {
$
(
'body'
).
attr
(
'style'
,
''
);
}
getVehicleBrand
(){
this
.
webService
.
get_data
(
'getVehicleBrand'
).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
carSearchJsonData
=
response
.
data
;
}
});
}
get_model
(
event
)
{
this
.
carModel
=
this
.
carSearchJsonData
[
event
].
models
;
this
.
webService
.
post_data
(
'getVehicleModel'
,{
'vehBrand_id'
:
event
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
carModel
=
response
.
data
;
}
});
// this.carModel = this.carSearchJsonData[event].models;
}
getVehicleLoc
(
lastLoc
){
...
...
@@ -201,11 +214,11 @@ export class IndexComponent implements OnInit {
'modelName'
:
vehicleData
[
'modelName'
],
'modelYear'
:
vehicleData
[
'modelYear'
],
'maintanenceInterval'
:
vehicleData
[
'maintanence_interval'
]
}
console
.
log
(
this
.
wizardData
[
'vechile_info'
])
//
console.log(this.wizardData['vechile_info'])
this
.
vehicleDataFormSubmit
=
false
;
}
}
getIssueData
(){
getIssueData
(){
const
This
=
this
;
this
.
loader
=
true
;
this
.
webService
.
get_data
(
'getGeneralIssues'
).
subscribe
(
response
=>
{
...
...
@@ -221,9 +234,9 @@ export class IndexComponent implements OnInit {
this
.
loader
=
false
;
return
false
;
});
}
}
searchIssues
(
event
){
searchIssues
(
event
){
if
(
event
.
target
.
value
==
''
||
event
.
target
.
value
==
'undefined'
||
event
.
target
.
value
==
undefined
||
event
.
target
.
value
==
'null'
||
event
.
target
.
value
==
null
){
this
.
issuesData
=
this
.
defIssuesData
;
}
else
{
...
...
@@ -254,8 +267,8 @@ export class IndexComponent implements OnInit {
$
(
'[id="issue_'
+
issues
.
issue_id
+
'_'
+
issues
.
sub_issue_id
+
'"]'
).
prop
(
'checked'
,
true
);
});
},
500
);
}
get_newlocaion
(
lastLoc
){
}
get_newlocaion
(
lastLoc
){
this
.
cfautocomplete
.
addListener
(
"place_changed"
,
()
=>
{
this
.
ngZone
.
run
(()
=>
{
let
places
:
google
.
maps
.
places
.
PlaceResult
=
this
.
cfautocomplete
.
getPlace
();
...
...
@@ -365,7 +378,7 @@ export class IndexComponent implements OnInit {
thisObj
.
selectedIssues
.
forEach
(
function
(
selIssues
)
{
selSubIssues
.
push
(
selIssues
.
sub_issue_id
);
});
console
.
log
(
this
.
wizardData
)
//
console.log(this.wizardData)
let
searchData
=
{
'pickup_data'
:
this
.
wizardData
.
pickup_data
,
'sub_issues'
:
selSubIssues
}
this
.
webService
.
post_data
(
'getNearByMechanics'
,
searchData
).
subscribe
(
response
=>
{
if
(
response
.
status
==
'1'
){
...
...
src/app/navbar/navbar.component.html
View file @
54e31d19
...
...
@@ -24,14 +24,19 @@
HOME
</a>
</li>
<li
class=
"nav-item"
*
ngIf=
"loginDetails"
>
<a
class=
"nav-link"
(
click
)="
goToPage
('
dashboard
')"
>
DASHBOARD
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
(
click
)="
goToPage
('
purchaseHome
')"
>
PURCHASE
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link base_arrow dropdown"
>
<div
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<a
class=
"nav-link base_arrow dropdown"
data-toggle=
"dropdown"
>
<div
class=
"dropdown-toggle"
>
CAR OWNERS
</div>
<div
class=
"dropdown-menu"
>
...
...
@@ -73,8 +78,6 @@
<div
class=
"clear"
></div>
</div>
<div
class=
"dropdown-menu"
>
<a
class=
"dropdown-item"
(
click
)="
goToPage
('
dashboard
')"
>
My Dashboard
</a>
<a
class=
"dropdown-item"
(
click
)="
logout
()"
>
Logout
</a>
</div>
</a>
...
...
@@ -387,6 +390,7 @@
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<input
class=
""
type=
"email"
placeholder=
"Email"
formControlName=
"email"
...
...
@@ -410,6 +414,14 @@
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<select
formControlName=
"shop_id"
>
<option
[
attr
.
value
]="
0
"
[
attr
.
selected
]=
true
[
attr
.
disabled
]="
true
"
>
Select
</option>
<option
*
ngFor=
"let shop of mechShop"
[
attr
.
value
]="
shop
.
shop_id
"
>
{{shop.shop_name}}
</option>
</select>
</div>
</div>
<div
*
ngIf=
"spSignupResponse"
class=
"s_alert"
[
ngClass
]="(
spSignupResponse
.
status =
=
'
success
')
?
'
alert-success
'
:
'
alert-danger
'"
>
<strong>
{{spSignupResponse.message}}
<br></strong>
</div>
...
...
src/app/navbar/navbar.component.scss
View file @
54e31d19
...
...
@@ -213,6 +213,27 @@
margin
:
0px
;
padding
:
0px
;
}
select
{
border
:
1px
solid
#1e1e1e
;
height
:
40px
;
width
:
100%
;
border-radius
:
10px
;
font-size
:
16px
;
-webkit-border-radius
:
10px
;
-moz-border-radius
:
10px
;
-ms-border-radius
:
10px
;
-o-border-radius
:
10px
;
text-align
:
center
;
option
{
text-align
:
center
;
}
&
:
:
placeholder
{
color
:
#bbbbbb
;
}
&
:focus
{
outline
:
none
;
}
}
input
{
border
:
1px
solid
#1e1e1e
;
height
:
40px
;
...
...
src/app/navbar/navbar.component.ts
View file @
54e31d19
...
...
@@ -17,13 +17,14 @@ declare const window: any;
export
class
NavbarComponent
implements
OnInit
{
data
:
any
;
loader
:
boolean
;
imageServer
:
any
;
loginDetails
:
any
;
loginResponse
:
any
;
forgotResponse
:
any
;
signupResponse
:
any
;
spSignupResponse
:
any
;
mechShop
:
any
;
loader
:
boolean
;
loginSubmitClick
:
boolean
;
forgotSubmitClick
:
boolean
;
signupSubmitClick
:
boolean
;
...
...
@@ -58,6 +59,7 @@ export class NavbarComponent implements OnInit {
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
});
this
.
getMechanicShops
();
this
.
loginForm
=
new
FormGroup
({
email
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
maxLength
(
50
),
Validators
.
pattern
(
'^[a-z0-9._%+-]+@[a-z0-9.-]+
\
.[a-z]{2,4}$'
)]),
password
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
maxLength
(
16
),
Validators
.
minLength
(
6
)])
...
...
@@ -83,10 +85,24 @@ export class NavbarComponent implements OnInit {
phone
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
pattern
(
"^[0-9
\
( ) + , - ]+$"
)]),
password
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
maxLength
(
16
),
Validators
.
minLength
(
6
)]),
last_name
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
pattern
(
"^[a-zA-Z
\
_ - '
\
/]+$"
)]),
first_name
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
pattern
(
"^[a-zA-Z
\
_ - '
\
/]+$"
)])
first_name
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
pattern
(
"^[a-zA-Z
\
_ - '
\
/]+$"
)]),
shop_id
:
new
FormControl
(
''
)
});
}
getMechanicShops
(){
this
.
loader
=
true
;
this
.
webService
.
get_data
(
'getMechanicShops'
).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
mechShop
=
response
.
data
;
}
else
{
this
.
mechShop
=
false
;
}
this
.
loader
=
false
;
})
}
loginSubmit
(
data
)
{
if
(
this
.
loginForm
.
invalid
){
return
false
;
...
...
src/app/purchase/addaddress/addaddress.component.ts
View file @
54e31d19
...
...
@@ -47,13 +47,13 @@ export class AddaddressComponent implements OnInit {
this
.
address_id
=
params
[
'address_id'
];
});
});
if
(
this
.
address_id
!=
''
){
this
.
getUserAddressById
(
this
.
address_id
);
}
this
.
checkUserLogin
();
this
.
checkProductId
();
this
.
buildAddressForm
();
if
(
this
.
address_id
>
0
){
this
.
getUserAddressById
(
this
.
address_id
);
}
}
buildAddressForm
(){
...
...
@@ -69,14 +69,6 @@ export class AddaddressComponent implements OnInit {
});
}
// checkProductId(product_id){
// if(product_id > 0){
// this.product_id = product_id;
// }else{
// this.goToPage('purchaseHome','');
// }
// }
checkProductId
(){
this
.
prdtData
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'productDetails'
));
...
...
src/app/purchase/orders/orders.component.html
View file @
54e31d19
...
...
@@ -53,7 +53,7 @@
<ngx-carousel
[
inputs
]="
carouselTile
"
(
carouselLoad
)="
carouselTileLoad
()"
*
ngIf=
"trendingProductData"
>
<ngx-tile
NgxCarouselItem
*
ngFor=
"let prdt of trendingProductData"
>
<li
(
click
)="
latestPrdtDtls
(
prdt
.
product_id
)"
>
<div
class=
"inner_div_product"
>
<div
class=
"inner_div_product
cpoint
"
>
<div
class=
"product_wrapper"
>
<img
src=
"{{imageServer + prdt.product_image}}"
onerror=
"this.src='assets/images/user_avatar.jpg'"
>
</div>
...
...
src/app/purchase/productdetails/productdetails.component.html
View file @
54e31d19
...
...
@@ -20,8 +20,8 @@
<div
class=
"product_details"
>
<h1>
{{productDetails.product_name}}
</h1>
<h2>
{{productDetails.short_description}}
</h2>
<h
4><div>
Brand
</div><span>
{{productDetails.brand_name}}
</span>
</h4>
<h4><div>
Part ID
</div><span>
PRD152685425
</span></h4>
<h
2>
Brand :
</h2><h4>
{{productDetails.brand_name}}
</h4>
<div
*
ngIf=
"productDetails.part_id"
><h2>
Part ID :
</h2><h4>
{{productDetails.part_id}}
</h4></div>
<h3>
$ {{productDetails.amount}}
</h3>
<div
class=
"rating_div"
*
ngIf=
"productDetails.rating"
>
<fieldset
class=
"rating prevent-click"
>
...
...
@@ -113,7 +113,7 @@
<ngx-carousel
[
inputs
]="
carouselTile
"
(
carouselLoad
)="
carouselTileLoad
()"
*
ngIf=
"trendingProductData"
>
<ngx-tile
NgxCarouselItem
*
ngFor=
"let prdt of trendingProductData"
>
<li
(
click
)="
latestPrdtDtls
(
prdt
.
product_id
)"
>
<div
class=
"inner_div_product"
>
<div
class=
"inner_div_product
cpoint
"
>
<div
class=
"product_wrapper"
>
<img
src=
"{{imageServer + prdt.product_image}}"
onerror=
"this.src='assets/images/user_avatar.jpg'"
>
</div>
...
...
src/app/purchase/productdetails/productdetails.component.ts
View file @
54e31d19
...
...
@@ -52,7 +52,6 @@ export class ProductdetailsComponent implements OnInit {
this
.
route
.
queryParams
.
subscribe
(
params
=>
{
this
.
product_id
=
params
[
'product_id'
];
});
this
.
getProductDetails
();
});
if
(
!
this
.
product_id
){
...
...
@@ -70,6 +69,7 @@ export class ProductdetailsComponent implements OnInit {
this
.
designModules
();
this
.
checkUserLogin
();
this
.
trendingProducts
();
this
.
getProductDetails
();
}
checkUserLogin
(){
...
...
@@ -81,7 +81,11 @@ export class ProductdetailsComponent implements OnInit {
getProductDetails
(){
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'SingleProductSearch'
,{
"product_id"
:
this
.
product_id
,
'page'
:
this
.
page
}).
subscribe
(
response
=>
{
let
user_id
:
number
=
0
;
if
(
this
.
loginDetails
&&
this
.
loginDetails
.
customer_id
){
user_id
=
this
.
loginDetails
.
customer_id
;
}
this
.
webService
.
post_data
(
'SingleProductSearch'
,{
"product_id"
:
this
.
product_id
,
'page'
:
this
.
page
,
'user_id'
:
user_id
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
let
image
:
string
=
''
;
let
imageArr
:
any
[]
=
new
Array
();
...
...
src/app/purchase/productlist/productlist.component.html
View file @
54e31d19
...
...
@@ -29,9 +29,7 @@
<ul
id=
"ac3"
class=
"collapse in show"
>
<h6
class=
"backgroundNone borderNone"
>
<select>
<option>
Year
</option>
<option
*
ngFor=
"let date of modelDates"
>
{{date}}
</option>
</select>
</h6>
<h6
class=
"backgroundNone borderNone"
>
...
...
@@ -66,7 +64,7 @@
</div>
</div>
<div
class=
"loader_overlay"
*
ngIf=
"loader"
></div>
<div
class=
"search_listing_content"
*
ngIf=
"productArray && productArray.length > 0;else noProductData"
>
<div
class=
"search_listing_content
cpoint
"
*
ngIf=
"productArray && productArray.length > 0;else noProductData"
>
<ul
infiniteScroll
[
infiniteScrollDistance
]="
2
"
[
infiniteScrollThrottle
]="
50
"
(
scrolled
)="
onScroll
()"
[
scrollWindow
]="
false
"
style=
"max-height: 700px; overflow: scroll"
>
<li
*
ngFor=
"let prdt of productArray"
>
<div
class=
"inner_div_product cpoint"
(
click
)="
getSingleProductDetails
(
prdt
.
product_id
)"
>
...
...
@@ -76,7 +74,7 @@
<h5>
{{prdt.product_name}}
</h5>
<p>
{{prdt.short_description}}
</p>
<div
class=
"star_ratting"
>
<fieldset
class=
"rating prevent-click
hide
"
>
<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.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>
...
...
src/app/purchase/productlist/productlist.component.scss
View file @
54e31d19
...
...
@@ -282,6 +282,7 @@
.rating
{
border
:
none
;
float
:
left
;
position
:
relative
;
}
.rating
>
input
{
display
:
none
;
}
...
...
src/app/purchase/productlist/productlist.component.ts
View file @
54e31d19
...
...
@@ -22,6 +22,7 @@ export class ProductlistComponent implements OnInit {
page
:
number
=
1
;
total_page
:
number
=
1
;
filterParam
:
any
=
new
Array
();
modelDates
:
number
[]
=
new
Array
();
constructor
(
private
router
:
Router
,
...
...
@@ -50,6 +51,16 @@ export class ProductlistComponent implements OnInit {
ngOnInit
()
{
this
.
getBrand
();
this
.
getYear
();
}
getYear
(){
let
currentYear
=
Number
((
new
Date
()).
getFullYear
());
let
startingYear
=
currentYear
-
110
;
for
(
let
date
=
currentYear
;
date
>=
startingYear
;
date
--
)
{
this
.
modelDates
.
push
(
date
);
}
console
.
log
(
this
.
modelDates
);
}
goToPage
(
path
,
data
=
null
){
...
...
src/app/purchase/purchase-home/purchase-home.component.html
View file @
54e31d19
...
...
@@ -12,7 +12,7 @@
<ngx-carousel
[
inputs
]="
carouselTile
"
(
carouselLoad
)="
carouselTileLoad
()"
*
ngIf=
"latestProductData"
>
<ngx-tile
NgxCarouselItem
*
ngFor=
"let prdt of latestProductData"
>
<li
(
click
)="
latestPrdtDtls
(
prdt
.
product_id
)"
>
<div
class=
"inner_div_product"
>
<div
class=
"inner_div_product
cpoint
"
>
<div
class=
"product_wrapper"
>
<img
src=
"{{imageServer + prdt.product_image}}"
onerror=
"this.src='assets/images/user_avatar.jpg'"
>
</div>
...
...
@@ -52,15 +52,15 @@
<div
class=
"loader_overlay"
*
ngIf=
"trend_loader"
></div>
<ul
*
ngIf=
"trendingProductData"
infiniteScroll
[
infiniteScrollDistance
]="
2
"
[
infiniteScrollThrottle
]="
50
"
(
scrolled
)="
onScroll
()"
[
scrollWindow
]="
false
"
style=
"max-height: 700px; overflow: scroll"
>
<li
(
click
)="
latestPrdtDtls
(
prdt
.
product_id
)"
*
ngFor=
"let prdt of trendingProductData"
>
<div
class=
"inner_div_product
"
>
<li
*
ngFor=
"let prdt of trendingProductData"
>
<div
class=
"inner_div_product
cpoint"
(
click
)="
latestPrdtDtls
(
prdt
.
product_id
)"
>
<div
class=
"product_wrapper"
>
<img
src=
"{{imageServer + prdt.product_image}}"
onerror=
"this.src='assets/images/user_avatar.jpg'"
>
</div>
<h5>
{{prdt.product_name}}
</h5>
<p>
{{prdt.short_description}}
</p>
<div
class=
"star_ratting"
>
<fieldset
class=
"rating prevent-click
hide
"
>
<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.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>
...
...
src/app/purchase/purchase-home/purchase-home.component.scss
View file @
54e31d19
...
...
@@ -289,6 +289,7 @@
.rating
{
border
:
none
;
float
:
left
;
position
:
relative
;
}
.rating
>
input
{
display
:
none
;
}
...
...
src/app/purchase/purchase-home/purchase-home.component.ts
View file @
54e31d19
...
...
@@ -20,6 +20,7 @@ export class PurchaseHomeComponent implements OnInit {
trend_loader
:
boolean
;
latestProductData
:
any
;
trendingProductData
:
any
;
loginDetails
:
any
;
@
ViewChild
(
"failureModel"
)
public
failureModelRef
:
ElementRef
;
...
...
src/app/purchase/searchbar/searchbar.component.html
View file @
54e31d19
...
...
@@ -23,7 +23,7 @@
</ul>
</div>
</div>
<div
class=
"purchase_other"
>
<div
class=
"purchase_other"
*
ngIf=
"loginDetails"
>
<ul>
<li
(
click
)="
goToPage
('
orders
')"
>
<img
src=
"assets/images/asset_cart.png"
>
...
...
src/app/purchase/searchbar/searchbar.component.ts
View file @
54e31d19
...
...
@@ -2,6 +2,7 @@ import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
WebService
}
from
'../../provider/web.service'
;
import
{
ImageStorage
}
from
'../../../environments/server.config'
;
import
{
SubjectService
}
from
'../../provider/subject.service'
;
@
Component
({
selector
:
'app-searchbar'
,
...
...
@@ -13,17 +14,29 @@ export class SearchbarComponent implements OnInit {
productArray
:
any
;
SingleProductData
:
any
;
imageServer
:
string
;
loginDetails
:
any
;
public
scrollbarOptions
=
{
axis
:
'y'
,
theme
:
'minimal-dark'
};
@
ViewChild
(
"productSearch"
)
public
productSearchRef
:
ElementRef
;
constructor
(
private
router
:
Router
,
private
route
:
ActivatedRoute
,
public
webService
:
WebService
)
{
constructor
(
private
router
:
Router
,
private
route
:
ActivatedRoute
,
public
webService
:
WebService
,
public
subjectService
:
SubjectService
)
{
this
.
productArray
=
true
;
this
.
imageServer
=
ImageStorage
;
}
ngOnInit
()
{
this
.
checkUserLogin
();
}
checkUserLogin
(){
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
});
}
goToPage
(
path
,
data
=
null
){
...
...
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