Province Codes
Province codes refer to the three-letter or two-letter shortcodes abbreviation for a province. For example Region 5 Bicol has:
Province | Code |
---|---|
Albay | ALB |
Camarines Norte | CN |
Camarines Sur | CS |
Catanduanes | CAT |
Masbate | MAS |
Sorsogon | SOR |
Default Values
The seeder scripts assigns the first three letter of a provice for its short code during the Installation - Seed default data step.
Update the Default Values
These steps are optional if there is a need to change the default-generated province shortcodes. Follow the steps to update the provinces' default three-letter short code.
đź’ˇ
These steps require a successful run of the Initialization steps before proceeding.
Edit the codes JSON file
Open the /server/src/scripts/uploaders/province_codes/data.json
file.
- data.json
- Replace the JSON keys with new
"province names"
matching those entered in the server.env
file. - Replace the
"code"
JSON key values with new two or three-letter province shortcodes. - Update the
"full"
JSON key values with new"province names."
Upload the new province shortcodes
- Navigate to the server directory using a terminal.
- Run this command switching between the development and production
.env
files.
npm run upload:province_codes