mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 02:28:18 +00:00
Enhance passenger API and web application functionality
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# API Configuration
|
||||
NEXT_PUBLIC_API_URL=http://localhost:3002
|
||||
NEXT_PUBLIC_API_URL=https://your-api-domain.com
|
||||
|
||||
# IAM Configuration (Corporate Authentication)
|
||||
NEXT_PUBLIC_IAM_ENABLED=false
|
||||
NEXT_PUBLIC_IAM_API_URL=https://iam.tria-plc.com/api
|
||||
|
||||
# GitHub Packages Token
|
||||
GITHUB_PACKAGE_TOKEN=$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
|
||||
|
||||
@@ -92,7 +92,6 @@ export default function SchedulesPage() {
|
||||
const departureAt = formData.get('departureAt') as string;
|
||||
const arrivalAt = formData.get('arrivalAt') as string;
|
||||
|
||||
// Convert datetime-local to ISO 8601
|
||||
const departureISO = new Date(departureAt).toISOString();
|
||||
const arrivalISO = new Date(arrivalAt).toISOString();
|
||||
|
||||
@@ -101,7 +100,7 @@ export default function SchedulesPage() {
|
||||
routeId: formData.get('routeId') as string,
|
||||
departureAt: departureISO,
|
||||
arrivalAt: arrivalISO,
|
||||
plannedTimes: [], // Will be auto-generated by backend based on route stops
|
||||
plannedTimes: [],
|
||||
};
|
||||
|
||||
if (editingSchedule) {
|
||||
|
||||
@@ -16,6 +16,10 @@ export const formatDateTime = (date: string | Date): string => {
|
||||
return format(new Date(date), 'MMM dd, yyyy HH:mm');
|
||||
};
|
||||
|
||||
export const formatDateTimeLocal = (date: string | Date): string => {
|
||||
return format(new Date(date), 'MMM dd, yyyy HH:mm');
|
||||
};
|
||||
|
||||
export const getStatusColor = (status: string): string => {
|
||||
const colors: Record<string, string> = {
|
||||
CONFIRMED: 'bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-400',
|
||||
|
||||
Reference in New Issue
Block a user