Skip to content

Commit

Permalink
User a predefined list from Bonza for origin countries
Browse files Browse the repository at this point in the history
  • Loading branch information
shintre committed Jul 18, 2024
1 parent 85a7c8a commit 40c48b9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const wildcardMatch = require('./utils/wildcardMatch');
const { translateProduct } = require('./resolvers/product');
const { translateAvailability } = require('./resolvers/availability');
const { translateBooking } = require('./resolvers/booking');
const ORIGIN_COUNTRIES =
`Australia,New Zealand,United Kingdom,U.S. United States,------------------,Albania,Algeria,American Samoa,Andorra,Angola,Anguilla,Antarctica,Antigua And Barbuda,Argentina,Armenia,Aruba,Austria,Azerbaijan,Bahamas,Bahrain,Bangladesh,Barbados,Belarus,Belgium,Belize,Benin,Bermuda,Bhutan,Bolivia,Bosnia and Herzegowina,Botswana,Bouvet Island,Brazil,Brunei Darussalam,Bulgaria,Burkina Faso,Burma,Burundi,Cambodia,Cameroon,Canada,Cape Verde,Cayman Islands,Central African Republic,Chad,Chile,Christmas Island,Cocos (Keeling) Islands,Colombia,Comoros,Congo,Cook Islands,Costa Rica,Cote dIvoire,Croatia,Cyprus,Czech Republic,Denmark,Djibouti,Dominica,Dominican Republic,East Timor,Ecuador,Egypt,El Salvador,England,Equatorial Guinea,Eritrea,Espana,Estonia,Ethiopia,Falkland Islands,Faroe Islands,Fiji,Finland,France,French Guiana,French Polynesia,Gabon,Gambia,Georgia,Germany,Ghana,Gibraltar,Great Britain,Greece,Greenland,Grenada,Guadeloupe,Guam,Guatemala,Guinea,Guinea-Bissau,Guyana,Haiti,Honduras,Hong Kong,Hungary,Iceland,India,Indonesia,Ireland,Israel,Italy,Jamaica,Japan,Jordan,Kazakhstan,Kenya,Kiribati,Korea (South),Korea - Republic of,Kuwait,Kyrgyzstan,Latvia,Lebanon,Lesotho,Liberia,Liechtenstein,Lithuania,Luxembourg,Macau,Macedonia,Madagascar,Malawi,Malaysia,Maldives,Mali,Malta,Marshall Islands,Martinique,Mauritania,Mauritius,Mayotte,Mexico,Moldova - Republic of,Monaco,Mongolia,Montserrat,Morocco,Mozambique,Myanmar,Namibia,Nauru,Nepal,Netherlands,Netherlands Antilles,New Caledonia,Nicaragua,Niger,Nigeria,Niue,Norfolk Island,Northern Ireland,Northern Mariana Islands,Norway,Oman,Pakistan,Palau,Panama,Papua New Guinea,Paraguay,Peru,Philippines,Pitcairn,Poland,Portugal,Puerto Rico,Qatar,Reunion,Romania,Russia,Russian Federation,Rwanda,Saint Kitts and Nevis,Saint Lucia,Samoa (Independent),San Marino,Sao Tome and Principe,Saudi Arabia,Scotland,Senegal,Seychelles,Sierra Leone,Singapore,Slovakia,Slovenia,Solomon Islands,Somalia,South Africa,South Korea,Spain,Sri Lanka,St. Helena,St. Pierre and Miquelon,Suriname,Swaziland,Sweden,Switzerland,Taiwan,Tajikistan,Tanzania,Thailand,Togo,Tokelau,Tonga,Trinidad,Triniad and Tobago,Tunisia,Turkey,Turkmenistan,Tuvalu,Uganda,Ukraine,United Arab Emirates,Uruguay,Uzbekistan,Vanuatu,Venezuela,Viet Nam,Virgin Islands (British),Virgin Islands (U.S.),Wales,Western Sahara,Yemen,Zambia,Zimbabwe`.
split(`,`,)
const CUSTOM_FIELD_IDS = {
EBIKE_COUNT: 1,
BABYSEATS_COUNT: 2,
Expand Down Expand Up @@ -897,7 +900,15 @@ class Plugin {
let customFieldsToShow = [];
// The custom field's type. Supported types: yes-no, short, long, count, and extended-option.

addCustomField(CUSTOM_FIELD_IDS.ORIGINCOUNTRY, "Entry Origin Country", "Enter the traveler's country of origin", "short");
customFieldsToShow.push ({
id: CUSTOM_FIELD_IDS.ORIGINCOUNTRY,
title: "Entry Origin Country",
subtitle: "Enter the traveler's country of origin",
type: "extended-option",
isPerUnitItem: false,
options: ORIGIN_COUNTRIES,
})

addCustomField(CUSTOM_FIELD_IDS.TRAVELAGENCY, "Entry Travel Agency", "Enter the travel agency name", "short");
addCustomField(CUSTOM_FIELD_IDS.FAMILS, "Is it famils booking?", "Entry whether this is a famil booking", "yes-no");

Expand Down

0 comments on commit 40c48b9

Please sign in to comment.