From 38ad08a1014a0be18416d954bba71f5ff4e7b67d Mon Sep 17 00:00:00 2001 From: cauterize Date: Fri, 26 Aug 2022 20:18:09 +0200 Subject: [PATCH] :rotating_light: fix lint warning --- src/components/Widgets/PublicHolidays.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/Widgets/PublicHolidays.vue b/src/components/Widgets/PublicHolidays.vue index 0cd990ed..4ff00cc8 100644 --- a/src/components/Widgets/PublicHolidays.vue +++ b/src/components/Widgets/PublicHolidays.vue @@ -54,11 +54,17 @@ export default { const then = new Date((now.setMonth(now.getMonth() + this.monthsToShow))); return `${then.getDate()}-${then.getMonth() + 1}-${then.getFullYear()}`; }, + region() { + if (this.options?.state) { + return `®ion=${this.options.state}`; + } + return ''; + }, endpoint() { - return `${widgetApiEndpoints.holidays}` + return `${`${widgetApiEndpoints.holidays}` + `&fromDate=${this.startDate}&toDate=${this.endDate}` - + `&country=${this.country}&holidayType=${this.holidayType}` - + `${this.options?.state ? `®ion=${this.options.state}` : ''}`; + + `&country=${this.country}&holidayType=${this.holidayType}`}${ + this.region}`; }, }, methods: {