NYCPlanning / labs-community-profiles

A site for exploring indicators, data, and information for NYC community districts
https://communityprofiles.planning.nyc.gov/
Other
52 stars 9 forks source link

Bug 10510 resource reference maps links broken related fix #672

Closed horatiorosa closed 2 years ago

horatiorosa commented 2 years ago

This PR

Bug related to PR#671, this is a fix for the NYC Community Districts Health Profile Link. Update boroAcronymLowerCase to use 2 character boro abbreviations object.

# districts.js lines 55-61
healthProfileLink: computed('boro', function() {
    const boroAcronymLowerCase = this.get('boroAcronymLowerCase');
    let cd = this.get('cd');
    if (boroAcronymLowerCase === 'si' || boroAcronymLowerCase === 'qn') {
      cd = numeral(cd).format('00');
    }
    return `https://www1.nyc.gov/assets/doh/downloads/pdf/data/2015chp-${boroAcronymLowerCase}${cd}.pdf`;

# profiles.hbs
<a href="{{model.healthProfileLink}}">{{fa-icon "file-pdf-o"}} <strong>{{model.boro}} Community District {{model.cd}} Health Profile</strong></a>

Closes

AB#10510

netlify[bot] commented 2 years ago

Deploy Preview for labs-communityprofiles ready!

Name Link
Latest commit 44cad830d317e71dcd3b37741d0c791d0a54a174
Latest deploy log https://app.netlify.com/sites/labs-communityprofiles/deploys/631a441b4fa317000874fbbc
Deploy Preview https://deploy-preview-672--labs-communityprofiles.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.