Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Commits
f305528d
Commit
f305528d
authored
5 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in admin panel booking section
parent
eb48845b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
Bookings.php
application/controllers/Bookings.php
+1
-1
Booking_model.php
application/models/Booking_model.php
+10
-0
list-booking.php
application/views/Bookings/list-booking.php
+13
-1
No files found.
application/controllers/Bookings.php
View file @
f305528d
...
...
@@ -34,7 +34,7 @@ class Bookings extends CI_Controller {
$template
[
'mechanic_id'
]
=
(
$this
->
session
->
userdata
(
'user_type'
)
==
1
&&
empty
(
$mechanic_id
))
?
''
:
$mechanic_id
;
$template
[
'mechanic_data'
]
=
$mechanic_data
;
$template
[
'bookingData'
]
=
$this
->
Booking_model
->
getMechBookings
(
$mechanic_id
,
''
,
'0,1,3,4'
);
$template
[
'bookingData'
]
=
$this
->
Booking_model
->
getMechBookings
(
$mechanic_id
,
''
,
'0,1,3,4
,6
'
);
$this
->
load
->
view
(
'template'
,
$template
);
}
...
...
This diff is collapsed.
Click to expand it.
application/models/Booking_model.php
View file @
f305528d
...
...
@@ -274,6 +274,16 @@ class Booking_model extends CI_Model {
array
(
'status'
=>
'2'
),
array
(
'booking_id'
=>
$booking_id
,
'mechanic_id'
=>
$id
));
}
else
if
(
$status
==
'6'
){
$this
->
db
->
update
(
'bookings'
,
array
(
'status'
=>
'6'
),
array
(
'booking_id'
=>
$booking_id
));
}
else
if
(
$status
==
'3'
){
$this
->
db
->
update
(
'bookings'
,
array
(
'status'
=>
'3'
),
array
(
'booking_id'
=>
$booking_id
));
}
}
return
$status
;
}
...
...
This diff is collapsed.
Click to expand it.
application/views/Bookings/list-booking.php
View file @
f305528d
...
...
@@ -100,6 +100,7 @@
case
1
:
echo
'Accepted'
;
break
;
case
3
:
echo
'Completed'
;
break
;
case
4
:
echo
'Cancelled'
;
break
;
case
6
:
echo
'Work in Progress'
;
break
;
}
}
else
{
switch
(
$bookData
->
mech_status
){
...
...
@@ -134,7 +135,18 @@
<i
class=
"fa fa-cog"
></i>
Accept
</a>
<?php
}
}
?>
if
(
$bookData
->
status
==
1
&&
$bookData
->
mech_status
==
1
){
?>
<a
class=
"btn btn-sm btn-info"
href=
"
<?=
base_url
(
"Bookings/changeBookingStatus/"
.
encode_param
(
$bookData
->
booking_id
)
.
"/6/"
.
encode_param
(
$mechanic_id
))
?>
"
>
<i
class=
"fa fa-cog"
></i>
Start Service
</a>
<?php
}
if
(
$bookData
->
status
==
6
&&
$bookData
->
mech_status
==
1
){
?>
<a
class=
"btn btn-sm btn-warning"
href=
"
<?=
base_url
(
"Bookings/changeBookingStatus/"
.
encode_param
(
$bookData
->
booking_id
)
.
"/3/"
.
encode_param
(
$mechanic_id
))
?>
"
>
<i
class=
"fa fa-cog"
></i>
Stop Service
</a>
<?php
}
}
?>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Bookings/changeBookingStatus/"
.
encode_param
(
$bookData
->
booking_id
)
.
"/2/"
.
encode_param
(
$mechanic_id
))
?>
"
onClick=
"return doconfirm()"
>
...
...
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