Component: Location data
Introduction
The Location data is present in all projects from small to large projects. Because it is master data for the project. Obviously, the Casewhere system is no exception. We have also been using Location data such as country, city... Developing the Location data component for each new project in Casewhere is very time-consuming. And, it's inefficient to implement the Location data component every time. It takes a lot of project resources. Therefore, we have provided the Location data component package which is easy to import to new projects to save time and cost.
Features
Administration interfaces for managing the following:
- Country
- Region
- Municipality
- City
Import/export: To export the data from an environment, e.g., DEV, and import it to another, e.g., PROD.
Friendly configuration page with many applicable settings. There you can also generate default data for your application.
Manage country
The component provides two pages to manage and set up the country.
Settings
The settings page is used to settings for the country where is the place the user can generate the default country data by clicking the Init button. All the default countries are in a JSON file which is stored on the back end site. If you click the Init button twice the system will clear all the existing countries and re-generate the new data. Hence, you must consider when using the initialization data feature.
To initialize data in the settings page, click on the Init button
After that, the confirm dialog of the Settings will be opened with two options Yes/No.
All default countries will be listed in the JSON file. You can modify their values based on your needs.
Country list
Country list page is used to manage the country data. On the Country list page, you can view all the created countries, also add, edit, delete, import, export the country data.
The following information must be provided when creating/editing a country:
- Country name: The name of the country. This field is required and unique.
- Prefix phone number: This field is used to input the pre-fix phone number of the country. This field is optional.
- Order number: This field defines the priority of the country you want to show. This field is optional.
- Continent: This field is used to input the continent of the country. This field is optional.
- Capital: This field is used to input the capital of the country. This field is optional.
- Internet domain: This field is used to input the internet domain of the country. This field is optional.
- Description: This field is used to describe the information of the country. This field is optional.
- Is active: This field is the status of the country. The default value is Active.
Delete a country:
To delete a country, click on the Delete button. Then, a confirmation dialog will be displayed. If you select the Yes button, the country will be deleted immediately. If you select the No button, the deletion will be canceled.
- Note: If the country is in use in the system. It may cause an error in the UI.
Import the country data:
To import the country data, click on the Import button to open the Import Country dialog. All the country data that exists in the destination environment will be overridden. (Detected by country name)
Export the country data:
To export 1 or several countries in the list, select the country, then click on the Export button. Then, the JSON file of the selected countries will be downloaded immediately.
Manage region
The component provides two pages to manage and set up the region.
Settings
The settings page is used to settings for the region where is the place the user can generate the default region data by clicking the Init button. All the default regions are in a JSON file which is stored on the back end site. If you click the Init button twice the system will clear all the existing regions and re-generate the new data. Leads to it will break the relationship between region and city, municipality. Therefore, you must consider when using the initialization data feature.
To initialize data in the settings page, click on the Init button
After that, the confirm dialog of the Settings will be opened with two options Cancel/Ok.
All default regions will be listed in the JSON file. You can modify their values based on your needs.
Region list
Region list page is used to manage the region data. On the Region list page, you can view all the created regions, also add, edit, delete, import, export the region data.
The following information must be provided when creating/editing a region:
- Region code: The code of the region. This field is required and unique.
- Region name: The name of the region. This field is required and unique.
- Country: The dropdown of the country. It loads data from the country list in the system. This field is optional.
- Order number: This field defines the priority of the region you want to show. This field is optional.
- Short name: The short name of the region. This field is optional.
- Bbox: This field returns the bounding rectangle of the geometry of the region. This field is optional.
- Description: This field is used to describe the information of the region. This field is optional.
- Is active: This field is the status of the region. The default value is Active.
Delete a region:
To delete a region, click on the Delete button. Then, a confirmation dialog will be displayed. If you select the Yes button, the region will be deleted immediately. If you select the No button, the deletion will be canceled.
- Note: If the region is in use in the system. It may cause an error in the UI.
Import the region data:
To import the region data, click on the Import button to open the Import Region dialog. All the region data that exists in the destination environment will be overridden. (Detected by region code)
Export the region data:
To export 1 or several regions in the list, select the region, then click on the Export button. Then, the JSON file of the selected regions will be downloaded immediately.
Manage municipality
The component provides two pages to manage and set up the municipality.
Settings
The settings page is used to settings for the municipality where is the place the user can generate the default municipality data by clicking the Init button. All the default municipalities are in a JSON file which is stored on the back end site. If you click the Init button twice the system will clear all the existing municipalities and re-generate the new data. Therefore, you must consider when using the initialization data feature.
To initialize data in the settings page, click on Init button
After that, the confirm dialog of the Settings will be opened with two options Yes/No.
All default municipalities will be listed in the JSON file. You can modify their values based on your needs.
Municipality list
Municipality list page is used to manage the municipality data. On the Municipality list page, you can view all the created municipalities, also add, edit, delete, import, export the municipality data.
The following information must be provided when creating/editing a municipality:
- Municipality code: The code of the municipality. This field is required and unique.
- Municipality name: The name of the municipality. This field is required and unique.
- Country: The dropdown of the country. It loads data from the country list in the system. This field is optional.
- Region: The dropdown of the region. It loads data from the region list in the system. It is an area to which the municipality belongs. This field is optional.
- Order number: This field defines the priority of the municipality you want to show. This field is optional.
- Bbox: This field returns the bounding rectangle of the geometry of the region. This field is optional.
- Description: This field is used to describe the information of the municipality. This field is optional.
- Is active: This field is the status of the municipality. The default value is Active.
Delete a municipality:
To delete a municipality, click on the Delete button. Then, a confirmation dialog will be displayed. If you select the Yes button, the municipality will be deleted immediately. If you select the No button, the deletion will be canceled.
- Note: If the municipality is in use in the system. It may cause an error in the UI.
Import the municipality data:
To import the municipality data, click on the Import button to open the Import Municipality dialog. All the municipality data that exists in the destination environment will be overridden. (Detected by municipality code)
Export the municipality data:
To export 1 or several municipalities in the list, select the municipality, then click on the Export button. Then, the JSON file of the selected municipalities will be downloaded immediately.
Manage city
The component provides two pages to manage and set up the city.
Settings
The settings page is used to settings for the city where is the place the user can generate the default city data by clicking the Init button. All the default cities are in a JSON file which is stored on the back end site. If you click the Init button twice the system will clear all the existing cities and re-generate the new data. Therefore, you must consider when using the initialization data feature.
To initialize data in the settings page, click on Init button
After that, the confirm dialog of the Settings will be opened with two options Cancel/Ok.
All default cities will be listed in the JSON file. You can modify their values based on your needs.
City list
City list page is used to manage the city data. On the City list page, you can view all the created cities, also add, edit, delete, import, export the city data.
The following information must be provided when creating/editing a city:
- City: The name of the city. This field is required and unique.
- Zip code: The postal code of the city. It is a series of numbers that communicates information about people within different geographic groupings. This field is optional.
- Country: The dropdown of the country. It loads data from the country list in the system. This field is optional.
- Region: The dropdown of the region. It loads data from the region list in the system. It is an area to which the city belongs. This field is optional.
- Order number: This field defines the priority of the city you want to show. This field is optional.
- Description: This field is used to describe the information of the city. This field is optional.
- Is active: This field is the status of the city. The default value is Active.
Delete a city:
To delete a city, click on the Delete button. Then, a confirmation dialog will be displayed. If you select the Yes button, the city will be deleted immediately. If you select the No button, the deletion will be canceled.
- Note: If the city is in use in the system. It may cause an error in the UI.
Import the city data:
To import the city data, click on the Import button to open the Import City dialog. All the city data that exists in the destination environment will be overridden. (Detected by city name)
Export the city data:
To export 1 or several cities in the list, select the city, then click on the Export button. Then, the JSON file of the selected cities will be downloaded immediately.
Installation
Requirements
- Casewhere 2.6.10 or later
Configuration
- Import the product
- Link the page to your worker sites and configure access control
- You can generate default data in the component's configuration page
Dependencies
- None
Releases
1.1.0 - 11/07/2022
Changelog
- Administration interfaces for managing regions, municipalities, cities.
- Import/export
- Initialization data
Download (login required): Location Data v1.1.0
Roadmap
- Integration ISO code