TicketAdministration Class
This class contains functionality of Ticket administration for CCE.
Constructor
TicketAdministration
()
Item Index
Methods
- addCustomerForExistingVehicle
- addNewCustomer
- addNewTicket
- assignVan
- bindClickEventToMap
- btnCancel
- btnCancelAddCustomer
- calcRoute
- calcRouteDistance
- calculateDistanceInSetTimeOut
- checkIfContactNoIsSame
- checkIfVRegistrationNoIsSame
- checkIsOwnerExist
- checkIsVehicleExist
- closeWindow
- createAjaxRequest
- createMarker
- createMarkerVanDealer
- createVanDealerList
- createVanDealerSortedList
- drawHighway
- getCloseTicketDetails
- getNearestVansDealers
- getReverseGeoCode
- getRoutesList
- getStateList
- getTicketDetails
- getTicketHistory
- getVehicleModelTagging
- initMap
- initMap
- LoadCityList
- onBackButtonClick
- onBeginGetAllVansDealers
- onBlurCity
- onChangeRoute
- onClickAssignTicketOrCancel
- onclickLabelActivity
- onclickLabelRoute
- onclickLabelRoute
- onclickLabelRoute
- onSuccessAddCustomer
- onSuccessAddCustomerForExistingVehicle
- placeLocationOnMap
- removeClickEventToMap
- removeTicketDetailsMarkerArray
- setMapCenterToAddress
- showFeedback
- showFeedback
- updateInfoWindow
- viewCheckHistory
Methods
addCustomerForExistingVehicle
-
vRegNo
Function to add new customer for already existing vehicle
Parameters:
-
vRegNoStringRegistration no of vehicle
addNewCustomer
()
Function to add new customer
addNewTicket
()
Function to add new ticket
assignVan
-
index
This fn removes and add class to show which Van is assigned.
Parameters:
-
indexStringIndex of selected row of van / dealer list
bindClickEventToMap
()
This fn binds Click Event to the Map when adding New Vehicle to location Vehicle Location.
btnCancel
()
Function call onclick cancel button
btnCancelAddCustomer
-
divId
Function call on click of cancel button of add customer window
Parameters:
-
divIdStringThe id of div
calcRoute
-
startLatLng -
endLatLng -
vanDealerType -
mapID
This fn calculates and draws the Route for the Ticket selected in the Ticket List using Google Direction API
Parameters:
-
startLatLngStringPosition of origin
-
endLatLngStringPosition of destination
-
vanDealerTypeStringType is Van or Dealer
-
mapIDStringmap id
calcRouteDistance
-
origin -
destinationArr
This fn calculate route distance and show sorted vans and dealers list in table
Parameters:
-
originStringLocation of origin
-
destinationArrStringarray Locations of destination
calculateDistanceInSetTimeOut
-
breakDownLatLng -
arrVanDealerLatLng -
arrVanDealerDetails -
timeOutSeconds
SetTimeOut function to calculate distance between van and dealer using google distance matrix api
Parameters:
-
breakDownLatLngStringLatLng of breakdown vehicle
-
arrVanDealerLatLngArrayLatLng of vans / dealers
-
arrVanDealerDetailsArraydetails of vans/dealers
-
timeOutSecondsStringtime in seconds for setTimeout function
checkIfContactNoIsSame
()
Function to check owner mobile no. on focus
checkIfVRegistrationNoIsSame
()
Function to check owner vehicle registration no. on focus
checkIsOwnerExist
()
Function to check is owner exist already
checkIsVehicleExist
()
Function to check is vehicle exist already
closeWindow
-
divId
Function to close kendo window
Parameters:
-
divIdStringThe id of div
createAjaxRequest
-
controller -
actionName -
divId -
VRegNo
Function to create ajax request
Parameters:
-
controllerStringName of controller
-
actionNameStringName of action on controller
-
divIdStringHTML id of div
-
VRegNoStringRegistration no. of vehicle
createMarker
-
position -
icon -
vanDealerId -
content -
mapId
Function to create markers on van's / dealer's locations
Parameters:
-
positionStringPosition of van / dealer
-
iconStringIcon of placed marker
-
vanDealerIdStringVan / Dealer's id
-
contentStringContent of mesage to show in infowindow
-
mapIdStringmap id
createMarkerVanDealer
-
position -
icon -
title
Function to create markers on van's / dealer's location for ticket details
Parameters:
-
positionStringPosition of van / dealer
-
iconStringIcon of placed marker
-
titleStringTitle of placed marker
createVanDealerList
()
setTimeOut function to create sorted van dealer list
createVanDealerSortedList
()
This fn create sorted van dealer list
drawHighway
-
startLatLng -
endLatLng -
vanDealerType -
mapID
This fn calculates and draws the Route for selected national highway using Google Direction API
Parameters:
-
startLatLngStringPosition of origin
-
endLatLngStringPosition of destination
-
vanDealerTypeStringType is Van or Dealer
-
mapIDStringmap id
getCloseTicketDetails
()
Function to get close ticket details
getNearestVansDealers
()
Function to get all nearest vans / dealers list
getReverseGeoCode
-
latLng -
callback
This function reverses the Lat Lng to Get the Approxmiate Address using the Google GeoCoding. Callback the result
Parameters:
-
latLngStringlat lng of marker
-
callbackStringfunction callback
getRoutesList
()
Function to bind all routes in drop down
getStateList
()
Function to bind all states in drop down
getTicketDetails
()
Function to get open ticket details
getTicketHistory
()
Function to get ticket history based on vehicle registration no., customer/owner mobile no. or ticket id/complaint no.
getVehicleModelTagging
()
Function to get vehicle model tagging based on vehicle model no
initMap
-
id
Load google map on page.
Parameters:
-
idStringHTML element id where map is loaded.
initMap
-
id
Load google map on page.
Parameters:
-
idStringHTML element id where map is loaded.
LoadCityList
-
ddlId -
cityValue
Function to add new customer
Parameters:
-
ddlIdStringHTML id of drop down list of city
-
cityValueStringHTML value of drop down list selected item of city
onBackButtonClick
()
Function call on click of back button
onBeginGetAllVansDealers
()
Function call on begin of get all nearest vans list
onBlurCity
-
$this
This function call on change of city ame
Parameters:
-
$thisStringid of input text box
onChangeRoute
()
This function call on change of route name
onClickAssignTicketOrCancel
()
Function call onclick of cancel or assign ticket
onclickLabelActivity
()
Function call on click of Activity label to show ticket activity
onclickLabelRoute
()
Function call on click of Route label to show map
onclickLabelRoute
()
Function call on click of Route label to show map
onclickLabelRoute
()
Function call on click of Route label to show map
onSuccessAddCustomer
()
Function call on success of add customer
onSuccessAddCustomerForExistingVehicle
()
Function call on success of add customer for already existing vehicle
placeLocationOnMap
()
Function to search location using search places text box google map api.
removeClickEventToMap
()
This fn removes Click Event Listener from the map
removeTicketDetailsMarkerArray
()
This fn removes all markers stored in ticketDetailsMarkerArray.
setMapCenterToAddress
-
address
This function set center and zoom of map when state or city change
Parameters:
-
addressStringaddress to show on map
showFeedback
()
Function call on click of feedback label to show feedback form
showFeedback
()
Function call on click of feedback label to show feedback form
updateInfoWindow
-
unitMarker -
message -
map
Function to update data of info window on markers of van's / dealer's locations
Parameters:
-
unitMarkerStringPosition of van / dealer
-
messageStringData of info window on placed marker
-
mapStringmap id
viewCheckHistory
()
Get Check History Form view
