Skip to content

Commit

Permalink
Add banks in Ghana and refactor template highlighting (#9341)
Browse files Browse the repository at this point in the history
* Add banks in Ghana

* Refactor template highlighting in CategoryRow.jsx

* npm run appbuild

---------

Co-authored-by: arch0345 <archpdx@pm.me>
  • Loading branch information
sammyhawkrad and arch0345 authored Apr 22, 2024
1 parent e0b1b6e commit d045ea2
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 53 deletions.
31 changes: 3 additions & 28 deletions app/src/CategoryRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,35 +310,10 @@ relation[${k}=${v}][network:wikidata=${qid}]
if (item.fromTemplate) {
let url, text;

/* Brands */
if ((t=='brands') && (k=='amenity') && (v=='atm'))
{url = '/index.html?t=brands&amp;k=amenity&amp;v=bank'; text = '/brands/amenity/bank.json';}
if ((t=='brands') && (k=='man_made') && (v=='charge_point'))
{url = '/index.html?t=brands&amp;k=amenity&amp;v=charging_station'; text = '/brands/amenity/charging_station.json';}
url = `/index.html?t=${t}&amp;k=${k}&amp;v=${v}`;
text = `/${t}/${k}/${v}.json`;

/* Operators */
if ((t=='operators') && (k=='leisure') && (v=='nature_reserve'))
{url = '/index.html?t=operators&amp;k=leisure&amp;v=park'; text = '/operators/leisure/park.json';}

if ((t=='operators') && (k=='power') && ((v=='minor_line') || (v=='pole') || (v=='tower')))
{url = '/index.html?t=operators&amp;k=power&amp;v=line'; text = '/operators/power/line.json';}
if ((t=='operators') && (k=='power') && (v=='transformer'))
{url = '/index.html?t=operators&amp;k=power&amp;v=substation'; text = '/operators/power/substation.json';}

if ((t=='operators') && (k=='pipeline') && (v=='substation'))
{url = '/index.html?t=operators&amp;k=man_made&amp;v=pipeline'; text = 'operators/man_made/pipeline.json';}

if ((t=='operators') && (k=='man_made') && ((v=='water_tower') || (v=='water_works')))
{url = '/index.html?t=operators&amp;k=office&amp;v=water_utility'; text = '/operators/office/water_utility.json';}

/* Transit */
if ((t=='transit') && (k=='highway') && (v=='bus_stop'))
{url = '/index.html?t=transit&amp;k=route&amp;v=bus'; text = '/transit/route/bus.json';}

if ((t=='transit') && (k=='amenity') && (v=='ferry_terminal'))
{url = '/index.html?t=transit&amp;k=route&amp;v=ferry'; text = '/transit/route/ferry.json';}

if ((t=='operators') && (k=='amenity') && (v=='post_box')) {
if (v=='post_box') {
/* Post Boxes use multiple templates */
result += '<strong>Master templates:</strong><br/>';
result += '<a href="/index.html?t=brands&amp;k=amenity&amp;v=post_office">/brands/amenity/post_office.json</a><br/>';
Expand Down
70 changes: 70 additions & 0 deletions data/brands/amenity/bank.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@
"name": "ABSA"
}
},
{
"displayName": "Absa (Ghana)",
"id": "absa-9d35ea",
"locationSet": {"include": ["gh"]},
"tags": {
"amenity": "bank",
"brand": "Absa",
"brand:wikidata": "Q58641733",
"name": "Absa",
"operator": "Absa Bank Ghana Limited",
"operator:type": "public",
"operator:wikidata": "Q96371413"
}
},
{
"displayName": "ACBA",
"id": "acba-9c44ae",
Expand Down Expand Up @@ -4247,6 +4261,20 @@
"name": "CajaSur"
}
},
{
"displayName": "CalBank",
"id": "calbank-9d35ea",
"locationSet": {"include": ["gh"]},
"tags": {
"amenity": "bank",
"brand": "CalBank",
"brand:wikidata": "Q4035559",
"name": "CalBank",
"operator": "CalBank PLC",
"operator:type": "public",
"operator:wikidata": "Q4035559"
}
},
{
"displayName": "California Coast Credit Union",
"id": "californiacoastcreditunion-cf92b8",
Expand Down Expand Up @@ -5597,6 +5625,20 @@
"name": "Ecobank"
}
},
{
"displayName": "Ecobank (Ghana)",
"id": "ecobank-9d35ea",
"locationSet": {"include": ["gh"]},
"tags": {
"amenity": "bank",
"brand": "Ecobank",
"brand:wikidata": "Q930225",
"name": "Ecobank",
"operator": "Ecobank Ghana PLC",
"operator:type": "public",
"operator:wikidata": "Q5333155"
}
},
{
"displayName": "Emirates NBD",
"id": "emiratesnbd-d9ce9c",
Expand Down Expand Up @@ -6268,6 +6310,20 @@
"name": "First Midwest Bank"
}
},
{
"displayName": "First National Bank (Ghana)",
"id": "firstnationalbank-9d35ea",
"locationSet": {"include": ["gh"]},
"tags": {
"amenity": "bank",
"brand": "First National Bank (FNB)",
"brand:wikidata": "Q3072956",
"name": "First National Bank",
"operator": "First National Bank Ghana",
"operator:type": "public",
"operator:wikidata": "Q96377981"
}
},
{
"displayName": "First National Bank (US)",
"id": "firstnationalbank-fdc31a",
Expand Down Expand Up @@ -10953,6 +11009,20 @@
"name": "Standard Chartered"
}
},
{
"displayName": "Standard Chartered (Ghana)",
"id": "standardchartered-9d35ea",
"locationSet": {"include": ["gh"]},
"tags": {
"amenity": "bank",
"brand": "Standard Chartered",
"brand:wikidata": "Q548278",
"name": "Standard Chartered",
"operator": "Standard Chartered Ghana",
"operator:type": "public",
"operator:wikidata": "Q7598195"
}
},
{
"displayName": "State Bank of India",
"id": "statebankofindia-f20878",
Expand Down
Loading

0 comments on commit d045ea2

Please sign in to comment.