feat: implement route planning dashboard including KPIs, user workload tracking, and route assignment management features
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class PlanningInputService {
|
||||
private pdvFile: File | null = null;
|
||||
private usuariosFile: File | null = null;
|
||||
private radioKm = 50;
|
||||
private velocidad = 28;
|
||||
|
||||
setFiles(pdvFile: File, usuariosFile: File, radioKm: number, velocidad: number): void {
|
||||
this.pdvFile = pdvFile;
|
||||
this.usuariosFile = usuariosFile;
|
||||
this.radioKm = radioKm;
|
||||
this.velocidad = velocidad;
|
||||
}
|
||||
|
||||
getFormData(): FormData | null {
|
||||
if (!this.pdvFile || !this.usuariosFile) return null;
|
||||
const data = new FormData();
|
||||
data.append('pdv_file', this.pdvFile, this.pdvFile.name);
|
||||
data.append('usuarios_file', this.usuariosFile, this.usuariosFile.name);
|
||||
data.append('radio_km', String(this.radioKm));
|
||||
data.append('velocidad', String(this.velocidad));
|
||||
return data;
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
this.pdvFile = null;
|
||||
this.usuariosFile = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user