Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nemt_backend
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
nemt_backend
Commits
6d302e54
Commit
6d302e54
authored
Nov 12, 2018
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit
parent
fb2d85e1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
607 additions
and
34 deletions
+607
-34
Ride.php
application/controllers/Ride.php
+0
-0
generals_helper.php
application/helpers/generals_helper.php
+10
-0
Ride_model.php
application/models/Ride_model.php
+92
-2
add_transport.php
application/views/Ride/add_transport.php
+7
-4
excel_mapping.php
application/views/Ride/excel_mapping.php
+92
-0
scheduled_rides.php
application/views/Ride/scheduled_rides.php
+128
-0
view_rides.php
application/views/Ride/view_rides.php
+21
-2
footer-script.php
application/views/Templates/footer-script.php
+1
-1
header-script.php
application/views/Templates/header-script.php
+1
-1
left-menu.php
application/views/Templates/left-menu.php
+8
-0
custom-style.css
assets/css/custom-style.css
+79
-24
nemt_custom.js
assets/js/nemt_custom.js
+168
-0
No files found.
application/controllers/Ride.php
View file @
6d302e54
This diff is collapsed.
Click to expand it.
application/helpers/generals_helper.php
View file @
6d302e54
...
@@ -40,6 +40,16 @@ function set_upload_editservice($path){
...
@@ -40,6 +40,16 @@ function set_upload_editservice($path){
}
}
function
set_upload_all_files
(
$path
){
$config
=
array
();
$config
[
'upload_path'
]
=
$path
;
$config
[
'allowed_types'
]
=
'*'
;
$config
[
'overwrite'
]
=
FALSE
;
return
$config
;
}
function
remove_html
(
&
$item
,
$key
)
function
remove_html
(
&
$item
,
$key
)
{
{
$item
=
strip_tags
(
$item
);
$item
=
strip_tags
(
$item
);
...
...
application/models/Ride_model.php
View file @
6d302e54
...
@@ -42,14 +42,24 @@ class Ride_model extends CI_Model {
...
@@ -42,14 +42,24 @@ class Ride_model extends CI_Model {
return
(
$status
)
?
1
:
0
;
return
(
$status
)
?
1
:
0
;
}
}
function
getRideData
(
$ride_id
=
''
,
$company_id
=
''
,
$broker_id
=
''
){
function
getRideData
(
$ride_id
=
''
,
$company_id
=
''
,
$broker_id
=
''
,
$scheduled
=
''
,
$condArr
=
array
()
){
$cond
=
(
!
empty
(
$ride_id
))
?
" AND TD.transport_id = '
$ride_id
'"
:
""
;
$cond
=
(
!
empty
(
$ride_id
))
?
" AND TD.transport_id = '
$ride_id
'"
:
""
;
$cond
.=
(
$broker_id
!=
''
)
?
" AND TD.broker_id = '
$broker_id
'"
:
""
;
$cond
.=
(
$broker_id
!=
''
)
?
" AND TD.broker_id = '
$broker_id
'"
:
""
;
$cond
.=
(
!
empty
(
$company_id
))
?
" AND TD.company_id = '
$company_id
'"
:
""
;
$cond
.=
(
!
empty
(
$company_id
))
?
" AND TD.company_id = '
$company_id
'"
:
""
;
$sql
=
"SELECT TD.*,BK.broker_name,AR.reason,VH.vehicle_id,VH.vehicle_type,TT.trip_type,TS.trip_status
if
(
$scheduled
!=
''
){
$cond
.=
" AND TD.is_scheduled = '
$scheduled
'"
;
}
if
(
!
empty
(
$condArr
)){
$cond
.=
implode
(
' '
,
$condArr
);
}
$sql
=
"SELECT TD.*,CONCAT(DV.first_name,' ',DV.last_name) AS assigned_driver_name,BK.broker_name,
AR.reason,VH.vehicle_id,VH.vehicle_type,TT.trip_type,TS.trip_status
FROM transport_details AS TD
FROM transport_details AS TD
LEFT JOIN brokers AS BK ON (TD.broker_id = BK.broker_id)
LEFT JOIN brokers AS BK ON (TD.broker_id = BK.broker_id)
LEFT JOIN drivers AS DV ON (DV.driver_id = TD.assigned_driver)
LEFT JOIN vehicles AS VH ON (VH.vehicle_id = TD.vehicle_type)
LEFT JOIN vehicles AS VH ON (VH.vehicle_id = TD.vehicle_type)
LEFT JOIN trip_type AS TT ON (TT.trip_id = TD.trip_type)
LEFT JOIN trip_type AS TT ON (TT.trip_id = TD.trip_type)
LEFT JOIN trip_status AS TS ON (TS.trip_status_id = TD.trip_status)
LEFT JOIN trip_status AS TS ON (TS.trip_status_id = TD.trip_status)
...
@@ -111,5 +121,84 @@ class Ride_model extends CI_Model {
...
@@ -111,5 +121,84 @@ class Ride_model extends CI_Model {
return
(
$status
)
?
1
:
0
;
return
(
$status
)
?
1
:
0
;
}
}
function
changeSchuduleStatus
(
$ride_id
=
''
,
$is_scheduled
=
'0'
){
if
(
empty
(
$ride_id
)){
return
;
}
$status
=
$this
->
db
->
update
(
'transport_details'
,
array
(
'is_scheduled'
=>
$is_scheduled
),
array
(
'transport_id'
=>
$ride_id
));
if
(
$is_scheduled
==
0
){
$this
->
deleteAssignedRider
(
$ride_id
);
}
return
$status
;
}
function
deleteAssignedRider
(
$ride_id
=
''
){
if
(
empty
(
$ride_id
)){
return
;
}
$this
->
db
->
delete
(
'ride_status'
,
array
(
'ride_id'
=>
$ride_id
));
}
function
autoAssignDriver
(
$ride_id
=
''
,
$appointment_time
=
''
,
$pickupLoc
=
array
()){
if
(
empty
(
$ride_id
)
||
empty
(
$appointment_time
)
||
empty
(
$pickupLoc
)
||
!
isset
(
$pickupLoc
[
'lat'
])
||
$pickupLoc
[
'lat'
]
==
''
||
!
isset
(
$pickupLoc
[
'lng'
])
||
$pickupLoc
[
'lng'
]
==
''
){
return
;
}
$time
=
date
(
"G:i"
,
$appointment_time
);
$date
=
date
(
"d-m-y"
,
$appointment_time
);
$endTime
=
date
(
"G:i"
,
strtotime
(
$time
)
+
60
*
60
);
$startTime
=
date
(
"G:i"
,
strtotime
(
$time
)
-
60
*
60
);
$endDateTime
=
strtotime
(
$date
.
' '
.
$endTime
);
$startDateTime
=
strtotime
(
$date
.
' '
.
$startTime
);
$sql
=
"SELECT GROUP_CONCAT(TD.assigned_driver) AS assigned_drivers
FROM transport_details AS TD
WHERE TD.driver_assign_status='0' AND TD.assigned_driver<>'0' AND TD.is_scheduled='1' AND
TD.appointment_time>
$startDateTime
AND TD.appointment_time<
$endDateTime
AND
TD.status IN (4,5,8)"
;
$prvDrivers
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$prvDrivers
)){
return
0
;
}
$driverCond
=
''
;
if
(
$prvDrivers
->
num_rows
()
>
0
){
$prvDrivers
=
$prvDrivers
->
row_array
();
$driverCond
=
(
isset
(
$prvDrivers
[
'assigned_drivers'
])
&&
!
empty
(
$prvDrivers
[
'assigned_drivers'
]))
?
'AND DRV.driver_id NOT IN ('
.
$prvDrivers
[
'assigned_drivers'
]
.
')'
:
''
;
}
$sql
=
"SELECT DRV.driver_id,3956*2*ASIN(SQRT(POWER(SIN(("
.
$pickupLoc
[
'lat'
]
.
"-DRV.lat_driver)*
pi()/180/2),2)+COS("
.
$pickupLoc
[
'lat'
]
.
"*pi()/180)*COS(DRV.lat_driver*pi()/180)*
POWER(SIN(("
.
$pickupLoc
[
'lng'
]
.
"-DRV.lng_driver)*pi()/180/2),2))) AS distance
FROM drivers AS DRV
WHERE DRV.status = 1 "
.
$driverCond
.
"
HAVING distance < 25
ORDER BY distance
LIMIT 0,1"
;
$driverData
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$driverData
)){
return
0
;
}
if
(
$driverData
->
num_rows
()
>
0
){
$nearByDriver
=
$driverData
->
row_array
();
$nearByDriver
=
$nearByDriver
[
'driver_id'
];
$status
=
$this
->
db
->
update
(
'transport_details'
,
array
(
'driver_assign_status'
=>
'0'
,
'assigned_driver'
=>
$nearByDriver
,
'status'
=>
'3'
),
array
(
'transport_id'
=>
$ride_id
));
}
else
{
$status
=
$this
->
db
->
update
(
'transport_details'
,
array
(
'driver_assign_status'
=>
'1'
,
'status'
=>
'3'
),
array
(
'transport_id'
=>
$ride_id
));
}
return
$status
;
}
}
}
?>
?>
\ No newline at end of file
application/views/Ride/add_transport.php
View file @
6d302e54
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
<div
class=
"box-header with-border"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Upload Ride
</h3>
<h3
class=
"box-title"
>
Upload Ride
</h3>
</div>
</div>
<form
role=
"form"
action=
"
<?=
base_url
(
'Ride/
import
'
)
?>
"
method=
"post"
class=
"validate"
data-parsley-validate=
""
enctype=
"multipart/form-data"
>
<form
role=
"form"
action=
"
<?=
base_url
(
'Ride/
excelMapping
'
)
?>
"
method=
"post"
class=
"validate"
data-parsley-validate=
""
enctype=
"multipart/form-data"
>
<br>
<br>
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
...
@@ -231,7 +231,9 @@
...
@@ -231,7 +231,9 @@
<?php
<?php
if
(
!
empty
(
$company_data
)){
if
(
!
empty
(
$company_data
)){
foreach
(
$company_data
as
$company
)
{
foreach
(
$company_data
as
$company
)
{
echo
'<option value="'
.
$company
->
company_id
.
'">'
.
$company
->
company_name
.
'</option>'
;
echo
'<option value="'
.
$company
->
company_id
.
'">'
.
$company
->
company_name
.
'</option>'
;
}
}
}
}
?>
?>
...
@@ -258,8 +260,9 @@
...
@@ -258,8 +260,9 @@
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<div
class=
"form-group has-feedback"
>
<div
class=
"form-group has-feedback"
>
<label>
CSV File
</label>
<label>
File to be Uploaded
</label>
<input
name=
"csv_file"
type=
"file"
accept=
".csv"
class=
"required"
/>
<input
name=
"import_file"
type=
"file"
accept=
".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
class=
"required"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
application/views/Ride/excel_mapping.php
0 → 100644
View file @
6d302e54
<?php
$headerArr
=
Array
(
0
=>
'Medicaid_Number'
,
1
=>
'Members_Last_Name'
,
2
=>
'Members_First_Name'
,
3
=>
'Members_Date_of_Birth'
,
4
=>
'Members_Age'
,
5
=>
'Members_Phone_Number'
,
6
=>
'Members_Alt_Phone'
,
7
=>
'Trip_Number'
,
8
=>
'Appointment_Date'
,
9
=>
'Appointment_Day_of_Week'
,
10
=>
'Appointment_Time'
,
11
=>
'Trip_Reason_Code'
,
12
=>
'Trip_Status'
,
13
=>
'Vehicle_Type'
,
14
=>
'Trip_Type'
,
15
=>
'Wheelchair_Flag'
,
16
=>
'Crutches_\/_Walker_\/_Cane_Flag'
,
17
=>
'Number_of_Car_Seats_Required'
,
18
=>
'Pregnant_Flag'
,
19
=>
'Number_of_Additional_Passengers'
,
20
=>
'Additional_Passengers_With_Appointments'
,
21
=>
'Trip_Mileage'
,
22
=>
'Trip_Cost'
,
23
=>
'Pickup_Address'
,
24
=>
'Pickup_City'
,
25
=>
'Pickup_State'
,
26
=>
'Pickup_Zip_Code'
,
27
=>
'Delivery_Name'
,
28
=>
'Delivery_Address'
,
29
=>
'Delivery_City'
,
30
=>
'Delivery_State'
,
31
=>
'Delivery_Zip_Code'
,
32
=>
'Delivery_Phone_Number'
,
33
=>
'Special_Needs'
,
34
=>
'Inst_\/_Directions'
,
35
=>
'Return_Time'
,
36
=>
'Attendant_Flag'
,
37
=>
'Trip_Bid_Status'
,
38
=>
'Date_Trip_Bid_Status_Was_Changed'
,
39
=>
'Confirmation_Number'
,
40
=>
'Copay'
,
41
=>
'Trip_Status_Date'
);
?>
<div
class=
"content-wrapper"
>
<section
class=
"content-header"
>
<h1>
<?=
$page_title
?>
<small>
<?=
$page_desc
?>
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"
<?=
base_url
()
?>
"
><i
class=
"fa fa-star-o"
aria-hidden=
"true"
></i>
Home
</a></li>
<li>
<?=
$menu
?>
</li>
<li
class=
"active"
>
<?=
$sub_menu
?>
</li>
</ol>
</section>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<?php
if
(
$this
->
session
->
flashdata
(
'message'
))
{
$flashdata
=
$this
->
session
->
flashdata
(
'message'
);
?>
<div
class=
"alert alert-
<?=
$flashdata
[
'class'
]
?>
"
>
<button
class=
"close"
data-dismiss=
"alert"
type=
"button"
>
×
</button>
<?=
$flashdata
[
'message'
]
?>
</div>
<?php
}
?>
</div>
<div
class=
"col-md-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
>
<h3
class=
"box-title"
>
Excel Mapping
</h3>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"col-md-7"
>
<div
style=
"overflow:scroll;height:400px;"
>
<table
id=
"mappedHeaders"
class=
"border-cls"
style=
"width:98%;"
>
<?php
foreach
(
$headerArr
AS
$id
=>
$header
){
echo
'<tr class="border-cls">
<td class="headtag-td">'
.
str_replace
(
'_'
,
' '
,
$header
)
.
'</td>
<td class="headtag-td">
<div type="child" class="drag-box" id="order_'
.
$id
.
'" ondrop="dropElement(event)"
ondragover="allowDropElement(event)" headOrder="'
.
$id
.
'"></div>
</td>
</tr>'
;
}
?>
</table>
</div>
</div>
<div
class=
"col-md-5"
>
<div
type=
"parent"
class=
"header-tag-box"
ondrop=
"dropElement(event)"
ondragover=
"allowDropElement(event)"
>
<?php
if
(
!
empty
(
$headerArr
)){
foreach
(
$headerArr
AS
$headID
=>
$heading
)
{
?>
<div
id=
"tempHead_
<?=
$headID
?>
"
class=
"header-tag"
draggable=
"true"
ondragstart=
"dragElement(event)"
tmporder=
"
<?=
$headID
?>
"
>
<?=
str_replace
(
array
(
'/'
,
'_'
),
array
(
''
,
' '
),
$heading
)
?>
</div>
<?php
}
}
?>
</div>
</div>
<div
class=
"col-md-12 btn-mapping"
>
<button
id=
"upload_excell"
type=
"button"
class=
"btn btn-primary"
dmclick=
"0"
>
Import Excell
</button>
</div>
</div>
</div>
</div>
</div>
</section>
<input
type=
"hidden"
name=
"fileType"
value=
"
<?=
$fileType
?>
"
>
<input
type=
"hidden"
name=
"broker_id"
value=
"
<?=
$broker_id
?>
"
>
<input
type=
"hidden"
name=
"company_id"
value=
"
<?=
$company_id
?>
"
>
<input
type=
"hidden"
name=
"import_file"
value=
"
<?=
$import_file
?>
"
>
</div>
\ No newline at end of file
application/views/Ride/scheduled_rides.php
0 → 100644
View file @
6d302e54
<div
class=
"content-wrapper"
>
<section
class=
"content-header"
>
<h1>
<?=
$page_title
?>
<small>
<?=
$page_desc
?>
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"
<?=
base_url
()
?>
"
><i
class=
"fa fa-star-o"
aria-hidden=
"true"
></i>
Home
</a></li>
<li>
<?=
$menu
?>
</li>
<li
class=
"active"
>
<?=
$sub_menu
?>
</li>
</ol>
</section>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<?php
if
(
$this
->
session
->
flashdata
(
'message'
))
{
$flashdata
=
$this
->
session
->
flashdata
(
'message'
);
?>
<div
class=
"alert alert-
<?=
$flashdata
[
'class'
]
?>
"
>
<button
class=
"close"
data-dismiss=
"alert"
type=
"button"
>
×
</button>
<?=
$flashdata
[
'message'
]
?>
</div>
<?php
}
?>
</div>
<div
class=
"col-md-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
>
<h3
class=
"box-title"
>
Scheduled Rides
</h3>
</div>
</div>
<div
class=
"box-body"
>
<form
action=
"
<?=
base_url
(
'Ride/scheduled_rides'
)
?>
"
method=
"post"
class=
"validate"
data-parsley-validate=
""
enctype=
"multipart/form-data"
>
<div
class=
"col-md-12"
>
<div
class=
"form-group has-feedback"
>
<label>
Appointment Date
</label>
<div
class=
"input-group date"
data-provide=
"datepicker"
>
<input
id=
"datepicker"
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
required=
""
name=
"search_date"
placeholder=
"Search Date"
autocomplete=
"off"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
</div>
</div>
</div>
<div
class=
"col-md-12"
>
<div
class=
"col-md-2"
style=
"float:right;padding:initial;"
>
<a
class=
"btn btn-sm btn-primary"
style=
"width: 150px;"
href=
"
<?=
base_url
(
'Ride/scheduled_rides'
)
?>
"
>
View All
</a>
</div>
<div
class=
"col-md-2"
style=
"float:right;padding:initial;"
>
<button
class=
"btn btn-sm btn-primary"
style=
"width: 150px;"
type=
"submit"
>
Search
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div
class=
"col-md-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-body"
>
<table
class=
"table table-bordered table-striped datatable "
>
<thead>
<tr>
<th
class=
"hidden"
>
ID
</th>
<th
width=
"100px"
>
Scheduled Time
</th>
<th
width=
"100px"
>
Arrival Time
</th>
<th
width=
"100px"
>
Coustomer Name
</th>
<th
width=
"100px"
>
Mobility
</th>
<th
width=
"100px"
>
Pick Up Address
</th>
<th
width=
"100px"
>
Drop Off Address
</th>
<th
width=
"100px"
>
Rider Status
</th>
<th
width=
"40px"
>
View
</th>
</tr>
</thead>
<tbody>
<?php
$report_data
=
array
();
if
(
!
empty
(
$ride_data
)){
foreach
(
$ride_data
as
$ride
)
{
$json_ride
=
json_decode
(
$ride
->
data
,
true
);
if
(
empty
(
$json_ride
)){
continue
;
}
?>
<tr>
<th
class=
"hidden"
>
<?=
$ride
->
transport_id
?>
</th>
<th
class=
"center"
>
<?=
date
(
"d-m-y G:i"
,
$ride
->
appointment_time
)
?>
</th>
<th
class=
"center"
></th>
<th
class=
"center"
>
<?=
$ride
->
patient_name
?>
</th>
<th
class=
"center"
></th>
<th
class=
"center"
>
<?=
$ride
->
pickup_location
?>
</th>
<th
class=
"center"
>
<?=
$ride
->
drop_location
?>
</th>
<th
class=
"center"
>
<?php
if
(
!
empty
(
$ride
->
assigned_driver
)
&&
$ride
->
driver_assign_status
==
'1'
){
echo
'Driver Cancelled & Auto Assigned to Dispatcher'
;
}
else
if
(
empty
(
$ride
->
assigned_driver
)
&&
$ride
->
driver_assign_status
==
'1'
){
echo
'No Driver Found, ride assigned to dispatcher'
;
}
else
if
(
!
empty
(
$ride
->
assigned_driver
)
&&
$ride
->
driver_assign_status
==
'0'
&&
!
empty
(
$ride
->
assigned_driver_name
)
&&
$ride
->
status
==
3
){
echo
'Waiting for driver response : Driver Name '
.
$ride
->
assigned_driver_name
;
}
else
if
(
!
empty
(
$ride
->
assigned_driver
)
&&
$ride
->
driver_assign_status
==
'0'
&&
!
empty
(
$ride
->
assigned_driver_name
)
&&
$ride
->
status
==
4
){
echo
'Driver Accepted : Driver Name '
.
$ride
->
assigned_driver_name
;
}
?>
</th>
<th
class=
"center"
>
<a
id=
"viewRideDetails"
key=
"
<?=
$ride
->
transport_id
?>
"
class=
"cpoint"
>
<i
class=
"fa fa-fw fa-eye"
></i>
</a>
</th>
</tr>
<?php
$report_data
[
$ride
->
transport_id
]
=
$json_ride
;
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script
type=
"text/javascript"
>
report_data
=
<?=
json_encode
(
$report_data
);
?>
;
</script>
\ No newline at end of file
application/views/Ride/view_rides.php
View file @
6d302e54
<?php
<?php
$headerArr
=
array
(
"Medicaid_Number"
,
"Members_Last_Name"
,
"Members_First_Name"
,
"Members_Date_of_Birth"
,
"Members_Age"
,
"Members_Phone_Number"
,
"Members_Alt_Phone"
,
"Trip_Number"
,
"Appointment_Date"
,
"Appointment_Day_of_Week"
,
"Appointment_Time"
,
"Trip_Reason_Code"
,
"Trip_Status"
,
"Vehicle_Type"
,
"Trip_Type"
,
"Wheelchair_Flag"
,
"Crutches_\/_Walker_\/_Cane_Flag"
,
"Number_of_Car_Seats_Required"
,
"Pregnant_Flag"
,
"Number_of_Additional_Passengers"
,
"Additional_Passengers_With_Appointments"
,
"Trip_Mileage"
,
"Trip_Cost"
,
"Pickup_Address"
,
"Pickup_City"
,
"Pickup_State"
,
"Pickup_Zip_Code"
,
"Delivery_Name"
,
"Delivery_Address"
,
"Delivery_City"
,
"Delivery_State"
,
"Delivery_Zip_Code"
,
"Delivery_Phone_Number"
,
"Special_Needs"
,
"Inst_\/_Directions"
,
"Return_Time"
,
"Attendant_Flag"
,
"Trip_Bid_Status"
,
"Date_Trip_Bid_Status_Was_Changed"
,
"Confirmation_Number"
,
"Copay"
,
"Trip_Status_Date"
);
$headerArr
=
array
(
"Medicaid_Number"
,
"Members_Last_Name"
,
"Members_First_Name"
,
"Members_Date_of_Birth"
,
"Members_Age"
,
"Members_Phone_Number"
,
"Members_Alt_Phone"
,
"Trip_Number"
,
"Appointment_Date"
,
"Appointment_Day_of_Week"
,
"Appointment_Time"
,
"Trip_Reason_Code"
,
"Trip_Status"
,
"Vehicle_Type"
,
"Trip_Type"
,
"Wheelchair_Flag"
,
"Crutches_\/_Walker_\/_Cane_Flag"
,
"Number_of_Car_Seats_Required"
,
"Pregnant_Flag"
,
"Number_of_Additional_Passengers"
,
"Additional_Passengers_With_Appointments"
,
"Trip_Mileage"
,
"Trip_Cost"
,
"Pickup_Address"
,
"Pickup_City"
,
"Pickup_State"
,
"Pickup_Zip_Code"
,
"Delivery_Name"
,
"Delivery_Address"
,
"Delivery_City"
,
"Delivery_State"
,
"Delivery_Zip_Code"
,
"Delivery_Phone_Number"
,
"Special_Needs"
,
"Inst_\/_Directions"
,
"Return_Time"
,
"Attendant_Flag"
,
"Trip_Bid_Status"
,
"Date_Trip_Bid_Status_Was_Changed"
,
"Confirmation_Number"
,
"Copay"
,
"Trip_Status_Date"
);
?>
?>
<div
class=
"content-wrapper"
>
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
<section
class=
"content-header"
>
...
@@ -50,7 +49,7 @@
...
@@ -50,7 +49,7 @@
}
}
}
}
?>
?>
<option
value=
"0"
<?=
(
$broker_id
==
0
)
?
'selected'
:
''
?>
>
Phone Bookings
</option>
<option
value=
"0"
<?=
(
$broker_id
!=
''
&&
$broker_id
==
0
)
?
'selected'
:
''
?>
>
Phone Bookings
</option>
</select>
</select>
</div>
</div>
</div>
</div>
...
@@ -77,9 +76,11 @@
...
@@ -77,9 +76,11 @@
</thead>
</thead>
<tbody>
<tbody>
<?php
<?php
$ride_ids
=
array
();
$report_data
=
array
();
$report_data
=
array
();
if
(
!
empty
(
$ride_data
)){
if
(
!
empty
(
$ride_data
)){
foreach
(
$ride_data
as
$ride
)
{
foreach
(
$ride_data
as
$ride
)
{
$ride_ids
[]
=
$ride
->
transport_id
;
$json_ride
=
json_decode
(
$ride
->
data
,
true
);
$json_ride
=
json_decode
(
$ride
->
data
,
true
);
if
(
empty
(
$json_ride
)){
if
(
empty
(
$json_ride
)){
continue
;
continue
;
...
@@ -88,6 +89,16 @@
...
@@ -88,6 +89,16 @@
<tr>
<tr>
<th
class=
"hidden"
>
<?=
$ride
->
transport_id
?>
</th>
<th
class=
"hidden"
>
<?=
$ride
->
transport_id
?>
</th>
<th
class=
"center"
>
<th
class=
"center"
>
<?php
if
(
$this
->
session
->
userdata
[
'user_type'
]
!=
1
){
$style
=
'style="color:red;";'
;
if
(
$ride
->
is_scheduled
==
1
){
$style
=
'style="color:green;";'
;
}
?>
<a
id=
"markSchedule_
<?=
$ride
->
transport_id
?>
"
transport_id=
"
<?=
$ride
->
transport_id
?>
"
is_scheduled=
"
<?=
$ride
->
is_scheduled
?>
"
class=
"cpoint"
>
<i
class=
"fa fa-fw fa-check"
<?=
$style
?>
></i>
</a>
<?php
}
?>
<a
id=
"viewRideDetails"
key=
"
<?=
$ride
->
transport_id
?>
"
class=
"cpoint"
>
<a
id=
"viewRideDetails"
key=
"
<?=
$ride
->
transport_id
?>
"
class=
"cpoint"
>
<i
class=
"fa fa-fw fa-eye"
></i>
<i
class=
"fa fa-fw fa-eye"
></i>
</a>
</a>
...
@@ -117,6 +128,13 @@
...
@@ -117,6 +128,13 @@
}
?>
}
?>
</tbody>
</tbody>
</table>
</table>
<?php
if
(
$this
->
session
->
userdata
[
'user_type'
]
!=
1
){
?>
<div
class=
"col-md-1"
style=
"float:right;padding:initial;"
>
<a
id=
"scheduleAll"
class=
"btn btn-sm btn-primary"
>
Schedule All
</a>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -124,5 +142,6 @@
...
@@ -124,5 +142,6 @@
</section>
</section>
</div>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
ride_ids
=
<?=
json_encode
(
$ride_ids
);
?>
;
report_data
=
<?=
json_encode
(
$report_data
);
?>
;
report_data
=
<?=
json_encode
(
$report_data
);
?>
;
</script>
</script>
application/views/Templates/footer-script.php
View file @
6d302e54
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
}
}
});
});
});
});
<?php
break
;
?>
<?php
break
;
default
:
?>
default
:
?>
jQuery
(
function
()
{
jQuery
(
function
()
{
jQuery
(
'.datatable'
).
DataTable
({
jQuery
(
'.datatable'
).
DataTable
({
...
...
application/views/Templates/header-script.php
View file @
6d302e54
...
@@ -22,6 +22,6 @@
...
@@ -22,6 +22,6 @@
<script
src=
"
<?php
echo
base_url
();
?>
assets/js/jQuery-2.1.4.min.js"
></script>
<script
src=
"
<?php
echo
base_url
();
?>
assets/js/jQuery-2.1.4.min.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
report_data
=
[];
report_data
=
ride_ids
=
[];
</script>
</script>
</head>
</head>
application/views/Templates/left-menu.php
View file @
6d302e54
...
@@ -136,6 +136,14 @@
...
@@ -136,6 +136,14 @@
Import Rides
Import Rides
</a>
</a>
</li>
</li>
<?php
if
(
$this
->
session
->
userdata
[
'user_type'
]
!=
1
){
?>
<li>
<a
href=
"
<?=
base_url
(
'Ride/scheduled_rides'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
Scheduled Rides
</a>
</li>
<?php
}
?>
</ul>
</ul>
</li>
</li>
<li><a
href=
"
<?=
base_url
(
'Payment/getPayDetails'
)
?>
"
>
<li><a
href=
"
<?=
base_url
(
'Payment/getPayDetails'
)
?>
"
>
...
...
assets/css/custom-style.css
View file @
6d302e54
...
@@ -81,20 +81,20 @@
...
@@ -81,20 +81,20 @@
width
:
34px
;
width
:
34px
;
margin-top
:
10px
;
margin-top
:
10px
;
height
:
41px
;
height
:
41px
;
}
.seater
{
}
.seater
{
background-image
:
url(./images/4.png)
;
background-repeat
:
no-repeat
;
height
:
23px
;
background-image
:
url(./images/4.png)
;
background-repeat
:
no-repeat
;
height
:
23px
;
width
:
34px
;
width
:
34px
;
margin-top
:
10px
;
margin-top
:
10px
;
height
:
41px
;
height
:
41px
;
}
.sleeper1
{
}
.sleeper1
{
background-image
:
url(../images/empty.png)
;
background-repeat
:
no-repeat
;
height
:
23px
;
background-image
:
url(../images/empty.png)
;
background-repeat
:
no-repeat
;
height
:
23px
;
width
:
34px
;
width
:
34px
;
margin-top
:
10px
;
margin-top
:
10px
;
height
:
41px
;
height
:
41px
;
}
}
.sub_buttons
{
padding-top
:
23px
!important
;}
.sub_buttons
{
padding-top
:
23px
!important
;}
.well
{
.well
{
position
:
absolute
;
position
:
absolute
;
z-index
:
1
;
z-index
:
1
;
margin-top
:
-30px
;
margin-top
:
-30px
;
...
@@ -102,14 +102,14 @@
...
@@ -102,14 +102,14 @@
min-height
:
30px
;
min-height
:
30px
;
padding
:
0
6.5px
;
padding
:
0
6.5px
;
left
:
25%
;
left
:
25%
;
}
}
.thumbnailss
{
.thumbnailss
{
list-style
:
none
;
list-style
:
none
;
}
}
/******SEAT BLOCK CSS********/
/******SEAT BLOCK CSS********/
.sleeper
{
.sleeper
{
background-image
:
url(../images/1.png)
;
background-image
:
url(../images/1.png)
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
height
:
23px
;
height
:
23px
;
...
@@ -209,20 +209,20 @@
...
@@ -209,20 +209,20 @@
margin-top
:
10px
;
margin-top
:
10px
;
height
:
21px
;
height
:
21px
;
}
}
/******SEAT BLOCK CSS********/
/******SEAT BLOCK CSS********/
.prevent-click
{
.prevent-click
{
pointer-events
:
none
;
pointer-events
:
none
;
cursor
:
default
;
cursor
:
default
;
text-decoration
:
none
;
text-decoration
:
none
;
color
:
black
;
color
:
black
;
}
}
.hide
{
.hide
{
display
:
none
!important
;
display
:
none
!important
;
}
}
.loader
{
.loader
{
position
:
absolute
;
position
:
absolute
;
top
:
0px
;
top
:
0px
;
right
:
0px
;
right
:
0px
;
...
@@ -230,16 +230,71 @@
...
@@ -230,16 +230,71 @@
left
:
0px
;
left
:
0px
;
text-align
:
center
;
text-align
:
center
;
background-image
:
url(../images/loader.gif)
;
background-image
:
url(../images/loader.gif)
;
background-size
:
12
%
;
background-size
:
5
%
;
background-position
:
center
;
background-position
:
center
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
background-color
:
rgba
(
211
,
211
,
211
,
0.5
);
background-color
:
rgba
(
0
,
0
,
0
,
0.56
);
}
}
.height_200
{
.height_200
{
height
:
200px
!important
;
height
:
200px
!important
;
}
}
.cpoint
{
.cpoint
{
cursor
:
pointer
!important
;
cursor
:
pointer
!important
;
}
}
\ No newline at end of file
.overlay
{
position
:
fixed
;
/* Sit on top of the page content */
display
:
none
;
/* Hidden by default */
width
:
100%
;
/* Full width (cover the whole page) */
height
:
100%
;
/* Full height (cover the whole page) */
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
/* Black background with opacity */
z-index
:
2
;
/* Specify a stack order in case you're using a different order for other elements */
cursor
:
pointer
;
/* Add a pointer on hover */
}
.drag-box
{
float
:
left
;
width
:
100%
;
min-height
:
25px
;
margin
:
2px
;
border
:
1px
solid
#A8A8A8
;
}
.border-cls
{
border
:
1px
solid
#e0dbdb
;
}
.headtag-td
{
padding
:
5px
;
width
:
50%
;
}
.header-tag
{
border
:
1px
solid
darkgray
;
border-radius
:
10px
;
padding
:
0px
10px
;
display
:
inline-block
;
margin
:
2px
;
background
:
#c2ccd6
;
}
.header-tag-box
{
width
:
100%
;
min-height
:
400px
;
border
:
1px
solid
#dfdbdb
;
padding
:
2px
;
}
.clear
{
clear
:
both
!important
;
}
.btn-mapping
{
text-align
:
center
;
padding
:
15px
;
}
\ No newline at end of file
assets/js/nemt_custom.js
View file @
6d302e54
jQuery
(
document
).
ready
(
function
(){
jQuery
(
'<div class="overlay"></div>'
).
insertBefore
(
".content-wrapper"
);
});
function
setImg
(
input
,
id
)
{
function
setImg
(
input
,
id
)
{
if
(
input
.
files
&&
input
.
files
[
0
])
{
if
(
input
.
files
&&
input
.
files
[
0
])
{
var
reader
=
new
FileReader
();
var
reader
=
new
FileReader
();
...
@@ -190,3 +194,166 @@ function remModalLoader(){
...
@@ -190,3 +194,166 @@ function remModalLoader(){
jQuery
(
"[id='modal_loader_body']"
).
remove
();
jQuery
(
"[id='modal_loader_body']"
).
remove
();
jQuery
(
"[id='modal_content']"
).
removeClass
(
'relative height_200'
);
jQuery
(
"[id='modal_content']"
).
removeClass
(
'relative height_200'
);
}
}
jQuery
(
'[id="scheduleAll"]'
).
click
(
function
(){
if
(
ride_ids
==
undefined
||
ride_ids
==
'undefined'
||
ride_ids
==
null
||
ride_ids
==
'null'
||
ride_ids
==
''
){
return
false
;
}
markAsScheduled
(
ride_ids
,
'0'
);
});
jQuery
(
'[id^="markSchedule_"]'
).
click
(
function
(){
var
thisObj
=
jQuery
(
this
),
is_scheduled
=
thisObj
.
attr
(
'is_scheduled'
),
transport_id
=
thisObj
.
attr
(
'transport_id'
);
if
(
transport_id
==
undefined
||
transport_id
==
'undefined'
||
transport_id
==
null
||
transport_id
==
'null'
||
transport_id
==
''
||
is_scheduled
==
undefined
||
is_scheduled
==
'undefined'
||
is_scheduled
==
null
||
is_scheduled
==
'null'
||
is_scheduled
==
''
){
return
false
;
}
if
(
is_scheduled
==
1
){
flag
=
confirm
(
"Are you sure to continue with this action...?"
);
if
(
flag
!=
true
)
return
false
;
}
markAsScheduled
(
transport_id
,
is_scheduled
);
});
function
markAsScheduled
(
transport_id
,
is_scheduled
){
if
(
transport_id
==
undefined
||
transport_id
==
'undefined'
||
transport_id
==
null
||
transport_id
==
'null'
||
transport_id
==
''
||
is_scheduled
==
undefined
||
is_scheduled
==
'undefined'
||
is_scheduled
==
null
||
is_scheduled
==
'null'
||
is_scheduled
==
''
){
return
false
;
}
showFullScreenLoader
();
jQuery
.
ajax
({
url
:
base_url
+
"Ride/changeSchuduleStatus"
,
type
:
'POST'
,
data
:
{
'transport_id'
:
transport_id
,
'is_scheduled'
:
is_scheduled
},
success
:
function
(
resp
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
null
||
resp
==
'null'
||
resp
==
'undefined'
){
remFullScreenLoader
();
return
false
;
}
resp
=
jQuery
.
parseJSON
(
resp
);
if
(
resp
[
'status'
]
==
1
){
var
color
=
''
;
if
(
is_scheduled
==
1
){
color
=
'red'
is_scheduled
=
0
;
}
else
{
color
=
'green'
is_scheduled
=
1
;
}
jQuery
.
each
(
resp
[
'succArr'
],
function
(
index
,
value
)
{
jQuery
(
'[id="markSchedule_'
+
value
+
'"]'
).
attr
(
'is_scheduled'
,
is_scheduled
);
jQuery
(
jQuery
(
'[id="markSchedule_'
+
value
+
'"]'
)).
children
().
css
(
"color"
,
color
);
});
remFullScreenLoader
();
}
},
error
:
function
(
jqXHR
,
exception
)
{
remFullScreenLoader
();
}
});
}
function
showFullScreenLoader
(){
var
thisObj
=
jQuery
(
'.overlay'
);
thisObj
.
css
(
"display"
,
'block'
);
thisObj
.
addClass
(
'relative'
);
thisObj
.
prepend
(
"<div id='fullScreenLoaderBody' class='loader'></div>"
);
}
function
remFullScreenLoader
(){
var
thisObj
=
jQuery
(
'.overlay'
);
thisObj
.
css
(
"display"
,
'none'
);
jQuery
(
'[id="fullScreenLoaderBody"]'
).
remove
();
thisObj
.
removeClass
(
'relative'
);
}
function
allowDropElement
(
ev
)
{
if
(
ev
.
target
.
getAttribute
(
'type'
)
!=
'parent'
&&
ev
.
target
.
firstChild
!=
null
){
return
false
;
}
ev
.
preventDefault
();
}
function
dragElement
(
ev
)
{
ev
.
dataTransfer
.
setData
(
"tmporderid"
,
ev
.
target
.
getAttribute
(
'id'
));
}
function
dropElement
(
ev
)
{
ev
.
preventDefault
();
var
tmporderid
=
ev
.
dataTransfer
.
getData
(
"tmporderid"
);
ev
.
target
.
appendChild
(
document
.
getElementById
(
tmporderid
));
}
jQuery
(
'[id="upload_excell"]'
).
click
(
function
(){
var
thisObj
=
jQuery
(
this
),
childThisObj
=
''
,
headerOrder
=
[],
fileType
=
jQuery
(
'[name="fileType"]'
).
val
(),
broker_id
=
jQuery
(
'[name="broker_id"]'
).
val
(),
company_id
=
jQuery
(
'[name="company_id"]'
).
val
(),
import_file
=
jQuery
(
'[name="import_file"]'
).
val
();
if
(
thisObj
.
attr
(
'dmclick'
)
!=
0
){
return
false
;
}
if
(
fileType
==
''
||
fileType
==
undefined
||
fileType
==
null
||
fileType
==
'null'
||
fileType
==
'undefined'
||
broker_id
==
''
||
broker_id
==
undefined
||
broker_id
==
null
||
broker_id
==
'null'
||
broker_id
==
'undefined'
||
company_id
==
''
||
company_id
==
undefined
||
company_id
==
null
||
company_id
==
'null'
||
company_id
==
'undefined'
||
import_file
==
''
||
import_file
==
undefined
||
import_file
==
null
||
import_file
==
'null'
||
import_file
==
'undefined'
){
setErrModal
(
'Error Uploading Excell'
,
'Please Map All the Fields to the corrospinding header..!'
);
return
false
;
}
showFullScreenLoader
();
thisObj
.
attr
(
'dmclick'
,
1
);
jQuery
(
'[id="mappedHeaders"] [type="child"]'
).
each
(
function
(){
childThisObj
=
jQuery
(
this
);
if
(
childThisObj
.
children
().
length
<=
0
)
{
remFullScreenLoader
();
thisObj
.
attr
(
'dmclick'
,
0
);
setErrModal
(
'Error Uploading Excell'
,
'Something went wrong, please try again later..!'
);
return
false
;
}
var
childHead
=
childThisObj
.
children
();
headerOrder
[
childThisObj
.
attr
(
'headOrder'
)]
=
childHead
.
attr
(
'tmporder'
);
});
jQuery
.
ajax
({
url
:
base_url
+
"Ride/import"
,
type
:
'POST'
,
data
:
{
'broker_id'
:
broker_id
,
'company_id'
:
company_id
,
'header_order'
:
headerOrder
,
'file_type'
:
fileType
,
'import_file'
:
import_file
},
success
:
function
(
resp
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
null
||
resp
==
'null'
||
resp
==
'undefined'
){
remFullScreenLoader
();
thisObj
.
attr
(
'dmclick'
,
0
);
setErrModal
(
'Error Uploading Excell'
,
'Something went wrong, please try again..!'
);
return
false
;
}
resp
=
jQuery
.
parseJSON
(
resp
);
if
(
resp
[
'status'
]
==
1
){
var
color
=
''
;
if
(
is_scheduled
==
1
){
color
=
'red'
is_scheduled
=
0
;
}
else
{
color
=
'green'
is_scheduled
=
1
;
}
jQuery
.
each
(
resp
[
'succArr'
],
function
(
index
,
value
)
{
jQuery
(
'[id="markSchedule_'
+
value
+
'"]'
).
attr
(
'is_scheduled'
,
is_scheduled
);
jQuery
(
jQuery
(
'[id="markSchedule_'
+
value
+
'"]'
)).
children
().
css
(
"color"
,
color
);
});
remFullScreenLoader
();
}
},
error
:
function
(
jqXHR
,
exception
)
{
remFullScreenLoader
();
thisObj
.
attr
(
'dmclick'
,
0
);
setErrModal
(
'Error Uploading Excell'
,
'Something went wrong, please try again..!'
);
return
false
;
}
});
});
\ No newline at end of file
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