feat: comprehensive update with Signal, Copilot, themes, and PDF features
## Signal Messaging Integration - Added SignalService for sending messages to drivers via Signal - SignalMessage model for tracking message history - Driver chat modal for real-time messaging - Send schedule via Signal (ICS + PDF attachments) ## AI Copilot - Natural language interface for VIP Coordinator - Capabilities: create VIPs, schedule events, assign drivers - Help and guidance for users - Floating copilot button in UI ## Theme System - Dark/light/system theme support - Color scheme selection (blue, green, purple, orange, red) - ThemeContext for global state - AppearanceMenu in header ## PDF Schedule Export - VIPSchedulePDF component for schedule generation - PDF settings (header, footer, branding) - Preview PDF in browser - Settings stored in database ## Database Migrations - add_signal_messages: SignalMessage model - add_pdf_settings: Settings model for PDF config - add_reminder_tracking: lastReminderSent for events - make_driver_phone_optional: phone field nullable ## Event Management - Event status service for automated updates - IN_PROGRESS/COMPLETED status tracking - Reminder tracking for notifications ## UI/UX Improvements - Driver schedule modal - Improved My Schedule page - Better error handling and loading states - Responsive design improvements ## Other Changes - AGENT_TEAM.md documentation - Seed data improvements - Ability factory updates - Driver profile page Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "MessageDirection" AS ENUM ('INBOUND', 'OUTBOUND');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "signal_messages" (
|
||||
"id" TEXT NOT NULL,
|
||||
"driverId" TEXT NOT NULL,
|
||||
"direction" "MessageDirection" NOT NULL,
|
||||
"content" TEXT NOT NULL,
|
||||
"timestamp" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"isRead" BOOLEAN NOT NULL DEFAULT false,
|
||||
"signalTimestamp" TEXT,
|
||||
|
||||
CONSTRAINT "signal_messages_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "signal_messages_driverId_idx" ON "signal_messages"("driverId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "signal_messages_driverId_isRead_idx" ON "signal_messages"("driverId", "isRead");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "signal_messages_timestamp_idx" ON "signal_messages"("timestamp");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "signal_messages" ADD CONSTRAINT "signal_messages_driverId_fkey" FOREIGN KEY ("driverId") REFERENCES "drivers"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,32 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "PageSize" AS ENUM ('LETTER', 'A4');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "pdf_settings" (
|
||||
"id" TEXT NOT NULL,
|
||||
"organizationName" TEXT NOT NULL DEFAULT 'VIP Coordinator',
|
||||
"logoUrl" TEXT,
|
||||
"accentColor" TEXT NOT NULL DEFAULT '#2c3e50',
|
||||
"tagline" TEXT,
|
||||
"contactEmail" TEXT NOT NULL DEFAULT 'contact@example.com',
|
||||
"contactPhone" TEXT NOT NULL DEFAULT '555-0100',
|
||||
"secondaryContactName" TEXT,
|
||||
"secondaryContactPhone" TEXT,
|
||||
"contactLabel" TEXT NOT NULL DEFAULT 'Questions or Changes?',
|
||||
"showDraftWatermark" BOOLEAN NOT NULL DEFAULT false,
|
||||
"showConfidentialWatermark" BOOLEAN NOT NULL DEFAULT false,
|
||||
"showTimestamp" BOOLEAN NOT NULL DEFAULT true,
|
||||
"showAppUrl" BOOLEAN NOT NULL DEFAULT false,
|
||||
"pageSize" "PageSize" NOT NULL DEFAULT 'LETTER',
|
||||
"showFlightInfo" BOOLEAN NOT NULL DEFAULT true,
|
||||
"showDriverNames" BOOLEAN NOT NULL DEFAULT true,
|
||||
"showVehicleNames" BOOLEAN NOT NULL DEFAULT true,
|
||||
"showVipNotes" BOOLEAN NOT NULL DEFAULT true,
|
||||
"showEventDescriptions" BOOLEAN NOT NULL DEFAULT true,
|
||||
"headerMessage" TEXT,
|
||||
"footerMessage" TEXT,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "pdf_settings_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
@@ -0,0 +1,3 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "schedule_events" ADD COLUMN "reminder20MinSent" BOOLEAN NOT NULL DEFAULT false,
|
||||
ADD COLUMN "reminder5MinSent" BOOLEAN NOT NULL DEFAULT false;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "drivers" ALTER COLUMN "phone" DROP NOT NULL;
|
||||
Reference in New Issue
Block a user