Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

354 file label of none not showing for the location search #358

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FMS.Infrastructure/DbScripts/GetNearbyFacilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ INNER JOIN [dbo].[FacilityStatuses] as b
ON a.FacilityStatusId = b.Id
INNER JOIN [dbo].[FacilityTypes] as c
ON a.FacilityTypeId = c.Id
INNER JOIN [dbo].[Files] as d
LEFT JOIN [dbo].[Files] as d
ON a.FileId = d.Id
where (a.Active = 1 AND ( @FacilityTypeId IS NULL OR a.FacilityTypeId = @FacilityTypeId ))
or @Active = 0
Expand Down
2 changes: 1 addition & 1 deletion FMS/Platform/DevHelpers/SeedData/FacilitySeedData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ private static IEnumerable<Facility> GetFacilities()
Id = Guid.NewGuid(),
Active = true,
FacilityNumber = "RN4979",
FileId = new Guid("EF5FB128-D3BF-4CFF-9931-9F114D25D8A1"),
FileId = null,
FacilityTypeId = new Guid("B7224976-5D67-40F8-8112-273AE3B91419"),
OrganizationalUnitId = new Guid("3FF12EE9-7295-45F9-A12D-766BCFB6AADC"),
BudgetCodeId = new Guid("5B4D0049-3AA3-4FC7-A8FE-59A771D0F7F8"),
Expand Down
12 changes: 10 additions & 2 deletions FMS/wwwroot/js/mapSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,18 @@ $(document).ready(function mapSearch() {
zip = ""
}
const hyplink = "./Details/" + data.id;
const hyplink2 = "../Files/Details/" + data.fileLabel;
var hyplink2;
var fileLabel;
if (data.fileLabel === null) {
hyplink2 = hyplink;
fileLabel = "No File Label. Facility Details";
} else {
hyplink2 = "../Files/Details/" + data.fileLabel;
fileLabel = data.fileLabel;
}
// This defines the contents of the InfoWindow that pops up when a marker is clicked on.
google.maps.event.addListener(marker, "spider_click", function () {
infowindow.setContent('<div style="font-family: arial, helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #00F;"><b><a target="_blank" href= ' + '' + hyplink + "" + '>' + data.name + '</a></b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #808080;"><b>' + data.address + '</b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #808080;"><b>' + data.city + ', GA ' + zip + '</b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #00F;"><b><a target="_blank" href= ' + '' + hyplink2 + "" + '> FILE ID: ' + data.fileLabel + '</a></b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #808080;"><b>STATUS: ' + data.facilityStatus + '</b></div>');
infowindow.setContent('<div style="font-family: arial, helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #00F;"><b><a target="_blank" href= ' + '' + hyplink + "" + '>' + data.name + '</a></b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #808080;"><b>' + data.address + '</b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #808080;"><b>' + data.city + ', GA ' + zip + '</b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #00F;"><b><a target="_blank" href= ' + '' + hyplink2 + "" + '> FILE ID: ' + fileLabel + '</a></b></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #808080;"><b>STATUS: ' + data.facilityStatus + '</b></div>');
infowindow.open(map, marker);
});
// This adds listener to say, if the marker is "Spiderfiable" then Use the image with the "+" plus sign.
Expand Down
Loading