-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #929 from OpenSourceFellows/tuolumne_letter_stub
Added hardcoded tuolumne letter
- Loading branch information
Showing
6 changed files
with
212 additions
and
6 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
server/db/migrations/20240528133030_adjust_letter_data_types.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
async up(knex) { | ||
await knex.schema.alterTable('letters', (table) => { | ||
table.dropColumn('letter_template') | ||
}) | ||
|
||
await knex.schema.alterTable('letters', (table) => { | ||
table.text('letter_template') | ||
}) | ||
}, | ||
|
||
async down(knex) { | ||
knex.schema.alterTable('letters', (table) => { | ||
table.dropColumn('letter_template') | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
<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> | ||
<div> | ||
<p> | ||
<span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>As a <strong>{{ constituentType }}</strong></span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt">, </span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>I’m extremely concerned about our skyrocketing “water and | ||
sewer bills” and the The Design Drought.</span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt"> | ||
San Francisco’s combined water and sewer bills are | ||
projected to increase by 8% per year. </span | ||
> | ||
</p> | ||
<p> | ||
<span style="color: rgb(0, 0, 0); font-size: 10pt"> | ||
<strong>{{ communityInput }}</strong> At a time when taxpayer water rates are set | ||
to skyrocket for San Franciscans, the SFPUC budget is on the | ||
verge of collapse, and low flows along the Tuolumne River | ||
contribute to the erosion of health for all species, the | ||
economic and ecological tipping point is now.</span | ||
> | ||
</p> | ||
<p> | ||
<span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>The Design Drought arbitrarily combines two of the worst | ||
droughts on record to create a </span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>megadrought that might occur once in 25,000 years. It assumes a | ||
huge increase in water use, </span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>despite the fact that water demand has decreased significantly | ||
over the past three decades. </span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>The Design Drought has prompted the SFPUC to create an | ||
Alternative Water Supply Plan that </span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>would cost between $17 billion and $25 billion. This would | ||
double the SFPUC budget (and water rates) to produce expensive | ||
water we won’t ever need. </span | ||
> | ||
</p> | ||
<p> | ||
<span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>Thank you for your continued attention. </span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>I support n</span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
>ot approving the new budget with rate increases</span | ||
><span style="color: rgb(0, 0, 0); font-size: 10pt" | ||
> and am following this issue closely and with great | ||
concern.</span | ||
> | ||
</p> | ||
</div> | ||
</v-card-text> | ||
|
||
<v-card-text> | ||
<v-select | ||
v-model="constituentType" | ||
:items="reasons" | ||
label="You are a ..." | ||
/> | ||
<v-select | ||
v-model="communityInput" | ||
:items="affects" | ||
label="How this affects 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, | ||
constituentType: '<fill in the input below>', | ||
communityInput: '<fill in the input below>', | ||
reasons: [ | ||
'a resident of San Francisco and someone who cares deeply about the Tuolumne River', | ||
'a person adjacent to Hetch Hetchy and someone who cares deeply about the Tuolumne River', | ||
'someone who cares deeply about the Tuolumne River' | ||
], | ||
affects: [ | ||
'I\'m already struggling to pay my utility bill.', | ||
'This will place an undue burden on my monthly bills.', | ||
'Rate increases hit lower income residents especially hard.', | ||
], | ||
} | ||
}, | ||
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 { constituentType: this.constituentType, 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> |