diff --git a/app/views/asset-manifest.json b/app/views/asset-manifest.json index 25443bc..68703f7 100644 --- a/app/views/asset-manifest.json +++ b/app/views/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { "main.css": "/static/css/main.2fa2d232.css", - "main.js": "/static/js/main.77186374.js", + "main.js": "/static/js/main.da419ea1.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.2fa2d232.css.map": "/static/css/main.2fa2d232.css.map", - "main.77186374.js.map": "/static/js/main.77186374.js.map", + "main.da419ea1.js.map": "/static/js/main.da419ea1.js.map", "787.c4e7f8f9.chunk.js.map": "/static/js/787.c4e7f8f9.chunk.js.map" }, "entrypoints": [ "static/css/main.2fa2d232.css", - "static/js/main.77186374.js" + "static/js/main.da419ea1.js" ] } \ No newline at end of file diff --git a/app/views/index.html b/app/views/index.html index fb86098..f6ea37a 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/src/components/admin/CustomerReport.js b/client/src/components/admin/CustomerReport.js index f014bc0..e540aaa 100644 --- a/client/src/components/admin/CustomerReport.js +++ b/client/src/components/admin/CustomerReport.js @@ -96,9 +96,11 @@ const CustomerReport = () => { const dateText = ((date.getMonth() > 8) ? (date.getMonth() + 1) : ('0' + (date.getMonth() + 1))) + '/' + ((date.getDate() > 9) ? date.getDate() : ('0' + date.getDate())) + '/' + date.getFullYear(); TransRoutesService.getAll(dateText).then(data => { setRoutes(data.data); + setShowDateDropdown(false) }) ReportService.getReportsByDateAndType(dateText, REPORT_TYPE.ADMIN_CUSTOMER_REPORT).then(data => { setExistedReports(data.data); + setShowDateDropdown(false); }) } @@ -748,7 +750,7 @@ const CustomerReport = () => { className="me-2" show={showDateDropdown} onToggle={() => setShowDateDropdown(!showDateDropdown)} - autoClose="outside" + autoClose={false} > Select Date to View Report @@ -761,7 +763,7 @@ const CustomerReport = () => { className="me-2" show={showFilterReportDropdown} onToggle={() => setShowFilterReportDropdown(!showFilterReportDropdown)} - autoClose="outside" + autoClose={false} > Filter diff --git a/client/src/components/center-phone/CenterPhoneList.js b/client/src/components/center-phone/CenterPhoneList.js index 3935c09..d9c79ff 100644 --- a/client/src/components/center-phone/CenterPhoneList.js +++ b/client/src/components/center-phone/CenterPhoneList.js @@ -2,6 +2,8 @@ import React, {useState, useEffect} from "react"; import { useDispatch } from "react-redux"; import { useNavigate } from "react-router-dom"; import { AuthService, CenterPhoneService } from "../../services"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; +import { Columns, Download, Send, PencilSquare, PersonSquare, Plus } from "react-bootstrap-icons"; const CenterPhoneList = () => { const navigate = useNavigate(); @@ -30,45 +32,71 @@ const CenterPhoneList = () => { } + const redirectTo = () => { + navigate(`/messages/list`) + } + const goToEdit = (id) => { navigate(`/center-phones/edit/${id}`) } + const goToCreateNew = () => { + navigate(`/center-phones`) + } + return ( <>
+ + General + + Center Phone + +
-
All Phones
+

+ All Phones +

-
-
-
Keyword: setKeyword(e.currentTarget.value)}/>
- - - - - - - - - - - - { - phones && phones.filter((item)=> item?.phone_number.includes(keyword) || item?.phone_title.toLowerCase().includes(keyword.toLowerCase())).map(phone => - - - - - ) - } - -
Phone TitlePhone NumberActivated
{phone?.phone_title}{phone?.phone_number}{phone?.activated ? 'Yes': 'No'} - -
- + +
+
+ + + + + + + + + + + + + + { + phones && phones.filter((item)=> item?.phone_number.includes(keyword) || item?.phone_title.toLowerCase().includes(keyword.toLowerCase())).map((phone, index )=> + + + + + + ) + } + +
No.Phone TitlePhone NumberActivated
{index + 1} goToEdit(phone?.id)}> { phone?.phone_title }{phone?.phone_number}{phone?.activated ? 'Yes': 'No'} + +
+
+
+
+ setKeyword(e.currentTarget.value)} /> + {/* */} + + {/* */} +
diff --git a/client/src/components/center-phone/CreateCenterPhone.js b/client/src/components/center-phone/CreateCenterPhone.js index c782b5d..505fc33 100644 --- a/client/src/components/center-phone/CreateCenterPhone.js +++ b/client/src/components/center-phone/CreateCenterPhone.js @@ -1,6 +1,7 @@ import React, {useEffect, useState} from "react"; import { useNavigate } from "react-router-dom"; import { AuthService, CenterPhoneService } from "../../services"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; const CreateCenterPhone = () => { const navigate = useNavigate(); @@ -18,11 +19,12 @@ const CreateCenterPhone = () => { const redirectTo = () => { - if (params.get('from') === 'medical') { - navigate(`/medical/`); - } else { - navigate(`/admin/customer-report`) - } + // if (params.get('from') === 'medical') { + // navigate(`/medical/`); + // } else { + // navigate(`/admin/customer-report`) + //} + navigate(`/center-phones/list`); } @@ -32,7 +34,7 @@ const CreateCenterPhone = () => { phone_number: phoneNumber }; CenterPhoneService.createNewCenterPhone(data).then(() => { - navigate(`/center-phones/list`) + navigate(`/center-phones/list`); }); } @@ -40,22 +42,44 @@ const CreateCenterPhone = () => { return ( <>
+ + General + + Center Phone + +
-
Create New Center Phone Item
+

+ Create Center Phone +

-
-
-
Phone Title(*):
setPhoneTitle(e.target.value)}/> -
-
-
Phone Number(*):
setPhoneNumber(e.target.value)}/> -
-
-
-
- - + +
+
+ + +
+
+
Phone Title + * +
+ setPhoneTitle(e.target.value)}/> +
+
+
Phone Number + * +
+ setPhoneNumber(e.target.value)}/> +
+
+
+ + + +
+
+
diff --git a/client/src/components/center-phone/UpdateCenterPhone.js b/client/src/components/center-phone/UpdateCenterPhone.js index f47f431..16a68ef 100644 --- a/client/src/components/center-phone/UpdateCenterPhone.js +++ b/client/src/components/center-phone/UpdateCenterPhone.js @@ -1,6 +1,7 @@ import React, {useEffect, useState} from "react"; import { useNavigate, useParams } from "react-router-dom"; import { AuthService, CenterPhoneService } from "../../services"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; const UpdateCenterPhone = () => { const navigate = useNavigate(); @@ -46,25 +47,49 @@ const UpdateCenterPhone = () => { return ( <>
+ + General + + Center Phone + +
-
Update Phone
+

+ Update Center Phone +

-
-
-
Phone Title(*):
setPhoneTitle(e.target.value)}/> -
-
-
Phone Number(*):
setPhoneNumber(e.target.value)}/> -
-
-
Activated:
setActivated(!activated)}/> -
-
-
-
- - + +
+
+ + +
+
+
Phone Title + * +
+ setPhoneTitle(e.target.value)}/> +
+
+
Phone Number + * +
+ setPhoneNumber(e.target.value)}/> +
+
+
Activated +
+ setActivated(!activated)}/> +
+
+
+ + + +
+
+
diff --git a/client/src/components/customers/CreateCustomer.js b/client/src/components/customers/CreateCustomer.js index 5afefaa..7f6d150 100644 --- a/client/src/components/customers/CreateCustomer.js +++ b/client/src/components/customers/CreateCustomer.js @@ -283,7 +283,42 @@ const CreateCustomer = () => { setEmail(e.target.value)}/>
+ {/* We will do Address and Emergency later */} +
Home Addresses
+
+
+
Address 1 *
+ setAddress1(e.target.value)}/> +
+
+
+
+
Address 2
+ setAddress2(e.target.value)}/> +
+
+
Address 3
+ setAddress3(e.target.value)}/> +
+
+
Address 4
+ setAddress4(e.target.value)}/> +
+
+
Address 5
+ setAddress5(e.target.value)}/> +
+
+ +
Emergency Contact Information
+
+
+
Emergency Contact *
+ setEmergencyContact(e.target.value)}/> +
+
+
Service Information
diff --git a/client/src/components/customers/UpdateCustomer.js b/client/src/components/customers/UpdateCustomer.js index 79b7f16..a4e7839 100644 --- a/client/src/components/customers/UpdateCustomer.js +++ b/client/src/components/customers/UpdateCustomer.js @@ -465,6 +465,40 @@ const UpdateCustomer = () => {
{/* We will do Address and Emergency later */} + {/* We will do Address and Emergency later */} +
Home Addresses
+
+
+
Address 1 *
+ setAddress1(e.target.value)}/> +
+
+
+
+
Address 2
+ setAddress2(e.target.value)}/> +
+
+
Address 3
+ setAddress3(e.target.value)}/> +
+
+
Address 4
+ setAddress4(e.target.value)}/> +
+
+
Address 5
+ setAddress5(e.target.value)}/> +
+
+ +
Emergency Contact Information
+
+
+
Emergency Contact *
+ setEmergencyContact(e.target.value)}/> +
+
Service Information
diff --git a/client/src/components/messages/CreateMessage.js b/client/src/components/messages/CreateMessage.js index aaf3c89..5be8519 100644 --- a/client/src/components/messages/CreateMessage.js +++ b/client/src/components/messages/CreateMessage.js @@ -1,77 +1,109 @@ import React, {useEffect, useState} from "react"; import { useNavigate } from "react-router-dom"; import { AuthService, MessageService } from "../../services"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; const CreateMessage = () => { const navigate = useNavigate(); useEffect(() => { - if (!AuthService.canAddOrEditRoutes() && !AuthService.canViewRoutes() && !AuthService.canAccessLegacySystem()) { - window.alert('You haven\'t login yet OR this user does not have access to this page. Please change a dispatcher or admin account to login.') - AuthService.logout(); - navigate(`/login`); - } - }, []); - const [messageGroup, setMessageGroup] = useState(); - const [messageName, setMessageName] = useState(''); - const [messageTitle, setMessageTitle] = useState(''); - const [messageBody, setMessageBody] = useState(''); - const [language, setLanguage] = useState(''); + if (!AuthService.canAddOrEditRoutes() && !AuthService.canViewRoutes() && !AuthService.canAccessLegacySystem()) { + window.alert('You haven\'t login yet OR this user does not have access to this page. Please change a dispatcher or admin account to login.') + AuthService.logout(); + navigate(`/login`); + } + }, []); + const [messageGroup, setMessageGroup] = useState(); + const [messageName, setMessageName] = useState(''); + const [messageTitle, setMessageTitle] = useState(''); + const [messageBody, setMessageBody] = useState(''); + const [language, setLanguage] = useState(''); - const redirectTo = () => { - navigate(`/messages/list`); - } + const redirectTo = () => { + navigate(`/messages/list`); + } - const saveMessage = () => { - const data = { - message_group: messageGroup, - message_title: messageTitle, - message_body: messageBody, - message_name: messageName, - language: language - }; - MessageService.createMessage(data).then(() => redirectTo()) + const saveMessage = () => { + const data = { + message_group: messageGroup, + message_title: messageTitle, + message_body: messageBody, + message_name: messageName, + language: language + }; + MessageService.createMessage(data).then(() => redirectTo()) } return ( <>
+ + General + + Messaging + +
-
Create New Message Template
+

+ Create Message Template +

-
-
-
Message Group (*):
- -
-
-
Message Name:
setMessageName(e.target.value)}/> -
-
-
Language:
- -
-
-
Message Title:
setMessageTitle(e.target.value)}/> -
-
-
Message Body: