Backup: 2025-07-21 18:13 - I got Claude Code
Some checks failed
CI/CD Pipeline / Backend Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Tests (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
E2E Tests / E2E Tests - ${{ github.event.inputs.environment || 'staging' }} (push) Has been cancelled
E2E Tests / Notify Results (push) Has been cancelled
Dependency Updates / Update Dependencies (push) Has been cancelled

[Restore from backup: vip-coordinator-backup-2025-07-21-18-13-I got Claude Code]
This commit is contained in:
2025-07-21 18:13:00 +02:00
parent 36cb8e8886
commit 8ace1ab2c1
33 changed files with 3507 additions and 3656 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import { apiCall } from '../utils/api';
import { apiCall } from '../config/api';
interface ScheduleEvent {
id: string;
@@ -83,27 +83,28 @@ const Dashboard: React.FC = () => {
'Content-Type': 'application/json'
};
const [vipsResult, driversResult] = await Promise.all([
const [vipsResponse, driversResponse] = await Promise.all([
apiCall('/api/vips', { headers: authHeaders }),
apiCall('/api/drivers', { headers: authHeaders })
]);
const vipsData = vipsResult.data;
const driversData = driversResult.data;
if (!vipsData || !driversData) {
if (!vipsResponse.ok || !driversResponse.ok) {
throw new Error('Failed to fetch data');
}
const vipsData = await vipsResponse.json();
const driversData = await driversResponse.json();
// Fetch schedule for each VIP and determine current/next events
const vipsWithSchedules = await Promise.all(
vipsData.map(async (vip: Vip) => {
try {
const { data: scheduleData } = await apiCall(`/api/vips/${vip.id}/schedule`, {
const scheduleResponse = await apiCall(`/api/vips/${vip.id}/schedule`, {
headers: authHeaders
});
if (scheduleData) {
if (scheduleResponse.ok) {
const scheduleData = await scheduleResponse.json();
const currentEvent = getCurrentEvent(scheduleData);
const nextEvent = getNextEvent(scheduleData);