Add new frontend - fix 19

This commit is contained in:
Urtzi Alfaro
2025-07-23 10:02:48 +02:00
parent 97e52dcfe5
commit b1639f5d9b
7 changed files with 168 additions and 175 deletions

View File

@@ -1,11 +1,7 @@
// src/api/services/DataService.ts
import { apiClient } from '../base/apiClient';
import {
ApiResponse,
SalesRecord,
CreateSalesRequest,
WeatherData,
TrafficData,
ApiResponse
} from '../types/api';
export interface DashboardStats {
@@ -33,6 +29,38 @@ export interface DataValidation {
duplicates: number;
}
// Data types
export interface WeatherData {
date: string;
temperature: number;
humidity: number;
precipitation: number;
wind_speed: number;
}
export interface TrafficData {
date: string;
traffic_volume: number;
pedestrian_count: number;
}
export interface SalesRecord {
id: string;
tenant_id: string;
product_name: string;
quantity_sold: number;
revenue: number;
date: string;
created_at: string;
}
export interface CreateSalesRequest {
product_name: string;
quantity_sold: number;
revenue: number;
date: string;
}
export class DataService {
/**
* Upload sales history file