All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rs.runtime.gears-frontend.0.80.1.source-code.routes.js Maven / Gradle / Ivy

There is a newer version: 0.80.3
Show newest version
import {
  Navigate,
  useLocation }      from 'react-router-dom';
import {
  DashboardLayout,
  MainLayout }       from 'components/layout/common';
import {
  List,
  Tasks,
  AssignedTasks,
  Login,
  NotFound,
  Start,
  GroupTasks,
  MyActiveProcesses,
  AllActiveProcesses,
  Task,
  Documents,
  Deployments,
  Status }            from 'pages'
import { Helmet }     from 'react-helmet';
import { useConfig }  from 'hooks/config';
import DetailPage     from 'pages/DetailPage';
import Process        from 'pages/Process';
import Messages       from 'pages/Messages';
import Message        from 'pages/Message';
import SvelteSchedule from 'components/gantt/Schedule';


const routes = (user) => {
  const isLoggedIn = !user.loading && user.user

  if (isLoggedIn) {
    return [
      {
        path: 'gears',
        element: ,
        children: [
          { path: 'status/:processInstanceId/:taskId', element:  },
          { path: 'processes/start',                   element:  },
          { path: 'process/:key',                      element:  },
          { path: 'instances/mine',                    element:  },
          { path: 'instances/all',                     element:  },
          { path: 'tasks/assigned',                    element:  },
          { path: 'tasks/all',                         element:  },
          { path: 'tasks/transferable',                element:  },
          { path: 'tasks/group',                       element:  },
          { path: 'tasks/:processKey/:id',             element:  },
          { path: 'schedule',                          element:  },
          { path: 'schedule/:resourceKey/:taskKey',    element:  },
          { path: 'messages',                          element:  },
          { path: 'messages/:id',                      element:  },
          { path: 'lists/:id',                         element:  },
          { path: 'details/:detail/:id',               element:  },
          { path: 'start/form/:processKey/:id',        element:  },
          { path: 'documents',                         element:  },
          { path: 'deployments',                       element:  },
          { path: '',                                  element:  },
          { path: '*',                                 element:  }
        ]
      },
      {
        path: '/',
        element: ,
        children: [
          { path: 'login',  element:  },
          { path: 'blank',  element:  },
          { path: '',       element:  },
          { path: '*',      element:  }
        ]
      },
    ];
  } else {
    return [
      {
        path: '/',
        element: ,
        children: [
          { path: 'login',  element:  },
          { path: 'blank',  element:  },
          { path: 'logout', element:  },
          { path: '',       element:  },
          { path: '*',      element:  }
        ]
      },
    ];
  }
}

const Blank = () => {
  const { project } = useConfig()

  return (
    
      /dev/null | {project}
    
  )
}

const Authenticate = () => {
  const location = useLocation()
  console.log("Redirecting path %o to the login page.", location.pathname)
  return 
}

const Home = ({reason}) => {
  const location = useLocation()
  console.log("Redirecting path %o to the start page. %s", location.pathname, reason ? reason : '')
  return 
}

export default routes;





© 2015 - 2024 Weber Informatics LLC | Privacy Policy