Commit Graph
6 Commits
Author SHA1 Message Date
westfarn 8e3c0a5909 Add EDDM size, income, businesses and USPS map link (#18)
Deploy Beta / unit-tests (push) Successful in 26s
Deploy Beta / docker (push) Successful in 28s
Deploy Beta / deploy-beta (push) Successful in 6m27s
## Summary
Closes #17.

- Join USPS EDDM GIS stats onto the carrier-route picker: household size, median income, business count.
- Add Open USPS EDDM map link next to Find routes.
- GIS miss stays a dash and does not block Find routes. PCM households and cost unchanged.

Template: westfarn/web_django_template#13

## Test plan
- [ ] Find routes for a ZIP; table shows Size / Income / Businesses columns
- [ ] Missing GIS values render as —
- [ ] Open USPS EDDM map opens eddm.usps.com
- [ ] Quote and 1–2 route send still work
- [ ] `CarrierRoutePostcardTests` pass

Reviewed-on: #18
2026-09-22 12:40:08 -07:00
westfarn 045e956011 Add PCM carrier-route postcard pick-and-send (#16)
Deploy Beta / unit-tests (push) Successful in 24s
Deploy Beta / docker (push) Successful in 30s
Deploy Beta / deploy-beta (push) Successful in 7m22s
## Summary
Closes #15.
Mirrors westfarn/web_django_template#11.

- Compose can target the postcard mailing list **or** find and select one or two USPS carrier routes by ZIP (optional radius).
- Estimated cost is shown per route and for the selection (PCM design pricing, else `PCM_POSTCARD_PRICE_*` fallback).
- Selected routes order through PCM `POST /order/postcard/with-list-count` — occupant addresses are not imported into Contacts.
- Not official EDDM postage; PCM FirstClass/Standard purchased occupant lists on carrier routes.

## Test plan
- [ ] Campaign compose: mailing-list audience still quotes list size × per-piece cost.
- [ ] Switch to USPS carrier routes, search ZIP 60540 (mocked or live PCM), pick 1–2 routes, confirm household count + estimated cost.
- [ ] Saving without a selection is rejected; saving with a quote creates one contact-less Message and shows the route panel on the report.
- [ ] Send places `/order/postcard/with-list-count` (not per-recipient `/order/postcard`).
- [ ] `uv run python manage.py test messaging.tests.CarrierRoutePostcardTests messaging.tests.PostcardDesignPickTests`

Reviewed-on: #16
2026-09-21 13:29:20 -07:00
westfarn 2643ba7a96 Require a complete PCM return address before placing orders.
Deploy Beta / unit-tests (push) Successful in 14s
Deploy Beta / docker (push) Successful in 17s
Deploy Beta / deploy-beta (push) Successful in 1m40s
Empty PCM_RETURN_ADDRESS was sending SITE_NAME as firstName with blank street fields, which PCM rejects with 400; validate early and wire PCM env through compose.
2026-08-11 05:52:39 -05:00
westfarn 7fb5317308 Fix PCM postcard orders to use POST /order/postcard.
Deploy Beta / unit-tests (push) Successful in 12s
Deploy Beta / docker (push) Successful in 18s
Deploy Beta / deploy-beta (push) Successful in 1m38s
Plain POST /order 404s at PCM; product-specific path is required for sandbox and production sends.
2026-08-10 14:47:10 -05:00
westfarn 7496af72d0 Fix PCM auth: login for API token and multi webhook secrets.
Deploy Beta / unit-tests (push) Successful in 8s
Deploy Beta / docker (push) Successful in 14s
Deploy Beta / deploy-beta (push) Successful in 1m34s
PCM DirectMail v3 needs POST /auth/login (apiKey+apiSecret) before design/order calls; accept each subscription's copy-only signature secret via PCM_WEBHOOK_SECRETS.
2026-08-09 06:02:32 -05:00
westfarn 1f7d78de64 Add Django site, Docker packaging, and beta/prod Gitea deploys.
Deploy Beta / unit-tests (push) Successful in 9s
Deploy Beta / docker (push) Successful in 17s
Deploy Beta / deploy-beta (push) Successful in 2m31s
Unignore site/ (was blocked by mkdocs /site rule), add compose/Docker/uv tooling, and split deploys so push to main goes to beta while prod stays manual.
2026-08-08 07:32:55 -05:00