Skip to content

Add warning callout for schedule exception deletion #14988

@harsh04044

Description

@harsh04044

Is your feature request related to a problem? Please describe.

When deleting a schedule exception, the confirmation dialog only warns that the action is permanent. It doesn't mention that removing the exception may affect appointments that were cancelled when the exception was created. This can lead to confusion if users later need to reschedule those appointments.

I noticed a TODO comment in the code (lines 170-176 of src/pages/Scheduling/ScheduleExceptions.tsx) indicating this warning was planned but not implemented. The commented code shows the intended warning callout.

Describe the solution you'd like

Add a warning callout below each schedule exception item that informs users about potential appointment impacts. The callout should:

  • Use the existing Callout component with a warning variant
  • Display below the exception details and above/below the Remove button
  • Show a clear message about potential appointment impacts
  • Be visually distinct (warning styling) to draw attention
  • Be consistent with existing UI patterns

The implementation should uncomment and complete the TODO block, using the existing Callout component from @/CAREUI/display/Callout and appropriate translation keys for internationalization.

Describe alternatives you've considered

  1. Adding the warning only in the delete confirmation dialog - Less visible; users might miss it before clicking delete
  2. Showing a tooltip on hover - Too subtle for important information
  3. Adding a separate Impact section - More complex; a simple callout is sufficient
  4. Only showing the warning if appointments were actually cancelled - Requires backend changes; a general warning is simpler and still valuable

The callout approach balances visibility and simplicity without requiring backend changes.

Additional context

  • File: src/pages/Scheduling/ScheduleExceptions.tsx
  • Lines 170-176 contain the commented TODO block with the intended implementation
  • The Callout component is already available at @/CAREUI/display/Callout
  • The warning should appear for all exceptions, providing general awareness about potential impacts

The commented code shows:

  • TODO comment indicating this feature was planned
  • A div wrapper with padding classes
  • Callout component with warning variant and Warning badge
  • Placeholder text about cancelled appointments that needs to be replaced with proper translation

Screenshots:

Image
  • Current state: Exception list shows no warning callout
Image
  • Expected state: Each exception should display a warning callout below the exception details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions