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
1eafe3ad
Commit
1eafe3ad
authored
Jan 23, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
416d4fef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
Webservices.php
application/controllers/Webservices.php
+2
-0
Booking_model.php
application/models/Booking_model.php
+7
-6
custom-script.js
assets/js/custom-script.js
+12
-8
No files found.
application/controllers/Webservices.php
View file @
1eafe3ad
...
@@ -235,6 +235,7 @@ class Webservices extends CI_Controller {
...
@@ -235,6 +235,7 @@ class Webservices extends CI_Controller {
$postData
=
$_POST
;
$postData
=
$_POST
;
$optionalData
=
array
(
'optionlaDescription'
=>
''
,
'optionalImages'
=>
array
(),
'optionalVideos'
=>
array
());
$optionalData
=
array
(
'optionlaDescription'
=>
''
,
'optionalImages'
=>
array
(),
'optionalVideos'
=>
array
());
$respArr
=
array
(
'status'
=>
'0'
,
'message'
=>
'Something went wrong.'
);
$respArr
=
array
(
'status'
=>
'0'
,
'message'
=>
'Something went wrong.'
);
if
(
empty
(
$postData
)
||
empty
(
$postData
=
json_decode
(
$postData
[
'data'
],
true
))
||
if
(
empty
(
$postData
)
||
empty
(
$postData
=
json_decode
(
$postData
[
'data'
],
true
))
||
!
isset
(
$postData
[
'cost'
])
||
empty
(
$postData
[
'cost'
])
||
!
isset
(
$postData
[
'cost'
])
||
empty
(
$postData
[
'cost'
])
||
!
isset
(
$postData
[
'customer_id'
])
||
empty
(
$postData
[
'customer_id'
])
||
!
isset
(
$postData
[
'customer_id'
])
||
empty
(
$postData
[
'customer_id'
])
||
...
@@ -245,6 +246,7 @@ class Webservices extends CI_Controller {
...
@@ -245,6 +246,7 @@ class Webservices extends CI_Controller {
!
isset
(
$postData
[
'selected_issues'
])
||
empty
(
$postData
[
'selected_issues'
])){
!
isset
(
$postData
[
'selected_issues'
])
||
empty
(
$postData
[
'selected_issues'
])){
echo
json_encode
(
$respArr
);
exit
;
echo
json_encode
(
$respArr
);
exit
;
}
}
$optionalData
[
'optionlaDescription'
]
=
(
isset
(
$postData
[
'optionalDescription'
])
&&
$optionalData
[
'optionlaDescription'
]
=
(
isset
(
$postData
[
'optionalDescription'
])
&&
!
empty
(
$postData
[
'optionalDescription'
]))
?
!
empty
(
$postData
[
'optionalDescription'
]))
?
$postData
[
'optionalDescription'
]
:
''
;
$postData
[
'optionalDescription'
]
:
''
;
...
...
application/models/Booking_model.php
View file @
1eafe3ad
...
@@ -14,6 +14,7 @@ class Booking_model extends CI_Model {
...
@@ -14,6 +14,7 @@ class Booking_model extends CI_Model {
!
isset
(
$postData
[
'selected_issues'
])
||
empty
(
$postData
[
'selected_issues'
])){
!
isset
(
$postData
[
'selected_issues'
])
||
empty
(
$postData
[
'selected_issues'
])){
return
0
;
return
0
;
}
}
$vehData
=
$postData
[
'vechile_info'
];
$vehData
=
$postData
[
'vechile_info'
];
$car_name
=
$vehData
[
'modelYear'
]
.
' '
.
$vehData
[
'maker'
]
.
' '
.
$vehData
[
'modelName'
];
$car_name
=
$vehData
[
'modelYear'
]
.
' '
.
$vehData
[
'maker'
]
.
' '
.
$vehData
[
'modelName'
];
...
@@ -78,8 +79,8 @@ class Booking_model extends CI_Model {
...
@@ -78,8 +79,8 @@ class Booking_model extends CI_Model {
BK.scheduled_time,BK.cost,BK.status,MECH.first_name,MECH.last_name,VEH.car_name,
BK.scheduled_time,BK.cost,BK.status,MECH.first_name,MECH.last_name,VEH.car_name,
BK.status
BK.status
FROM bookings AS BK
FROM bookings AS BK
INNER JOIN mechanic AS MECH ON (MECH.mechanic_id
AND
BK.mechanic_id)
INNER JOIN mechanic AS MECH ON (MECH.mechanic_id
=
BK.mechanic_id)
INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id
AND
BK.customer_veh_id)
INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id
=
BK.customer_veh_id)
WHERE
$cond
WHERE
$cond
GROUP BY BK.booking_id"
;
GROUP BY BK.booking_id"
;
...
@@ -120,10 +121,10 @@ class Booking_model extends CI_Model {
...
@@ -120,10 +121,10 @@ class Booking_model extends CI_Model {
CUST.first_name AS custFirstName,CUST.last_name AS custLastName,CUST.phone,
CUST.first_name AS custFirstName,CUST.last_name AS custLastName,CUST.phone,
CUST.email,CUST.address,CUST.profile_image,CUST.date_of_birth
CUST.email,CUST.address,CUST.profile_image,CUST.date_of_birth
FROM bookings AS BK
FROM bookings AS BK
INNER JOIN mechanic AS MECH ON (MECH.mechanic_id
AND
BK.mechanic_id)
INNER JOIN mechanic AS MECH ON (MECH.mechanic_id
=
BK.mechanic_id)
INNER JOIN customers AS CUST ON (CUST.customer_id
AND
BK.customer_id)
INNER JOIN customers AS CUST ON (CUST.customer_id
=
BK.customer_id)
INNER JOIN admin_users AS ADM ON (ADM.id
AND
BK.mechanic_id)
INNER JOIN admin_users AS ADM ON (ADM.id
=
BK.mechanic_id)
INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id
AND
BK.customer_veh_id)
INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id
=
BK.customer_veh_id)
WHERE
$cond
AND ADM.status='1' AND CUST.status='1'
WHERE
$cond
AND ADM.status='1' AND CUST.status='1'
GROUP BY BK.booking_id"
;
GROUP BY BK.booking_id"
;
...
...
assets/js/custom-script.js
View file @
1eafe3ad
...
@@ -808,13 +808,16 @@ jQuery('[id="showBookinDetails"]').on('click',function() {
...
@@ -808,13 +808,16 @@ jQuery('[id="showBookinDetails"]').on('click',function() {
}
}
if
(
optional_data
!=
''
){
if
(
optional_data
!=
''
){
optionalHtml
=
'<div class="col-md-12">'
+
optionalHtml
=
'<br><div class="col-md-12">'
+
'<div class="row"><label>Additional Information</label></div>'
+
'<div class="row"><label>Additional Information</label></div>'
;
'<div class="row">'
+
'<div class="col-md-2">Issue Details</div>'
+
if
(
optional_data
[
'optionlaDescription'
]
!=
''
){
'<div class="col-md-1">:</div>'
+
optionalHtml
+=
'<div class="row">'
+
'<div class="col-md-9"><label>'
+
optional_data
[
'optionlaDescription'
]
+
'</label></div>'
+
'<div class="col-md-2">Issue Details</div>'
+
'</div>'
;
'<div class="col-md-1">:</div>'
+
'<div class="col-md-9"><p>'
+
optional_data
[
'optionlaDescription'
]
+
'</p></div>'
+
'</div>'
;
}
if
(
optional_data
[
'optionalImages'
]
!=
''
){
if
(
optional_data
[
'optionalImages'
]
!=
''
){
optionalHtml
+=
'<div class="row">'
+
optionalHtml
+=
'<div class="row">'
+
...
@@ -826,8 +829,9 @@ jQuery('[id="showBookinDetails"]').on('click',function() {
...
@@ -826,8 +829,9 @@ jQuery('[id="showBookinDetails"]').on('click',function() {
imgCount
+=
1
;
imgCount
+=
1
;
optionalHtml
+=
'<img id="optionalImage_'
+
imgCount
+
'" src="'
+
base_url
+
image
+
'" height="100" width="100" /> '
;
optionalHtml
+=
'<img id="optionalImage_'
+
imgCount
+
'" src="'
+
base_url
+
image
+
'" height="100" width="100" /> '
;
});
});
optionalHtml
+=
'</div>
</div>
'
;
optionalHtml
+=
'</div>'
;
}
}
optionalHtml
+=
'</div>'
;
}
}
html
=
'<div class="col-xs-12">'
+
html
=
'<div class="col-xs-12">'
+
...
...
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