From 91d8ad9545fa5ded5974c60d0f42017291ffffd3 Mon Sep 17 00:00:00 2001 From: soraefir Date: Wed, 2 Aug 2023 08:12:41 +0200 Subject: [PATCH] Added guest_house to hotels --- public/js/main.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 2a2c1ea..07181e0 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -27,7 +27,7 @@ Date.prototype.toJSONLocal = (function () { function toEncoded(string) { const codeUnits = Uint16Array.from( { length: string.length }, - (element, index) => string.charCodeAt(index) + (element, index) => string.charCodeAt(index), ); const charCodes = new Uint8Array(codeUnits.buffer); @@ -41,7 +41,7 @@ function toEncoded(string) { function toDecoded(string) { let binary = window.atob(string); const bytes = Uint8Array.from({ length: binary.length }, (element, index) => - binary.charCodeAt(index) + binary.charCodeAt(index), ); const charCodes = new Uint16Array(bytes.buffer); @@ -62,7 +62,7 @@ const query_flight = (q) => const is_restauration_type = (e) => ["restaurant", "cafe", "pub", "bar", "fast_food", "food_court"].indexOf( - e.type + e.type, ) != -1; const is_attraction_type = (e) => @@ -244,7 +244,7 @@ const app = new Vue({ if (!this.journey_data.main[this.journey_step_data.section].dateRange) return "?"; var date = new Date( - this.journey_data.main[this.journey_step_data.section].dateRange[0] + this.journey_data.main[this.journey_step_data.section].dateRange[0], ); date.setDate(date.getDate() + this.journey_step_data.day - 1); return this.format_date(date); @@ -289,9 +289,10 @@ const app = new Vue({ if (this.journey_data.main.length == 0) return ""; try { return `${this.format_date( - this.journey_data.main[0].dateRange[0] + this.journey_data.main[0].dateRange[0], )} - ${this.format_date( - this.journey_data.main[this.journey_data.main.length - 1].dateRange[1] + this.journey_data.main[this.journey_data.main.length - 1] + .dateRange[1], )}`; } catch { return "?"; @@ -404,7 +405,7 @@ const app = new Vue({ }, filter_selected: function (list, step) { return list.filter((e) => - step ? e.step == this.journey_step_data.day : e.step >= 0 + step ? e.step == this.journey_step_data.day : e.step >= 0, ); }, filter_unselected: function (list) { @@ -456,7 +457,8 @@ const app = new Vue({ this.querying.hotel = true; this.search_nominatim( q, - (r) => r.type == "hotel" || r.type == "hostel" + (r) => + r.type == "hotel" || r.type == "hostel" || r.type == "guest_house", ).then((r) => { this.querying.hotel = false; });