From 3c62fe2ca1a700fbf25ca51ef40e09d3f7de9250 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 14 Apr 2026 01:26:23 +0000 Subject: [PATCH] Be consistent about using report.public_id over report.id --- resource/publicreport_compliance.go | 4 ++-- ts/components/CommunicationColumnList.vue | 2 +- ts/components/PublicreportCard.vue | 2 +- ts/rmo/content/Nuisance.vue | 2 +- ts/rmo/content/Water.vue | 2 +- ts/rmo/content/compliance/Complete.vue | 14 -------------- ts/rmo/view/Compliance.vue | 14 ++++++++++++-- ts/store/publicreport.ts | 2 +- ts/type/api.ts | 6 ------ 9 files changed, 19 insertions(+), 29 deletions(-) diff --git a/resource/publicreport_compliance.go b/resource/publicreport_compliance.go index c4f5d470..eb454597 100644 --- a/resource/publicreport_compliance.go +++ b/resource/publicreport_compliance.go @@ -28,7 +28,7 @@ type complianceR struct { } type compliance struct { District string `json:"district"` - ID string `json:"id"` + PublicID string `json:"public_id"` URI string `json:"uri"` } @@ -91,7 +91,7 @@ func (res *complianceR) Create(ctx context.Context, r *http.Request, n publicrep } return &compliance{ District: district_uri, - ID: report.PublicID, + PublicID: report.PublicID, URI: uri, }, nil } diff --git a/ts/components/CommunicationColumnList.vue b/ts/components/CommunicationColumnList.vue index e3511746..e407fdc7 100644 --- a/ts/components/CommunicationColumnList.vue +++ b/ts/components/CommunicationColumnList.vue @@ -212,7 +212,7 @@ function filterMatchesLogEntry(filter: string, logs: LogEntry[]) { function filterMatchesPublicReport(filter: string, pr: PublicReport) { if ( pr.address.raw.includes(filter) || - pr.id.includes(filter) || + pr.public_id.includes(filter) || filterMatchesLogEntry(filter, pr.log) ) { return true; diff --git a/ts/components/PublicreportCard.vue b/ts/components/PublicreportCard.vue index 541f6de5..43bf2e10 100644 --- a/ts/components/PublicreportCard.vue +++ b/ts/components/PublicreportCard.vue @@ -25,7 +25,7 @@ Standing Water Report - Report ID: #{{ report.id }} + Report ID: #{{ report.public_id }} diff --git a/ts/rmo/content/Nuisance.vue b/ts/rmo/content/Nuisance.vue index 74ca6da6..84b3319b 100644 --- a/ts/rmo/content/Nuisance.vue +++ b/ts/rmo/content/Nuisance.vue @@ -537,7 +537,7 @@ async function doSubmit() { }); const data: PublicReport = (await resp.json()) as PublicReport; storePublicReport.add(data); - router.push("/submitted/" + data.id); + router.push("/submitted/" + data.public_id); } catch (error) { errorMessage.value = error instanceof Error ? error.message : "Upload failed"; diff --git a/ts/rmo/content/Water.vue b/ts/rmo/content/Water.vue index 9e60d1eb..eea853bc 100644 --- a/ts/rmo/content/Water.vue +++ b/ts/rmo/content/Water.vue @@ -697,7 +697,7 @@ async function doSubmit() { }); const data: PublicReport = (await resp.json()) as PublicReport; storePublicReport.add(data); - router.push("/submitted/" + data.id); + router.push("/submitted/" + data.public_id); } catch (error) { errorMessage.value = error instanceof Error ? error.message : "Upload failed"; diff --git a/ts/rmo/content/compliance/Complete.vue b/ts/rmo/content/compliance/Complete.vue index d15be528..2e5d45a8 100644 --- a/ts/rmo/content/compliance/Complete.vue +++ b/ts/rmo/content/compliance/Complete.vue @@ -121,13 +121,6 @@ margin-top: 16px; } -.reference-number { - text-align: center; - color: #6c757d; - font-size: 0.9rem; - margin-top: 24px; -} - .action-buttons { width: 100%; } @@ -233,13 +226,6 @@ - - -
- - Reference number: {{ modelValue.public_id }} - -