fix
All checks were successful
Build And Deploy Main / build-and-deploy (push) Successful in 33s

This commit is contained in:
2026-03-12 15:10:42 -04:00
parent 21a378039c
commit af8ff3188f
3 changed files with 66 additions and 79 deletions

View File

@@ -3,7 +3,7 @@ import { useDispatch, useSelector } from "react-redux";
import { useNavigate, useParams } from "react-router-dom";
import { customerSlice } from "./../../store";
import { AuthService, CustomerService, EventsService } from "../../services";
import { CUSTOMER_TYPE, CUSTOMER_TYPE_TEXT, PROGRAM_TYPE, PROGRAM_TYPE_TEXT, PAY_SOURCE, PAY_SOURCE_TEXT, TRANSPORTATION_TYPE, TRANSPORTATION_TYPE_TEXT, YES_NO, YES_NO_TEXT, ManageTable } from "../../shared";
import { CUSTOMER_TYPE, CUSTOMER_TYPE_TEXT, PROGRAM_TYPE, PROGRAM_TYPE_TEXT, PAY_SOURCE, PAY_SOURCE_TEXT, YES_NO, YES_NO_TEXT, ManageTable } from "../../shared";
import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab, Dropdown, Modal } from "react-bootstrap";
import { Columns, Download, Filter, PencilSquare, PersonSquare, Plus } from "react-bootstrap-icons";
@@ -37,7 +37,6 @@ const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, tit
customerType: 'careServices',
programType: 'personalInfo',
paySource: 'personalInfo',
transportationType: 'careServices',
eyesOn: 'medicalInsurance'
};
const canViewFilterControl = (filterKey) => {
@@ -48,9 +47,8 @@ const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, tit
const visibleCustomerTypeFilter = canViewFilterControl('customerType');
const visibleProgramTypeFilter = canViewFilterControl('programType');
const visiblePaySourceFilter = canViewFilterControl('paySource');
const visibleTransportationTypeFilter = canViewFilterControl('transportationType');
const visibleEyesOnFilter = canViewFilterControl('eyesOn');
const hasVisibleFilters = visibleCustomerTypeFilter || visibleProgramTypeFilter || visiblePaySourceFilter || visibleTransportationTypeFilter || visibleEyesOnFilter;
const hasVisibleFilters = visibleCustomerTypeFilter || visibleProgramTypeFilter || visiblePaySourceFilter || visibleEyesOnFilter;
const navigate = useNavigate();
const dispatch = useDispatch();
const site = EventsService.site;
@@ -68,7 +66,6 @@ const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, tit
const [customerTypeFilter, setCustomerTypeFilter] = useState('');
const [programTypeFilter, setProgramTypeFilter] = useState('');
const [paySourceFilter, setPaySourceFilter] = useState('');
const [transportationTypeFilter, setTransportationTypeFilter] = useState('');
const [eyesOnFilter, setEyesOnFilter] = useState('');
const [showAvatarModal, setShowAvatarModal] = useState(false);
const [avatarData, setAvatarData] = useState(null);
@@ -223,10 +220,6 @@ const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, tit
filtered = filtered.filter((item) => (item?.pay_source || '') === paySourceFilter);
}
if (transportationTypeFilter && visibleTransportationTypeFilter) {
filtered = filtered.filter((item) => (item?.transportation_type || '') === transportationTypeFilter);
}
if (eyesOnFilter && visibleEyesOnFilter) {
filtered = filtered.filter((item) => {
const normalized = `${item?.eyes_on || (item?.disability ? YES_NO.YES : '')}`.toLowerCase();
@@ -235,7 +228,7 @@ const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, tit
}
setFilteredCustomers(filtered);
}, [keyword, customers, showInactive, customerTypeFilter, programTypeFilter, paySourceFilter, transportationTypeFilter, eyesOnFilter])
}, [keyword, customers, showInactive, customerTypeFilter, programTypeFilter, paySourceFilter, eyesOnFilter])
useEffect(() => {
const newCustomers = [...customers];
@@ -287,7 +280,6 @@ const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, tit
setCustomerTypeFilter('');
setProgramTypeFilter('');
setPaySourceFilter('');
setTransportationTypeFilter('');
setEyesOnFilter('');
setShowFilterDropdown(false);
}
@@ -459,15 +451,6 @@ const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, tit
))}
</select>
</div>}
{visibleTransportationTypeFilter && <div className="me-4">
<div className="field-label">Tranportation Type</div>
<select value={transportationTypeFilter} onChange={(e) => setTransportationTypeFilter(e.currentTarget.value)}>
<option value="">All</option>
{getOptionsFromEnum(TRANSPORTATION_TYPE, TRANSPORTATION_TYPE_TEXT).map((item) => (
<option key={item.value} value={item.value}>{item.label}</option>
))}
</select>
</div>}
</div>
<div className="app-main-content-fields-section margin-sm dropdown-container">
{visibleEyesOnFilter && <div className="me-4">

View File

@@ -176,19 +176,19 @@ const SideMenu = () => {
name: 'Appointment Requests',
link: '/medical/event-request/list',
category: '/event-request',
roleFunc: AuthService.canViewMedicalSection
roleFunc: AuthService.canViewAppointmentRequests
},
{
name: 'Appointment Calendar',
link: '/medical/events/calendar',
category: '/events/calendar',
roleFunc: AuthService.canViewMedicalSection
roleFunc: AuthService.canViewMedicalEvents
},
{
name: 'Appointment Multi-Days List',
link: '/medical/events/multiple-list',
category: '/events/multiple-list',
roleFunc: AuthService.canViewMedicalSection
roleFunc: AuthService.canViewMedicalEvents
},
{
name: 'Template',

View File

@@ -7,6 +7,7 @@ import moment from 'moment';
const InfoScreen = () => {
const navigate = useNavigate();
const canViewAppointmentCalendar = AuthService.hasPermission('View_Appointment Calendar');
const [isLoading, setIsLoading] = useState(true);
const [medicalEvents, setMedicalEvents] = useState([]);
const [activityEvents, setActivityEvents] = useState([]);
@@ -680,41 +681,43 @@ const InfoScreen = () => {
<Tabs defaultActiveKey="infoScreen" id="info-screen-tab">
<Tab eventKey="infoScreen" title="Info Screen">
<div className="multi-columns-container">
<div className="column-container">
<div className="column-card">
<h6 className="text-black" style={{ fontSize: '14px', fontWeight: '600' }}>Appointments</h6>
<div className="app-main-content-fields-section">
<div className="list row mb-4">
<div className="col-md-12">
<table className="personnel-info-table info-screen-appointments-table">
<thead>
<tr>
<th>Time</th>
<th>Customer</th>
<th>Driver</th>
</tr>
</thead>
<tbody>
{medicalEvents && medicalEvents.length > 0 ? (
medicalEvents.map((medicalEvent, index) => (
<tr key={medicalEvent.id}>
<td>{medicalEvent.startTime}</td>
<td>{medicalEvent.customer}</td>
<td>{medicalEvent.driverInfo}</td>
</tr>
))
) : (
{canViewAppointmentCalendar && (
<div className="column-container">
<div className="column-card">
<h6 className="text-black" style={{ fontSize: '14px', fontWeight: '600' }}>Appointments</h6>
<div className="app-main-content-fields-section">
<div className="list row mb-4">
<div className="col-md-12">
<table className="personnel-info-table info-screen-appointments-table">
<thead>
<tr>
<td colSpan="3" className="text-center">No medical appointments scheduled for today</td>
<th>Time</th>
<th>Customer</th>
<th>Driver</th>
</tr>
)}
</tbody>
</table>
</thead>
<tbody>
{medicalEvents && medicalEvents.length > 0 ? (
medicalEvents.map((medicalEvent, index) => (
<tr key={medicalEvent.id}>
<td>{medicalEvent.startTime}</td>
<td>{medicalEvent.customer}</td>
<td>{medicalEvent.driverInfo}</td>
</tr>
))
) : (
<tr>
<td colSpan="3" className="text-center">No medical appointments scheduled for today</td>
</tr>
)}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
)}
<div className="column-container">
{/* First Piece - Time and Weather Cards */}
<div style={{display: 'flex', marginBottom: '32px', gap: '20px'}}>
@@ -969,36 +972,37 @@ const InfoScreen = () => {
{/* Full Screen Content */}
{isFullScreen && (
<div className="multi-columns-container">
{/* Column 1 - Appointments */}
<div className="column-container">
<div className="column-card">
<h6 className="text-black fullscreen-title">Appointments</h6>
<table className="personnel-info-table info-screen-appointments-table">
<thead>
<tr>
<th>Time</th>
<th>Customer</th>
<th>Driver</th>
</tr>
</thead>
<tbody>
{medicalEvents && medicalEvents.length > 0 ? (
medicalEvents.map((medicalEvent, index) => (
<tr key={medicalEvent.id}>
<td>{medicalEvent.startTime}</td>
<td>{medicalEvent.customer}</td>
<td>{medicalEvent.driverInfo}</td>
</tr>
))
) : (
{canViewAppointmentCalendar && (
<div className="column-container">
<div className="column-card">
<h6 className="text-black fullscreen-title">Appointments</h6>
<table className="personnel-info-table info-screen-appointments-table">
<thead>
<tr>
<td colSpan="3" className="text-center">No medical appointments scheduled for today</td>
<th>Time</th>
<th>Customer</th>
<th>Driver</th>
</tr>
)}
</tbody>
</table>
</thead>
<tbody>
{medicalEvents && medicalEvents.length > 0 ? (
medicalEvents.map((medicalEvent, index) => (
<tr key={medicalEvent.id}>
<td>{medicalEvent.startTime}</td>
<td>{medicalEvent.customer}</td>
<td>{medicalEvent.driverInfo}</td>
</tr>
))
) : (
<tr>
<td colSpan="3" className="text-center">No medical appointments scheduled for today</td>
</tr>
)}
</tbody>
</table>
</div>
</div>
</div>
)}
{/* Column 2 - Time, Weather, Attendance Note, Gallery */}
<div className="column-container">