Skin
\nContent Width
\nRTL
\nRouter Transition
\nMenu Layout
\nMenu Collapsed
\nMenu Hidden
\nNavbar Color
\n\n {layout === \"HorizontalLayout\" ? \"Menu\" : \"Navbar\"} Type\n
\nFooter Type
\n\n El sistema de Ruta LogĆstica es un sistema de software WEB diseƱado para recibir\n y procesar tramas de datos provenientes de dispositivos GPS instalados en\n camiones o cualquier tipo de activo como contenedores o maquinaria pesada. Una\n vez procesada la trama de datos el sistema es capaz de generar informaciĆ³n\n relevante, precisa y oportuna acerca del estado y avance de un camiĆ³n de\n transporte asignado a trasladar un determinado producto desde un punto origen a\n uno o varios puntos de destino (entregas). El mismo manda notificaciones\n logĆsticas y alertas de seguridad automĆ”ticas en caso suceda un evento en el\n cual un conductor del camiĆ³n NO RESPETE las reglas configuradas para la ruta\n asignada.\n
\n\n {highlightQuery(item.title, formValues.query)}\n
\n {item.type === 'units' ? (\n <>\n \n\r\n \r\n Copyright Ā© {new Date().getFullYear()}{' '}\r\n \r\n Webtrack\r\n {' '}\r\n v.{process.env.REACT_APP_VERSION}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import sidebarOptions from '../vertical';\r\nexport default [\r\n ...sidebarOptions\r\n .map((option) => (option.header == null ? option : null))\r\n .filter((option) => option != null)\r\n];\r\n","// ** React Imports\r\nimport { useContext } from 'react'\r\nimport { AbilityContext } from '@src/utility/context/Can'\r\n\r\n/**\r\n * Return which component to render based on it's data/context\r\n * @param {Object} item nav menu item\r\n */\r\nexport const resolveVerticalNavMenuItemComponent = item => {\r\n if (item.header) return 'VerticalNavMenuSectionHeader'\r\n if (item.children) return 'VerticalNavMenuGroup'\r\n return 'VerticalNavMenuLink'\r\n}\r\n\r\n/**\r\n * Return which component to render based on it's data/context\r\n * @param {Object} item nav menu item\r\n */\r\nexport const resolveHorizontalNavMenuItemComponent = item => {\r\n if (item.children) return 'HorizontalNavMenuGroup'\r\n return 'HorizontalNavMenuLink'\r\n}\r\n\r\n/**\r\n * Check if nav-link is active\r\n * @param {Object} link nav-link object\r\n */\r\n// export const isNavLinkActive = (link, currentURL, match) => {\r\n// // return currentURL === link || (URLParams && Object.keys(URLParams).length && currentURLFilter === item.navLink)\r\n// const getFirstObjProp = obj => obj[Object.keys(obj)[0]]\r\n// return (\r\n// currentURL === link ||\r\n// (match !== null && match !== undefined && match.url === `${link}/${getFirstObjProp(match.params)}`)\r\n// )\r\n// }\r\n\r\nexport const isNavLinkActive = (link, currentURL, routerProps) => {\r\n return (\r\n currentURL === link ||\r\n (routerProps && routerProps.meta && routerProps.meta.navLink && routerProps.meta.navLink === link)\r\n )\r\n // return currentURL === link\r\n}\r\n\r\n/**\r\n * Check if nav group is\r\n * @param {Array} children Group children\r\n */\r\n// export const isNavGroupActive = (children, currentURL, match) => {\r\n// return children.some(child => {\r\n// // If child have children => It's group => Go deeper(recursive)\r\n// if (child.children) {\r\n// return isNavGroupActive(child.children, currentURL, match)\r\n// }\r\n// // else it's link => Check for matched Route\r\n// return isNavLinkActive(child.navLink, currentURL, match)\r\n// })\r\n// }\r\nexport const isNavGroupActive = (children, currentURL, routerProps) => {\r\n return children.some(child => {\r\n // If child have children => It's group => Go deeper(recursive)\r\n if (child.children) {\r\n return isNavGroupActive(child.children, currentURL, routerProps)\r\n }\r\n // else it's link => Check for matched Route\r\n return isNavLinkActive(child.navLink, currentURL, routerProps)\r\n })\r\n}\r\n\r\n/**\r\n * Search for parent object\r\n * @param {Array} navigation Group children\r\n * @param {string} currentURL current URL\r\n */\r\n// export const search = (navigation, currentURL, match) => {\r\n// let result\r\n// navigation.some(child => {\r\n// let children\r\n// // If child have children => It's group => Go deeper(recursive)\r\n// if (child.children && (children = search(child.children, currentURL, match))) {\r\n// return (result = {\r\n// id: child.id,\r\n// children\r\n// })\r\n// }\r\n\r\n// // else it's link => Check for matched Route\r\n// if (isNavLinkActive(child.navLink, currentURL, match)) {\r\n// return (result = {\r\n// id: child.id\r\n// })\r\n// }\r\n// })\r\n// return result\r\n// }\r\n\r\nexport const search = (navigation, currentURL, routerProps) => {\r\n let result\r\n navigation.some(child => {\r\n let children\r\n // If child have children => It's group => Go deeper(recursive)\r\n if (child.children && (children = search(child.children, currentURL, routerProps))) {\r\n return (result = {\r\n id: child.id,\r\n children\r\n })\r\n }\r\n\r\n // else it's link => Check for matched Route\r\n if (isNavLinkActive(child.navLink, currentURL, routerProps)) {\r\n return (result = {\r\n id: child.id\r\n })\r\n }\r\n })\r\n return result\r\n}\r\n\r\n/**\r\n * Loop through nested object\r\n * @param {object} obj nested object\r\n */\r\nexport const getAllParents = (obj, match) => {\r\n const res = []\r\n const recurse = (obj, current) => {\r\n for (const key in obj) {\r\n const value = obj[key]\r\n if (value !== undefined) {\r\n if (value && typeof value === 'object') {\r\n recurse(value, key)\r\n } else {\r\n if (key === match) {\r\n res.push(value)\r\n }\r\n }\r\n }\r\n }\r\n }\r\n recurse(obj)\r\n return res\r\n}\r\n\r\nexport const canViewMenuGroup = item => {\r\n const ability = useContext(AbilityContext)\r\n // ! This same logic is used in canViewHorizontalNavMenuGroup and canViewHorizontalNavMenuHeaderGroup. So make sure to update logic in them as well\r\n const hasAnyVisibleChild = item.children && item.children.some(i => ability.can(i.action, i.resource))\r\n\r\n // ** If resource and action is defined in item => Return based on children visibility (Hide group if no child is visible)\r\n // ** Else check for ability using provided resource and action along with checking if has any visible child\r\n if (!(item.action && item.resource)) {\r\n return hasAnyVisibleChild\r\n }\r\n return ability.can(item.action, item.resource) && hasAnyVisibleChild\r\n}\r\n\r\nexport const canViewMenuItem = item => {\r\n const ability = useContext(AbilityContext)\r\n return ability.can(item.action, item.resource)\r\n}\r\n","// ** React Imports\r\nimport { useEffect } from \"react\";\r\nimport { NavLink, useLocation } from \"react-router-dom\";\r\n\r\n// ** Horizontal menu items array\r\nimport navigation from \"@src/navigation/horizontal\";\r\n\r\n// ** Third Party Components\r\nimport classnames from \"classnames\";\r\nimport { FormattedMessage } from \"react-intl\";\r\n\r\n// ** Utils\r\nimport { isNavLinkActive, search, getAllParents } from \"@layouts/utils\";\r\n\r\nconst HorizontalNavMenuLink = ({\r\n item,\r\n setOpenDropdown,\r\n setGroupActive,\r\n activeItem,\r\n setActiveItem,\r\n routerProps,\r\n currentActiveItem,\r\n isChild,\r\n}) => {\r\n // ** Conditional Link Tag, if item has newTab or externalLink props use tag else use NavLink\r\n const LinkTag = item.externalLink ? \"a\" : NavLink;\r\n\r\n // ** URL Vars\r\n const location = useLocation();\r\n const currentURL = location.pathname;\r\n\r\n const navLinkActive = isNavLinkActive(item.navLink, currentURL, routerProps);\r\n\r\n // ** Get parents of current items\r\n const searchParents = (navigation, currentURL) => {\r\n const parents = search(navigation, currentURL, routerProps); // Search for parent object\r\n const allParents = getAllParents(parents, \"id\"); // Parents Object to Parents Array\r\n allParents.pop();\r\n return allParents;\r\n };\r\n\r\n // ** Remove all items from OpenDropdown array\r\n const resetOpenDropdowns = () => setOpenDropdown([]);\r\n\r\n // ** On mount update active group array\r\n useEffect(() => {\r\n if (currentActiveItem !== null) {\r\n setActiveItem(currentActiveItem);\r\n const arr = searchParents(navigation, currentURL);\r\n setGroupActive([...arr]);\r\n }\r\n }, [location]);\r\n\r\n return (\r\n