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
2fb57759
Commit
2fb57759
authored
Jan 05, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit
parent
812e4049
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
13 deletions
+47
-13
index.component.html
src/app/home/index/index.component.html
+7
-11
index.component.scss
src/app/home/index/index.component.scss
+1
-1
index.component.ts
src/app/home/index/index.component.ts
+39
-1
No files found.
src/app/home/index/index.component.html
View file @
2fb57759
...
@@ -316,22 +316,21 @@
...
@@ -316,22 +316,21 @@
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"service_methods"
>
<div
class=
"service_methods"
>
<ul>
<ul>
<!-- <div *ngFor="let issue_data of issuesData; let issue_id = index">
<div
*
ngFor=
"let issue_data of issuesData"
>
{{issue_data}}
<li
data-toggle=
"collapse"
[
attr
.
data-target
]="'#
issue_
'
+
issue_data
.
issue_id
"
>
{{issue_data.issue}}
</li>
<li data-toggle="collapse" data-target="#issue_{{issue_id}}">{{issue_data.issue_id}}</li>
<div
class=
"service_list collapse"
[
attr
.
id
]="'
issue_
'
+
issue_data
.
issue_id
"
>
<div class="service_list collapse" id="issue_{{issue_id}}">
<ul>
<ul>
<li *ngFor="let sub_issue_data of issue_data.sub_categories
; let subIssueId = index
">
<li
*
ngFor=
"let sub_issue_data of issue_data.sub_categories"
>
<button
id=
"custom_check_button"
>
<button
id=
"custom_check_button"
>
<label>
<label>
<input
id="{{subIssueId}}" type="checkbox" name="services" value="{{subIssueId}}
">
<input
type=
"checkbox"
name=
"services"
[
attr
.
id
]="'
issue_
'
+
issue_data
.
issue_id
+
'
_
'
+
sub_issue_data
.
issue_cat_id
"
[
attr
.
issue_id
]="
issue_data
.
issue_id
"
[
attr
.
sub_issue_id
]="
sub_issue_data
.
issue_cat_id
"
(
click
)="
setIssueSelected
($
event
)
"
>
<p>
{{sub_issue_data.issue_category}}
</p>
<p>
{{sub_issue_data.issue_category}}
</p>
</label>
</label>
</button>
</button>
</li>
</li>
</ul>
</ul>
</div>
</div>
</div>
-->
</div>
</ul>
</ul>
</div>
</div>
</div>
</div>
...
@@ -390,10 +389,7 @@
...
@@ -390,10 +389,7 @@
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"selected_services"
>
<div
class=
"selected_services"
>
<ul>
<ul>
<li>
EXHAUST
<a>
×
</a></li>
<li
*
ngFor=
"let selIssue of selectedIssues"
>
{{selIssue.issue_category}}
<a
(
click
)="
removeSelectedItem
(
selIssue
.
issue_id
,
selIssue
.
sub_issue_id
)"
>
×
</a></li>
<li>
TIRES
<a>
×
</a></li>
<li>
FLUIDS
<a>
×
</a></li>
<li>
BRAKES
<a>
×
</a></li>
</ul>
</ul>
</div>
</div>
</div>
</div>
...
...
src/app/home/index/index.component.scss
View file @
2fb57759
...
@@ -369,7 +369,7 @@
...
@@ -369,7 +369,7 @@
text-transform
:
uppercase
;
text-transform
:
uppercase
;
color
:
#1e1e1e
;
color
:
#1e1e1e
;
font-weight
:
600
;
font-weight
:
600
;
padding-bottom
:
4
0px
;
padding-bottom
:
1
0px
;
}
}
.facebook_btn
{
.facebook_btn
{
background-color
:
#3b5998
;
background-color
:
#3b5998
;
...
...
src/app/home/index/index.component.ts
View file @
2fb57759
...
@@ -6,6 +6,7 @@ import { MapsAPILoader } from '@agm/core';
...
@@ -6,6 +6,7 @@ import { MapsAPILoader } from '@agm/core';
import
{
SubjectService
}
from
'../../provider/subject.service'
;
import
{
SubjectService
}
from
'../../provider/subject.service'
;
import
{
FormGroup
,
FormControl
,
Validators
,
ValidationErrors
}
from
'@angular/forms'
;
import
{
FormGroup
,
FormControl
,
Validators
,
ValidationErrors
}
from
'@angular/forms'
;
declare
var
$
;
declare
const
google
:
any
;
declare
const
google
:
any
;
@
Component
({
@
Component
({
...
@@ -40,6 +41,7 @@ export class IndexComponent implements OnInit {
...
@@ -40,6 +41,7 @@ export class IndexComponent implements OnInit {
//Service Details: TAB 3
//Service Details: TAB 3
loader
:
boolean
;
loader
:
boolean
;
issuesData
:
any
;
issuesData
:
any
;
selectedIssues
:
any
[]
=
new
Array
();
carModel
:
any
;
carModel
:
any
;
carSearchJsonData
:
any
;
carSearchJsonData
:
any
;
...
@@ -92,6 +94,43 @@ export class IndexComponent implements OnInit {
...
@@ -92,6 +94,43 @@ export class IndexComponent implements OnInit {
this
.
carModel
=
this
.
carSearchJsonData
[
event
].
models
;
this
.
carModel
=
this
.
carSearchJsonData
[
event
].
models
;
}
}
setIssueSelected
(
event
){
let
issue_id
=
event
.
target
.
attributes
.
issue_id
.
value
;
let
sub_issue_id
=
event
.
target
.
attributes
.
sub_issue_id
.
value
;
let
index
=
this
.
selectedIssues
.
findIndex
(
x
=>
x
.
sub_issue_id
==
sub_issue_id
);
if
(
index
>
-
1
){
this
.
selectedIssues
.
splice
(
index
,
1
);
}
else
{
const
thisObj
=
this
;
this
.
issuesData
.
forEach
(
function
(
issData
)
{
if
(
issData
.
issue_id
==
issue_id
){
issData
.
sub_categories
.
forEach
(
function
(
subIssData
)
{
if
(
subIssData
.
issue_cat_id
==
sub_issue_id
){
let
issue
=
issData
.
issue
,
issue_image
=
issData
.
issue_image
,
issue_category
=
subIssData
.
issue_category
,
issue_cat_image
=
subIssData
.
issue_cat_image
,
default_service_fee
=
subIssData
.
default_service_fee
,
default_description
=
subIssData
.
default_description
;
thisObj
.
selectedIssues
.
push
({
issue_id
,
sub_issue_id
,
issue
,
issue_image
,
issue_category
,
issue_cat_image
,
default_service_fee
,
default_description
});
}
});
}
});
}
}
removeSelectedItem
(
issue_id
,
sub_issue_id
){
let
index
=
this
.
selectedIssues
.
findIndex
(
x
=>
x
.
sub_issue_id
==
sub_issue_id
);
if
(
index
>
-
1
){
this
.
selectedIssues
.
splice
(
index
,
1
);
$
(
'[id="issue_'
+
issue_id
+
'_'
+
sub_issue_id
+
'"]'
).
prop
(
'checked'
,
false
);
}
}
getVehicleLoc
(
lastLoc
){
getVehicleLoc
(
lastLoc
){
if
(
lastLoc
==
''
){
if
(
lastLoc
==
''
){
this
.
searchLocError
=
true
;
this
.
searchLocError
=
true
;
...
@@ -138,7 +177,6 @@ export class IndexComponent implements OnInit {
...
@@ -138,7 +177,6 @@ export class IndexComponent implements OnInit {
this
.
loader
=
false
;
this
.
loader
=
false
;
if
(
response
.
status
==
'1'
){
if
(
response
.
status
==
'1'
){
this
.
issuesData
=
response
.
issue_data
;
this
.
issuesData
=
response
.
issue_data
;
console
.
log
(
this
.
issuesData
);
}
else
{
}
else
{
this
.
router
.
navigate
([
"index"
]);
this
.
router
.
navigate
([
"index"
]);
}
}
...
...
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