diff --git a/packages/bcer-api/app/src/notification/textService.ts b/packages/bcer-api/app/src/notification/textService.ts index 4ee63db8..30dd80d6 100644 --- a/packages/bcer-api/app/src/notification/textService.ts +++ b/packages/bcer-api/app/src/notification/textService.ts @@ -36,6 +36,9 @@ export class TextService { reference: this.reference, }, ); + + Logger.log(`Status: ${response.status} ${response.status}`) + Logger.log(`ConfigData: ${response.config.data}`) } async sendMessage( diff --git a/packages/bcer-data-portal/app/src/hooks/useLeaflet.tsx b/packages/bcer-data-portal/app/src/hooks/useLeaflet.tsx index e2f27ebc..1131bea2 100644 --- a/packages/bcer-data-portal/app/src/hooks/useLeaflet.tsx +++ b/packages/bcer-data-portal/app/src/hooks/useLeaflet.tsx @@ -19,6 +19,7 @@ import { useAxiosPost } from './axios'; import sanitizeHtml from 'sanitize-html'; import iconShadow from 'leaflet/dist/images/marker-shadow.png'; import { useHistory } from 'react-router'; +import moment from 'moment'; // Map layer for Health Authority Boundaries const haLayer = createHealthAuthorityLayer(); @@ -370,9 +371,21 @@ function useLeaflet(locationIds: string, config: LocationConfig) { shadowSize: [41, 41] }); + var blueIcon = new L.Icon({ + iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-blue.png', + shadowUrl: iconShadow, + iconSize: [25, 41], + iconAnchor: [12, 41], + popupAnchor: [1, -34], + shadowSize: [41, 41] + }); + let hasMissingReport = Object.values(l.reportStatus).includes("missing"); + const isLocationCreatedLessThanThreeMonthAgo = moment().diff(l.created_at, "days") < 90; - if (hasMissingReport) + if (isLocationCreatedLessThanThreeMonthAgo) { + mkr.setIcon(blueIcon) + } else if (hasMissingReport) mkr.setIcon(redIcon) else mkr.setIcon(greenIcon)