fix: reminders include contacted bookings, confirmation details persist after status revert
- Reminders query now includes 'contacted' group bookings with confirmed_date, preventing people from being forgotten when admin hasn't clicked "Подтвердить" - Confirmation details (group, date) remain visible regardless of booking status, so "Вернуть" no longer hides previously entered info
This commit is contained in:
@@ -288,7 +288,7 @@ function GroupBookingsTab() {
|
|||||||
renderExtra={(b) => (
|
renderExtra={(b) => (
|
||||||
<>
|
<>
|
||||||
{b.groupInfo && <span className="text-xs text-neutral-400 bg-neutral-800 rounded-full px-2 py-0.5">{b.groupInfo}</span>}
|
{b.groupInfo && <span className="text-xs text-neutral-400 bg-neutral-800 rounded-full px-2 py-0.5">{b.groupInfo}</span>}
|
||||||
{b.status === "confirmed" && (b.confirmedGroup || b.confirmedDate) && (
|
{(b.confirmedGroup || b.confirmedDate) && (
|
||||||
<span className="text-[10px] text-emerald-400/70">
|
<span className="text-[10px] text-emerald-400/70">
|
||||||
{b.confirmedGroup}
|
{b.confirmedGroup}
|
||||||
{b.confirmedDate && ` · ${new Date(b.confirmedDate + "T12:00").toLocaleDateString("ru-RU", { day: "numeric", month: "short" })}`}
|
{b.confirmedDate && ` · ${new Date(b.confirmedDate + "T12:00").toLocaleDateString("ru-RU", { day: "numeric", month: "short" })}`}
|
||||||
|
|||||||
@@ -868,7 +868,7 @@ export function getUpcomingReminders(): ReminderItem[] {
|
|||||||
// Group bookings — confirmed with date today/tomorrow
|
// Group bookings — confirmed with date today/tomorrow
|
||||||
try {
|
try {
|
||||||
const gbRows = db.prepare(
|
const gbRows = db.prepare(
|
||||||
"SELECT * FROM group_bookings WHERE status = 'confirmed' AND confirmed_date IN (?, ?)"
|
"SELECT * FROM group_bookings WHERE status IN ('confirmed', 'contacted') AND confirmed_date IN (?, ?)"
|
||||||
).all(today, tomorrow) as GroupBookingRow[];
|
).all(today, tomorrow) as GroupBookingRow[];
|
||||||
for (const r of gbRows) {
|
for (const r of gbRows) {
|
||||||
items.push({
|
items.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user