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

This commit is contained in:
2026-03-19 12:29:09 -04:00
parent 425671e55d
commit e1a870de47
5 changed files with 74 additions and 10 deletions

View File

@@ -911,7 +911,12 @@ const EventsCalendar = () => {
} }
} }
const dismissEventModal = () => { const dismissEventModal = (e) => {
e?.preventDefault?.();
e?.stopPropagation?.();
try {
eventModalService?.close?.();
} catch (_e) {}
try { try {
calendar?.config?.plugins?.eventModal?.close(); calendar?.config?.plugins?.eventModal?.close();
} catch (e) { } catch (e) {
@@ -933,13 +938,20 @@ const EventsCalendar = () => {
style={{ style={{
border: 'none', border: 'none',
background: 'transparent', background: 'transparent',
padding: 0, padding: '8px',
marginTop: '4px',
marginRight: '4px',
cursor: 'pointer', cursor: 'pointer',
lineHeight: 1, lineHeight: 1,
color: '#666' color: '#666',
minWidth: '36px',
minHeight: '36px',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center'
}} }}
> >
<X size={18} /> <X size={24} />
</button> </button>
</div> </div>
{calendarEvent?.doctor && <div className="sx__event-modal__time">{`${calendarEvent?.doctor}`}</div>} {calendarEvent?.doctor && <div className="sx__event-modal__time">{`${calendarEvent?.doctor}`}</div>}

View File

@@ -29,7 +29,7 @@ import { Spinner, Breadcrumb, BreadcrumbItem, Tabs, Tab, Dropdown, Modal } from
import { Columns, Download, Filter, PencilSquare, PersonSquare, Plus } from "react-bootstrap-icons"; import { Columns, Download, Filter, PencilSquare, PersonSquare, Plus } from "react-bootstrap-icons";
const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, title = null }) => { const DashboardCustomersList = ({ additionalButtons, showBreadcrumb = false, title = null }) => {
const HIDDEN_CUSTOMER_TYPE_FILTER_VALUES = [CUSTOMER_TYPE.TRANSFERRED, CUSTOMER_TYPE.DECEASED, CUSTOMER_TYPE.DISCHARGED]; const HIDDEN_CUSTOMER_TYPE_FILTER_VALUES = [CUSTOMER_TYPE.SELF_PAY, CUSTOMER_TYPE.TRANSFERRED, CUSTOMER_TYPE.DECEASED, CUSTOMER_TYPE.DISCHARGED];
const DISCHARGE_ONLY_COLUMN_KEYS = new Set(['discharge_date', 'discharge_by', 'discharge_reason']); const DISCHARGE_ONLY_COLUMN_KEYS = new Set(['discharge_date', 'discharge_by', 'discharge_reason']);
const CUSTOMER_COLUMNS = [ const CUSTOMER_COLUMNS = [
{ key: 'customer_name', label: 'Customer Name', show: true }, { key: 'customer_name', label: 'Customer Name', show: true },

View File

@@ -317,7 +317,12 @@ const EventsCalendar = () => {
setSelectedColorFilters([]); setSelectedColorFilters([]);
} }
const dismissEventModal = () => { const dismissEventModal = (e) => {
e?.preventDefault?.();
e?.stopPropagation?.();
try {
eventModalService?.close?.();
} catch (_e) {}
try { try {
calendar?.config?.plugins?.eventModal?.close(); calendar?.config?.plugins?.eventModal?.close();
} catch (e) { } catch (e) {
@@ -338,13 +343,20 @@ const EventsCalendar = () => {
style={{ style={{
border: 'none', border: 'none',
background: 'transparent', background: 'transparent',
padding: 0, padding: '8px',
marginTop: '4px',
marginRight: '4px',
cursor: 'pointer', cursor: 'pointer',
lineHeight: 1, lineHeight: 1,
color: '#666' color: '#666',
minWidth: '36px',
minHeight: '36px',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center'
}} }}
> >
<X size={18} /> <X size={24} />
</button> </button>
</div> </div>
{calendarEvent?.doctor && <div className="sx__event-modal__time">{`${calendarEvent?.doctor}`}</div>} {calendarEvent?.doctor && <div className="sx__event-modal__time">{`${calendarEvent?.doctor}`}</div>}

View File

@@ -32,6 +32,17 @@ const Export = ({ columns, data, filename = "export", customActions = [], show,
handleToggle(false); handleToggle(false);
}; };
const handleDeselectAll = () => {
scrollTopRef.current = scrollContainerRef.current?.scrollTop || 0;
const updatedColumns = exportColumns.map((col) => ({ ...col, show: false }));
setExportColumns(updatedColumns);
requestAnimationFrame(() => {
if (scrollContainerRef.current) {
scrollContainerRef.current.scrollTop = scrollTopRef.current;
}
});
};
const generateCSV = () => { const generateCSV = () => {
const visibleColumns = exportColumns.filter(col => col.show); const visibleColumns = exportColumns.filter(col => col.show);
const headers = visibleColumns.map(col => col.label).join(','); const headers = visibleColumns.map(col => col.label).join(',');
@@ -145,7 +156,16 @@ const Export = ({ columns, data, filename = "export", customActions = [], show,
</> </>
)} )}
<div style={{ maxHeight: '200px', overflowY: 'auto', marginBottom: '15px' }} ref={scrollContainerRef}> <div style={{ maxHeight: '200px', overflowY: 'auto', marginBottom: '15px' }} ref={scrollContainerRef}>
<h6 style={{ fontSize: '14px', marginBottom: '10px' }}>Select Columns:</h6> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '10px' }}>
<h6 style={{ fontSize: '14px', marginBottom: 0 }}>Select Columns:</h6>
<button
type="button"
className="btn btn-link btn-sm p-0"
onClick={handleDeselectAll}
>
Deselect All
</button>
</div>
{exportColumns.map((column) => ( {exportColumns.map((column) => (
<div key={column.key} style={{ marginBottom: '8px' }}> <div key={column.key} style={{ marginBottom: '8px' }}>
<input <input

View File

@@ -47,6 +47,17 @@ const ManageTable = ({ columns, onColumnsChange, show, onToggle }) => {
} }
}; };
const handleDeselectAll = () => {
scrollTopRef.current = scrollContainerRef.current?.scrollTop || 0;
const updatedColumns = tempColumns.map((col) => ({ ...col, show: false }));
setTempColumns(updatedColumns);
requestAnimationFrame(() => {
if (scrollContainerRef.current) {
scrollContainerRef.current.scrollTop = scrollTopRef.current;
}
});
};
const customManageTableMenu = React.forwardRef( const customManageTableMenu = React.forwardRef(
({ children, style, className, 'aria-labelledby': labeledBy }, ref) => { ({ children, style, className, 'aria-labelledby': labeledBy }, ref) => {
return ( return (
@@ -57,6 +68,15 @@ const ManageTable = ({ columns, onColumnsChange, show, onToggle }) => {
aria-labelledby={labeledBy} aria-labelledby={labeledBy}
> >
<h6>Manage Table Columns</h6> <h6>Manage Table Columns</h6>
<div style={{ marginBottom: '8px' }}>
<button
type="button"
className="btn btn-link btn-sm p-0"
onClick={handleDeselectAll}
>
Deselect All
</button>
</div>
<div className="app-main-content-fields-section margin-sm dropdown-container"> <div className="app-main-content-fields-section margin-sm dropdown-container">
<div className="manage-table-columns-wrapper"> <div className="manage-table-columns-wrapper">
<div className="manage-table-columns-scroll" ref={scrollContainerRef}> <div className="manage-table-columns-scroll" ref={scrollContainerRef}>