Commit graph

942 commits

Author SHA1 Message Date
bf99e0ce2e
Fix display of types on comms page 2026-03-18 19:26:49 +00:00
d03ae73285
Fix setting address on marker drag of standing water page 2026-03-18 19:26:32 +00:00
c39837faba
Make 'minutes' a bit shorter.
To avoid some line wrapping
2026-03-18 19:26:06 +00:00
28714b06b8
Fix tracking report type through the system 2026-03-18 19:25:52 +00:00
5cfd16e6a0
Fix references to report organization ID 2026-03-18 19:00:40 +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
341c3ef6b9
Fix publicreport creation
The consistency is good, but I added some errors, like not using an enum
2026-03-18 18:45:18 +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
3a28151b09
Make structured and raw geocodes work for bulk geocoding 2026-03-16 03:51:14 +00:00
7a0fe04768
Fix references to structured geocode request 2026-03-16 01:49:41 +00:00
cc95c38ab5
Initial creation of endpoint to send messages to public reporters 2026-03-16 00:20:41 +00:00
9707e8793b
Fix display of notification area 2026-03-14 20:04:10 +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
1075e35bca
Update communications list on event 2026-03-14 18:13:51 +00:00
94b2ff2e21
Only count publicreports that haven't been reviewed 2026-03-14 16:58:25 +00:00
a20c8918f8
Update mailer query based on changes to lead/site rel 2026-03-14 16:56:04 +00:00
f8193f7354
Default map to continental US
Because 0,0 is in the middle of the ocean
2026-03-14 16:55:40 +00:00
299b72eac3
Only show communications if we have a method to do them. 2026-03-14 16:23:09 +00:00
4c71cab973
Avoid error on photo modal without photos 2026-03-14 16:17:08 +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
5d86da626b
Fix address input when user doesn't pick a suggestion or use geolocation 2026-03-14 02:01:48 +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
be1e49e524
Fix rendering of dashboard page 2026-03-13 18:21:45 +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
9a5cc4cf97
Fix service area on communication page 2026-03-13 00:03:36 +00:00
f29047f723
Initiate events connection on all authenticated pages 2026-03-13 00:03:23 +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
32dcc50c94
Add new view for report counts and invalidated status
Also drop site.version from the primary key.
2026-03-12 15:27:36 +00:00
9525363bc8
Disallow SVG upload for photo-upload 2026-03-12 01:23:56 +00:00
82f67bdb6c
Add basic data table and map for looking at sites 2026-03-12 01:16:41 +00:00
26bf8ceab9
Fetch more tasks after clearing one
That way we can keep a list of 20 if we have thousands.
2026-03-12 00:37:57 +00:00
20c0b4487c
Zoom in closer by default on task click 2026-03-12 00:37:43 +00:00
6d1003dcbd
Show the actual total number of tasks pending 2026-03-12 00:30:19 +00:00
40e7c8fdbe
Move discard entry away from complete button
To avoid mis-clicks
2026-03-12 00:00:40 +00:00
20025333fa
Make it possible to save the pool condition 2026-03-11 23:59:50 +00:00
f1c21a6fba
Update sites list to show proper nested authenticated layout. 2026-03-11 23:53:28 +00:00
6e9554d62d
Fix commit action on pool review page to send changes 2026-03-11 23:53:08 +00:00
d0a920b8d9
Log errors on POST, send JSON bodies back 2026-03-11 23:52:44 +00:00
5b75ac1d1c
Add initial sketch of site review page 2026-03-11 23:39:25 +00:00