mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-05-18 20:08:19 +00:00
fix: remove eye icon columns, remove redundant Gender/Age columns
- LeadTable: removed eye icon column, row click (onAction) opens detail panel - Appointments: removed eye icon column, row click opens detail panel - Patients: removed Gender + Age columns (already shown as sub-line beneath patient name) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import { TableBody as AriaTableBody } from 'react-aria-components';
|
import { TableBody as AriaTableBody } from 'react-aria-components';
|
||||||
import type { SortDescriptor, Selection } from 'react-aria-components';
|
import type { SortDescriptor, Selection } from 'react-aria-components';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
||||||
import { faEye } from '@fortawesome/pro-duotone-svg-icons';
|
|
||||||
import { Badge } from '@/components/base/badges/badges';
|
import { Badge } from '@/components/base/badges/badges';
|
||||||
import { Table } from '@/components/application/table/table';
|
import { Table } from '@/components/application/table/table';
|
||||||
import { LeadStatusBadge } from '@/components/shared/status-badge';
|
import { LeadStatusBadge } from '@/components/shared/status-badge';
|
||||||
@@ -94,7 +92,6 @@ export const LeadTable = ({
|
|||||||
}, [leads, expandedDupId]);
|
}, [leads, expandedDupId]);
|
||||||
|
|
||||||
const allColumns = [
|
const allColumns = [
|
||||||
{ id: 'view', label: '', allowsSorting: false, defaultWidth: 40 },
|
|
||||||
{ id: 'phone', label: 'Phone', allowsSorting: true, defaultWidth: 150 },
|
{ id: 'phone', label: 'Phone', allowsSorting: true, defaultWidth: 150 },
|
||||||
{ id: 'name', label: 'Name', allowsSorting: true, defaultWidth: 160 },
|
{ id: 'name', label: 'Name', allowsSorting: true, defaultWidth: 160 },
|
||||||
{ id: 'email', label: 'Email', allowsSorting: false, defaultWidth: 180 },
|
{ id: 'email', label: 'Email', allowsSorting: false, defaultWidth: 180 },
|
||||||
@@ -110,7 +107,7 @@ export const LeadTable = ({
|
|||||||
];
|
];
|
||||||
|
|
||||||
const columns = visibleColumns
|
const columns = visibleColumns
|
||||||
? allColumns.filter(c => visibleColumns.has(c.id) || c.id === 'view')
|
? allColumns.filter(c => visibleColumns.has(c.id))
|
||||||
: allColumns;
|
: allColumns;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -156,7 +153,6 @@ export const LeadTable = ({
|
|||||||
id={row.id}
|
id={row.id}
|
||||||
className="bg-warning-primary"
|
className="bg-warning-primary"
|
||||||
>
|
>
|
||||||
<Table.Cell />
|
|
||||||
<Table.Cell className="pl-10">
|
<Table.Cell className="pl-10">
|
||||||
<span className="text-xs text-tertiary">{phone}</span>
|
<span className="text-xs text-tertiary">{phone}</span>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
@@ -207,20 +203,12 @@ export const LeadTable = ({
|
|||||||
key={row.id}
|
key={row.id}
|
||||||
id={row.id}
|
id={row.id}
|
||||||
className={cx(
|
className={cx(
|
||||||
'group/row',
|
'group/row cursor-pointer',
|
||||||
isSpamRow && !isSelected && 'bg-warning-primary',
|
isSpamRow && !isSelected && 'bg-warning-primary',
|
||||||
isSelected && 'bg-brand-primary',
|
isSelected && 'bg-brand-primary',
|
||||||
)}
|
)}
|
||||||
|
onAction={() => onViewActivity?.(lead)}
|
||||||
>
|
>
|
||||||
<Table.Cell>
|
|
||||||
<button
|
|
||||||
onClick={(e) => { e.stopPropagation(); onViewActivity?.(lead); }}
|
|
||||||
className="flex size-7 items-center justify-center rounded-lg text-fg-quaternary hover:text-fg-secondary hover:bg-primary_hover transition duration-100 ease-linear"
|
|
||||||
title="View details"
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon icon={faEye} className="size-3.5" />
|
|
||||||
</button>
|
|
||||||
</Table.Cell>
|
|
||||||
{isCol('phone') && <Table.Cell>
|
{isCol('phone') && <Table.Cell>
|
||||||
{phoneRaw ? (
|
{phoneRaw ? (
|
||||||
<PhoneActionCell phoneNumber={phoneRaw} displayNumber={phone} />
|
<PhoneActionCell phoneNumber={phoneRaw} displayNumber={phone} />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import {
|
import {
|
||||||
faMagnifyingGlass, faPenToSquare, faEye, faXmark,
|
faMagnifyingGlass, faPenToSquare, faXmark,
|
||||||
faCalendarCheck, faUserDoctor, faBuilding, faStethoscope, faNotesMedical,
|
faCalendarCheck, faUserDoctor, faBuilding, faStethoscope, faNotesMedical,
|
||||||
} from '@fortawesome/pro-duotone-svg-icons';
|
} from '@fortawesome/pro-duotone-svg-icons';
|
||||||
import { faIcon } from '@/lib/icon-wrapper';
|
import { faIcon } from '@/lib/icon-wrapper';
|
||||||
@@ -578,8 +578,7 @@ export const AppointmentsPageV2 = () => {
|
|||||||
) : (
|
) : (
|
||||||
<Table size="sm">
|
<Table size="sm">
|
||||||
<Table.Header>
|
<Table.Header>
|
||||||
<Table.Head label="" className="w-8" isRowHeader />
|
<Table.Head label="PATIENT" className="min-w-[180px]" isRowHeader />
|
||||||
<Table.Head label="PATIENT" className="min-w-[180px]" />
|
|
||||||
<Table.Head label="DATE & TIME" className="w-28" />
|
<Table.Head label="DATE & TIME" className="w-28" />
|
||||||
<Table.Head label="DOCTOR" className="min-w-[160px]" />
|
<Table.Head label="DOCTOR" className="min-w-[160px]" />
|
||||||
<Table.Head label="STATUS" className="w-24" />
|
<Table.Head label="STATUS" className="w-24" />
|
||||||
@@ -595,18 +594,9 @@ export const AppointmentsPageV2 = () => {
|
|||||||
return (
|
return (
|
||||||
<Table.Row
|
<Table.Row
|
||||||
id={appt.id}
|
id={appt.id}
|
||||||
className={cx('group/row', isSelected && 'bg-brand-primary')}
|
className={cx('group/row cursor-pointer', isSelected && 'bg-brand-primary')}
|
||||||
|
onAction={() => handleEditClick(appt)}
|
||||||
>
|
>
|
||||||
{/* Eye icon — first column */}
|
|
||||||
<Table.Cell>
|
|
||||||
<button
|
|
||||||
onClick={(e) => { e.stopPropagation(); handleEditClick(appt); }}
|
|
||||||
className="flex size-7 items-center justify-center rounded-lg text-fg-quaternary hover:text-fg-secondary hover:bg-primary_hover transition duration-100 ease-linear"
|
|
||||||
title="View details"
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon icon={faEye} className="size-3.5" />
|
|
||||||
</button>
|
|
||||||
</Table.Cell>
|
|
||||||
|
|
||||||
{/* Patient: name + phone on 2 lines */}
|
{/* Patient: name + phone on 2 lines */}
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
|
|||||||
@@ -133,8 +133,6 @@ export const PatientsPage = () => {
|
|||||||
<Table.Head label="PATIENT" isRowHeader />
|
<Table.Head label="PATIENT" isRowHeader />
|
||||||
<Table.Head label="PHONE" />
|
<Table.Head label="PHONE" />
|
||||||
<Table.Head label="EMAIL" />
|
<Table.Head label="EMAIL" />
|
||||||
<Table.Head label="GENDER" />
|
|
||||||
<Table.Head label="AGE" />
|
|
||||||
</Table.Header>
|
</Table.Header>
|
||||||
<Table.Body items={pagedPatients} dependencies={[selectedPatient?.id]}>
|
<Table.Body items={pagedPatients} dependencies={[selectedPatient?.id]}>
|
||||||
{(patient) => {
|
{(patient) => {
|
||||||
@@ -197,19 +195,6 @@ export const PatientsPage = () => {
|
|||||||
)}
|
)}
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
|
|
||||||
{/* Gender */}
|
|
||||||
<Table.Cell>
|
|
||||||
<span className="text-sm text-secondary">
|
|
||||||
{patient.gender ? patient.gender.charAt(0) + patient.gender.slice(1).toLowerCase() : '—'}
|
|
||||||
</span>
|
|
||||||
</Table.Cell>
|
|
||||||
|
|
||||||
{/* Age */}
|
|
||||||
<Table.Cell>
|
|
||||||
<span className="text-sm text-secondary">
|
|
||||||
{age !== null ? `${age} yrs` : '—'}
|
|
||||||
</span>
|
|
||||||
</Table.Cell>
|
|
||||||
|
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user