🗓️ distinguish delete-slot from delete-series in the row menu
Browse files at this commitf986b51b2d83cccf9fc8f0c776354d1e679662b6Parent: 8bba96b- fix
- 🗓️ distinguish delete-slot from delete-series in the row menu
3 changed files +24 -6
src/components/ui/icons.tsxmodified+15 -0
| @@ -45,6 +45,21 @@ export function IconTrash(props: IconProps) { | |||
| 45 | ); | 45 | ); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | +/** Delete-whole-series: a calendar with an ✕ — distinct silhouette from the | ||
| 49 | + * single-slot trash, signalling "remove these recurring dated slots". */ | ||
| 50 | +export function IconCalendarX(props: IconProps) { | ||
| 51 | + return ( | ||
| 52 | + <Svg {...props}> | ||
| 53 | + <path d="M8 2v3" /> | ||
| 54 | + <path d="M16 2v3" /> | ||
| 55 | + <rect x="3" y="4.5" width="18" height="16.5" rx="2" /> | ||
| 56 | + <path d="M3 9.5h18" /> | ||
| 57 | + <path d="m9.5 13 5 5" /> | ||
| 58 | + <path d="m14.5 13-5 5" /> | ||
| 59 | + </Svg> | ||
| 60 | + ); | ||
| 61 | +} | ||
| 62 | + | ||
| 48 | export function IconArchive(props: IconProps) { | 63 | export function IconArchive(props: IconProps) { |
| 49 | return ( | 64 | return ( |
| 50 | <Svg {...props}> | 65 | <Svg {...props}> |
src/i18n/messages.tsmodified+4 -4
| @@ -1245,8 +1245,8 @@ const en: Dict = { | |||
| 1245 | "appointments.reschedule": "Propose new time", | 1245 | "appointments.reschedule": "Propose new time", |
| 1246 | "appointments.acceptReschedule": "Accept new time", | 1246 | "appointments.acceptReschedule": "Accept new time", |
| 1247 | "appointments.declineReschedule": "Decline new time", | 1247 | "appointments.declineReschedule": "Decline new time", |
| 1248 | - "appointments.deleteSlot": "Delete time", | 1248 | + "appointments.deleteSlot": "Delete this time", |
| 1249 | - "appointments.deleteSeries": "Delete series", | 1249 | + "appointments.deleteSeries": "Delete whole series", |
| 1250 | "appointments.note": "Note", | 1250 | "appointments.note": "Note", |
| 1251 | "appointments.reason": "Reason", | 1251 | "appointments.reason": "Reason", |
| 1252 | "appointments.repeatWeekly": "Repeat weekly", | 1252 | "appointments.repeatWeekly": "Repeat weekly", |
| @@ -2142,8 +2142,8 @@ const tr: Dict = { | |||
| 2142 | "appointments.reschedule": "Yeni saat öner", | 2142 | "appointments.reschedule": "Yeni saat öner", |
| 2143 | "appointments.acceptReschedule": "Yeni saati kabul et", | 2143 | "appointments.acceptReschedule": "Yeni saati kabul et", |
| 2144 | "appointments.declineReschedule": "Yeni saati reddet", | 2144 | "appointments.declineReschedule": "Yeni saati reddet", |
| 2145 | - "appointments.deleteSlot": "Saati sil", | 2145 | + "appointments.deleteSlot": "Bu saati sil", |
| 2146 | - "appointments.deleteSeries": "Seriyi sil", | 2146 | + "appointments.deleteSeries": "Tüm seriyi sil", |
| 2147 | "appointments.note": "Not", | 2147 | "appointments.note": "Not", |
| 2148 | "appointments.reason": "Sebep", | 2148 | "appointments.reason": "Sebep", |
| 2149 | "appointments.repeatWeekly": "Haftalık tekrarla", | 2149 | "appointments.repeatWeekly": "Haftalık tekrarla", |
src/pages/appointments-page.tsxmodified+5 -2
| @@ -28,7 +28,7 @@ import { Button } from "@/components/ui/button"; | |||
| 28 | import { ConfirmDialog } from "@/components/ui/confirm-dialog"; | 28 | import { ConfirmDialog } from "@/components/ui/confirm-dialog"; |
| 29 | import { DataTable, DataTableSkeleton } from "@/components/ui/data-table"; | 29 | import { DataTable, DataTableSkeleton } from "@/components/ui/data-table"; |
| 30 | import { Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; | 30 | import { Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; |
| 31 | -import { IconCheck, IconEye, IconPlus, IconRefresh, IconTrash, IconX } from "@/components/ui/icons"; | 31 | +import { IconCalendarX, IconCheck, IconEye, IconPlus, IconRefresh, IconTrash, IconX } from "@/components/ui/icons"; |
| 32 | import { SidePanel } from "@/components/ui/side-panel"; | 32 | import { SidePanel } from "@/components/ui/side-panel"; |
| 33 | import { TableRowActions } from "@/components/ui/table-row-actions"; | 33 | import { TableRowActions } from "@/components/ui/table-row-actions"; |
| 34 | import { appointmentStatusClass, appointmentStatusDotClass, appointmentStatusLabelKey } from "@/lib/appointment-status"; | 34 | import { appointmentStatusClass, appointmentStatusDotClass, appointmentStatusLabelKey } from "@/lib/appointment-status"; |
| @@ -200,9 +200,12 @@ function AppointmentsContent() { | |||
| 200 | onSelect: () => askConfirm(t("appointments.confirmDeleteSlot"), () => deleteSlotById(slot.id)), | 200 | onSelect: () => askConfirm(t("appointments.confirmDeleteSlot"), () => deleteSlotById(slot.id)), |
| 201 | }]; | 201 | }]; |
| 202 | if (slot.series) { | 202 | if (slot.series) { |
| 203 | + // Distinct silhouette from the single-slot trash: a calendar-✕ signals | ||
| 204 | + // this removes the WHOLE recurring series, not just this one time — the | ||
| 205 | + // two menu items must not look identical. | ||
| 203 | actions.push({ | 206 | actions.push({ |
| 204 | label: t("appointments.deleteSeries"), | 207 | label: t("appointments.deleteSeries"), |
| 205 | - icon: <IconTrash class="h-4 w-4" />, | 208 | + icon: <IconCalendarX class="h-4 w-4" />, |
| 206 | destructive: true, | 209 | destructive: true, |
| 207 | onSelect: () => askConfirm(t("appointments.confirmDeleteSeries"), () => deleteSlotSeries(slot.series!)), | 210 | onSelect: () => askConfirm(t("appointments.confirmDeleteSeries"), () => deleteSlotSeries(slot.series!)), |
| 208 | }); | 211 | }); |