mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 06:16:18 +00:00
mostrar cuales son las provincias que no existen
This commit is contained in:
parent
1d5328a821
commit
5d87be731b
1 changed files with 5 additions and 2 deletions
|
@ -128,10 +128,13 @@ const checkers: Record<string, (files: Files) => boolean | string> = {
|
|||
["[sucursales.csv] sucursales_provincia no cumple con ISO 3166-2"](files) {
|
||||
const sucursales = files["sucursales.csv"].data;
|
||||
for (const sucursal of sucursales) {
|
||||
if (!(sucursal as any).sucursales_provincia) continue;
|
||||
if (!ISO_PROVINCIAS.includes((sucursal as any).sucursales_provincia))
|
||||
const prov = (sucursal as any).sucursales_provincia;
|
||||
if (!prov) continue;
|
||||
if (!ISO_PROVINCIAS.includes(prov)) {
|
||||
console.error(` La provincia ${prov} no es válida`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue