diff --git a/feedback.md b/feedback.md
new file mode 100644
index 0000000..3ba13f4
--- /dev/null
+++ b/feedback.md
@@ -0,0 +1,29 @@
+# Project 3 Feedback
+
+## Back-end Technology
+
+>**Progressing:** Lacking more than one model
+
+## Front-end Technology
+
+>**Performing:** Front-end makes appropriate use of Angular controllers and states with ui-router.
+
+## Code Quality
+
+>**Progressing:** Code lacks proper formatting, includes commented out, non-functional code, or otherwise contains major issues of quality (DRY, naming, etc)
+
+## Deployment and Functionality
+
+>**Excelling:** App has advanced functionality that works with minimal errors, and may make use of advanced tools such as APIs, plugins, etc. App may be deployed to a service other than Heroku (e.g. Digital Ocean).
+
+
+## Planning / Process / Submission
+
+>**Progressing:** App is submitted, with basic evidence of planning. Documentation exists, but lacks common areas such as setup instructions, description of application functionality and link to deployed application
+
+Overall, you guys built an awesome app and should be very proud of the work you did!
+I hope you continue to build on this, and work together to implement the rest of your desired features.
+
+Please review inline code comments prefixed with my initials `NHO:`:
+ - [API](https://github.com/AWhitleyGA/RentMapAPI/compare/master...nolds9:feedback)
+ - [Angular](https://github.com/KhoiLe89/RentMapApp/compare/master...nolds9:feedback)
diff --git a/index.html b/index.html
index 5240c61..be200f9 100644
--- a/index.html
+++ b/index.html
@@ -10,7 +10,8 @@
-
+
+ RentApp
diff --git a/js/app.js b/js/app.js
index 334381e..4b667e1 100644
--- a/js/app.js
+++ b/js/app.js
@@ -28,16 +28,20 @@ function FavoriteFactoryFunction($resource) {
return $resource("https://evening-woodland-89369.herokuapp.com/places/:zip.json")
}
+// NHO: reminder to remove unused / commented out code
// "https://evening-woodland-89369.herokuapp.com/places/:zip.json"
// "http://localhost:3000/places/:zip.json"
function HomeControllerFunction(){
-
+ // NHO: is this doing anything? if its just a static page you probably do not need a controller...
}
function MapControllerFunction(FavoriteFactory){
+ // NHO: this controller is really bloated, especially with a lot of third-party code
+ // is there any way to abstract this into different files?
+ // NHO: could also move your data fetching logic to a custom service
this.filters = []
this.activeFilters = {
restaurant: false,
@@ -47,11 +51,12 @@ function MapControllerFunction(FavoriteFactory){
bar: false,
}
this.renderFilters = () => {
- markersArray.forEach((marker) => {
- marker.setMap(null)
- })
+ markersArray.forEach((marker) => {
+ marker.setMap(null)
+ })
this.filters.forEach((filter) => {
var icon = 'null'
+ // NHO: could use an object to map name of filters to images to reduce this code!
switch(filter) {
case 'restaurant':
icon = 'dining.png'
@@ -68,7 +73,9 @@ function MapControllerFunction(FavoriteFactory){
case 'bar':
icon = 'bars.png'
break;
+ // NHO: might recommend setting a default for this switch statemet
}
+ // NHO: feel like we could move this code to map.js or some other utility file
console.log(icon)
var request = {
location: searchLocation,
@@ -99,6 +106,7 @@ function MapControllerFunction(FavoriteFactory){
google.maps.event.addListener(marker, 'click', function() {
service.getDetails(place, function(result, status) {
if (status !== google.maps.places.PlacesServiceStatus.OK) {
+ // NHO: might want to display to user some notification, like "No Results Found" etc...
console.error(status);
return;
}
@@ -120,12 +128,14 @@ function MapControllerFunction(FavoriteFactory){
console.log(this.activeFilters)
this.renderFilters()
}
+ // NHO: this works but would recommend doing this the "angular" way utilizing `ng-init`
$(document).ready(() =>{
initMap()
console.log('fire')
})
this.create = function(){
+ // NHO: where are areaName, state, ZIPVal, and rentVal defined?
this.favorite = new FavoriteFactory({name: areaName, state: state, zip: ZIPVal, rent: rentVal})
console.log(this.favorite)
this.favorite.$save()
@@ -137,11 +147,13 @@ function FavoritesControllerFunction(FavoriteFactory, $state){
// console.log(this.favorites)
this.delete = function(favorite){
+ // NHO: these console.logs are fine for during the development phase
+ // but would remove them during production / before you show code to potential employers
console.log(this.favorites)
console.log(favorite)
// this.favorites.$remove(favorite)
favorite.$remove({zip: favorite.zip}).then(function(){
- $state.reload();
+ $state.reload(); // NHO: nice!
})
}
diff --git a/js/map.js b/js/map.js
index 1a86761..b6e9251 100644
--- a/js/map.js
+++ b/js/map.js
@@ -66,6 +66,8 @@ function initMap() {
});
google.maps.event.addListener(layer, 'click', function(fEvent) {
+ // NHO: one idea might be to update the browser's location so that the user could share / deep link
+ // to a particular ZIP / see all associated data
ZIPVal = fEvent.row['ZIP'].value;
rentVal = fEvent.row['Rent'].value;
@@ -82,6 +84,7 @@ function initMap() {
console.log(ZIPVal, rentVal, lat, long, state, county, studioRent, oneBedRent, twoBedRent, threeBedRent)
+ // NHO: is there any way to pass this data to view with Angular?
$('.zip-code').text(ZIPVal)
$('.area-name').text(areaName)
$('.county-state-name').text(county+', '+state)
@@ -105,6 +108,8 @@ function initMap() {
function initAutocomplete() {
+ // NHO: reminder to remove commented out / unused code!
+
// var map = new google.maps.Map(document.getElementById('map'), {
// center: {lat: 38.9072, lng: -77.0369},
// zoom: 12,
@@ -154,6 +159,7 @@ function initMap() {
scaledSize: new google.maps.Size(25, 25),
};
+ // NHO: is there anyway to reusue the addMarker function defined in the mapController?
// Create a marker for each place.
markers.push(new google.maps.Marker({
map: map,
diff --git a/js/ng-views/favorites.html b/js/ng-views/favorites.html
index f75e7fa..bfeef72 100644
--- a/js/ng-views/favorites.html
+++ b/js/ng-views/favorites.html
@@ -12,9 +12,4 @@
Avg. Rent: ${{favorite.rent}}
-
-
-
-
-
diff --git a/js/places.js b/js/places.js
index c3407e5..eb0ba41 100644
--- a/js/places.js
+++ b/js/places.js
@@ -1,3 +1,5 @@
+// NHO: reminder to remove unused / commented out code
+
// // function performSearch(ZIPbound) {
// // var ZIPVal = ZIPbound.row['ZIP'].value;
// // var request = {