diff --git a/.DS_Store b/.DS_Store index 472a59b..9532a00 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/app/.DS_Store b/app/.DS_Store index 0accf62..ce5443f 100644 Binary files a/app/.DS_Store and b/app/.DS_Store differ diff --git a/app/controllers/resource.controller.js b/app/controllers/resource.controller.js index d62bb15..aea151f 100644 --- a/app/controllers/resource.controller.js +++ b/app/controllers/resource.controller.js @@ -30,6 +30,7 @@ exports.createResource = (req, res) => { description: req.body.description, contact: req.body.contact, fax: req.body.fax, + email: req.body.email, note: req.body.note, data: req.body.data, edit_by: req.body.edit_by, diff --git a/app/models/resource.model.js b/app/models/resource.model.js index 8544c28..fd47ece 100644 --- a/app/models/resource.model.js +++ b/app/models/resource.model.js @@ -25,6 +25,7 @@ module.exports = mongoose => { description: String, contact: String, fax: String, + email: String, note: String, data: Object, edit_by: String, diff --git a/app/views/asset-manifest.json b/app/views/asset-manifest.json index 2d36b98..42107af 100644 --- a/app/views/asset-manifest.json +++ b/app/views/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { - "main.css": "/static/css/main.3602a440.css", - "main.js": "/static/js/main.d36451b8.js", + "main.css": "/static/css/main.38d76725.css", + "main.js": "/static/js/main.6292bf56.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.3602a440.css.map": "/static/css/main.3602a440.css.map", - "main.d36451b8.js.map": "/static/js/main.d36451b8.js.map", + "main.38d76725.css.map": "/static/css/main.38d76725.css.map", + "main.6292bf56.js.map": "/static/js/main.6292bf56.js.map", "787.c4e7f8f9.chunk.js.map": "/static/js/787.c4e7f8f9.chunk.js.map" }, "entrypoints": [ - "static/css/main.3602a440.css", - "static/js/main.d36451b8.js" + "static/css/main.38d76725.css", + "static/js/main.6292bf56.js" ] } \ No newline at end of file diff --git a/app/views/index.html b/app/views/index.html index 51fca20..9a0a559 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 d46fa9f..9c53564 100644 Binary files a/client/.DS_Store and b/client/.DS_Store differ diff --git a/client/build/asset-manifest.json b/client/build/asset-manifest.json index 2d36b98..42107af 100644 --- a/client/build/asset-manifest.json +++ b/client/build/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { - "main.css": "/static/css/main.3602a440.css", - "main.js": "/static/js/main.d36451b8.js", + "main.css": "/static/css/main.38d76725.css", + "main.js": "/static/js/main.6292bf56.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.3602a440.css.map": "/static/css/main.3602a440.css.map", - "main.d36451b8.js.map": "/static/js/main.d36451b8.js.map", + "main.38d76725.css.map": "/static/css/main.38d76725.css.map", + "main.6292bf56.js.map": "/static/js/main.6292bf56.js.map", "787.c4e7f8f9.chunk.js.map": "/static/js/787.c4e7f8f9.chunk.js.map" }, "entrypoints": [ - "static/css/main.3602a440.css", - "static/js/main.d36451b8.js" + "static/css/main.38d76725.css", + "static/js/main.6292bf56.js" ] } \ No newline at end of file diff --git a/client/build/index.html b/client/build/index.html index 51fca20..9a0a559 100644 --- a/client/build/index.html +++ b/client/build/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/App.css b/client/src/App.css index 5ed65a2..1d70de5 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -174,6 +174,7 @@ input { padding: 40px; height: 100vh; overflow: auto; + position: relative; } .app-side-bar-logo img { @@ -369,7 +370,12 @@ table tr td { width: 30px !important; padding-left: 8px !important; min-width: 5px !important; - border-right: none; +} + +.td-index, .th-index { + width: 30px !important; + padding-left: 8px !important; + min-width: 5px !important; } .float-right { @@ -388,6 +394,112 @@ table .group td { font-style: italic; } +.app-main-content-fields-section { + display: flex; + align-items: baseline; + margin-top: 24px; + margin-bottom: 40px; +} + +.app-main-content-fields-section.column { + flex-direction: column; +} + +.app-main-content-fields-section li { + list-style: decimal; + margin-top: 4px; + margin-bottom: 4px; +} + +/* .app-main-content-fields-section.base-line { + align-items: baseline !important; +} */ + +.app-main-content-fields-section .field-label { + font-size: 13px; + color: black; + font-weight: 500; + line-height: 2; +} + +.app-main-content-fields-section .field-value { + font-size: 12px; + color: #555; +} + +.app-main-content-fields-section .field-body { + margin-right: 100px; +} + +.app-main-content-fields-section input[type=text] { + width: 350px; + height: 45px; +} + +.app-main-content-fields-section input[type=text].shorter { + width: 50px; + height: 45px; +} + +.app-main-content-fields-section input[type=text].short { + width: 150px; + height: 45px; +} + +.app-main-content-fields-section input[type=text].long { + width: 450px; + height: 45px; +} + +.app-main-content-fields-section .file-name { + color: #aaa; + margin-top: 4px; + font-size: 13px; +} + +.app-main-content-fields-section input[type=email] { + width: 350px; + height: 45px; +} + +.app-main-content-fields-section input[type=number] { + width: 350px; + height: 45px; +} + +.app-main-content-fields-section input[type=file] { + display: none; +} + +.custom-file-upload { + background:#0066B1; + display: inline-block; + cursor: pointer; + color: white; + height: 45px; + width: 150px; + padding: 12px; + font-size: 13px; + font-weight: 500; + border-radius: 6px; +} + +.app-main-content-fields-section select { + width: 350px; + height: 45px; + border-radius: 8px; + margin-left: 0 !important; + border-color: #ccc !important; +} + +.app-main-content-fields-section .field-blurb { + color: #aaa; +} + +.app-main-content-fields-section .required { + color:#0066B1; +} + select { margin-left: 5px; min-width: 200px; @@ -449,20 +561,6 @@ input[type="checkbox"] { cursor: pointer; } -table.medical th { - font-size: 16px; - color: #000; -} - -table.medical td { - font-size: 14px; - color: #000; -} - -table.medical, table tr, table.medical tr td, table.medical tr th { - border-color: #000; -} - .personnel-info-table .red { background: #dc3545; color: rgb(25, 23, 23); @@ -755,11 +853,63 @@ table.medical, table tr, table.medical tr td, table.medical tr th { height: 50px; } +.pagination-container { + display: flex; + justify-content: right; + margin-top: 20px; +} + +.page-prev-item, .page-next-item { + font-size: 12px; + padding: 4px 0; + border: 1px solid #777; + border-radius: 10px; + margin-right: 4px; + color: #777; +} + +.page-prev-item.disabled, .page-next-item.disabled { + color: #aaa; + border-color: #aaa; +} + +.per-page, .page-picker { + width: 55px !important; + height: 30px; + border-radius: 10px; + border-color: #777; + color: #777; + font-size: 12px; + min-width: 20px; + margin-right: 2px; +} + +.per-page option { + width: 30px; +} + +.page-item { + display:none; +} + +.per-page-label { + font-size: 12px; +} + +.select-page-container { + font-size: 12px; + display: flex; + align-items: baseline; + margin-right: 4px; + margin-left: 4px; +} + .customers-pagination { margin-bottom: 2rem; + margin-right: 4px; display: flex; flex-direction: row; - justify-content: center; + justify-content: right; list-style-type: none; padding: 0; flex-wrap: wrap; @@ -774,9 +924,9 @@ table.medical, table tr, table.medical tr td, table.medical tr th { color: #777; } -.customers-pagination li { +/* .customers-pagination li { border: none; -} +} */ .customers-pagination li a { border: none; diff --git a/client/src/components/customers/CreateCustomer.js b/client/src/components/customers/CreateCustomer.js index d8eeb54..5afefaa 100644 --- a/client/src/components/customers/CreateCustomer.js +++ b/client/src/components/customers/CreateCustomer.js @@ -5,6 +5,8 @@ import { customerSlice } from "../../store"; import { AuthService, CustomerService, ResourceService } from "../../services"; import Select from 'react-select'; import { CUSTOMER_TYPE, PICKUP_STATUS, PICKUP_STATUS_TEXT , CUSTOMER_TYPE_TEXT} from "../../shared"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; +import { Upload } from "react-bootstrap-icons"; const CreateCustomer = () => { const navigate = useNavigate(); @@ -13,6 +15,8 @@ const CreateCustomer = () => { const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [firstname, setFirstname] = useState(''); + const [middlename, setMiddlename] = useState(''); + const [nameOnId, setNameOnId] = useState('') const [lastname, setLastname] = useState(''); const [nameCN, setNameCN] = useState(''); const [birthDate, setBirthDate] = useState(''); @@ -60,7 +64,7 @@ const CreateCustomer = () => { const [textMsgEnabled, setTextMsgEnabled] = useState(false); const params = new URLSearchParams(window.location.search); const redirectTo = () => { - navigate('/admin'); + navigate('/customers/list'); } useEffect(() => { @@ -185,49 +189,249 @@ const CreateCustomer = () => { return ( <>
+ + General + + Customer Information + + + Create New Customer + +
-
Create New Customer
+

Create New Customer

-
-
-
First Name:(*)
setFirstname(e.target.value)}/> -
-
-
Last Name:(*)
setLastname(e.target.value)}/> -
-
-
Preferred Name (中文姓名):
setNameCN(e.target.value)}/> -
-
-
Nick Name:
setNickname(e.target.value)}/> -
-
-
Email:(*)
setEmail(e.target.value)}/> -
-
-
Care Provider:
setCareProvider(e.target.value)}/> -
+ +
+
+ + +
Personal Details
+
+
First Name *
setFirstname(e.target.value)}/>
+ {/*
Middle Name
setMiddlename(e.target.value)}/>
*/} +
Last Name *
setLastname(e.target.value)}/>
+
Preferred Name/Chinese Name
setNameCN(e.target.value)}/>
+
Nick Name
setNickname(e.target.value)}/>
+
+
+
+
Admission Date
+ setAdmissionDate(e.target.value)}/> +
+
+
Discharge Date
+ setDischargeDate(e.target.value)}/> +
+
+
Birth Date
+ setBirthDate(e.target.value)}/> +
+
+
+
+
Customer Type
+ +
+
+
Gender
+ +
+
+
Language Spoken
+ setLanguage(e.target.value)}/> +
+
+
+
+
Height
+ setHeightFeet(e.target.value)}/> Ft + setHeightInch(e.target.value)}/> In +
+
+
Weight
+ setWeight(e.target.value)}/> lb +
+
+ +
Contact Information
+
+
+
Primary Phone Number * Text Message Available
+ setPhone(e.target.value)}/> +
+
+
Secondary Phone Number
+ setHomePhone(e.target.value)}/> +
+ {/*
+
Other Phone Number
+ setMobilePhone(e.target.value)}/> +
*/} +
+
Personal Email
+ setEmail(e.target.value)}/> +
+
+ {/* We will do Address and Emergency later */} +
Service Information
+
+
+
Text Message Enabled
+ +
+
+
Table Id
+ setTableId(e.target.value)}/> +
+
+
Seating
+ setSeating(e.target.value)}/> +
+
+
Pickup Status
+ +
+
+
General Health Information
+
+
+
Eyes-on
+ +
+
+
Special Needs
+ setSpecialNeeds(e.target.value)}/> +
+
+
Additional Information
+
+
+
Profile Picture
+ +
{ selectedFile && selectedFile?.name }
+
+
+
Note
+ setNote(e.target.value)}/> +
+ {/*
+
Private Note
+ setPrivateNote(e.target.value)}/> +
*/} +
+
+
+ + +
+
+
+ +
Personal Details
+
+
+
Primary Care Provider
+ setCareProvider(e.target.value)}/> +
+
+
Medicare Number
+ setMedicareNumber(e.target.value)}/> +
+
+
Medicaid Number
+ setMedicaidNumber(e.target.value)}/> +
+
+ {/*
Pharmacy:
setPharmacy(e.target.value)}/> */} +
Pharmacy
+ +
+
+
Pharmacy ID
+ setPharmacyId(e.target.value)}/> +
+
+
+
+ + +
+
+
+
+
+ {/* setKeyword(e.currentTarget.value)} /> + + + + */} +
+
+
+ + {/*
Emergency Contact:
setEmergencyContact(e.target.value)}/>
-
-
Medicare Number:
setMedicareNumber(e.target.value)}/> -
-
-
Medicaid Number:
setMedicaidNumber(e.target.value)}/> -
-
- {/*
Pharmacy:
setPharmacy(e.target.value)}/> */} -
Pharmacy
- -
-
-
Pharmacy ID:
setPharmacyId(e.target.value)}/> -
Address 1:
setAddress1(e.target.value)}/>
@@ -246,74 +450,15 @@ const CreateCustomer = () => {
Apartment:
setApartment(e.target.value)}/>
-
-
Table Id:
setTableId(e.target.value)}/> -
-
-
Customer Type:
-
-
-
Pickup Status:
-
-
-
Upload Avatar (Image size should be less than 500 KB):
- setSelectedFile(e.target.files[0])} - className="form-control-file border" - /> - -
-
-
Birth Date (Type in as: MM/DD/YYYY):
setBirthDate(e.target.value)}/> -
-
-
Phone :
setPhone(e.target.value)}/> -
-
-
Mobile Phone:
setMobilePhone(e.target.value)}/> -
-
-
Home Phone:
setHomePhone(e.target.value)}/> -
-
-
Special Needs:
setSpecialNeeds(e.target.value)}/> -
-
-
Language(Please use ',' between each language):
setLanguage(e.target.value)}/> -
Username (not required):
setUsername(e.target.value)}/>
Password (not required):
setPassword(e.target.value)}/>
-
-
Note:
setNote(e.target.value)}/> -
- -
-
Admission Date(Type in as 'MM/DD/YYYY'):
setAdmissionDate(e.target.value)}/> -
-
-
Discharge Date(Type in as 'MM/DD/YYYY'):
setDischargeDate(e.target.value)}/> -
Pin:
setPin(e.target.value)}/>
-
-
Seating:
setSeating(e.target.value)}/> -
Vehicle No:
setVehicleNo(e.target.value)}/>
@@ -332,43 +477,7 @@ const CreateCustomer = () => {
Roles(Please use ',' between each roles):
setRoles(e.target.value)}/>
-
-
Private Note:
setPrivateNote(e.target.value)}/> -
-
-
Disability:
-
-
-
Height:
- setHeightFeet(e.target.value)}/> Ft - setHeightInch(e.target.value)}/> In -
-
-
Weight:
setWeight(e.target.value)}/> lb -
-
-
Gender:
-
-
-
Enable Text Message:
-
-
-
-
- - -
-
+
*/} ); }; diff --git a/client/src/components/customers/CustomersList.js b/client/src/components/customers/CustomersList.js index 289b1cf..c68f75e 100644 --- a/client/src/components/customers/CustomersList.js +++ b/client/src/components/customers/CustomersList.js @@ -140,7 +140,7 @@ const CustomersList = () => { const toggleSelectedAllItems = () => { if (selectedItems.length !== filteredCustomers.length || selectedItems.length === 0) { - const newSelectedItems = [...filteredCustomers].filter(ev=> ev.status === 'active').map((customer) => customer.id); + const newSelectedItems = [...filteredCustomers].map((customer) => customer.id); setSelectedItems(newSelectedItems); } else { setSelectedItems([]); @@ -167,11 +167,7 @@ const CustomersList = () => { } const checkSelectAll = () => { - return selectedItems.length === filteredCustomers.filter(ev=> ev.status === 'active').length && selectedItems.length > 0; - } - - const redirectToAdmin = () => { - navigate(`/admin/customer-report`) + return selectedItems.length === filteredCustomers.length && selectedItems.length > 0; } const goToEdit = (id) => { @@ -290,6 +286,7 @@ const CustomersList = () => { toggleSelectedAllItems()}> + No. { columns.map((column, index) => {column.label} sortTableWithField(column.key)}> @@ -302,8 +299,9 @@ const CustomersList = () => { { - filteredCustomers.map(customer => + filteredCustomers.map((customer, index) => toggleItem(customer?.id)}/> + {index + 1} {AuthService.canAddOrEditCustomers() && goToEdit(customer?.id)}>} {AuthService.canViewCustomers() && goToView(customer?.id)} size={16} className="clickable me-2" />} {customer?.name} {customer?.name_cn} {customer?.email} diff --git a/client/src/components/customers/UpdateCustomer.js b/client/src/components/customers/UpdateCustomer.js index 49cd598..79b7f16 100644 --- a/client/src/components/customers/UpdateCustomer.js +++ b/client/src/components/customers/UpdateCustomer.js @@ -4,8 +4,9 @@ import { useNavigate, useParams } from "react-router-dom"; import { customerSlice } from "./../../store"; import { AuthService, CustomerService, ResourceService } from "../../services"; import Select from 'react-select'; -import { Modal, Button } from "react-bootstrap"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab, Modal, Button } from "react-bootstrap"; import { CUSTOMER_TYPE, PICKUP_STATUS, PICKUP_STATUS_TEXT , CUSTOMER_TYPE_TEXT} from "../../shared"; +import { Upload } from "react-bootstrap-icons"; const UpdateCustomer = () => { const navigate = useNavigate(); @@ -101,7 +102,7 @@ const UpdateCustomer = () => { setRoles(currentCustomer.roles?.join(',')); setEmail(currentCustomer.email); setMobilePhone(currentCustomer.mobile_phone); - setPhone(currentCustomer.phone); + setPhone(currentCustomer.phone || currentCustomer.mobile_phone); setHomePhone(currentCustomer.home_phone); setLanguage(currentCustomer.language); setAddress1(currentCustomer.address1); @@ -109,7 +110,7 @@ const UpdateCustomer = () => { setAddress3(currentCustomer.address3); setAddress4(currentCustomer.address4); setAddress5(currentCustomer.address5); - setNote(currentCustomer.note); + setNote(currentCustomer.note || currentCustomer.private_note); setTableId(currentCustomer.table_id); setCustomerType(currentCustomer.type); setCareProvider(currentCustomer.care_provider); @@ -369,6 +370,240 @@ const UpdateCustomer = () => { return ( <>
+ + General + + Customer Information + + + Create New Customer + + +
+

Create New Customer

+
+
+ +
+
+ + +
Personal Details
+
+
First Name *
setFirstname(e.target.value)}/>
+ {/*
Middle Name
setMiddlename(e.target.value)}/>
*/} +
Last Name *
setLastname(e.target.value)}/>
+
Preferred Name/Chinese Name
setNameCN(e.target.value)}/>
+
Nick Name
setNickname(e.target.value)}/>
+
+
+
+
Admission Date
+ setAdmissionDate(e.target.value)}/> +
+
+
Discharge Date
+ setDischargeDate(e.target.value)}/> +
+
+
Birth Date
+ setBirthDate(e.target.value)}/> +
+
+
+
+
Customer Type
+ +
+
+
Gender
+ +
+
+
Language Spoken
+ setLanguage(e.target.value)}/> +
+
+
+
+
Height
+ setHeightFeet(e.target.value)}/> Ft + setHeightInch(e.target.value)}/> In +
+
+
Weight
+ setWeight(e.target.value)}/> lb +
+
+ +
Contact Information
+
+
+
Primary Phone Number * Text Message Available
+ setPhone(e.target.value)}/> +
+
+
Secondary Phone Number
+ setHomePhone(e.target.value)}/> +
+ {/*
+
Other Phone Number
+ setMobilePhone(e.target.value)}/> +
*/} +
+
Personal Email
+ setEmail(e.target.value)}/> +
+
+ {/* We will do Address and Emergency later */} +
Service Information
+
+
+
Text Message Enabled
+ +
+
+
Table Id
+ setTableId(e.target.value)}/> +
+
+
Seating
+ setSeating(e.target.value)}/> +
+
+
Pickup Status
+ +
+
+
General Health Information
+
+
+
Eyes-on
+ +
+
+
Special Needs
+ setSpecialNeeds(e.target.value)}/> +
+
+
Additional Information
+
+
+
Profile Picture
+ +
{ selectedFile && selectedFile?.name }
+
+
+
Note
+ setNote(e.target.value)}/> +
+ {/*
+
Private Note
+ setPrivateNote(e.target.value)}/> +
*/} +
+
+
+ + + +
+
+
+ +
Personal Details
+
+
+
Primary Care Provider
+ setCareProvider(e.target.value)}/> +
+
+
Medicare Number
+ setMedicareNumber(e.target.value)}/> +
+
+
Medicaid Number
+ setMedicaidNumber(e.target.value)}/> +
+
+ {/*
Pharmacy:
setPharmacy(e.target.value)}/> */} +
Pharmacy
+ +
+
+
Pharmacy ID
+ setPharmacyId(e.target.value)}/> +
+
+
+
+ + + +
+
+
+
+
+
+ {/*
Update Customer
@@ -545,14 +780,14 @@ const UpdateCustomer = () => {
- -
+
*/} + {/*
-
+ */} closeDeleteModal()}> Delete Customer diff --git a/client/src/components/customers/ViewCustomer.js b/client/src/components/customers/ViewCustomer.js index 3f375c5..829b89a 100644 --- a/client/src/components/customers/ViewCustomer.js +++ b/client/src/components/customers/ViewCustomer.js @@ -1,6 +1,8 @@ import React, {useState, useEffect} from "react"; +import { PencilSquare } from "react-bootstrap-icons"; import { useNavigate, useParams } from "react-router-dom"; import { AuthService, CustomerService } from "../../services"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; const ViewCustomer = () => { const navigate = useNavigate(); @@ -13,6 +15,10 @@ const ViewCustomer = () => { navigate(`/customers/list`) } + const goToEdit = (id) => { + navigate(`/customers/edit/${id}`) + } + useEffect(() => { if (!AuthService.canViewCustomers()) { window.alert('You haven\'t login yet OR this user does not have access to this page. Please change an admin account to login.') @@ -37,74 +43,185 @@ const ViewCustomer = () => { return ( <>
+ + General + + Customer Information + + + View Customer Details + +
-
{currentCustomer?.name}
+

View Customer Information

-
+
+
+ + +
Personal Details
+
+
+
Name
+
{currentCustomer?.name}
+
+
+
First Name
+
{currentCustomer?.firstname}
+
+ {/*
Middle Name
setMiddlename(e.target.value)}/>
*/} +
+
Last Name
+
{currentCustomer?.lastname}
+
+
+
Preferred Name/Chinese Name
+
{currentCustomer?.name_cn}
+
+
+
+
+
Admission Date
+
{currentCustomer?.admission_date}
+
+
+
Discharge Date
+
{currentCustomer?.discharge_date}
+
+
+
Birth Date
+
{currentCustomer?.birth_date}
+
+
+
+
+
Customer Type
+
{currentCustomer?.type}
+
+
+
Gender
+
{currentCustomer?.gender}
+
+
+
Language Spoken
+
{currentCustomer?.language}
+
+
+
+
+
Height
+
{currentCustomer?.height}
+
+
+
Weight
+
{currentCustomer?.weight}
+
+
+ +
Contact Information
+
+
+
Primary Phone Number
+
{currentCustomer?.phone}
+
+
+
Secondary Phone Number
+
{currentCustomer?.home_phone}
+
+ {/*
+
Other Phone Number
+ setMobilePhone(e.target.value)}/> +
*/} +
+
Personal Email
+
{currentCustomer?.email}
+
+
+ {/* We will do Address and Emergency later */} +
Service Information
+
+
+
Text Message Enabled
+
{currentCustomer?.text_msg_enabled ? 'Yes': 'No'}
+
+
+
Table Id
+
{currentCustomer?.table_id}
+
+
+
Seating
+
{currentCustomer?.seating}
+
+
+
Pickup Status
+
{currentCustomer?.pickup_status}
+
+
+
General Health Information
+
+
+
Eyes-on
+
{currentCustomer?.disability ? 'Yes' : 'No'}
+
+
+
Special Needs
+
{currentCustomer?.special_needs}
+
+
+
Additional Information
+
+
+
Profile Picture
+ {currentAvatar && } +
+
+
Note
+
{currentCustomer?.note || currentCustomer?.private_note}
+
+
+
+ +
Personal Details
+
+
+
Primary Care Provider
+
{currentCustomer?.care_provider}
+
+
+
Medicare Number
+
{currentCustomer?.medicare_number}
+
+
+
Medicaid Number
+
{currentCustomer?.medicaid_number}
+
+
+
Pharmacy
+
{currentCustomer?.pharmacy}
+
+
+
Pharmacy ID
+
{currentCustomer?.pharmacy_id}
+
+
+
+
+
+ +
+
+
+ {/*
{currentAvatar && }
-
-
Name: {currentCustomer?.name}
-
-
-
First Name: {currentCustomer?.firstname}
-
-
-
Last Name: {currentCustomer?.lastname}
-
-
-
Preferred Name (中文姓名): {currentCustomer?.name_cn}
-
-
-
Birth Date: {currentCustomer?.birth_date}
-
-
-
Table Id:{currentCustomer?.table_id}
-
-
-
Customer Type:{currentCustomer?.type}
-
-
-
Pickup Status:{currentCustomer?.pickup_status}
-
-
-
Email: {currentCustomer?.email}
-
-
-
Care Provider:{currentCustomer?.care_provider}
-
Emergency Contact:{currentCustomer?.emergency_contact}
-
-
Medicare Number:{currentCustomer?.medicare_number}
-
-
-
Medicaid Number:{currentCustomer?.medicaid_number}
-
-
-
Pharmacy:{currentCustomer?.pharmacy}
-
-
-
Pharmacy ID:{currentCustomer?.pharmacy_id}
-
-
-
Phone: {currentCustomer?.phone}
-
Mobile Phone: {currentCustomer?.mobile_phone}
-
-
Home Phone: {currentCustomer?.home_phone}
-
-
-
Special Needs:{currentCustomer?.special_needs}
-
-
-
Language: {currentCustomer?.language}
-
Username: {currentCustomer?.username}
@@ -126,21 +243,9 @@ const ViewCustomer = () => {
Apartment: {currentCustomer?.apartment}
-
-
Note: {currentCustomer?.note}
-
-
-
Admission Date: {currentCustomer?.admission_date}
-
-
-
Discharge Date: {currentCustomer?.discharge_date}
-
Pin:{currentCustomer?.pin}
-
-
Seating:{currentCustomer?.seating}
-
Vehicle No: {currentCustomer?.vehicle_no}
@@ -159,25 +264,7 @@ const ViewCustomer = () => {
Roles:{currentCustomer?.roles?.join(', ')}
-
-
Private Note:{currentCustomer?.private_note}
-
-
-
Disability:{currentCustomer?.disability ? 'Yes' : 'No'}
-
-
-
Gender:{currentCustomer?.gender}
-
-
-
Height:{currentCustomer?.height}
-
-
-
Weight:{currentCustomer?.weight} lb
-
-
-
Text Message Enabled:{currentCustomer?.text_msg_enabled ? 'Yes': 'No'}
-
-
+
*/} ); }; diff --git a/client/src/components/event-request/EventRequestList.js b/client/src/components/event-request/EventRequestList.js index 327696a..2aeb97a 100644 --- a/client/src/components/event-request/EventRequestList.js +++ b/client/src/components/event-request/EventRequestList.js @@ -253,7 +253,7 @@ const columns = [
- +
{ diff --git a/client/src/components/events/EventsCalendar.js b/client/src/components/events/EventsCalendar.js index b09b88c..8173c02 100644 --- a/client/src/components/events/EventsCalendar.js +++ b/client/src/components/events/EventsCalendar.js @@ -161,7 +161,6 @@ const EventsCalendar = () => {
event.status === 'active')} month = {{ weekDays: [0, 1, 2, 3, 4, 5, 6], @@ -174,7 +173,7 @@ const EventsCalendar = () => { day = {{ startHour: 0, endHour: 24, - step: 60, + step:1440, navigation: true }} onSelectedDateChange = {(date) => {setFromDate(new Date(new Date(date).getFullYear(), new Date(date).getMonth(), 1)); setToDate(new Date(new Date(date).getFullYear(), new Date(date).getMonth() + 1, 0))}} diff --git a/client/src/components/events/EventsList.js b/client/src/components/events/EventsList.js index 7405a81..887544d 100644 --- a/client/src/components/events/EventsList.js +++ b/client/src/components/events/EventsList.js @@ -370,7 +370,7 @@ const EventsList = () => { Show Deleted Events: setShowDeletedItems(!showDeletedItems)} />
-
+
diff --git a/client/src/components/events/EventsMultipleList.js b/client/src/components/events/EventsMultipleList.js index c71eba0..2d2d465 100644 --- a/client/src/components/events/EventsMultipleList.js +++ b/client/src/components/events/EventsMultipleList.js @@ -501,7 +501,7 @@ const EventsMultipleList = () => {
-
toggleSelectedAllItems()}>
+
diff --git a/client/src/components/home/menu.js b/client/src/components/home/menu.js index 905793b..6ac558c 100644 --- a/client/src/components/home/menu.js +++ b/client/src/components/home/menu.js @@ -4,157 +4,173 @@ import { ArrowBarLeft, ArrowBarRight, Grid1x2, Display, Person, BusFront, BagPlu import { AuthService } from '../../services'; import { useNavigate } from 'react-router-dom'; -const sideNavs = [ - { - icon: , - name: 'Dashboard', - link: '#', - roleFunc: undefined - }, - { - icon: , - name: 'Info Screen', - link: '#', - roleFunc: undefined - }, - { - icon: , - name: 'General', - collapsed: false, - subNavs: [ - { - name: 'Customer Information', - //collapsed: true, - link: '/customers/list', - category: '/customers' - // subNavs: [ - // { - // name: 'Customer List', - // link: '/customers/list' - // }, - // { - // name: 'Create New Customer', - // link: '/customers' - // } - // ] - }, - { - name: 'Calendar', - link: '#' - }, - { - name: 'Messaging', - //collapsed: true, - link: '/messages/list', - category: '/messages' - // subNavs: [ - // { - // name: 'Messages List', - // link: '/messages/list' - // }, - // { - // name: 'Create New Message', - // link: '/messages' - // }, - // { - // name: 'Send Message', - // link: '/messages/send-message' - // }, - // { - // name: 'Sent Messages List', - // link: '/messages/sent-messages/list' - // } - // ] - }, - // { - // name: 'Center Phones', - // //collapsed: true, - // link: '/center-phones/list' - // // subNavs: [ - // // { - // // name: 'Center Phones List', - // // link: '/center-phones/list' - // // }, - // // { - // // name: 'Create New Center Phone', - // // link: '/center-phones' - // // } - // // ] - // } - ] - }, - { - name: 'Transportation', - icon: , - collapsed: false, - subNavs: [ - { - name: 'Vehicle Information', - link: '/vehicles/list', - category: '/vehicles' - // subNavs: [ - // { - // name: 'Vehicles List', - // link: '/vehicles/list' - // }, - // { - // name: 'Create New Vehicle', - // link: '/vehicles' - // } - // ] - }, - { - name: 'Transportation Schedule', - link: '/trans-routes/schedule', - category: '/trans-routes' - }, - { - name: 'Schedule Driver for Appointment', - link: '#' - } - ] - }, - { - name: 'Medical', - icon: , - collapsed: false, - subNavs: [ - { - name: 'Provider Information', - link: '/medical/resources/list', - category: '/resources' - }, - { - name: 'Appointment Requests', - link: '/medical/event-request/list', - category: '/event-request' - }, - { - name: 'Appointment Calendar', - link: '/medical/events/calendar', - category: '/events' - } - ] - }, - { - name: 'Lobby', - icon: , - collapsed: false, - subNavs: [ - { - name: 'Meal Status', - link: '#' - }, - { - name: 'Seating Chart', - link: '#' - } - ] - } -] + const SideMenu = () => { + const sideNavs = [ + { + icon: , + name: 'Dashboard', + link: '#', + roleFunc: () => true + }, + { + icon: , + name: 'Info Screen', + link: '#', + roleFunc: () => true + }, + { + icon: , + name: 'General', + collapsed: false, + roleFunc: () => true, + subNavs: [ + { + name: 'Customer Information', + //collapsed: true, + link: '/customers/list', + category: '/customers', + roleFunc: AuthService.canViewCustomers + // subNavs: [ + // { + // name: 'Customer List', + // link: '/customers/list' + // }, + // { + // name: 'Create New Customer', + // link: '/customers' + // } + // ] + }, + { + name: 'Calendar', + link: '#', + roleFunc: () => true + }, + { + name: 'Messaging', + //collapsed: true, + link: '/messages/list', + category: '/messages', + roleFunc: () => true + // subNavs: [ + // { + // name: 'Messages List', + // link: '/messages/list' + // }, + // { + // name: 'Create New Message', + // link: '/messages' + // }, + // { + // name: 'Send Message', + // link: '/messages/send-message' + // }, + // { + // name: 'Sent Messages List', + // link: '/messages/sent-messages/list' + // } + // ] + }, + // { + // name: 'Center Phones', + // //collapsed: true, + // link: '/center-phones/list' + // // subNavs: [ + // // { + // // name: 'Center Phones List', + // // link: '/center-phones/list' + // // }, + // // { + // // name: 'Create New Center Phone', + // // link: '/center-phones' + // // } + // // ] + // } + ] + }, + { + name: 'Transportation', + icon: , + collapsed: false, + roleFunc: AuthService.canAddOrEditVechiles, + subNavs: [ + { + name: 'Vehicle Information', + link: '/vehicles/list', + category: '/vehicles', + roleFunc: AuthService.canAddOrEditVechiles + // subNavs: [ + // { + // name: 'Vehicles List', + // link: '/vehicles/list' + // }, + // { + // name: 'Create New Vehicle', + // link: '/vehicles' + // } + // ] + }, + { + name: 'Transportation Schedule', + link: '/trans-routes/schedule', + category: '/trans-routes', + roleFunc: AuthService.canAddOrEditRoutes + }, + { + name: 'Schedule Driver for Appointment', + link: '#', + roleFunc: AuthService.canAddOrEditRoutes + } + ] + }, + { + name: 'Medical', + icon: , + collapsed: false, + roleFunc: AuthService.canAccessLegacySystem, + subNavs: [ + { + name: 'Provider Information', + link: '/medical/resources/list', + category: '/resources', + roleFunc: AuthService.canAccessLegacySystem + }, + { + name: 'Appointment Requests', + link: '/medical/event-request/list', + category: '/event-request', + roleFunc: AuthService.canAccessLegacySystem + }, + { + name: 'Appointment Calendar', + link: '/medical/events/calendar', + category: '/events', + roleFunc: AuthService.canAccessLegacySystem + } + ] + }, + { + name: 'Lobby', + icon: , + collapsed: false, + roleFunc: () => true, + subNavs: [ + { + name: 'Meal Status', + link: '#', + roleFunc: () => true + }, + { + name: 'Seating Chart', + link: '#', + roleFunc: () => true + } + ] + } + ]; const [collapse, setCollapse] = useState(false); const [navs, setNavs] = useState(sideNavs) const location = useLocation(); @@ -186,7 +202,7 @@ const SideMenu = () => {
{ - sideNavs.map((sideNav) => { + sideNavs.filter(item => item.roleFunc()).map((sideNav) => { return
sideNav.link && goToLink(sideNav.link)} className={`app-side-bar-list-item main-nav-item${sideNav.category && location?.pathname?.includes(sideNav.category) ? ' app-side-bar-list-item-active' : '' }`}> { sideNav?.icon ? <>{sideNav.icon} : <>} @@ -194,7 +210,7 @@ const SideMenu = () => { { !collapse && sideNav?.subNavs?.length > 0 && toggleMenu(sideNav)} className="float-icon">{sideNav?.collapsed ? : } }
{ - !collapse && !sideNav?.collapsed && sideNav?.subNavs?.map((subNav) =>
subNav.link && goToLink(subNav.link)} className={`app-side-bar-list-item sub-nav-item${subNav?.category && location?.pathname?.includes(subNav?.category) ? ' app-side-bar-list-item-active' : '' }`}> + !collapse && !sideNav?.collapsed && sideNav?.subNavs?.filter(item=> item.roleFunc()).map((subNav) =>
subNav.link && goToLink(subNav.link)} className={`app-side-bar-list-item sub-nav-item${subNav?.category && location?.pathname?.includes(subNav?.category) ? ' app-side-bar-list-item-active' : '' }`}> { subNav?.icon ? <>{subNav.icon} : <>} { !collapse && {subNav.name} } { subNav?.subNavs?.length > 0 && toggleMenu(subNav)} className="float-icon">{sideNav?.collapsed ? : } } diff --git a/client/src/components/medical/Medical.js b/client/src/components/medical/Medical.js index b579fdd..4624669 100644 --- a/client/src/components/medical/Medical.js +++ b/client/src/components/medical/Medical.js @@ -79,7 +79,7 @@ const Medical = () => { }, []) return ( <> -
+ {/*

Medical Center

@@ -87,7 +87,6 @@ const Medical = () => {
- {/* Customers Admin */} {(AuthService.canViewRoutes() || AuthService.canAddOrEditRoutes() || AuthService.canAccessLegacySystem()) &&
-
+
*/}
-
- -
+
+ +
diff --git a/client/src/components/resources/CreateResource.js b/client/src/components/resources/CreateResource.js index fcc0cb8..45ac0f1 100644 --- a/client/src/components/resources/CreateResource.js +++ b/client/src/components/resources/CreateResource.js @@ -1,6 +1,8 @@ import React, {useState, useEffect} from "react"; import { useNavigate, useParams } from "react-router-dom"; import { AuthService, ResourceService } from "../../services"; +import { Archive } from "react-bootstrap-icons"; +import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab } from "react-bootstrap"; const CreateResource = () => { const navigate = useNavigate(); @@ -23,6 +25,7 @@ const CreateResource = () => { const [note, setNote] = useState(''); const [fax, setFax] = useState(''); const [status, setStatus] = useState('active'); + const [email, setEmail] = useState(''); const redirectTo = (id) => { @@ -45,6 +48,7 @@ const CreateResource = () => { name_branch: branchName, specialty, type, + email, category, color, address, @@ -79,94 +83,155 @@ const CreateResource = () => { return ( <> -
-
-
Create New Resource
-
-
-
-
Doctor Name:
setName(e.target.value)}/> -
-
-
Office Name:
setOriginalName(e.target.value)}/> -
-
-
Branch Name:
setBranchName(e.target.value)}/> -
-
- {/*
Specialty:
setSpecialty(e.target.value)}/> */} -
Specialty:
- -
- -
-
Type:
- -
- {/*
-
Category:
setCategory(e.target.value)}/> -
*/} -
-
Description:
setDescription(e.target.value)}/> -
-
-
Color:
setColor(e.target.value)}/> -
-
-
Address:
toggleSelectedAllItems()}>