diff --git a/app/components/list-filter.js b/app/components/list-filter.js index bd2206da1..4579b4ccd 100644 --- a/app/components/list-filter.js +++ b/app/components/list-filter.js @@ -6,15 +6,13 @@ export default Component.extend({ init() { this._super(...arguments); - this.get('filter')('').then((allResults) => this.set('results', allResults.results)); + this.filter('').then((allResults) => this.set('results', allResults.results)); }, actions: { handleFilterEntry() { - let filterInputValue = this.get('value'); - let filterAction = this.get('filter'); - filterAction(filterInputValue).then((resultsObj) => { - if (resultsObj.query === this.get('value')) { + this.filter(this.value).then((resultsObj) => { + if (resultsObj.query === this.value) { this.set('results', resultsObj.results); } }); diff --git a/app/components/location-map.js b/app/components/location-map.js index 47692b362..934c912e2 100644 --- a/app/components/location-map.js +++ b/app/components/location-map.js @@ -6,8 +6,7 @@ export default Component.extend({ didInsertElement() { this._super(...arguments); - let location = this.get('location'); - let mapElement = this.get('maps').getMapElement(location); + let mapElement = this.maps.getMapElement(this.location); this.$('.map-container').append(mapElement); } }); diff --git a/app/controllers/rentals.js b/app/controllers/rentals.js index 663b00fdd..9349d525d 100644 --- a/app/controllers/rentals.js +++ b/app/controllers/rentals.js @@ -4,11 +4,11 @@ export default Controller.extend({ actions: { filterByCity(param) { if (param !== '') { - return this.get('store').query('rental', { city: param }).then((filteredResults) => { + return this.store.query('rental', { city: param }).then((filteredResults) => { return { query: param, results: filteredResults }; }); } else { - return this.get('store').findAll('rental').then((results) => { + return this.store.findAll('rental').then((results) => { return { query: param, results: results }; }); } diff --git a/app/routes/rentals/index.js b/app/routes/rentals/index.js index 2983a62c5..442ff6474 100644 --- a/app/routes/rentals/index.js +++ b/app/routes/rentals/index.js @@ -2,6 +2,6 @@ import Route from '@ember/routing/route'; export default Route.extend({ model() { - return this.get('store').findAll('rental'); + return this.store.findAll('rental'); } }); diff --git a/app/routes/rentals/show.js b/app/routes/rentals/show.js index 5803fce5d..2cd37eb9d 100644 --- a/app/routes/rentals/show.js +++ b/app/routes/rentals/show.js @@ -2,6 +2,6 @@ import Route from '@ember/routing/route'; export default Route.extend({ model(params) { - return this.get('store').findRecord('rental', params.rental_id); + return this.store.findRecord('rental', params.rental_id); } }); diff --git a/app/services/maps.js b/app/services/maps.js index 5164b2f6c..a82a70f48 100644 --- a/app/services/maps.js +++ b/app/services/maps.js @@ -6,10 +6,11 @@ import MapUtil from '../utils/google-maps'; export default Service.extend({ init() { this._super(...arguments); - if (!this.get('cachedMaps')) { + + if (!this.cachedMaps) { this.set('cachedMaps', EmberObject.create()); } - if (!this.get('mapUtil')) { + if (!this.mapUtil) { this.set('mapUtil', MapUtil.create()); } }, @@ -19,7 +20,7 @@ export default Service.extend({ let element = this.get(`cachedMaps.${camelizedLocation}`); if (!element) { element = this.createMapElement(); - this.get('mapUtil').createMap(element, location); + this.mapUtil.createMap(element, location); this.set(`cachedMaps.${camelizedLocation}`, element); } return element; diff --git a/app/utils/google-maps.js b/app/utils/google-maps.js index fd8e6c41f..e20ecff8f 100644 --- a/app/utils/google-maps.js +++ b/app/utils/google-maps.js @@ -15,7 +15,7 @@ export default EmberObject.extend({ }, pinLocation(location, map) { - this.get('geocoder').geocode({address: location}, (result, status) => { + this.geocoder.geocode({address: location}, (result, status) => { if (status === google.maps.GeocoderStatus.OK) { let coordinates = result[0].geometry.location; let position = { lat: coordinates.lat(), lng: coordinates.lng() }; diff --git a/package.json b/package.json index 2c14a56d9..125a66bd9 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-resolver": "^4.0.0", "ember-simple-google-maps": "^1.0.0", - "ember-source": "~3.0.0", + "ember-source": "~3.1.0-beta", "eslint-plugin-ember": "^5.0.0", "loader.js": "^4.2.3" }, diff --git a/yarn.lock b/yarn.lock index db027af24..56f028b1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2816,9 +2816,9 @@ ember-simple-google-maps@^1.0.0: dependencies: ember-cli-babel "^6.0.0" -ember-source@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.0.0.tgz#51811cae98d2ceec53bcfbaa876d02b2b5b2159f" +ember-source@~3.1.0-beta: + version "3.1.0-beta.5" + resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.1.0-beta.5.tgz#c6f66294c228bbff877fefa7a918aad5a1d0343d" dependencies: broccoli-funnel "^2.0.1" broccoli-merge-trees "^2.0.0" @@ -2831,8 +2831,8 @@ ember-source@~3.0.0: ember-cli-version-checker "^2.1.0" ember-router-generator "^1.2.3" inflection "^1.12.0" - jquery "^3.2.1" - resolve "^1.3.3" + jquery "^3.3.1" + resolve "^1.5.0" encodeurl@~1.0.1: version "1.0.2" @@ -4262,7 +4262,7 @@ istextorbinary@2.1.0: editions "^1.1.1" textextensions "1 || 2" -jquery@^3.2.1: +jquery@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"