First commit
26
.gitignore
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
/client/node_modules
|
||||
/client/build
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
BIN
app/.DS_Store
vendored
BIN
app/views/.DS_Store
vendored
@ -1,16 +1,16 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.22055773.css",
|
||||
"main.js": "/static/js/main.3884af74.js",
|
||||
"main.css": "/static/css/main.380e9f2d.css",
|
||||
"main.js": "/static/js/main.c721f88d.js",
|
||||
"static/js/787.c4e7f8f9.chunk.js": "/static/js/787.c4e7f8f9.chunk.js",
|
||||
"static/media/background.jpg": "/static/media/background.d0e107221150b4c16901.jpg",
|
||||
"static/media/landing.png": "/static/media/landing.d4c6072db7a67dff6a78.png",
|
||||
"index.html": "/index.html",
|
||||
"main.22055773.css.map": "/static/css/main.22055773.css.map",
|
||||
"main.3884af74.js.map": "/static/js/main.3884af74.js.map",
|
||||
"main.380e9f2d.css.map": "/static/css/main.380e9f2d.css.map",
|
||||
"main.c721f88d.js.map": "/static/js/main.c721f88d.js.map",
|
||||
"787.c4e7f8f9.chunk.js.map": "/static/js/787.c4e7f8f9.chunk.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.22055773.css",
|
||||
"static/js/main.3884af74.js"
|
||||
"static/css/main.380e9f2d.css",
|
||||
"static/js/main.c721f88d.js"
|
||||
]
|
||||
}
|
||||
BIN
app/views/images/.DS_Store
vendored
BIN
app/views/images/landing.png
Normal file
|
After Width: | Height: | Size: 6.4 MiB |
BIN
app/views/images/logo-trans.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@ -1 +1 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.min.js"></script><link rel="manifest" href="/manifest.json"/><title>Worldshine Transportation</title><script defer="defer" src="/static/js/main.3884af74.js"></script><link href="/static/css/main.22055773.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.min.js"></script><link rel="manifest" href="/manifest.json"/><title>Worldshine Transportation</title><script defer="defer" src="/static/js/main.c721f88d.js"></script><link href="/static/css/main.380e9f2d.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
7
app/views/static/css/main.380e9f2d.css
Normal file
1
app/views/static/css/main.380e9f2d.css.map
Normal file
|
Before Width: | Height: | Size: 149 KiB |
BIN
app/views/static/media/landing.d4c6072db7a67dff6a78.png
Normal file
|
After Width: | Height: | Size: 6.4 MiB |
BIN
client/.DS_Store
vendored
BIN
client/build/.DS_Store
vendored
@ -1,16 +1,16 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.22055773.css",
|
||||
"main.js": "/static/js/main.3884af74.js",
|
||||
"main.css": "/static/css/main.380e9f2d.css",
|
||||
"main.js": "/static/js/main.c721f88d.js",
|
||||
"static/js/787.c4e7f8f9.chunk.js": "/static/js/787.c4e7f8f9.chunk.js",
|
||||
"static/media/background.jpg": "/static/media/background.d0e107221150b4c16901.jpg",
|
||||
"static/media/landing.png": "/static/media/landing.d4c6072db7a67dff6a78.png",
|
||||
"index.html": "/index.html",
|
||||
"main.22055773.css.map": "/static/css/main.22055773.css.map",
|
||||
"main.3884af74.js.map": "/static/js/main.3884af74.js.map",
|
||||
"main.380e9f2d.css.map": "/static/css/main.380e9f2d.css.map",
|
||||
"main.c721f88d.js.map": "/static/js/main.c721f88d.js.map",
|
||||
"787.c4e7f8f9.chunk.js.map": "/static/js/787.c4e7f8f9.chunk.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.22055773.css",
|
||||
"static/js/main.3884af74.js"
|
||||
"static/css/main.380e9f2d.css",
|
||||
"static/js/main.c721f88d.js"
|
||||
]
|
||||
}
|
||||
BIN
client/build/images/.DS_Store
vendored
@ -1 +1 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.min.js"></script><link rel="manifest" href="/manifest.json"/><title>Worldshine Transportation</title><script defer="defer" src="/static/js/main.3884af74.js"></script><link href="/static/css/main.22055773.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.min.js"></script><link rel="manifest" href="/manifest.json"/><title>Worldshine Transportation</title><script defer="defer" src="/static/js/main.c721f88d.js"></script><link href="/static/css/main.380e9f2d.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
@ -1,136 +0,0 @@
|
||||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Signature Pad v2.3.2
|
||||
* https://github.com/szimek/signature_pad
|
||||
*
|
||||
* Copyright 2017 Szymon Nowak
|
||||
* Released under the MIT license
|
||||
*
|
||||
* The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:
|
||||
* http://corner.squareup.com/2012/07/smoother-signatures.html
|
||||
*
|
||||
* Implementation of interpolation using cubic Bézier curves is taken from:
|
||||
* http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript
|
||||
*
|
||||
* Algorithm for approximated length of a Bézier curve is taken from:
|
||||
* http://www.lemoda.net/maths/bezier-length/index.html
|
||||
*
|
||||
*/
|
||||
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* React Router v6.3.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
//! Copyright (c) JS Foundation and other contributors
|
||||
|
||||
//! github.com/moment/moment-timezone
|
||||
|
||||
//! license : MIT
|
||||
|
||||
//! moment-timezone.js
|
||||
|
||||
//! moment.js
|
||||
|
||||
//! version : 0.5.45
|
||||
|
Before Width: | Height: | Size: 149 KiB |
20
client/package-lock.json
generated
@ -23,6 +23,7 @@
|
||||
"immutability-helper": "^3.1.1",
|
||||
"react": "^18.1.0",
|
||||
"react-bootstrap": "^2.4.0",
|
||||
"react-bootstrap-icons": "^1.11.5",
|
||||
"react-csv": "^2.2.2",
|
||||
"react-datepicker": "^4.8.0",
|
||||
"react-datetime-picker": "^3.5.0",
|
||||
@ -17395,6 +17396,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/react-bootstrap-icons": {
|
||||
"version": "1.11.5",
|
||||
"resolved": "https://registry.npmjs.org/react-bootstrap-icons/-/react-bootstrap-icons-1.11.5.tgz",
|
||||
"integrity": "sha512-eOhtFJMUqw98IJcfKJsSMZkFHCeNPTTwXZAe9V9d4mT22ARmbrISxPO9GmtWWuf72zQctLeZMGodX/q6wrbYYg==",
|
||||
"dependencies": {
|
||||
"prop-types": "^15.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.8.6"
|
||||
}
|
||||
},
|
||||
"node_modules/react-calendar": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/react-calendar/-/react-calendar-3.7.0.tgz",
|
||||
@ -34839,6 +34851,14 @@
|
||||
"warning": "^4.0.3"
|
||||
}
|
||||
},
|
||||
"react-bootstrap-icons": {
|
||||
"version": "1.11.5",
|
||||
"resolved": "https://registry.npmjs.org/react-bootstrap-icons/-/react-bootstrap-icons-1.11.5.tgz",
|
||||
"integrity": "sha512-eOhtFJMUqw98IJcfKJsSMZkFHCeNPTTwXZAe9V9d4mT22ARmbrISxPO9GmtWWuf72zQctLeZMGodX/q6wrbYYg==",
|
||||
"requires": {
|
||||
"prop-types": "^15.7.2"
|
||||
}
|
||||
},
|
||||
"react-calendar": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/react-calendar/-/react-calendar-3.7.0.tgz",
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
"immutability-helper": "^3.1.1",
|
||||
"react": "^18.1.0",
|
||||
"react-bootstrap": "^2.4.0",
|
||||
"react-bootstrap-icons": "^1.11.5",
|
||||
"react-csv": "^2.2.2",
|
||||
"react-datepicker": "^4.8.0",
|
||||
"react-datetime-picker": "^3.5.0",
|
||||
|
||||
BIN
client/public/.DS_Store
vendored
BIN
client/public/images/.DS_Store
vendored
BIN
client/public/images/landing.png
Normal file
|
After Width: | Height: | Size: 6.4 MiB |
BIN
client/public/images/logo-trans.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@ -1,3 +1,26 @@
|
||||
body {
|
||||
background-color: #D0E1F8 !important;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #0066B1;
|
||||
color: white;
|
||||
height: 35px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
color: #0066B1;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
input {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
@ -7,6 +30,61 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.app-layout {
|
||||
display: flex;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.app-side-bar-container {
|
||||
width: 300px;
|
||||
border-right: 1px solid #ccc;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.app-side-bar-collapse {
|
||||
padding: 16px;
|
||||
border-top: 1px solid #ccc;
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.collapse-label {
|
||||
color: #555;
|
||||
font-size: 12px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.app-side-bar-logo {
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.app-layout .collapsed {
|
||||
width: 56px !important;
|
||||
}
|
||||
|
||||
.app-side-bar-logo .logo-container {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.app-main-container {
|
||||
padding: 40px;
|
||||
height: 100vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.app-side-bar-logo img {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.App-logo {
|
||||
animation: App-logo-spin infinite 20s linear;
|
||||
@ -51,9 +129,9 @@ legend {
|
||||
}
|
||||
}
|
||||
|
||||
.container-fixed {
|
||||
/* .container-fixed {
|
||||
margin-top: 6rem;
|
||||
}
|
||||
} */
|
||||
|
||||
.card-container {
|
||||
border: 1px solid #ccc;
|
||||
@ -152,10 +230,11 @@ a {
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
margin-left: 5px;
|
||||
height: 40px;
|
||||
height: 30px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
textarea {
|
||||
@ -163,28 +242,32 @@ textarea {
|
||||
height: 80px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
margin-left: 5px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
input[type="number"] {
|
||||
margin-left: 5px;
|
||||
height: 40px;
|
||||
height: 30px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
input[type="email"] {
|
||||
margin-left: 5px;
|
||||
height: 40px;
|
||||
height: 30px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
input[type="password"] {
|
||||
margin-left: 5px;
|
||||
height: 40px;
|
||||
height: 30px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
@ -352,21 +435,67 @@ table.medical, table tr, table.medical tr td, table.medical tr th {
|
||||
}
|
||||
|
||||
.login {
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.login .logo-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.login .logo-suffix {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.login .logo-worldshine {
|
||||
font-size: 30px;
|
||||
color: #0066B1;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
background: #eee;
|
||||
padding: 40px 5px;
|
||||
background: #fff;
|
||||
padding: 50px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 768px;
|
||||
width: 100%;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.login-items {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-container input {
|
||||
min-width: 300px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-container .btn-link {
|
||||
font-size: 12px !important;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-disclaimer {
|
||||
font-size: 12px;
|
||||
color: #0066B1;
|
||||
}
|
||||
|
||||
.btn-login {
|
||||
min-width: 300px;
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.create-route-container {
|
||||
@ -375,36 +504,48 @@ table.medical, table tr, table.medical tr td, table.medical tr th {
|
||||
}
|
||||
|
||||
.landing {
|
||||
color:#0d6efd;
|
||||
color:#0066B1;
|
||||
display: flex;
|
||||
margin-top: 6rem;
|
||||
}
|
||||
|
||||
.landing .logo-container {
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
top: 40px;
|
||||
}
|
||||
|
||||
.landing .logo-container img {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.landing-img {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
right: -80px;
|
||||
top: 0;
|
||||
background-image: url(../public/images/background.jpg);
|
||||
background-image: url(../public/images/landing.png);
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
width: 60%;
|
||||
background-position: right top;
|
||||
background-repeat: no-repeat;
|
||||
z-index: -1;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.landing .btn-primary {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.landing-content-title {
|
||||
height: 100vh;
|
||||
padding-top: 5%;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.landing-title {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.landing-content {
|
||||
margin-bottom: 40px;
|
||||
margin-left: 20px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.landing-content a {
|
||||
margin-left: 15px;
|
||||
}
|
||||
@ -533,19 +674,34 @@ table.medical, table tr, table.medical tr td, table.medical tr th {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1200px) {
|
||||
.container {
|
||||
/* .container {
|
||||
max-width: 1200px;
|
||||
} */
|
||||
.landing {
|
||||
max-width: 1200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
.landing {
|
||||
color: black;
|
||||
color:#0066B1;
|
||||
}
|
||||
|
||||
.landing-img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.landing-content-title {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 2000px) {
|
||||
.container {
|
||||
/* .container {
|
||||
max-width: 1920px;
|
||||
} */
|
||||
.landing {
|
||||
max-width: 1920px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,6 +63,9 @@ import EventRequestList from "./components/event-request/EventRequestList";
|
||||
import DriverSignature from "./components/signature/DriverSignature";
|
||||
import RouteReportWithSignature from './components/trans-routes/RouteReportWithSignature';
|
||||
|
||||
import Layout from "./components/home/layout";
|
||||
import Home from "./components/home/home";
|
||||
|
||||
|
||||
function App() {
|
||||
const [showMenu, setShowMenu] = useState(false);
|
||||
@ -77,13 +80,13 @@ function App() {
|
||||
// return (window.location.hostname.includes('ws2') || window.location.hostname.includes('site2') ||window.location.hostname.includes('localhost')) ? "/images/logo2.png" : ((window.location.hostname.includes('ws3') ||window.location.hostname.includes('site3')) ? "/images/logo3.png" : "/images/logo1.png");
|
||||
// }
|
||||
|
||||
const goToAdmin = () => {
|
||||
window.location.href = `/admin`;
|
||||
}
|
||||
// const goToAdmin = () => {
|
||||
// window.location.href = `/admin`;
|
||||
// }
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="logo">
|
||||
{/* <div className="logo">
|
||||
<img src="/images/logo_new.jpg" /><span className="logo-suffix">{getLogoSuffix()}</span>
|
||||
{showMenu && <Navbar bg="#fff" expand="lg" className="admin-nav mb-4 ms-4">
|
||||
<Container>
|
||||
@ -91,74 +94,77 @@ function App() {
|
||||
</Container>
|
||||
</Navbar>}
|
||||
|
||||
</div>
|
||||
<div className="container container-fixed">
|
||||
</div> */}
|
||||
<div>
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="/" element={<Navigate replace to="/login" />} />
|
||||
{/* <Route path="/" element={<Navigate replace to="/login" />} /> */}
|
||||
<Route path="/landing" element={<Landing />} />
|
||||
<Route path="/login" element={<Login setMenu={() => {setShowMenu(true)}}/>} />
|
||||
<Route path="/trans-routes" element={<TransRoutes />}>
|
||||
<Route path="" element={<Navigate replace to="dashboard" />} />
|
||||
<Route path="create" element={<CreateRoute/>} />
|
||||
<Route path="dashboard" element={<RoutesDashboard/>} />
|
||||
<Route path=":id" element={<RouteView/>} />
|
||||
<Route path="edit/:id" element={<RouteEdit/>} />
|
||||
<Route path="schedule" element={<RoutesSchedule />} />
|
||||
<Route path="history" element={<RoutesHistory />} />
|
||||
<Route path="templates" element={<RouteTemplatesList />} />
|
||||
<Route path="templates/edit/:id" element={<RouteTemplateEdit />} />
|
||||
<Route path="route-signature" element={<RouteSignatureList/>} />
|
||||
<Route path="route-report-with-signature/:id" element={<RouteReportWithSignature/>} />
|
||||
</Route>
|
||||
<Route path="/signature/:id" element={<DriverSignature/>} />
|
||||
<Route path="/vehicles" element={<CreateVehicle /> } />
|
||||
<Route path="/vehicles/edit/:id" element={<UpdateVehicle />} />
|
||||
<Route path="/vehicles/list" element={<VehicleList/> } />
|
||||
<Route path="/vehicles/:id" element={<ViewVehicle/>}/>
|
||||
<Route path="/" element={<Layout />}>
|
||||
<Route index element={<Home />} ></Route>
|
||||
<Route path="/trans-routes" element={<TransRoutes />}>
|
||||
<Route path="" element={<Navigate replace to="dashboard" />} />
|
||||
<Route path="create" element={<CreateRoute/>} />
|
||||
<Route path="dashboard" element={<RoutesDashboard/>} />
|
||||
<Route path=":id" element={<RouteView/>} />
|
||||
<Route path="edit/:id" element={<RouteEdit/>} />
|
||||
<Route path="schedule" element={<RoutesSchedule />} />
|
||||
<Route path="history" element={<RoutesHistory />} />
|
||||
<Route path="templates" element={<RouteTemplatesList />} />
|
||||
<Route path="templates/edit/:id" element={<RouteTemplateEdit />} />
|
||||
<Route path="route-signature" element={<RouteSignatureList/>} />
|
||||
<Route path="route-report-with-signature/:id" element={<RouteReportWithSignature/>} />
|
||||
</Route>
|
||||
<Route path="/signature/:id" element={<DriverSignature/>} />
|
||||
<Route path="/vehicles" element={<CreateVehicle /> } />
|
||||
<Route path="/vehicles/edit/:id" element={<UpdateVehicle />} />
|
||||
<Route path="/vehicles/list" element={<VehicleList/> } />
|
||||
<Route path="/vehicles/:id" element={<ViewVehicle/>}/>
|
||||
|
||||
<Route path="/messages" element={<CreateMessage /> } />
|
||||
<Route path="/messages/edit/:id" element={<UpdateMessage />} />
|
||||
<Route path="/messages/list" element={<MessageList/> } />
|
||||
<Route path="/message-tokens" element={<MessageTokenEditor/>} />
|
||||
<Route path="/messages/send-message" element={<SendMessage/>} />
|
||||
<Route path="/messages/sent-messages/list" element={<SentMessageList />} />
|
||||
<Route path="/messages" element={<CreateMessage /> } />
|
||||
<Route path="/messages/edit/:id" element={<UpdateMessage />} />
|
||||
<Route path="/messages/list" element={<MessageList/> } />
|
||||
<Route path="/message-tokens" element={<MessageTokenEditor/>} />
|
||||
<Route path="/messages/send-message" element={<SendMessage/>} />
|
||||
<Route path="/messages/sent-messages/list" element={<SentMessageList />} />
|
||||
|
||||
<Route path="/center-phones" element={<CreateCenterPhone /> } />
|
||||
<Route path="/center-phones/edit/:id" element={<UpdateCenterPhone />} />
|
||||
<Route path="/center-phones/list" element={<CenterPhoneList/> } />
|
||||
|
||||
<Route path="/employees" element={<CreateEmployee /> } />
|
||||
<Route path="/employees/list" element={<EmployeeList/> } />
|
||||
<Route path="/employees/:id" element={<ViewEmployee /> } />
|
||||
<Route path="/employees/edit/:id" element={<UpdateEmployee /> } />
|
||||
<Route path="/users" element={<UsersList />} />
|
||||
<Route path="/customers" element={<CreateCustomer /> } />
|
||||
<Route path="/customers/list" element={<CustomersList/> } />
|
||||
<Route path="/customers/:id" element={<ViewCustomer /> } />
|
||||
<Route path="/customers/edit/:id" element={<UpdateCustomer /> } />
|
||||
<Route path="/admin" element={<Admin />}>
|
||||
<Route path="" element={<Navigate replace to="customer-report" />} />
|
||||
<Route path="customer-report" element={<CustomerReport/>} />
|
||||
</Route>
|
||||
|
||||
<Route path="/medical" element={<Medical />}>
|
||||
<Route path="" element={<Navigate replace to="index" />} />
|
||||
<Route path="index" element={<MedicalIndex/>} />
|
||||
<Route path="resources" element={<CreateResource /> } />
|
||||
<Route path="resources/list" element={<ResourcesList/> } />
|
||||
<Route path="resources/:id" element={<ViewResource /> } />
|
||||
<Route path="resources/edit/:id" element={<UpdateResource /> } />
|
||||
<Route path="/center-phones" element={<CreateCenterPhone /> } />
|
||||
<Route path="/center-phones/edit/:id" element={<UpdateCenterPhone />} />
|
||||
<Route path="/center-phones/list" element={<CenterPhoneList/> } />
|
||||
|
||||
<Route path="/employees" element={<CreateEmployee /> } />
|
||||
<Route path="/employees/list" element={<EmployeeList/> } />
|
||||
<Route path="/employees/:id" element={<ViewEmployee /> } />
|
||||
<Route path="/employees/edit/:id" element={<UpdateEmployee /> } />
|
||||
<Route path="/users" element={<UsersList />} />
|
||||
<Route path="/customers" element={<CreateCustomer /> } />
|
||||
<Route path="/customers/list" element={<CustomersList/> } />
|
||||
<Route path="/customers/:id" element={<ViewCustomer /> } />
|
||||
<Route path="/customers/edit/:id" element={<UpdateCustomer /> } />
|
||||
<Route path="/admin" element={<Admin />}>
|
||||
<Route path="" element={<Navigate replace to="customer-report" />} />
|
||||
<Route path="customer-report" element={<CustomerReport/>} />
|
||||
</Route>
|
||||
|
||||
<Route path="/medical" element={<Medical />}>
|
||||
<Route path="" element={<Navigate replace to="index" />} />
|
||||
<Route path="index" element={<MedicalIndex/>} />
|
||||
<Route path="resources" element={<CreateResource /> } />
|
||||
<Route path="resources/list" element={<ResourcesList/> } />
|
||||
<Route path="resources/:id" element={<ViewResource /> } />
|
||||
<Route path="resources/edit/:id" element={<UpdateResource /> } />
|
||||
|
||||
<Route path="events" element={<CreateEvent /> } />
|
||||
<Route path="events/list" element={<EventsList/> } />
|
||||
<Route path="events/multiple-list" element={<EventsMultipleList/> } />
|
||||
<Route path="events/calendar" element={<EventsCalendar/> } />
|
||||
<Route path="events/:id" element={<ViewEvent /> } />
|
||||
<Route path="events/edit/:id" element={<UpdateEvent /> } />
|
||||
<Route path="events/create-from-request" element={<UpdateEvent /> } />
|
||||
<Route path="events/request" element={<CreateEventRequest />} />
|
||||
<Route path="events/request/list" element={<EventRequestList />} />
|
||||
<Route path="events" element={<CreateEvent /> } />
|
||||
<Route path="events/list" element={<EventsList/> } />
|
||||
<Route path="events/multiple-list" element={<EventsMultipleList/> } />
|
||||
<Route path="events/calendar" element={<EventsCalendar/> } />
|
||||
<Route path="events/:id" element={<ViewEvent /> } />
|
||||
<Route path="events/edit/:id" element={<UpdateEvent /> } />
|
||||
<Route path="events/create-from-request" element={<UpdateEvent /> } />
|
||||
<Route path="events/request" element={<CreateEventRequest />} />
|
||||
<Route path="events/request/list" element={<EventRequestList />} />
|
||||
</Route>
|
||||
</Route>
|
||||
</Routes>
|
||||
</Router>
|
||||
|
||||
15
client/src/components/home/home.js
Normal file
@ -0,0 +1,15 @@
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
function Home() {
|
||||
const navigate = useNavigate();
|
||||
useEffect(() => {
|
||||
if (localStorage.getItem('user') && localStorage.getItem('token')) {
|
||||
navigate('/admin')
|
||||
}
|
||||
})
|
||||
|
||||
return <></>
|
||||
}
|
||||
|
||||
export default Home;
|
||||
24
client/src/components/home/layout.js
Normal file
@ -0,0 +1,24 @@
|
||||
import { Outlet, useLocation, Navigate } from 'react-router-dom';
|
||||
import { AuthService } from '../../services';
|
||||
import SideMenu from './menu';
|
||||
|
||||
function Layout() {
|
||||
const location = useLocation();
|
||||
const showMenu = location.pathname !== '/login' && location.pathname !== '/landing'; // Example: Hide menu on login page
|
||||
const getLogoSuffix = () => {
|
||||
return (window.location.hostname.includes('worldshine2.mayo.llc') || window.location.hostname.includes('site2') || window.location.host.includes('ws2') ||window.location.hostname.includes('localhost')) ? "Care LLC" : ((window.location.hostname.includes('worldshine3.mayo.llc') ||window.location.hostname.includes('site3') || window.location.hostname.includes('ws3')) ? "Cloverleaf LLC" : "International LLC");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="app-layout">
|
||||
{
|
||||
showMenu && <SideMenu />
|
||||
}
|
||||
<div className="app-main-container">
|
||||
{localStorage.getItem('user') && localStorage.getItem('token') ? <Outlet /> : <Navigate to="/login" replace />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Layout;
|
||||
31
client/src/components/home/menu.js
Normal file
@ -0,0 +1,31 @@
|
||||
import { Outlet, useLocation, Navigate } from 'react-router-dom';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ArrowBarLeft, ArrowBarRight} from 'react-bootstrap-icons'
|
||||
import { AuthService } from '../../services';
|
||||
|
||||
const SideMenu = () => {
|
||||
const [collapse, setCollapse] = useState(false)
|
||||
const location = useLocation();
|
||||
const showMenu = location.pathname !== '/login' && location.pathname !== '/landing'; // Example: Hide menu on login page
|
||||
const getLogoSuffix = () => {
|
||||
return (window.location.hostname.includes('worldshine2.mayo.llc') || window.location.hostname.includes('site2') || window.location.host.includes('ws2') ||window.location.hostname.includes('localhost')) ? "Care LLC" : ((window.location.hostname.includes('worldshine3.mayo.llc') ||window.location.hostname.includes('site3') || window.location.hostname.includes('ws3')) ? "Cloverleaf LLC" : "International LLC");
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={`app-side-bar-container${collapse ? ' collapsed' : ''}`}>
|
||||
<div className={`app-side-bar-logo${collapse ? ' collapsed' : ''}`}>
|
||||
<img src="/images/logo-trans.png" />
|
||||
{!collapse && <strong className="logo-worldshine">Worldshine</strong>}
|
||||
{!collapse && <span className="logo-suffix">{getLogoSuffix()}</span>}
|
||||
</div>
|
||||
|
||||
<div className={`app-side-bar-collapse ${collapse ? ' collapsed' : ''}`} onClick={() => setCollapse(!collapse)}>
|
||||
{collapse ? <ArrowBarRight color="#777" size={20} /> : <><ArrowBarLeft color="#777" size={20}/> <span className='collapse-label'>{` Collapse`}</span></>}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default SideMenu;
|
||||
@ -8,8 +8,8 @@ const Landing = () => {
|
||||
navigate('/admin');
|
||||
}
|
||||
|
||||
const goToMedicalList = () => {
|
||||
navigate('/medical');
|
||||
const getLogoSuffix = () => {
|
||||
return (window.location.hostname.includes('worldshine2.mayo.llc') || window.location.hostname.includes('site2') || window.location.host.includes('ws2') ||window.location.hostname.includes('localhost')) ? "Care LLC" : ((window.location.hostname.includes('worldshine3.mayo.llc') ||window.location.hostname.includes('site3') || window.location.hostname.includes('ws3')) ? "Cloverleaf LLC" : "International LLC");
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@ -21,28 +21,25 @@ const Landing = () => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="list row">
|
||||
<div className="col-md-12 landing">
|
||||
<div className="landing-img"/>
|
||||
<div className="container container-fixed">
|
||||
<div className="landing">
|
||||
<div className="landing-content-title">
|
||||
<h2 className="landing-title">Worldshine Group </h2>
|
||||
<h2 className="landing-title">Online Management System</h2>
|
||||
<div className="logo-container mb-8"><img src="/images/logo-trans.png" /><strong className="logo-worldshine">Worldshine</strong><span className="logo-suffix">{getLogoSuffix()}</span></div>
|
||||
<h3 className="landing-title">Worldshine Group </h3>
|
||||
<h3 className="landing-title mb-4">Online Management System</h3>
|
||||
<div className="landing-content-container">
|
||||
<div className="landing-content">
|
||||
|
||||
<button onClick={() => goToAdmin()} className="btn btn-primary ps-4 pe-4">Access To Transportation</button>
|
||||
<div className="landing-content mb-4">
|
||||
<button onClick={() => goToAdmin()} className="btn btn-primary">Center Management Access</button>
|
||||
</div>
|
||||
<div className="landing-content">
|
||||
|
||||
<button className="btn btn-primary btn-medical" onClick={() => goToMedicalList()}>Access To Medical</button>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<button className="btn btn-primary">HR Management Access</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="landing-img"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -3,6 +3,10 @@ import {AuthService} from './../../services';
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
const Login = ({ setMenu}) => {
|
||||
|
||||
const getLogoSuffix = () => {
|
||||
return (window.location.hostname.includes('worldshine2.mayo.llc') || window.location.hostname.includes('site2') || window.location.host.includes('ws2') ||window.location.hostname.includes('localhost')) ? "Care LLC" : ((window.location.hostname.includes('worldshine3.mayo.llc') ||window.location.hostname.includes('site3') || window.location.hostname.includes('ws3')) ? "Cloverleaf LLC" : "International LLC");
|
||||
}
|
||||
const [username, setUsername] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
const navigate = useNavigate();
|
||||
@ -27,9 +31,10 @@ const Login = ({ setMenu}) => {
|
||||
localStorage.setItem('user', JSON.stringify(data));
|
||||
if (AuthService.canAccessLegacySystem()) {
|
||||
navigate(`/landing`);
|
||||
} else {
|
||||
navigate(`/admin`);
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// navigate(`/admin`);
|
||||
// }
|
||||
// navigate(`/admin`);
|
||||
setMenu();
|
||||
}).catch((error) => {
|
||||
@ -38,14 +43,37 @@ const Login = ({ setMenu}) => {
|
||||
})
|
||||
};
|
||||
return (
|
||||
<div className="list row">
|
||||
<div className="col-md-12 login">
|
||||
<h3 className="mb-4">Login To Worldshine System</h3>
|
||||
<div className="container container-fixed">
|
||||
<div className="login">
|
||||
<div className="logo-container"><img class="login-logo" src="/images/logo-trans.png" /><strong className="logo-worldshine">Worldshine</strong><span className="logo-suffix">{getLogoSuffix()}</span></div>
|
||||
<div className="login-container mt-4">
|
||||
<div className="mb-4"><input type="text" placeholder="Username OR Email" value={username} onChange={(e) => setUsername(e.currentTarget.value)}></input></div>
|
||||
<div className="mb-4"><input type="password" placeholder="Password" value={password} onChange={(e) => setPassword(e.currentTarget.value)}></input></div>
|
||||
<div className="mb-2"><button className="btn btn-primary btn-login" onClick={() => loginAndRedirect()}>Login</button></div>
|
||||
<div><button className="btn btn-secondary btn-login" onClick={() => goToCreateDispatcher()}>Registration</button></div>
|
||||
<div className="login-items">
|
||||
<div>
|
||||
<h6>Sign In</h6>
|
||||
</div>
|
||||
<div className="mb-2">
|
||||
<label for="username">Email/Username</label>
|
||||
</div>
|
||||
<div className="mb-2">
|
||||
<input id="username" name="username" type="text" placeholder="e.g. example@worldshine.com" value={username} onChange={(e) => setUsername(e.currentTarget.value)}></input>
|
||||
</div>
|
||||
<div className="mb-2">
|
||||
<label for="password">Password</label>
|
||||
</div>
|
||||
<div className="mb-2">
|
||||
<input id="password" name="password" type="password" placeholder="e.g. Password@123!" value={password} onChange={(e) => setPassword(e.currentTarget.value)}></input>
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<div class="login-disclaimer">Forgot password? Please contact your supervisor.</div>
|
||||
</div>
|
||||
<div className="mb-2">
|
||||
<button className="btn btn-primary btn-login" onClick={() => loginAndRedirect()}>Sign In</button>
|
||||
</div>
|
||||
<div>
|
||||
<button className="btn btn-link btn-small btn-login" onClick={() => goToCreateDispatcher()}>Registration</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -5,6 +5,7 @@ body {
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
background-color: #D0E1F8
|
||||
}
|
||||
|
||||
code {
|
||||
|
||||