From 2fc3adfaecd27398c84e3d6f226a9934b4a62777 Mon Sep 17 00:00:00 2001 From: Yang Li Date: Thu, 8 May 2025 19:38:54 -0400 Subject: [PATCH] Route Dashboard schedule and history --- app/.DS_Store | Bin 14340 -> 14340 bytes app/views/asset-manifest.json | 12 +- app/views/index.html | 2 +- client/.DS_Store | Bin 12292 -> 12292 bytes client/build/asset-manifest.json | 12 +- client/build/index.html | 2 +- client/src/App.css | 114 +- .../event-request/CreateEventRequest.js | 6 +- client/src/components/events/CreateEvent.js | 177 +-- .../components/events/EventsMultipleList.js | 2 +- client/src/components/events/UpdateEvent.js | 530 ++++---- client/src/components/home/menu.js | 6 +- .../trans-routes/PersonnelInfoTable.js | 47 +- .../trans-routes/PersonnelSection.js | 20 +- .../src/components/trans-routes/RouteCard.js | 6 +- .../trans-routes/RoutesDashboard.js | 1069 ++++++++++++++++- .../components/trans-routes/RoutesSchedule.js | 2 +- .../components/trans-routes/RoutesSection.js | 49 +- .../components/trans-routes/TransRoutes.js | 4 +- client/src/http-common.js | 4 +- 20 files changed, 1644 insertions(+), 420 deletions(-) diff --git a/app/.DS_Store b/app/.DS_Store index ce5443f011dee1e7d3ff018377fc4bbf87d22b70..a6a596946f13e140b4241b5f749ed9a1368cd86f 100644 GIT binary patch delta 23 ecmZoEXeromRDj*oTt~ssz+{q!&1Me4KWYGCIR~Zy delta 23 ecmZoEXeromRDj*sP)EVg&~TE5&1Me4KWYGBwg;R5 diff --git a/app/views/asset-manifest.json b/app/views/asset-manifest.json index cd279bf..af610e7 100644 --- a/app/views/asset-manifest.json +++ b/app/views/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { - "main.css": "/static/css/main.184a423c.css", - "main.js": "/static/js/main.6094576b.js", + "main.css": "/static/css/main.bbcd4e86.css", + "main.js": "/static/js/main.8f60a967.js", "static/js/787.c4e7f8f9.chunk.js": "/static/js/787.c4e7f8f9.chunk.js", "static/media/landing.png": "/static/media/landing.d4c6072db7a67dff6a78.png", "index.html": "/index.html", - "main.184a423c.css.map": "/static/css/main.184a423c.css.map", - "main.6094576b.js.map": "/static/js/main.6094576b.js.map", + "main.bbcd4e86.css.map": "/static/css/main.bbcd4e86.css.map", + "main.8f60a967.js.map": "/static/js/main.8f60a967.js.map", "787.c4e7f8f9.chunk.js.map": "/static/js/787.c4e7f8f9.chunk.js.map" }, "entrypoints": [ - "static/css/main.184a423c.css", - "static/js/main.6094576b.js" + "static/css/main.bbcd4e86.css", + "static/js/main.8f60a967.js" ] } \ No newline at end of file diff --git a/app/views/index.html b/app/views/index.html index fd23ba4..f0082b6 100644 --- a/app/views/index.html +++ b/app/views/index.html @@ -1 +1 @@ -Worldshine Transportation
\ No newline at end of file +Worldshine Transportation
\ No newline at end of file diff --git a/client/.DS_Store b/client/.DS_Store index 9c535649daba9bde49339deccf151d30e8f6e3ba..df16e924cd88a17be62ab3596f5e9e5ec54dc745 100644 GIT binary patch delta 64 zcmZokXi3=cgpoNfzjN~oMtQc)Y#g2vjN2y%C={}aS65qDOg^rlz}Pt%D96~fnM1Lk UZSyqsWY*2UROT{Go+h3L0Pm_72><{9 delta 62 zcmV-E0Kxx+V1!_>Worldshine Transportation
\ No newline at end of file +Worldshine Transportation
\ No newline at end of file diff --git a/client/src/App.css b/client/src/App.css index 6a6ae9f..22c3684 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -7,6 +7,7 @@ body { color: white; height: 35px; font-size: 13px; + white-space: nowrap; } .text-primary { @@ -282,11 +283,14 @@ legend { } */ .card-container { - border: 1px solid #ccc; - padding: 15px; - margin-bottom: 15px; + border: none; + padding: 16px; + margin-bottom: 16px; font-size: .8em; + color: #333; cursor: pointer; + border-radius: 8px; + background: #eee; } .card-status { @@ -357,7 +361,7 @@ table tr th { table tr td { border: 1px solid white; - padding-left: 16px; + padding: 8px 16px; font-size: 12px; color: #333; min-width: 250px; @@ -446,6 +450,25 @@ table .group td { line-height: 2; } +.multi-columns-container { + display: flex; + background: #D0E1F8; + padding: 24px; + border-radius: 10px; +} + +.column-container { + padding: 20px; +} + +.column-card { + background: white; + padding:24px; + border-radius: 10px; +} + + + .app-main-content-fields-section .field-value { font-size: 12px; color: #555; @@ -455,7 +478,16 @@ table .group td { margin-right: 100px; } -.app-main-content-fields-section .react-datepicker-wrapper { +.app-main-content-fields-section.short .field-body { + margin-right: 20px; +} + +.app-main-content-fields-section.short { + margin-bottom: 0; + margin-top: 12px; +} + +.app-main-content-fields-section.with-function .react-datepicker-wrapper { width: 120px !important; } @@ -464,6 +496,16 @@ table .group td { height: 45px; } +.app-main-content-fields-section.dropdown-container input[type=text] { + width: 210px; + height: 35px; +} + +.app-main-content-fields-section.dropdown-container select { + width: 210px; + height: 35px; +} + .app-main-content-fields-section.with-function .react-datepicker-wrapper input[type=text] { height: 35px; width: 120px; @@ -594,6 +636,25 @@ input[type="checkbox"] { cursor: pointer; } +.rs__cell button { + width: 120px !important; +} + +.rs__cell button p { + font-size: 13px; + color: #333; +} + +.rs__multi_day { + padding-left: 8px; + padding-right: 8px; +} + +.btn-no-deco { + text-decoration: none!important; + padding-top: 6px; +} + .personnel-info-table .red { background: #dc3545; color: rgb(25, 23, 23); @@ -603,6 +664,12 @@ input[type="checkbox"] { color: white; } +.personnel-info-table .status-tag { + padding: 4px 8px; + border-radius: 6px; + text-align: center; +} + .personnel-info-table .dark-red { background: #7c0d0e; color: #fff; @@ -657,6 +724,29 @@ input[type="checkbox"] { color: #000; } +.all-routes-container { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; + margin-top: 20px; +} + +.route-card-container { + flex-basis: 19%; + margin-right: 8px; + box-sizing: border-box; +} + +.route-stats { + color: #777; +} + +.route-card-title { + color: black; + font-weight: 500; + line-height: 2; +} + .medical ul li { cursor: pointer; list-style: none; @@ -1051,6 +1141,20 @@ input[type="checkbox"] { } +@media only screen and (max-width: 1240px) { + .route-card-container { + flex-basis: 30%; + } + +} + +@media only screen and (max-width: 910px) { + .route-card-container { + flex-basis: 100%; + } + +} + @media only screen and (min-width: 2000px) { /* .container { max-width: 1920px; diff --git a/client/src/components/event-request/CreateEventRequest.js b/client/src/components/event-request/CreateEventRequest.js index 3336b90..a2d16ac 100644 --- a/client/src/components/event-request/CreateEventRequest.js +++ b/client/src/components/event-request/CreateEventRequest.js @@ -6,7 +6,7 @@ import { AuthService, CustomerService, EventRequestsService, EventsService, Reso import Select from 'react-select'; import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab, Button, Modal } from "react-bootstrap"; -const CreateEvent = () => { +const CreateEventRequest = () => { const navigate = useNavigate(); const [resources, setResources] = useState([]); const [customers, setCustomers] = useState([]); @@ -267,7 +267,7 @@ const CreateEvent = () => { - +
@@ -300,4 +300,4 @@ const CreateEvent = () => { ); }; -export default CreateEvent; \ No newline at end of file +export default CreateEventRequest; \ No newline at end of file diff --git a/client/src/components/events/CreateEvent.js b/client/src/components/events/CreateEvent.js index b826c41..d108b33 100644 --- a/client/src/components/events/CreateEvent.js +++ b/client/src/components/events/CreateEvent.js @@ -153,91 +153,106 @@ const CreateEvent = () => {
- -
Client And Start Time
-
-
-
Client - * -
- -
-
-
Start Time - * -
- -
-
- { - currentCustomer && <> -
Client Information
+ +
+
+
+
Client And Start Time
-
-
Client Name
-
{currentCustomer?.name || ''}
+
+
Client + * +
+
-
-
Preferred Name
-
{currentCustomer?.name_cn || ''}
-
-
-
Pharmacy
-
{currentCustomer?.pharmacy || ''}
-
-
-
Care Provider
-
{currentCustomer?.care_provider || ''}
-
-
-
Birthday
-
{currentCustomer?.birth_date || ''}
+
+
Start Time + * +
+
- - } - -
-
- - +
+
+ + +
+
+
+
+
+
+ { + currentCustomer && <> +
Client Information
+
+
+
Client Name
+
{currentCustomer?.name || ''}
+
+
+
Preferred Name
+
{currentCustomer?.name_cn || ''}
+
+
+
Pharmacy
+
{currentCustomer?.pharmacy || ''}
+
+
+
+
+
Care Provider
+
{currentCustomer?.care_provider || ''}
+
+
+
Birthday
+
{currentCustomer?.birth_date || ''}
+
+
+
Note
+
{currentCustomer?.note || ''}
+
+
+ + } +
diff --git a/client/src/components/events/EventsMultipleList.js b/client/src/components/events/EventsMultipleList.js index b71ff05..4ab401f 100644 --- a/client/src/components/events/EventsMultipleList.js +++ b/client/src/components/events/EventsMultipleList.js @@ -489,7 +489,7 @@ const EventsMultipleList = () => { {table('active')} -
+
From
{setFromDate(v); setSelectedItems([]);}} /> diff --git a/client/src/components/events/UpdateEvent.js b/client/src/components/events/UpdateEvent.js index 87e44f8..6d827d2 100644 --- a/client/src/components/events/UpdateEvent.js +++ b/client/src/components/events/UpdateEvent.js @@ -6,6 +6,7 @@ import { AuthService, CustomerService, EventsService, ResourceService } from ".. import Select from 'react-select'; import { Button, Modal } from "react-bootstrap"; import DatePicker from "react-datepicker"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; const UpdateEvent = () => { const navigate = useNavigate(); @@ -70,9 +71,6 @@ const UpdateEvent = () => { } const saveEvent = () => { - console.log('customer', currentCustomer); - console.log('resource', currentResource); - let newEventDataClientAndResource = {}; let newEventClientAndResource = {}; if (currentCustomer) { @@ -142,8 +140,6 @@ const UpdateEvent = () => { edit_history: currentEvent?.edit_history? [...currentEvent.edit_history, { employee: localStorage.getItem('user') && JSON.parse(localStorage.getItem('user'))?.name, date: new Date() }] : [{ employee: localStorage.getItem('user') && JSON.parse(localStorage.getItem('user'))?.name, date: new Date() }], ...newEventClientAndResource } - - console.log('new Event', newEvent); if (params.get('event')) { if (currentCustomer && currentResource) EventsService.createNewEvent(newEvent).then(data => redirectTo()); @@ -192,7 +188,6 @@ const UpdateEvent = () => { setTimeData(timeDatas.data); if (!currentEvent) { if (params.get('event')) { - console.log('event', JSON.parse(params.get('event'))); setCurrentEvent(JSON.parse(params.get('event'))); } else { EventsService.getEvent(urlParams.id).then(eventData => { @@ -269,20 +264,315 @@ const UpdateEvent = () => { return ( <> -
-
-
-
-
{ params.get('event') ? 'Create Medical Event from Request' : 'Update Medical Event'}
+
+ + Medical + + Medical Appointment Information + + + { params.get('event') ? 'Create Medical Event from Request' : 'Update Medical Event'} + + +
+

{ params.get('event') ? 'Create Medical Event from Request' : 'Update Medical Event'}

+
+
+ +
+
+ + { !hideCreateFields && +
+
+
+
Client And Start Time
+
+
+
Client + * +
+ +
+
+
Start Time + * +
+ +
+
+
+
+ + +
+
+
+
+
+
+ { + currentCustomer && <> +
Client Information
+
+
+
Client Name
+
{currentCustomer?.name || ''}
+
+
+
Preferred Name
+
{currentCustomer?.name_cn || ''}
+
+
+
Pharmacy
+
{currentCustomer?.pharmacy || ''}
+
+
+
+
+
Care Provider
+
{currentCustomer?.care_provider || ''}
+
+
+
Birthday
+
{currentCustomer?.birth_date || ''}
+
+
+
Note
+
{currentCustomer?.note || ''}
+
+
+ + } +
+
+
+
} + +
+
+
+
Appointment Details
+
+
+
Resource + * +
+ {currentResource ? + (<>{currentResource?.name} ) : + (currentEvent?.data?.resource_name ? <>{currentEvent?.data?.resource_name} : )} +
+
+
+
+
Title + * +
+ setTitle(e.target.value)}/> +
+
+
Tag + * +
+ +
+
+
Customer Information
+
+
+
New Patient +
+ +
+
+
Doctor's Order +
+ +
+
+
Fasting Required +
+ +
+
+
+
+
Need Id +
+ +
+
+
Need Medication List +
+ +
+
+
Assistance
+
+
+
Language Support + * +
+ +
+
+
Transportation Needed +
+ +
+
+
Additional Information
+
+
+
Notes +
+
Name