Skip to content
Snippets Groups Projects
Commit 3adf4ba4 authored by Olabarrieta Palacios, Ignacio's avatar Olabarrieta Palacios, Ignacio
Browse files

checking names traffic twice with the same name

parent b16f24f8
No related branches found
No related tags found
No related merge requests found
...@@ -282,6 +282,7 @@ export class NoiseCompComponent implements OnInit { ...@@ -282,6 +282,7 @@ export class NoiseCompComponent implements OnInit {
select.appendChild(el); select.appendChild(el);
}; };
console.log("getTrafficFromDB0::: success data="+JSON.stringify(data)); console.log("getTrafficFromDB0::: success data="+JSON.stringify(data));
console.log("getTrafficFromDB0::: traffic_names="+JSON.stringify(this.traffic_names));
//document.getElementById("mapasCB").value = -1; //document.getElementById("mapasCB").value = -1;
} }
...@@ -609,11 +610,13 @@ export class NoiseCompComponent implements OnInit { ...@@ -609,11 +610,13 @@ export class NoiseCompComponent implements OnInit {
} }
selectFile(event:any) { selectFile(event:any) {
console.log('selectFile::: event='+event.target.files); console.log('selectFile::: event='+JSON.stringify(event.target.files));
const file:File = event.target.files[0]; const file:File = event.target.files[0];
this.trafficFilename = file.name; this.trafficFilename = file.name;
console.log('selectFile::: file='+file.name); console.log('selectFile::: file='+file.name);
if ( this.traffic_names.includes(file.name) ){ console.log('selectFile::: traffic_names='+JSON.stringify(this.traffic_names));
console.log('selectFile:::----------------------------------------------');
if ( this.traffic_names.includes(file.name.replace(".zip","")) ){
alert(file.name+" is already uploaded to the platform.\nPlease choose different file."); alert(file.name+" is already uploaded to the platform.\nPlease choose different file.");
} }
if ( file ) { if ( file ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment