Remove default
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
let year = new Date().getFullYear();
|
let year = new Date().getFullYear();
|
||||||
let months = Array.from({ length: 12 }, (_, i) => i);
|
let months = Array.from({ length: 12 }, (_, i) => i);
|
||||||
let selectedCountry = 'Belgium';
|
let selectedCountry = '';
|
||||||
let holidays = [];
|
let holidays = [];
|
||||||
let daysOff = ptoData['BE'];
|
let daysOff = 0;
|
||||||
let optimizedDaysOff = [];
|
let optimizedDaysOff = [];
|
||||||
let consecutiveDaysOff = [];
|
let consecutiveDaysOff = [];
|
||||||
let placeholder = "Country";
|
let placeholder = "Country";
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
const text = await response.text();
|
const text = await response.text();
|
||||||
const countryCodeMatch = text.match(/cf-ipcountry=(\w+)/);
|
const countryCodeMatch = text.match(/cf-ipcountry=(\w+)/);
|
||||||
const countryCode = countryCodeMatch ? countryCodeMatch[1] : 'BE';
|
const countryCode = countryCodeMatch ? countryCodeMatch[1] : 'BE';
|
||||||
selectedCountry = countriesList[countryCode] || 'Belgium';
|
selectedCountry = countriesList[countryCode] || '';
|
||||||
daysOff = ptoData[countryCode] || ptoData['BE'];
|
daysOff = ptoData[countryCode] || 0;
|
||||||
updateHolidays();
|
updateHolidays();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching country code:', error);
|
console.error('Error fetching country code:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user