const { createRoute, getAllRoutes, getRouteDataById, updateRoute, deleteRoute, getAllUnAssignedRoutes,
     getInstallationsByRoute, assignInstallationToDriver, addSelectedRoutes, updateRouteStatus, deleteCompletedRoute,
     findDataByDriverId,demoMessage,getAllAssignedRoutes, 
     fetchAllUnassignedSalesorderFromAppointments,
     assignTSJobToRoute,
     saveTSRouteLocations,
     fetchRouteLocationsByRouteId,
     fetchRoutesWithLocations,
     getAllProductsForWEDRoute,
     fetchRouteLocationsBySalesId,
     getRouteDataBySalesOrderId,
     fetchProjectAddressByRouteId} = require("../controllers/routes");
const { updateProjectLatLngController } = require("../controllers/settings");

const RoutingRoutes = [
    {
        method : "POST",
        url : "/webservice/route/add",
        handler : createRoute
    },
    {
        method : "POST",
        url : "/webservice/route/get-route",
        handler : getAllRoutes
    },
    {
        method : "POST",
        url : "/webservice/route/get-all-unassigned-routes",
        handler : getAllUnAssignedRoutes
    },
    {
        method : "POST",
        url : "/webservice/route/get-route-by-id",
        handler : getRouteDataById
    },
    {
        method : "POST",
        url : "/webservice/route/fetch-all-unassigned-installation-salesorder",
        handler : fetchAllUnassignedSalesorderFromAppointments
    },
    {
        method : "POST",
        url : "/webservice/route/update",
        handler : updateRoute
    },
    {
        method : "POST",
        url : "/webservice/route/delete",
        handler : deleteRoute
    },
    {
        method : "POST",
        url : "/webservice/route/get-installations-by-route",
        handler : getInstallationsByRoute
    },
    {
        method : "POST",
        url : "/webservice/route/assign-installation-to-driver",
        handler : assignInstallationToDriver
    },
    {
        method : "POST",
        url : "/webservice/route/add-driver-selected-route",
        handler : addSelectedRoutes
    },
    {
        method : "POST",
        url : "/webservice/route/update-status-route",
        handler : updateRouteStatus
    },
    {
        method : "POST",
        url : "/webservice/route/delete-status-route",
        handler : deleteCompletedRoute
    },
    {
        method : "POST",
        url : "/webservice/route/get-route-data-by-driverId",
        handler : findDataByDriverId
    },
    {
        method : "POST",
        url : "/webservice/route/demo-message",
        handler : demoMessage
    },
    {
        method : "POST",
        url : "/webservice/route/get-all-assigned-route",
        handler : getAllAssignedRoutes
    },
    {
        method : "POST",
        url : "/webservice/route/assign-ts-job-to-route",
        handler : assignTSJobToRoute
    },
    {
        method : "POST",
        url : "/webservice/route/save-locations",
        handler : saveTSRouteLocations
    },
    {
        method : "POST",
        url : "/webservice/route/fetch-locations-route-id",
        handler : fetchRouteLocationsByRouteId
    },
    {
        method : "POST",
        url : "/webservice/route/get-project-address-by-route",
        handler : fetchProjectAddressByRouteId
    },
    {
        method : "POST",
        url : "/webservice/route/update-community-lat-lng",
        handler : updateProjectLatLngController
    },
    {
        method : "POST",
        url : "/webservice/route/fetch-locations-sales-id",
        handler : fetchRouteLocationsBySalesId
    },
    {
        method : "POST",
        url : "/webservice/route/fetch-routes-with-locations",
        handler : fetchRoutesWithLocations
    },
    {
        method : "POST",
        url : "/webservice/route/get-all-products-for-wed-route",
        handler : getAllProductsForWEDRoute
    },
    {
        method : "POST",
        url : "/webservice/route/get-route-by-sales-order-id",
        handler : getRouteDataBySalesOrderId
    },
   ]

 module.exports=RoutingRoutes  