Skip to content

Commit

Permalink
Merge pull request #53 from CityOfPhiladelphia/main
Browse files Browse the repository at this point in the history
adds new category, for grayed-out mail in voting boxes for ones not active during special election
  • Loading branch information
ajrothwell authored Aug 22, 2024
2 parents e2c86fa + b4cb3dd commit 76c7164
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev_push_to_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: dev Push to S3
on:
push:
branches:
- main
- dev/gray-out-sites_x

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion src/components/ExpandCollapseContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
:item="item"
/>
<official-ballot-return-drop-box
v-if="section === 'Official mail-in ballot drop box'"
v-if="section === 'Official mail-in ballot drop box' || section === 'Mail-in ballot drop box (not open for special election)'"
:item="item"
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/data-sources/voting-sites-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ export default {
type: 'http-get',
dependent: 'none',
resettable: false,
url: 'https://phl.carto.com/api/v2/sql?q=select+*+from+voting_sites_staging',
url: 'https://phl.carto.com/api/v2/sql', //?q=select+*+from+voting_sites_staging',
options: {
// params: {
// q: "select * from voting_sites where temporary_closure = 'FALSE'",
// },
params: {
q: "select * from voting_sites_staging where temporary_closure = 'FALSE' order by site_type desc",
},
},
};
9 changes: 9 additions & 0 deletions src/general/legendControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ export default {
'font-size': '10px',
'background-color': '#4F6D0A',
},
'Mail-in ballot drop box (not open for special election)': {
'border-color': 'black',
'border-style': 'solid',
'border-weight': '0px',
'width': '15px',
'height': '15px',
'font-size': '10px',
'background-color': '#a1a1a1',
},
'Official mobile mail-in ballot return': {
'border-color': 'black',
'border-style': 'solid',
Expand Down
12 changes: 12 additions & 0 deletions src/i18n/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default {
'Election office': 'Election offices',
'Official mobile mail-in ballot return': 'Official mobile mail-in ballot return',
'Official mail-in ballot drop box': 'Official mail-in ballot dropboxes',
'Mail-in ballot drop box (not open for special election)': 'Mail-in ballot drop box (not open for special election)',
},
sections: {
'Election office': {
Expand Down Expand Up @@ -102,6 +103,17 @@ export default {
callout1: 'On Election Day, dropboxes will be locked at precisely 8 p.m.',
callout2: '',
},
'Mail-in ballot drop box (not open for special election)': {
header: 'Mail-in ballot dropboxes (not open for special election)',
englishName: 'Mail-in ballot dropbox (not open for special election)',
p1: '\
If a drop box is full, not functioning, or is damaged in any way, call (215) 686-3469 or email <a href="mailto:vote@phila.gov">vote@phila.gov</a>. \
',
h2: '',
dates: '',
callout1: 'On Election Day, dropboxes will be locked at precisely 8 p.m.',
callout2: '',
},
},
beforeYouGo: 'Before you go',
checkSite: 'Eligibility requirements and testing hours vary by site. Be sure to check site details to arrange for testing.',
Expand Down
12 changes: 12 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import legendControls from './general/legendControls';

// data-sources
import votingSites from './data-sources/voting-sites';
// import votingSites from './data-sources/voting-sites-dev';

import expandCollapseContent from './components/ExpandCollapseContent.vue';
import customGreeting from './components/customGreeting.vue';
Expand Down Expand Up @@ -105,6 +106,11 @@ pinboard({
},
},
customComps,
// hiddenRefine: {
// Type: function(item) {
// return item.site_type !== 'Official mobile mail-in ballot return';
// },
// },
refine: {
type: 'categoryField_value',
value: function(item) {
Expand All @@ -130,6 +136,11 @@ pinboard({
titleSingular: 'Official mail-in ballot drop box',
color: '#4F6D0A',
},
'Mail-in ballot drop box (not open for special election)': {
title: 'Mail-in ballot drop boxes (not open for special election)',
titleSingular: 'Mail-in ballot drop box (not open for special election)',
color: '#a1a1a1',
},

},
legendControls,
Expand All @@ -140,6 +151,7 @@ pinboard({
'Election office': '#a86518',
'Official mobile mail-in ballot return': '#721817',
'Official mail-in ballot drop box': '#4F6D0A',
'Mail-in ballot drop box (not open for special election)': '#a1a1a1',
},
borderColor: 'white',
weight: 1,
Expand Down

0 comments on commit 76c7164

Please sign in to comment.