chore: remove unused packages, imports, and stale type definitions
- Remove @casl/prisma (unused) from backend - Remove @heroicons/react (unused, using lucide-react) from frontend - Remove unused InferSubjects import from ability.factory.ts - Remove unused Calendar import from Dashboard.tsx - Delete stale frontend/src/lib/types.ts (duplicate of src/types/index.ts) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
15
backend/package-lock.json
generated
15
backend/package-lock.json
generated
@@ -11,7 +11,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "^0.72.1",
|
"@anthropic-ai/sdk": "^0.72.1",
|
||||||
"@casl/ability": "^6.8.0",
|
"@casl/ability": "^6.8.0",
|
||||||
"@casl/prisma": "^1.6.1",
|
|
||||||
"@nestjs/axios": "^4.0.1",
|
"@nestjs/axios": "^4.0.1",
|
||||||
"@nestjs/common": "^10.3.0",
|
"@nestjs/common": "^10.3.0",
|
||||||
"@nestjs/config": "^3.1.1",
|
"@nestjs/config": "^3.1.1",
|
||||||
@@ -791,20 +790,6 @@
|
|||||||
"url": "https://github.com/stalniy/casl/blob/master/BACKERS.md"
|
"url": "https://github.com/stalniy/casl/blob/master/BACKERS.md"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@casl/prisma": {
|
|
||||||
"version": "1.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@casl/prisma/-/prisma-1.6.1.tgz",
|
|
||||||
"integrity": "sha512-VSAzfTMOZvP3Atj3F0qwJItOm1ixIiumjbBz21PL/gLUIDwoktyAx2dB7dPwjH9AQvzZPE629ee7fVU5K2hpzg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@ucast/core": "^1.10.0",
|
|
||||||
"@ucast/js": "^3.0.1"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@casl/ability": "^5.3.0 || ^6.0.0",
|
|
||||||
"@prisma/client": "^2.14.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@colors/colors": {
|
"node_modules/@colors/colors": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "^0.72.1",
|
"@anthropic-ai/sdk": "^0.72.1",
|
||||||
"@casl/ability": "^6.8.0",
|
"@casl/ability": "^6.8.0",
|
||||||
"@casl/prisma": "^1.6.1",
|
|
||||||
"@nestjs/axios": "^4.0.1",
|
"@nestjs/axios": "^4.0.1",
|
||||||
"@nestjs/common": "^10.3.0",
|
"@nestjs/common": "^10.3.0",
|
||||||
"@nestjs/config": "^3.1.1",
|
"@nestjs/config": "^3.1.1",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { AbilityBuilder, PureAbility, AbilityClass, ExtractSubjectType, InferSubjects } from '@casl/ability';
|
import { AbilityBuilder, PureAbility, AbilityClass, ExtractSubjectType } from '@casl/ability';
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { Role, User, VIP, Driver, ScheduleEvent, Flight, Vehicle } from '@prisma/client';
|
import { Role, User, VIP, Driver, ScheduleEvent, Flight, Vehicle } from '@prisma/client';
|
||||||
|
|
||||||
|
|||||||
10
frontend/package-lock.json
generated
10
frontend/package-lock.json
generated
@@ -11,7 +11,6 @@
|
|||||||
"@auth0/auth0-react": "^2.2.4",
|
"@auth0/auth0-react": "^2.2.4",
|
||||||
"@casl/ability": "^6.8.0",
|
"@casl/ability": "^6.8.0",
|
||||||
"@casl/react": "^5.0.1",
|
"@casl/react": "^5.0.1",
|
||||||
"@heroicons/react": "^2.2.0",
|
|
||||||
"@react-pdf/renderer": "^4.3.2",
|
"@react-pdf/renderer": "^4.3.2",
|
||||||
"@tanstack/react-query": "^5.17.19",
|
"@tanstack/react-query": "^5.17.19",
|
||||||
"axios": "^1.6.5",
|
"axios": "^1.6.5",
|
||||||
@@ -912,15 +911,6 @@
|
|||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@heroicons/react": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.2.0.tgz",
|
|
||||||
"integrity": "sha512-LMcepvRaS9LYHJGsF0zzmgKCUim/X3N/DQKc4jepAXJ7l8QxJ1PmxJzqplF2Z3FE4PqBAIGyJAQ/w4B5dsqbtQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": ">= 16 || ^19.0.0-rc"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.13.0",
|
"version": "0.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"@auth0/auth0-react": "^2.2.4",
|
"@auth0/auth0-react": "^2.2.4",
|
||||||
"@casl/ability": "^6.8.0",
|
"@casl/ability": "^6.8.0",
|
||||||
"@casl/react": "^5.0.1",
|
"@casl/react": "^5.0.1",
|
||||||
"@heroicons/react": "^2.2.0",
|
|
||||||
"@react-pdf/renderer": "^4.3.2",
|
"@react-pdf/renderer": "^4.3.2",
|
||||||
"@tanstack/react-query": "^5.17.19",
|
"@tanstack/react-query": "^5.17.19",
|
||||||
"axios": "^1.6.5",
|
"axios": "^1.6.5",
|
||||||
|
|||||||
@@ -1,126 +0,0 @@
|
|||||||
/**
|
|
||||||
* TypeScript interfaces for VIP Coordinator
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface VIP {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
organization?: string;
|
|
||||||
department: 'OFFICE_OF_DEVELOPMENT' | 'ADMIN';
|
|
||||||
arrivalMode: 'FLIGHT' | 'SELF_DRIVING';
|
|
||||||
expectedArrival?: string;
|
|
||||||
airportPickup: boolean;
|
|
||||||
venueTransport: boolean;
|
|
||||||
notes?: string;
|
|
||||||
createdAt: string;
|
|
||||||
updatedAt: string;
|
|
||||||
deletedAt?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Driver {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
phone: string;
|
|
||||||
department?: 'OFFICE_OF_DEVELOPMENT' | 'ADMIN';
|
|
||||||
userId?: string;
|
|
||||||
shiftStartTime?: string;
|
|
||||||
shiftEndTime?: string;
|
|
||||||
isAvailable: boolean;
|
|
||||||
createdAt: string;
|
|
||||||
updatedAt: string;
|
|
||||||
deletedAt?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ScheduleEvent {
|
|
||||||
id: string;
|
|
||||||
vipId: string;
|
|
||||||
vip?: VIP;
|
|
||||||
title: string;
|
|
||||||
pickupLocation?: string;
|
|
||||||
dropoffLocation?: string;
|
|
||||||
location?: string;
|
|
||||||
startTime: string;
|
|
||||||
endTime: string;
|
|
||||||
actualStartTime?: string;
|
|
||||||
actualEndTime?: string;
|
|
||||||
description?: string;
|
|
||||||
type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
|
|
||||||
status: 'SCHEDULED' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED';
|
|
||||||
driverId?: string;
|
|
||||||
driver?: Driver;
|
|
||||||
vehicleId?: string;
|
|
||||||
eventId?: string;
|
|
||||||
event?: Event;
|
|
||||||
notes?: string;
|
|
||||||
createdAt: string;
|
|
||||||
updatedAt: string;
|
|
||||||
deletedAt?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EventTemplate {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
description?: string;
|
|
||||||
defaultDuration: number; // in minutes
|
|
||||||
location?: string;
|
|
||||||
type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
|
|
||||||
createdAt: string;
|
|
||||||
updatedAt: string;
|
|
||||||
deletedAt?: string;
|
|
||||||
_count?: {
|
|
||||||
events: number;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Event {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
description?: string;
|
|
||||||
startTime: string;
|
|
||||||
endTime: string;
|
|
||||||
location: string;
|
|
||||||
type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
|
|
||||||
templateId?: string;
|
|
||||||
template?: EventTemplate;
|
|
||||||
attendees: EventAttendance[];
|
|
||||||
scheduleTasks?: ScheduleEvent[];
|
|
||||||
createdAt: string;
|
|
||||||
updatedAt: string;
|
|
||||||
deletedAt?: string;
|
|
||||||
_count?: {
|
|
||||||
attendees: number;
|
|
||||||
scheduleTasks: number;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EventAttendance {
|
|
||||||
id: string;
|
|
||||||
eventId: string;
|
|
||||||
vipId: string;
|
|
||||||
vip: VIP;
|
|
||||||
addedAt: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateEventTemplateDto {
|
|
||||||
name: string;
|
|
||||||
description?: string;
|
|
||||||
defaultDuration: number;
|
|
||||||
location?: string;
|
|
||||||
type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateEventDto {
|
|
||||||
name: string;
|
|
||||||
description?: string;
|
|
||||||
startTime: string;
|
|
||||||
endTime: string;
|
|
||||||
location: string;
|
|
||||||
type: 'TRANSPORT' | 'MEETING' | 'EVENT' | 'MEAL' | 'ACCOMMODATION';
|
|
||||||
templateId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AddVipsToEventDto {
|
|
||||||
vipIds: string[];
|
|
||||||
pickupMinutesBeforeEvent?: number;
|
|
||||||
pickupLocationOverride?: string;
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { api } from '@/lib/api';
|
import { api } from '@/lib/api';
|
||||||
import { Users, Car, Calendar, Plane, Clock } from 'lucide-react';
|
import { Users, Car, Plane, Clock } from 'lucide-react';
|
||||||
import { VIP, Driver, ScheduleEvent } from '@/types';
|
import { VIP, Driver, ScheduleEvent } from '@/types';
|
||||||
import { formatDateTime } from '@/lib/utils';
|
import { formatDateTime } from '@/lib/utils';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user