Commit graph

216 commits

Author SHA1 Message Date
e3cc1e99d1
Update storage of reporter in contact
I failed to retrieve the data correctly before as part of the changeover
to contact records.

Issue: #13
2026-05-21 23:12:36 +00:00
d120ed05f2
Emit communication updated events when reports change
Some checks failed
/ golint (push) Failing after 10s
2026-05-21 04:26:07 +00:00
594bf33b0a
Fix updating contact by ID 2026-05-21 04:25:36 +00:00
5e103f46a0
Fix populating water report from ID, make ContactSimple
ContactSimple is the replacement for ContactReporter, which was the
simplified form of a contact from a report. I made the name more generic
and use it in the general report structures for consistency.
2026-05-21 03:23:10 +00:00
72eef554ea
Fix creation of nuisance reports
Some checks failed
/ golint (push) Failing after 9s
Issue: #9
2026-05-20 23:17:57 +00:00
4ead6ba31b
Increase DB connections to 10
Seeing if it helps sort out the DB pool getting exhausted

Issue: #3
2026-05-19 20:32:35 +00:00
7237f5f666
Move internal references to new source hosting
Some checks failed
/ golint (push) Failing after 3m50s
2026-05-19 15:33:57 +00:00
1f7b4cede2
lint: remove embedded field that's unnecessary 2026-05-19 15:24:56 +00:00
12e9599c15
lint: don't capitalize error messages 2026-05-19 15:24:44 +00:00
14e95a2fe0
Remove unused stored procedure function 2026-05-19 15:14:06 +00:00
71463433e7
Add missing user query file
Some checks failed
/ golint (push) Failing after 3m52s
2026-05-19 15:04:25 +00:00
47aebd0237
Remove unused db/prepared functions
Some checks failed
/ golint (push) Failing after 2m50s
Fixes some lint
2026-05-19 14:45:52 +00:00
3cafca6cbd
Set contact ID when creating a report
Some checks failed
/ golint (push) Failing after 3m51s
For now we just set it to the empty contact, which is a bit weird, and
wrong until we fix the update logic.
2026-05-19 00:39:53 +00:00
2093ea74c4
Pass pool management on to pgxpool
Some checks failed
/ golint (push) Failing after 3m56s
Rather than letting Bob create a pool-on-pool.
2026-05-19 00:02:13 +00:00
1c8b13b31e
Restore accidentally removed platform mailer by ID func
Needed by the mailer resource
2026-05-16 18:12:01 +00:00
feff03428f
Actually allocate result arrays 2026-05-16 18:11:44 +00:00
725945d95c
WIP: creating contact resource
Some checks failed
/ golint (push) Has been cancelled
2026-05-15 20:10:14 +00:00
f1fe8b4d2b
Add contacts, rework comms schema
This in a pretty huge change. At a high level we're adding the concept
of a 'contact' which is a person or organization that has zero or more
contact methods (email, phone). This ended up cascading a number of
changes, including critically to the publicreprt schema. In the end it
seemed safer to get to the point where I'm confident we aren't using any
of the old fields for storing reporter information (though I haven't
deleted the columns yet) so I removed the code for defining those
columns.

At this point I think it's not possible for me to regenerate the bob
schema due to the interdependencies between my various schemas, so the
migration is well-and-truly happening.
2026-05-15 16:58:28 +00:00
e569bb32b7
Start work on populating context of communication at API layer
Remove communication stub, it's a performance enhancement.
2026-05-12 18:04:39 +00:00
b369361a43
Initial work on getting communication context
Committing now to debug build process.
2026-05-12 18:04:39 +00:00
8e0ac790f1
Return all communications from the DB
We'll filter on the frontend
2026-05-11 23:23:01 +00:00
3a3cd78cac
Only show communications that are 'new' or 'opened' 2026-05-11 23:22:43 +00:00
27596aff20
Fix insertion of communication log entries when marking 2026-05-11 23:22:41 +00:00
57eea3a08a
Fix reference to enum value in SQL
Without this we get a runtime crash querying the DB :(
2026-05-11 23:22:09 +00:00
d1935d31af
Sort communication by recency 2026-05-11 23:22:09 +00:00
93510e4b2e
Properly insert nuisance and water public reports 2026-05-11 23:22:07 +00:00
10046f1edb lint: remove unused items from resource, sync, platform, db
- Remove contentUploadList/Placeholder/Detail from resource/upload.go
- Remove toImageURLs, userURI from resource/communication.go
- Remove responseListUser from resource/user.go
- Remove contentSignin/getSignin from sync/signin.go (re-add contentSignin used elsewhere)
- Delete sync/service-request.go (entirely unused)
- Remove _rowWithID from platform/signal.go
- Remove unused tag field from db/tx.go Rows struct
2026-05-09 17:19:38 +00:00
4008b9aa25
lint: fix errcheck for txn.Rollback/Commit and r.Close
Use lint.LogOnErrRollback for deferred Rollback in test-jet.
Use lint.LogOnErrCtx for Commit in test-jet.
Use lint.LogOnErr for r.Close in ExecuteNoneTxBob.
2026-05-09 02:14:47 +00:00
970cd568dc
Add generated jet tables and models
These will change with schema changes
2026-05-09 01:54:12 +00:00
935800e334
Switch to using the Gleipnir fork of jet
Because we need those sweet, sweet geometry columns
2026-05-09 01:48:56 +00:00
24a3610c4c
Correctly build updaters with New
Otherwise we have nil columns
2026-05-08 22:22:52 +00:00
7da653efc6
Avoid a DB query if there are no address IDs 2026-05-08 22:21:56 +00:00
735a9dc1d2
Properly close rows on empty results
I we don't do this we get "conn busy" errors.
2026-05-08 22:21:27 +00:00
f2585c569c
Woops, actually set all columns on compliance because it doesn't have a serial key 2026-05-08 01:08:06 +00:00
0fc46d5916
Only set mutable columns on insert
Because we don't want to set ID and other primary keys
2026-05-08 00:56:55 +00:00
61ad3fbe45
Remove string-based queries for public report data
Use the new jet hotness
2026-05-07 23:22:50 +00:00
12213fb31b
Remove string-only references to location_* generated columns 2026-05-07 17:01:54 +00:00
7a361a330d
Remove now-extraneous latitude/longitude generated columns
Now that we can pull out the geometry directly into a go object we don't
need these and they complicate our insertions
2026-05-07 16:38:42 +00:00
fcd95f1a25
Get back to compiling, but using new jet for publicreport
This was an epically long change, and a terrible idea, but it compiles.
This was essentially a cascade that came about because I can't blend jet
and bob in the same transaction. In for a penny, I guess...
2026-05-07 10:39:17 +00:00
a95e44cf42
Use transactions to set the communication status changes
Not doing it yet, but soon we'll do log entries for them.
2026-05-04 20:57:50 +00:00
040ab106b4
Fix failing to set timestamp in mark query
I accidentally didn't understand how this API works.
2026-05-04 20:30:36 +00:00
114aec73ed
Fix setting timestamp for when action is taken 2026-05-04 20:09:56 +00:00
3153e8bf13
Initial work marking communications
And a bunch of lint fixes
2026-05-04 19:07:29 +00:00
d6b664d84a
Return the communication we create
...or else it'll be empty.
2026-05-02 00:37:51 +00:00
52d4c47e43
Fix lint errors related to not checking errors 2026-05-02 00:37:28 +00:00
a82732a49c
Return communication database rows from communication API
This is a pretty big refactor of how communication works to start moving
us in the direction we want to go long-term. This adds the new
communication row and migrates existing reports to add rows for
communication.

There's also a bunch of automatic fixes from the new linter. I should
have added them separately, but whatever.
2026-05-01 21:00:23 +00:00
bab3200b6c
Port all of the arcgis schema to using jet
Have not tested anything at this point, it just compiles.
2026-05-01 17:28:33 +00:00
a82b2b8cb8
Add new communication table
It allows us to track when communication tasks are complete, and
information about how they were completed, separate from the entries
that created the tasks in the first place (reports, emails, texts)
2026-05-01 15:13:05 +00:00
6a47302192
Create custom jet template for both stadia and arcgis 2026-05-01 15:11:20 +00:00
0e0b2489e6
Get beginnings of custom column type working 2026-05-01 06:27:26 +00:00