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
b2e6ee2e
Commit
b2e6ee2e
authored
Apr 11, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jensa' into 'master'
Jensa See merge request
!26
parents
81a483d0
fab431ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
46 deletions
+49
-46
dashboard.component.html
src/app/home/dashboard/dashboard.component.html
+35
-42
dashboard.component.ts
src/app/home/dashboard/dashboard.component.ts
+14
-4
No files found.
src/app/home/dashboard/dashboard.component.html
View file @
b2e6ee2e
...
@@ -229,45 +229,41 @@
...
@@ -229,45 +229,41 @@
<table>
<table>
<thead>
<thead>
<tr>
<tr>
<th>
Orders
</th>
<th></th>
<th>
Order Date
</th>
<th>
Order Date
</th>
<th>
Vehicle Model
</th>
<th>
Vehicle Model
</th>
<th>
Vehicle Make
</th>
<th>
Vehicle Make
</th>
<th>
Mechanic
</th>
<th>
Mechanic
</th>
<
th>
Cost
</th
>
<
!-- <th>Cost</th> --
>
<th>
Action
</th>
<th>
Action
</th>
</tr>
</tr>
</thead>
</thead>
</table>
</table>
<div
*
ngFor=
"let bookData of successBookDtls; let i = index"
>
<div
*
ngFor=
"let bookData of successBookDtls; let i = index"
>
<table>
<table>
<tbody>
<tbody>
<tr>
<tr>
<td>
{{i+1}}
</td>
<td>
{{i+1}}
</td>
<td>
{{bookData.scheduled_date+' '+bookData.scheduled_time}}
</td>
<td>
{{bookData.scheduled_date+' '+bookData.scheduled_time}}
</td>
<td>
{{bookData.car_name}}
</td>
<td>
{{bookData.car_name}}
</td>
<td>
{{bookData.car_name}}
</td>
<td>
{{bookData.car_name}}
</td>
<td>
{{bookData.first_name+' '+bookData.last_name}}
</td>
<td>
{{(bookData.is_multiple ==='0')? bookData.mechanic_data[0].first_name+' '+bookData.mechanic_data[0].last_name : bookData.mechanic_data.length+' Requests'}}
</td>
<td>
{{bookData.cost}}
</td>
<!-- <td>{{bookData.cost}}</td> -->
<td>
<td>
<div
class=
"floatLeft"
>
<div
class=
"floatLeft"
>
<div
class=
"btn-group btn-group-justified"
>
<div
class=
"btn-group btn-group-justified"
>
<button
(
click
)="
cancelBooking
(
bookData
.
booking_id
)"
class=
"btn btn-danger btn-sm"
>
Reject
</button>
<button
(
click
)="
cancelBooking
(
bookData
.
booking_id
)"
class=
"btn btn-danger btn-sm"
>
Cancel
</button>
</div>
</div>
</div>
</div>
<div
class=
"booking_drop"
data-toggle=
"collapse"
[
attr
.
data-target
]="'#
quote_list_
'+
bookData
.
booking_id
"
></div>
<div
class=
"booking_drop"
data-toggle=
"collapse"
data-target=
"#quote_list"
>
</td>
</tr>
</div>
</tbody>
</td>
</tr>
</tbody>
</table>
</table>
<table
id=
"quote_list
"
class=
"collapse"
>
<table
[
attr
.
id
]="'
quote_list_
'+
bookData
.
booking_id
"
class=
"collapse"
>
<thead>
<thead>
<tr>
<tr>
<th>
Sl no
</th>
<th>
Mechanic
</th>
<th>
Mechanic Name
</th>
<th>
Contact
</th>
<th>
Contact
</th>
<th>
Rating
</th>
<th>
Rating
</th>
<th>
Location
</th>
<th>
Location
</th>
...
@@ -276,23 +272,20 @@
...
@@ -276,23 +272,20 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr>
<tr
*
ngFor=
"let mechdata of bookData.mechanic_data;"
>
<td>
01
</td>
<td>
{{mechdata.first_name+' '+mechdata.last_name}}
</td>
<td>
John Doe
</td>
<td>
{{mechdata.phone}}
</td>
<td>
96153214859
</td>
<td>
{{mechdata.rating > 0?mechdata.rating+'/5':''}}
</td>
<td>
6.4/10
</td>
<td>
{{mechdata.location}}
</td>
<td>
East Bouliward Sydney
</td>
<td>
{{mechdata.custom_amount > 0 ?mechdata.custom_amount:bookData.cost}}
</td>
<td>
$400
</td>
<td>
<td>
<div
class=
"btn-group btn-group-justified"
>
<div
class=
"btn-group btn-group-justified"
>
<button
class=
"btn btn-default btn-sm"
>
Waiting for Approval
</button>
<button
class=
"btn btn-default btn-sm"
*
ngIf=
"mechdata.status =='0'"
>
Waiting for Approval
</button>
<button
class=
"btn btn-success btn-sm"
>
Accept
</button>
<button
class=
"btn btn-success btn-sm"
*
ngIf=
"mechdata.status =='1'"
>
Accept
</button>
<button
class=
"btn btn-danger btn-sm"
>
Reject
</button>
<button
class=
"btn btn-info btn-sm"
data-toggle=
"modal"
data-target=
"#failure"
*
ngIf=
"mechdata.status =='1'"
>
View Quote
</button>
<button
class=
"btn btn-info btn-sm"
data-toggle=
"modal"
data-target=
"#failure"
>
View Quote
</button>
</div>
</div>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
...
@@ -337,12 +330,12 @@
...
@@ -337,12 +330,12 @@
<td>
{{i+1}}
</td>
<td>
{{i+1}}
</td>
<td>
{{bookData.scheduled_date+' '+bookData.scheduled_time}}
</td>
<td>
{{bookData.scheduled_date+' '+bookData.scheduled_time}}
</td>
<td>
{{bookData.car_name}}
</td>
<td>
{{bookData.car_name}}
</td>
<td>
{{bookData.
first_name+' '+bookD
ata.last_name}}
</td>
<td>
{{bookData.
mechanic_data.first_name+' '+bookData.mechanic_d
ata.last_name}}
</td>
<td
class=
"service-align-center"
>
{{bookData.cost}}
</td>
<td
class=
"service-align-center"
>
{{bookData.cost}}
</td>
<td
[
ngSwitch
]="
bookData
.
status
"
>
<td
[
ngSwitch
]="
bookData
.
status
"
>
<p
*
ngSwitchCase=
"
1"
class=
"success_status"
>
Success
</p>
<p
*
ngSwitchCase=
"
3"
class=
"success_status"
>
Completed
</p>
<p
*
ngSwitchCase=
"
0"
class=
"pending_status"
>
Pending
</p>
<p
*
ngSwitchCase=
"
4"
class=
"canceled_status"
>
Canceled
</p>
<p
*
ngSwitchCase=
"
3
"
class=
"canceled_status"
>
Canceled
</p>
<p
*
ngSwitchCase=
"
5
"
class=
"canceled_status"
>
Canceled
</p>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
...
...
src/app/home/dashboard/dashboard.component.ts
View file @
b2e6ee2e
...
@@ -205,20 +205,30 @@ export class DashboardComponent implements OnInit {
...
@@ -205,20 +205,30 @@ export class DashboardComponent implements OnInit {
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'getCustBookDetails'
,
{
'customer_id'
:
this
.
loginDetails
.
customer_id
}).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'getCustBookDetails'
,
{
'customer_id'
:
this
.
loginDetails
.
customer_id
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'1'
&&
response
.
bookData
!=
'undefined'
&&
response
.
bookData
!=
undefined
&&
response
.
bookData
!=
'null'
&&
response
.
bookData
!=
null
)
{
if
(
response
.
status
==
'1'
&&
response
.
bookData
!=
'undefined'
&&
response
.
bookData
!=
undefined
&&
response
.
bookData
!=
'null'
&&
response
.
bookData
!=
null
)
{
this
.
bookingDetail
s
=
response
.
bookData
;
let
booking
s
=
response
.
bookData
;
let
successBooking
:
any
[]
=
new
Array
();
let
successBooking
:
any
[]
=
new
Array
();
let
bookingDetails
:
any
[]
=
new
Array
();
this
.
bookingDetails
.
forEach
(
function
(
booking
)
{
bookings
.
forEach
(
function
(
book
)
{
if
(
booking
.
status
==
1
){
if
(
book
.
status
==
0
||
book
.
status
==
1
||
book
.
status
==
6
){
successBooking
.
push
(
booking
);
successBooking
.
push
(
book
);
}
else
{
bookingDetails
.
push
(
book
);
}
}
});
});
if
(
successBooking
.
length
>
0
){
if
(
successBooking
.
length
>
0
){
this
.
successBookDtls
=
successBooking
;
this
.
successBookDtls
=
successBooking
;
}
else
{
}
else
{
this
.
successBookDtls
=
false
;
this
.
successBookDtls
=
false
;
}
}
if
(
bookingDetails
.
length
>
0
){
this
.
bookingDetails
=
bookingDetails
;
}
else
{
this
.
bookingDetails
=
false
;
}
}
}
this
.
loader
=
false
;
this
.
loader
=
false
;
});
});
...
...
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