Skip to content

Commit

Permalink
Added CaliforniaRivers campaign seed and letter
Browse files Browse the repository at this point in the history
Added button to high rep list
Added eventlistener for window resize. Probably unnecessary but cool
  • Loading branch information
DietBepis1 committed Jun 19, 2024
1 parent c5dbe15 commit ede4c10
Show file tree
Hide file tree
Showing 4 changed files with 337 additions and 12 deletions.
163 changes: 163 additions & 0 deletions server/db/seeds/development/seed-campaigns-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,169 @@ module.exports = {
'campaign-img-3':
'https://images.squarespace-cdn.com/content/v1/5eebc0039b04b54b2fb0ce52/1609781359705-Q5YNFL6DET5ORHW62ZU7/IMG_2249_WEBSITE+copy.jpg?format=1500w'
})
},
{
id: 7,
organization: 'Save California Salmon',
name: 'Save California Salmon',
cause: 'Civic Rights',
type: 'Grant',
page_url: 'https://www.californiasalmon.org/',
campaign_tagline: 'Restoring and Protecting California Salmon and Rivers for Future Generations',
campaign_text: '<p><strong>#UNDAMTHEKLAMATH</strong></p><p>Save California Salmon (SCS) is dedicated to policy change and community advocacy for Northern California’s salmon and fish dependent people. We support the fisheries and water protection work of the local communities, and advocate effective policy change for clean water, restored fisheries and vibrant communities. We aim to help to support Tribes and the general public in engaging with public comments related to water pollution, fisheries, and beneficial use issues.</p><p>Restoration of the Klamath River does not stop with dam removal. Salmon populations are continuing to plummet throughout California, leaving Tribal communities without salmon for subsistence, and ocean fishermen without a season. Restoration of the Klamath’s tributaries, which are often dewatered for animal agriculture, is also critical. We continued to support Tribal efforts to establish both permanent and temporary emergency flows in the Scott and Shasta Rivers through the California Water Resources Control Board. In December, the board passed emergency irrigation curtailments for both rivers, and we are still pushing for permanent instream flow requirements.</p><p>We also continued to fight for Trinity River flows, which are critical to the river, and to stop fish kills in the Klamath River. The Trinity is the Klamath’s largest tributary, but it is also an artificial Sacramento River tributary that feeds the Central Valley Water Project. The federal government is working on a new Biological Opinion for Endangered Species (water operations plan) for the Central Valley and State Water Projects. We are calling for a separate, protective Biological Opinion for the Trinity River, and for flows in the Bay Delta watersheds.</p><p>We are deeply dedicated to dam removal and flow restoration in all the North State’s watersheds. We want salmon back for all Northern California Tribes, which is why we are hopeful about Pacific Gas & Electric’s (PGE) December proposal to fully decommission the Eel River Dams.</p>',
supplemental_text: '<p>At the end of 2020 California, Oregon and Berkshire Hathaway entered a new agreement to undam the Klamath River. This decision came after almost twenty years of organizing, testifying, actions and planning from the native peoples of the Klamath basin, coastal fishermen and their allies. This year we continue our advocacy to make sure these dams come down.<p>',
representatives: JSON.stringify([
{
name: 'Connie Chan',
title: 'District 1 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Connie_Chan_2023.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'chanstaff@sfgov.org'
},
{
name: 'Catherine Stefani',
title: 'District 2 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Supervisor_Stefani_2018.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'Catherine.Stefani@sfgov.org'
},
{
name: 'Aaron Peskin',
title: 'District 3 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Aaron_Peskin_2023.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'Aaron.Peskin@sfgov.org'
},
{
name: 'Joel Engardio',
title: 'District 4 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Joel_Engardio_2023.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: ''
},
{
name: 'Dean Preston',
title: 'District 5 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Dean_Preston_2023.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'prestonstaff@sfgov.org'
},
{
name: 'Matt Dorsey',
title: 'District 6 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Dorsey_2022_lg.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'DorseyStaff@sfgov.org'
},
{
name: 'Myrna Melgar',
title: 'District 7 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Myrna_Melgar_2023.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'melgarstaff@sfgov.org'
},
{
name: 'Rafael Mandelman',
title: 'District 8 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Supervisor_Mandelman_2018.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'mandelmanstaff@sfgov.org'
},
{
name: 'Hillary Ronen',
title: 'District 9 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Supervisor_Ronen_2019.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'RonenStaff@sfgov.org'
},
{
name: 'Shamann Walton',
title: 'District 10 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Shamann_Walton_2023.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'waltonstaff@sfgov.org'
},
{
name: 'Ahsha Safai',
title: 'District 11 Supervisor',
photoUrl:
'https://sfbos.org/sites/default/files/Ahsha_Safai_2023.jpg',
address_line1: '1 Dr Carlton B Goodlett Pl',
address_line2: '#244',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94102',
address_country: 'US',
email: 'Ahsha.Safai@sfgov.org'
}
]),
assets: JSON.stringify({
campaign_logo: 'https://static.wixstatic.com/media/d97ff6_b61eff2e17cc4511b92752e6af420835~mv2.png/v1/fill/w_96,h_97,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/White%20circle%2C%20Black%20background%20SCS%20Logo.png',
campaign_background: 'https://i.imgur.com/4OsValj.png',
'campaign-img-1': 'https://i.imgur.com/fGMy8Wz.png',
'campaign-img-2': 'https://i.imgur.com/toMnnE0.png',
'campaign-img-3': 'https://i.imgur.com/wXRXDCd.png'
})
}
])
}
Expand Down
129 changes: 129 additions & 0 deletions src/components/CaliforniaRiversLetterLoad.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<template>
<section class="letter-load">
<v-card flat>
<div v-show="isSubmitted">
<v-card-subtitle align="left">
<div class="text-left">
{{ currentDate }}
</div>
<div>{{ selectedRep.name }}</div>
<div>{{ selectedRep.address_line1 }}</div>
<div>
{{ selectedRep.address_city }}, {{ selectedRep.address_state }},
{{ selectedRep.address_zip }}
</div>
<br />
<div>{{ user.name }}</div>
<div>
{{ user.line1 }}
<br />
{{ user.line2 }}
</div>
<div>
{{ formattedCityState }}
</div>
</v-card-subtitle>
<v-card-title class="salutation">
Dear {{ selectedRep.name }},
</v-card-title>

<v-card-text>
<p>
Thank you for your continued interest in building climate resilience across California, I’m a resident of <span style="font-weight: bold;">{{ communityInput }}</span> and I wanted to express why I’m for keeping Phase II of the Bay Delta Water Quality Control Plan and negate the proposed Voluntary Agreements as part of the State Water Boards replacement for 2 reasons. First, there’s higher solvency and return on investment for climate resilience through status quo and second, other states have successfully scaled such a model to increase federal funding.*
</p>

<p>
*Climate resilience is forecasted 110 billion dollar problem due to the erosion to our soil, coasts, and flooding. Such a decision can not be taken lightly yet local water agencies, private companies, and agricultural interests sidestepped the process without listening to voices like mine across local communities - the fish population plummeting is a testament to the approach Voluntary Agreements have taken. The current Phase 2 approach takes into account both science and public based traditional ecological knowledge that include Tribal, Environmental Justice, fishermen, and sustainability communities.*
</p>

<p>
Not only is there precedent for through AB 1284 , traditional ecological knowledge helps protect more than 86% of the world’s biodiversity towards climate resilience. Oregon’s Fish & WildLife program has successfully scaled such partnerships with Burns Paiute to restore trout and salmon since 1997. Not only had the population of fish greatly increase but they also received 300 million in funding federally. Given the Biden administration’s stance on cocreating with Tribal communities - this would be a great opportunity to work with all communities across the North Delta, Sacramento River, and Tribituaries to support flows for fish and fish dependent communities and reject the use of Voluntary Agreements for Phase II of the Bay Delta Plan.
</p>
</v-card-text>

<v-card-text>
<v-select
v-model="communityInput"
:items="community"
label="Your Community"
/>
</v-card-text>

<p>{{ user.name }}</p>
</div>
<div v-show="!isSubmitted">
<v-card-text> clicked</v-card-text>

<div class="col-md text-center text-md-left">
<!--<h2>You are logged in as {{ $auth.user.name }}</h2>
{ JSON.stringify($auth.user, null, 2) }} -->
</div>
</div>
<!--
<v-card-actions class="justify-center">
<v-btn>
<AuthNav />
</v-btn>
</v-card-actions>
-->
</v-card>
</section>
</template>

<script lang="js">
// import AuthNav from '@/components/AuthNav'
// import { mapState } from 'vuex';
export default {
name: 'TuolumneLetterLoad',
components: {
/* AuthNav */
},
props: {
letterBody: { type: String, default: '' }
},
data() {
return {
isSubmitted: true,
communityInput: '<fill in the input below>',
community: ['Klamath', 'Joaquin Valley', 'the Hoopa Tribe']
}
},
computed: {
selectedRep() {
return this.$store.state.selectedRep
},
user() {
return this.$store.state.userData
},
currentDate() {
return new Intl.DateTimeFormat('en-US').format(new Date())
},
formattedCityState() {
if (this.user.city) {
return `${this.user.city}, ${this.user.state} ${this.user.zip}`
}
return ''
},
mergeVariables() {
return { communityInput: this.communityInput }
}
},
watch: {
mergeVariables: function() {
this.$store.commit('setGenericValue', { key: 'mergeVariables', value: this.mergeVariables })
}
}
}
</script>

<style scoped lang="less">
.letter-load {
}
.salutation {
font-size: 18px;
}
</style>
42 changes: 32 additions & 10 deletions src/components/SearchReps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,23 @@
<!-- Always enabled -->
<div v-if="true" id="representatives-list">
<h3>
Click or tap a Representative, then scroll down to get started.
Click or tap a Representative.
</h3>
<div>
<v-card v-for="member in representatives" :key="member.name" flat>
<representative-card
:member="member"
@handle-rep-selected="loadLetterWorkflow"
/>
<v-divider />
</v-card>
<div v-if="Object.keys(selectedRep).length">
<v-btn @click="clearSelectedRep" color="secondary" class="my-5">
Clear Rep Selection
</v-btn>
</div>
<div v-if="screenWidth >= 600 || !Object.keys(selectedRep).length">
<div>
<v-card v-for="member in representatives" :key="member.name" flat>
<representative-card
:member="member"
@handle-rep-selected="loadLetterWorkflow"
/>
<v-divider />
</v-card>
</div>
</div>
</div>
</v-col>
Expand Down Expand Up @@ -187,7 +194,8 @@ export default {
hasContent: true,
postalCode: this.$route.params.postalCode || '',
listVisible: false,
isActive: false
isActive: false,
screenWidth: window.innerWidth
}
},
computed: {
Expand Down Expand Up @@ -227,7 +235,18 @@ export default {
this.$store.commit('setGenericValue', { key: 'mode', value: 'single' })
}
},
mounted() {
this.$nextTick(() => {
window.addEventListener('resize', this.onResize)
})
},
beforeunMount() {
window.removeEventListener('resize', this.onResize)
},
methods: {
clearSelectedRep() {
this.$store.commit('setGenericValue', { key: 'selectedRep', value: {} })
},
async loadLetterWorkflow() {
const letter = await axios.get(`/api/lob/templates/${this.letterId}`)
Expand Down Expand Up @@ -289,6 +308,9 @@ export default {
} catch (e) {
console.error(e)
}
},
onResize() {
this.screenWidth = window.innerWidth
}
}
}
Expand Down
Loading

0 comments on commit ede4c10

Please sign in to comment.