Province Codes

Province codes refer to the three-letter or two-letter shortcodes abbreviation for a province. For example Region 5 Bicol has:

ProvinceCode
AlbayALB
Camarines NorteCN
Camarines SurCS
CatanduanesCAT
MasbateMAS
SorsogonSOR

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
    1. Replace the JSON keys with new "province names" matching those entered in the server .env file.
    2. Replace the "code" JSON key values with new two or three-letter province shortcodes.
    3. Update the "full" JSON key values with new "province names."

    Upload the new province shortcodes

    1. Navigate to the server directory using a terminal.
    2. Run this command switching between the development and production .env files.
    npm run upload:province_codes