Skip to content

Commit

Permalink
Feedback, content updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Jan 3, 2024
1 parent bb99f07 commit e671f90
Show file tree
Hide file tree
Showing 17 changed files with 182 additions and 115 deletions.
48 changes: 43 additions & 5 deletions api/submitappeal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import gspread
import pandas as pd
import pytz
from docxtpl import DocxTemplate
from google.oauth2 import service_account

Expand All @@ -15,7 +16,7 @@
gsheet_submission = None


def record_final_submission(sub_dict):
def record_final_submission(submission):
if not os.getenv("GOOGLE_SERVICE_ACCOUNT"):
return

Expand All @@ -31,9 +32,46 @@ def record_final_submission(sub_dict):
)

client = gspread.authorize(credentials)
worksheet = client.open(os.getenv("GOOGLE_SHEET_SUBMISSION_NAME")).sheet1
worksheet = client.open(os.getenv("GOOGLE_SHEET_SUBMISSION_NAME")).worksheet(
"submissions"
)

timestamp = datetime.now(pytz.timezone("America/Detroit"))
key = f"submissions/{timestamp.strftime('%Y/%m/%d')}/{submission.get('uuid')}.json"
# TODO: For now just append, in the future update like lambda for resubmission

info = submission.get("user", {})
eligibility = submission.get("eligibility", {})
row_data = [
submission.get("uuid"),
key,
timestamp.strftime("%Y-%m-%dT%H:%M:%SZ"),
info.get("name", f'{submission["first_name"]} {submission["last_name"]}'),
info.get("email"),
info.get("phone"),
info.get("phonetype"),
submission.get("pin"),
submission.get("address"),
info.get("city"),
info.get("state"),
eligibility.get("residence"),
eligibility.get("owner"),
eligibility.get("hope"),
info.get("mailingaddress"),
info.get("altcontactname"),
info.get("heardabout"),
info.get("localinput"),
info.get("socialmedia"),
submission.get("validcharacteristics"),
submission.get("characteristicsinput"),
submission.get("valueestimate"),
len(submission.get("selectedComparables", [])),
submission.get("damage_level"),
submission.get("damage"),
len(submission.get("files", [])),
]
worksheet.append_rows([row_data])

worksheet.append_rows([list(sub_dict.values())])
val_list = worksheet.col_values(1)
base_url = "https://docs.google.com/spreadsheets/d/"

Expand Down Expand Up @@ -250,15 +288,15 @@ def submit_detroit_sf(comp_submit, mail):
"Email Address": comp_submit["email"],
"Phone Contact Time": comp_submit.get("phonetime", ""),
"PRE": targ["homestead_exemption"].to_string(index=False),
"Eligibility Flag": comp_submit["eligibility"],
"Eligibility Flag": comp_submit["eligible"],
"Characteristics Flag": c_flag,
"SEV": str(pin_av),
"TV": targ["taxable_value"].to_string(index=False),
"CV": str(comps_avg),
}

if not os.getenv("ATTACH_LETTERS"):
log_url = record_final_submission(sub_dict)
log_url = record_final_submission(comp_submit)
comp_submit["log_url"] = log_url

# send email
Expand Down
Binary file modified api/templates/docs/representation_agreement.docx
Binary file not shown.
8 changes: 4 additions & 4 deletions api/templates/emails/submission_detroit.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Steps in Appeals Process:
<ul>
<li>
<b>Step 1</b>: Complete this online application by <b>March 1, 2024</b>.
<b>Step 1</b>: Complete this online application by <b>March 11, 2024</b>.
</li>
<li>
<b>Step 2</b>: We will review your application, determine if you are
Expand All @@ -18,9 +18,9 @@
Review by March 8, 2024.
</li>
<li>
<b>Step 4</b>: Before June of 2024, the Board of Review will send you a
letter notifying you whether it has reduced your home&apos;s assessed value
because of your appeal.
<b>Step 4</b>: Before June 2024, the Board of Review will send you a letter
notifying you whether it has reduced your home&apos;s assessed value because
of your appeal.
</li>
</ul>
<br /><br />
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/appeals.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe("Appeal flow", () => {
cy.visit(appealUrl)
cy.get("#Eligibility_residence [type=radio]").check("Yes")
cy.get("#Eligibility_owner [type=radio]").check("Yes")
cy.get("#Eligibilty_hope [type=radio]").check("No")

cy.get("input[placeholder=number]").type(street_number)
cy.get("input[placeholder=street]").type(street_name)
Expand All @@ -36,7 +37,6 @@ describe("Appeal flow", () => {
cy.get("#Housing_Information_address").type(contact.address)
cy.get("#Housing_Information_city").type(contact.city)
cy.get("#Housing_Information_state").type(contact.state)
cy.get("#Housing_Information_zip").type(contact.zip)
cy.get("#Housing_Information_mailingsame [type=radio]").check("Yes")
cy.get("#Housing_Information_altcontact [type=radio]").check("No")
cy.get("#Housing_Information_heardabout").click()
Expand Down
Binary file added src/assets/ilo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/components/file-upload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export const FileUpload = ({ accept, files, label, onChange }) => {
.catch(onError)
}}
>
<Button>{label || "Click to upload"}</Button>
<Button style={{ height: "auto", whiteSpace: "normal" }}>
{label || "Click to upload"}
</Button>
</Upload>
)
}
Expand Down
17 changes: 7 additions & 10 deletions src/components/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@ const { Header } = Layout
const PTAPHeader = () => (
<Header>
<Menu mode="horizontal">
<Menu.Item key="base">
<a href="/">Property Tax Appeal Project</a>
</Menu.Item>
<Menu.Item key="coalition">
<a
href="https://illegalforeclosures.org/"
target="_blank"
rel="noopener noreferrer"
>
<img height={50} alt="Coalition Logo" src={coalition} />
<a href="/" target="_blank" rel="noopener noreferrer">
<img
height={50}
alt="Coalition for Property Tax Justice Home"
src={coalition}
/>
</a>
</Menu.Item>
<Menu.Item key="appointment">
<span style={{ color: "black" }}>
<a target="_blank" rel="noopener noreferrer" href={HELP_LINK}>
Make an appointment
Click here to make an appointment
</a>
</span>
</Menu.Item>
Expand Down
46 changes: 24 additions & 22 deletions src/components/pin-lookup.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import PropTypes from "prop-types"
import { lookupPin } from "../requests"
import { Form, Input, Button } from "antd"
import { Form, Input, Button, Space } from "antd"
import { getAppealType } from "../utils"

const PinLookup = ({ city, onSearch }) => {
Expand All @@ -24,28 +24,30 @@ const PinLookup = ({ city, onSearch }) => {
autoComplete="off"
size="large"
>
<Input.Group compact>
<Form.Item
style={{ width: "100px" }}
name="street_number"
rules={[{ required: true, message: "Street number is required." }]}
>
<Input
<Input.Group>
<Space horizontal wrap>
<Form.Item
style={{ width: "100px", marginBottom: 0 }}
name="street_number"
inputMode="numeric"
placeholder="number"
/>
</Form.Item>
<Form.Item
style={{ width: "300px" }}
name="street_name"
rules={[{ required: true, message: "Street name is required." }]}
>
<Input name="street_name" placeholder="street" />
</Form.Item>
<Button type="primary" htmlType="submit">
Search
</Button>
rules={[{ required: true, message: "Street number is required." }]}
>
<Input
name="street_number"
inputMode="numeric"
placeholder="number"
/>
</Form.Item>
<Form.Item
style={{ width: "300px", marginBottom: 0 }}
name="street_name"
rules={[{ required: true, message: "Street name is required." }]}
>
<Input name="street_name" placeholder="street" />
</Form.Item>
<Button type="primary" htmlType="submit">
Search
</Button>
</Space>
</Input.Group>
</Form>
)
Expand Down
2 changes: 1 addition & 1 deletion src/context/appeal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ function appealReducer(appeal, action) {
return {
...appeal,
eligibility: {
landlord: action.landlord,
residence: action.residence,
owner: action.owner,
hope: action.hope,
},
}
}
Expand Down
38 changes: 31 additions & 7 deletions src/pages/content/appeal-intro.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
import React from "react"
import { Space } from "antd"
import PropTypes from "prop-types"
import { HELP_LINK } from "../../utils"
import coalition from "../../assets/coalition_logo.png"
import ilo from "../../assets/ilo.png"

const AppealIntro = ({ city }) => (
<>
<h1>Who We Are</h1>
<p>
The Coalition for Property Tax Justice is a current campaign of the
Institute for Law and Organizing’s (ILO). In addition to Detroit, ILO is
working in Milwaukee, Chicago, and nationally to end racialized property
tax administration in America.
</p>
<Space wrap direction="horizontal">
<img
src={ilo}
style={{ height: "80px" }}
alt="Institute for Law and Organizing logo"
/>
<img
src={coalition}
style={{ height: "80px" }}
alt="Coalition for Property Tax Justice logo"
/>
</Space>
<br />
<br />
<h1>The Appeals Process</h1>
<p>Here is a general overview of the appeals process:</p>

{city === "detroit" && (
<ul>
<li>
<b>Step 1</b>: Complete this online application by{" "}
<b>March 1, 2024</b>. If you are unable to complete the application or
have questions, please fill out this form to set up an appointment to
answer any questions or troubleshoot any issues you might have:{" "}
<b>March 11, 2024</b>. If you are unable to complete the application
or have questions, please fill out this form to set up an appointment
to answer any questions or troubleshoot any issues you might have:{" "}
<a target="_blank" rel="noopener noreferrer" href={HELP_LINK}>
Schedule an appointment
</a>
Expand All @@ -28,9 +52,9 @@ const AppealIntro = ({ city }) => (
of Review by March 8, 2024.
</li>
<li>
<b>Step 4</b>: Before June of 2024, the Board of Review will send you
a letter notifying you whether it has reduced your home&apos;s
assessed value because of your appeal.
<b>Step 4</b>: Before June 2024, the Board of Review will send you a
letter notifying you whether it has reduced your home&apos;s assessed
value because of your appeal.
</li>
</ul>
)}
Expand Down Expand Up @@ -66,7 +90,7 @@ const AppealIntro = ({ city }) => (
</ul>
)}

<h2>Who is Eligible for the Project&apos;s Services?</h2>
<h2>Who is Eligible for ILO&apos;s Services?</h2>
<p>You are eligible for services if you meet all of these criteria:</p>

{city == "detroit" && (
Expand Down
41 changes: 26 additions & 15 deletions src/pages/final-page.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react"
import { Button, Space } from "antd"
import { Button } from "antd"

const FinalPage = () => (
<>
<h2>Your application has now been submitted.</h2>
<h1>Your application has now been submitted.</h1>
<p>
<b>What to expect next</b>
</p>
Expand All @@ -12,19 +12,30 @@ const FinalPage = () => (
can reach us at our contact information above.
</p>

<Space>
<p>Do you want to join our fight for Property Tax Justice?</p>
<br />
<Button size="large" type="primary">
<a
href="https://actionnetwork.org/petitions/impacted-detroiters-compensation?source=ptapapp"
target="_blank"
rel="noopener noreferrer"
>
Take Action
</a>
</Button>
</Space>
<h2>Join our fight</h2>
<p>
The Problem: Since 2009, the City of Detroit has illegally over assessed
property values and inflated its property tax bills. From 2010 to 2016,
the City of Detroit Overtaxed Homeowners by $600 million. When homeowners
cannot afford to pay, Wayne County forecloses on their homes. Since 2009,
Wayne County foreclosed on 1 in 3 Detroit homes, displacing over 100,000
Detroiters, for failure to pay the City&apos;s inflated tax bills. Despite
efforts to address the problem, the City continues to illegally and
inequitably tax Detroiters, especially those who own lower-valued homes.
</p>
<p>
Will you join our current fight to compensate Detroit homeowners who have
been illegally overassessed by the City of Detroit?
</p>
<Button size="large" type="primary">
<a
href="https://actionnetwork.org/petitions/impacted-detroiters-compensation?source=ptapapp"
target="_blank"
rel="noopener noreferrer"
>
Sign our compensation petition
</a>
</Button>
</>
)

Expand Down
Loading

0 comments on commit e671f90

Please sign in to comment.