Skip to content

Commit 39fbedf

Browse files
committed
Add shelter features
1 parent 0d16436 commit 39fbedf

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

client/src/app/_services/shelters.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,4 @@ export class SheltersService {
8080
}
8181
);
8282
}
83-
}
84-
https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=AIzaSyDoaA5lB4-JbSXElDWllnNU3QcArgxdreM&location=19.1334302,72.91326789999994&radius=5000&type=gas_station
83+
}

client/src/app/shelters/shelter-info/shelter-info.component.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<p class="subtitle">
1414
{{ shelter.contact }}
1515
</p>
16+
<p class="has-text-weight-bold has-text-grey">Updated on {{shelter.lastUpdated | date: 'mediumDate'}} | {{shelter.lastUpdated | date: 'shortTime'}}</p>
17+
1618
</div>
1719
<div class="column is-4">
1820
<div class="content">
@@ -24,6 +26,17 @@
2426
<br><br>
2527
</div>
2628
</div>
29+
<div class="column is-4">
30+
<p class="has-text-weight-bold">Features:</p>
31+
<ul>
32+
<li *ngIf="shelter.propertyType === '0'">Public Property</li>
33+
<li *ngIf="shelter.propertyType === '1'">Private Property</li>
34+
<li *ngIf="shelter.infantFriendly === '1'">Infant Friendly</li>
35+
<li *ngIf="shelter.elderFriendly === '1'">Elder Friendly</li>
36+
<li *ngIf="shelter.family === '1'">Family Place</li>
37+
<li *ngIf="shelter.family === '1'">Age group - {{shelter.familyAgeMin}} to {{shelter.familyAgeMax}}</li>
38+
</ul>
39+
</div>
2740
</div>
2841
<div class="columns has-text-centered">
2942
<div class="column">

client/src/app/shelters/shelter-info/shelter-info.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ export class ShelterInfoComponent implements OnInit {
5454
dist = Math.acos(dist);
5555
dist = dist * 180 / Math.PI;
5656
dist = dist * 60 * 1.1515;
57-
if (unit == "K") { dist = dist * 1.609344 }
58-
if (unit == "N") { dist = dist * 0.8684 }
57+
if (unit === "K") { dist = dist * 1.609344 }
5958
return dist.toFixed(2);
6059
}
6160
}

0 commit comments

Comments
 (0)