Commit graph

149 commits

Author SHA1 Message Date
cb34c43ef4
Improve error messages on notify failures 2026-03-19 21:29:55 +00:00
6042e7d337
Emit events on note creation 2026-03-19 21:29:55 +00:00
fdab54a775
Fix saving note images and transcoding 2026-03-19 20:49:17 +00:00
ba03bf9d4f
Fix audio transcode copy-paste error 2026-03-19 20:14:23 +00:00
17fb3dcdb5
Fix saving notes from Nidus
Wow, that's a serious break.
2026-03-19 20:13:53 +00:00
429b724cf2
Emit a created event on signal creation 2026-03-19 19:17:00 +00:00
2c4e7c4f96
Handle nuisance reports without location data 2026-03-19 19:16:39 +00:00
2f1b612e9e
Move signal creation inside platform layer
This allows us to emit events with it.
2026-03-19 19:00:44 +00:00
908ac4faea
Make signals, not leads, from public reports. 2026-03-19 17:41:56 +00:00
ee61b6d24b
Move review actions into the platform, emit events on change
Still not seeing updates in the sidebar, however.
2026-03-19 16:55:49 +00:00
954a4330ee
Add notifications for review tasks 2026-03-19 16:01:44 +00:00
786a6c16a3
Fix up upload by ID
Show the street number as well as the rest of the address, emit an event
when the upload is processed, actually check if pools are existing, etc.
2026-03-19 15:31:04 +00:00
97c9269215
Update file status to committed when commit completes 2026-03-19 05:53:43 +00:00
ab5840dd54
Fix references to org ID using platform org
I broke these a while ago and didn't realize because the compiler
doesn't catch them.
2026-03-19 03:57:38 +00:00
544f99c09b
Check error state on update sql 2026-03-19 03:52:56 +00:00
6338d9f3f3
Remove chatty debug log 2026-03-19 03:52:40 +00:00
45643e8369
fix redundant log message 2026-03-19 03:52:28 +00:00
434746aa99
Allow the catch-all district to do uploads 2026-03-19 03:25:36 +00:00
2f61b224de
Prevent creating CSV uploads without a service area 2026-03-19 03:19:58 +00:00
f2ea1367e2
Allow the transaction to commit on failure in CSV processing 2026-03-19 03:19:17 +00:00
b2eb98a66c
Fix upload list page 2026-03-19 02:51:09 +00:00
15766d0f86
Fix build for staging 2026-03-18 19:59:42 +00:00
28714b06b8
Fix tracking report type through the system 2026-03-18 19:25:52 +00:00
685b7456b6
Return logs on comms public reports
...and start to display them. A bit.
2026-03-18 18:56:51 +00:00
21e8b9880d
Remove report_location view, add lat lng to report table 2026-03-18 18:55:50 +00:00
1d2570c912
Add DB model for publicreport logs
It's just way easier to track that deriving the data every time an API
request is made.
2026-03-18 17:32:06 +00:00
1e071d5ce5
Overhaul publicreport storage layer, create unified tables
This is a huge change. I was getting really sick of the split between
nuisance/water tables when more than half of the data they store is
common. I finally bit off the big work of switching it all.

This creates a single unified table, publicreport.report and copies the
existing report data into it. It also ports existing data from the
original tables into the new table.

Along with all of this I also overhauled the system for handling
asynchronous work to use a LISTEN/NOTIFY connection from the database
and a single cache table to avoid ever losing work.
2026-03-18 15:36:20 +00:00
2538638c9d
Create generic backend process, fix background interdependencies
This refactor was born out of the inter-dependency cycles developing
between the "background" module and just about every other module which
was caused by the background module becoming a dependency of every
module that needed to background work and the fact that the background
module was also supposedly responsible for the logic for processing
those tasks.

Instead the "background" module is now very, very shallow and relies
entirely on the Postgres NOTIFY logic for triggering jobs. There's a new
table, `job` which holds just a type and single row ID.

All told, this means that jobs can be added to the queue as part of the
API-level or platform-level transaction, ensuring atomicity, and
processing coordination is handled by the platform module, which can
depend on anything.
2026-03-16 19:52:29 +00:00
cc95c38ab5
Initial creation of endpoint to send messages to public reporters 2026-03-16 00:20:41 +00:00
70d3aef8b3
Re-select selected communication on fetch
This makes it so the UI updates with any changes we pull down.
2026-03-14 20:03:46 +00:00
a8f2c87e38
Fix display of reporter name on comms page 2026-03-14 18:14:46 +00:00
148454d392
Push update to public report event when reporter is saved 2026-03-14 18:14:30 +00:00
94b2ff2e21
Only count publicreports that haven't been reviewed 2026-03-14 16:58:25 +00:00
70ebfa8ee0
Avoid making the images list null if there are no images 2026-03-14 16:13:08 +00:00
66e122f7e7
Fix notification counts being off
Double-counting water
2026-03-14 16:12:52 +00:00
1a9a72adc0
Create district catch-all, make organization on public reports not null 2026-03-14 15:53:16 +00:00
b29d172030
Add better support for extracting address from reverse geocode results
Stadia's API sucks. They don't really tell you what their response will
be in detail, just claim they are all the same, but they're not. Not
even a little.
2026-03-14 01:51:02 +00:00
e2af49a323
Make lead creation and invalidation for public reports work
The only thing wrong at this point that I can tell is that address
aren't being correctly populated when I reverse geocode.
2026-03-14 01:14:30 +00:00
3e1b56a266
Add notification count to user, populate sidebar via alpine 2026-03-13 21:22:34 +00:00
6fb964852f
Allow sudo to send structured SSEs 2026-03-13 18:31:43 +00:00
4925fe4857
Close old SSE connections, push down type strings 2026-03-13 18:21:20 +00:00
e8d865d0ab
Wire up events for creating new public reports
This involved moving a lot of stuff to the platform layer since I don't
want event interfaces leaking out.

Also this includes a fix to the user authentication which I had
previously broken by making a platform-layer user object independent of
the database layer.
2026-03-13 17:56:24 +00:00
44c4f17f32
Massive rework of platform layer user/organization
The goal of this rework is to make it so I can pass around platform.User
instead of a pair of models.Organization and models.User. This is useful
for reason I kind of forget now, but it started with working on
notifications and ballooned massively from there into refactoring a
number of things that were bugging me.

This also includes a tiny amount of work on server-side events (SSE).

 * background stuff lives inside the platform now, which I need for
   having it push updates through SSE
 * userfile now lives in the platform, under file, so other platform
   functions can safely use it
 * oauth is broken into pieces and inside platform because other stuff
   was calling it already, but badly.
 * notifications go into the platform as well
2026-03-12 23:49:16 +00:00
e09c412139
Make it possible to handle null reporter_contact_consent 2026-03-11 23:00:06 +00:00
182fd7d229
Fix quoting in insertFlyover
I didn't know I could do this when I wrote it.
2026-03-11 22:54:22 +00:00
3ccc05d4c5
Save tiles to the database to make empty tile load faster 2026-03-11 17:01:47 +00:00
3743d63692
Add proxy for managing tiles 2026-03-11 14:28:59 +00:00
741b60485c
Add some files I missed in earlier commits 2026-03-09 23:26:44 +00:00
ce6c6c1cc1
Initial render of standing water reports from the public 2026-03-09 22:59:21 +00:00
f6ce5f91a2
Match up distance from reporter in UI and API 2026-03-09 22:18:24 +00:00