bcgov / nr-bcws-wfnews

Primary code repository for WFNEWS 2.0
Apache License 2.0
5 stars 15 forks source link

wfmews-2425. handle url share between mobile and desktop #2091

Closed yzlucas closed 5 days ago

yzlucas commented 5 days ago

https://apps.nrs.gov.bc.ca/int/jira/browse/WFNEWS-2425 Add URL query parameter transformation logic for mobile and desktop routes. Handle query parameter transformations, purpose of these is because or mobile detail page for evac, area-restrictions, bans, dang rating are different as desktop detail page and uses different parameters. Eventually we might want to align them but it way too out of scope of WFNEWS-2425 and WFNEWS-2423

ie: desktop area-restriction detail page is: /events?eventType=area-restriction&eventNumber=2&eventName=C55175%20Area%20Restriction but mobile area-restriction detail page is :/full-details?type=area-restriction&id=2&source=list&name=C55175%20Area%20Restriction

yzlucas commented 5 days ago

Some changes around keeping the code DRY

@sukhpalp Done, also created constanst for Type and EventType to make the code clean and esay to maintain