validatedCity, mask for input, confirmatonService, Version Info,

This commit is contained in:
2024-08-07 13:11:26 +02:00
parent 8698aa3e66
commit 3795a5a30c
44 changed files with 360313 additions and 119860 deletions

View File

@@ -53,16 +53,18 @@ export class GeoService {
result.push({
id: city.id,
city: city.name,
state: state.name,
state_code: state.state_code,
state: state.state_code,
//state_code: state.state_code,
latitude: city.latitude,
longitude: city.longitude,
});
}
});
});
return state ? result.filter(e => e.state_code.toLowerCase() === state.toLowerCase()) : result;
return state ? result.filter(e => e.state.toLowerCase() === state.toLowerCase()) : result;
}
findCitiesAndStatesStartingWith(prefix: string, state?: string): Array<{ id: string; name: string; type: 'city' | 'state'; state_code: string }> {
const results: Array<{ id: string; name: string; type: 'city' | 'state'; state_code: string }> = [];
findCitiesAndStatesStartingWith(prefix: string, state?: string): Array<{ id: string; name: string; type: 'city' | 'state'; state: string }> {
const results: Array<{ id: string; name: string; type: 'city' | 'state'; state: string }> = [];
const lowercasePrefix = prefix.toLowerCase();
@@ -74,7 +76,7 @@ export class GeoService {
id: state.id.toString(),
name: state.name,
type: 'state',
state_code: state.state_code,
state: state.state_code,
});
}
@@ -85,7 +87,7 @@ export class GeoService {
id: city.id.toString(),
name: city.name,
type: 'city',
state_code: state.state_code,
state: state.state_code,
});
}
}