Purpose
Open Administration → Countries & Cities Directory (/geo-catalog). This catalog maintains the country → region/state → city hierarchy. Its records are used in student, employee and educational institution addresses, and countries are also used for student citizenship.
The page contains three linked tables. Selecting a country opens its regions. Selecting a region opens its cities. Selecting another country clears the previous region selection.
Add a country
Use the create action in the first table.
| Field | Example | Rule |
|---|---|---|
| Name | Армения / Armenia / Հայաստան | Translated name, up to 255 characters per language; at least one translation is required |
| Code | AM | Required unique string, up to 10 characters |
| Phone code | +374 | Optional string, up to 20 characters |
Save the record. New countries are created with an enabled status. If a country already exists, find and edit it. The code must be unique, while the telephone code is stored as a string.
Add a region and city
- Find the country by name and select its row.
- In the regions table, click Add, enter the name, such as Котайк / Kotayk / Կոտայք, and save. The country ID comes from the current selection.
- Select the new region and add a city, such as Абовян / Abovyan / Աբովյան. The region is assigned from the current selection.
- Select another country, then return. Check that the region and city appear under their intended parents.
- When entering an address, choose the same country, region and city from the corresponding selectors.
Region and city forms contain translated names. Every record requires an existing parent. These dialogs do not provide a parent-change field. Editing names preserves stored translations in other languages.
Search and verification
Each table supports search. Regions are selected within the chosen country and cities within the chosen region. If a record is missing, select the correct parent and clear the search.
Editing a record's name preserves its ID, so existing address references remain connected to it. Creating a duplicate name does not move existing references to the new ID.
Deletion and related data
The delete action first checks record usage. The result determines which confirmation is available.
| Condition | Behavior |
|---|---|
| Country has regions or region has cities | Deletion is blocked and the dialog can only be closed |
| No children or external references | Confirmation deletes the record permanently |
| No children, but external references exist | The dialog warns about permanent deletion; forced deletion clears the corresponding external fields |
External references include student, employee and institutional addresses and, for countries, both student citizenship fields. Forced deletion clears references to the selected record and deletes it. Student and employee records remain, with affected fields empty. The server checks for child records again before deletion.
For example, forcing deletion of a city used in two student addresses clears the city in those addresses. Correct spelling by editing the existing name. There is no deleted-items list for this catalog.
Permissions and scopes
The geo-catalog module declares no faculty, department or profession scopes. Each section has its own permission group. Region selection requires country access and region read permission; city selection additionally requires city read permission.
| Action | API permission names per entity |
|---|---|
| List | geo-catalog.countries.index, geo-catalog.regions.index, geo-catalog.cities.index |
| Create | geo-catalog.{countries,regions,cities}.store |
| Edit | geo-catalog.{countries,regions,cities}.update |
| Delete | geo-catalog.{countries,regions,cities}.destroy |
| Check usage | geo-catalog.{countries,regions,cities}.usage |
| Force delete | geo-catalog.{countries,regions,cities}.force |
Braces represent three separate permission names. Interface permission groups use the prefixes GeoCountry*, GeoRegion* and GeoCity*, with TablePull, CreateAction, EditAction and DeleteAction suffixes. Usage checking and forced deletion have their own server routes. Verify their permissions separately when configuring deletion access.
Troubleshooting
- Region or city table is empty. Select its parent row and check read access to the child list.
- A country cannot be saved. Verify code uniqueness and the required name.
- Deletion is blocked. Check child records. Review related addresses and citizenship before confirming permanent deletion.
- A city is missing from an address selector. Verify the country, region and translated name, then reopen the address form.