mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-05-18 20:08:19 +00:00
fix: P1 call-desk defects batch
- Mute persists across calls: sip-manager's "ended/failed" branch now resets the Recoil sipIsMutedAtom + sipIsOnHoldAtom (previously only the SIP track was unmuted, leaving the UI icon + toggle logic in a muted state that the next call inherited). - Telephony-unavailable dial pad: call-desk.tsx dial-pad "Call" button was missing an isRegistered check in its disabled prop, so it stayed clickable when SIP was down. Button now shows "Telephony unavailable" and is disabled. - Past dates in Follow-up: enquiry-form's follow-up date input had no min constraint. Switched to a raw <input type="date"> with min set to today's ISO date. - Returning-patient AI summary during call: ai-chat-panel now auto-fires a "give me a quick summary of <caller>" request whenever the caller's leadId changes (new incoming call). Clears prior chat state so each caller starts fresh. - Remove Type column in Patients page (Badge import also pruned). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ import { cx } from '@/utils/cx';
|
||||
export const CallDeskPage = () => {
|
||||
const { user } = useAuth();
|
||||
const { leadActivities, calls, followUps: dataFollowUps, patients, appointments } = useData();
|
||||
const { callState, callerNumber, callUcid, dialOutbound } = useSip();
|
||||
const { callState, callerNumber, callUcid, dialOutbound, isRegistered } = useSip();
|
||||
const { missedCalls, followUps, marketingLeads, loading } = useWorklist();
|
||||
const [selectedLead, setSelectedLead] = useState<WorklistLead | null>(null);
|
||||
const [contextOpen, setContextOpen] = useState(true);
|
||||
@@ -204,11 +204,11 @@ export const CallDeskPage = () => {
|
||||
</div>
|
||||
<button
|
||||
onClick={handleDial}
|
||||
disabled={dialling || dialNumber.replace(/[^0-9]/g, '').length < 10}
|
||||
disabled={!isRegistered || dialling || dialNumber.replace(/[^0-9]/g, '').length < 10}
|
||||
className="w-full flex items-center justify-center gap-2 rounded-lg bg-success-solid py-2.5 text-sm font-medium text-white hover:opacity-90 disabled:bg-disabled disabled:cursor-not-allowed transition duration-100 ease-linear"
|
||||
>
|
||||
<FontAwesomeIcon icon={faPhone} className="size-3.5" />
|
||||
{dialling ? 'Dialling...' : 'Call'}
|
||||
{dialling ? 'Dialling...' : !isRegistered ? 'Telephony unavailable' : 'Call'}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -6,7 +6,6 @@ import { faIcon } from '@/lib/icon-wrapper';
|
||||
|
||||
const SearchLg = faIcon(faMagnifyingGlass);
|
||||
import { Avatar } from '@/components/base/avatar/avatar';
|
||||
import { Badge } from '@/components/base/badges/badges';
|
||||
// Button removed — actions are icon-only now
|
||||
import { Input } from '@/components/base/input/input';
|
||||
import { Table, TableCard } from '@/components/application/table/table';
|
||||
@@ -134,7 +133,6 @@ export const PatientsPage = () => {
|
||||
<Table.Header>
|
||||
<Table.Head label="PATIENT" isRowHeader />
|
||||
<Table.Head label="CONTACT" />
|
||||
<Table.Head label="TYPE" />
|
||||
<Table.Head label="GENDER" />
|
||||
<Table.Head label="AGE" />
|
||||
<Table.Head label="ACTIONS" />
|
||||
@@ -196,17 +194,6 @@ export const PatientsPage = () => {
|
||||
</div>
|
||||
</Table.Cell>
|
||||
|
||||
{/* Type */}
|
||||
<Table.Cell>
|
||||
{patient.patientType ? (
|
||||
<Badge size="sm" color="gray">
|
||||
{patient.patientType}
|
||||
</Badge>
|
||||
) : (
|
||||
<span className="text-sm text-placeholder">—</span>
|
||||
)}
|
||||
</Table.Cell>
|
||||
|
||||
{/* Gender */}
|
||||
<Table.Cell>
|
||||
<span className="text-sm text-secondary">
|
||||
|
||||
Reference in New Issue
Block a user