diff --git a/resource/publicreport_nuisance.go b/resource/publicreport_nuisance.go index 5fc2090d..ec19a5b7 100644 --- a/resource/publicreport_nuisance.go +++ b/resource/publicreport_nuisance.go @@ -138,7 +138,7 @@ func (res *nuisanceR) Create(ctx context.Context, r *http.Request, n nuisanceFor if err != nil { return nil, nhttp.NewError("create nuisance report: %w", err) } - uri, err := res.router.IDStrToURI("publicreport.ByIDGet", report.PublicID) + uri, err := res.router.IDStrToURI("publicreport.ByIDGetPublic", report.PublicID) if err != nil { return nil, nhttp.NewError("generate uri: %w", err) } diff --git a/resource/publicreport_water.go b/resource/publicreport_water.go index dcf97309..bc6dd3e1 100644 --- a/resource/publicreport_water.go +++ b/resource/publicreport_water.go @@ -124,7 +124,7 @@ func (res *waterR) Create(ctx context.Context, r *http.Request, w waterForm) (*w if err != nil { return nil, nhttp.NewError("Failed to save new report: %w", err) } - uri, err := res.router.IDStrToURI("publicreport.ByIDGet", report.PublicID) + uri, err := res.router.IDStrToURI("publicreport.ByIDGetPublic", report.PublicID) if err != nil { return nil, nhttp.NewError("generate uri: %w", err) } diff --git a/ts/rmo/route/config.ts b/ts/rmo/route/config.ts index b1e90cc4..a5b61a62 100644 --- a/ts/rmo/route/config.ts +++ b/ts/rmo/route/config.ts @@ -133,7 +133,7 @@ const routes: RouteRecordRaw[] = [ }, { component: StatusByID, - name: "StatusbyID", + name: ROUTE_NAMES.STATUS_BY_ID, path: "/status/:id", props: true, }, diff --git a/ts/rmo/route/name.ts b/ts/rmo/route/name.ts index bd1f59e9..28e83d98 100644 --- a/ts/rmo/route/name.ts +++ b/ts/rmo/route/name.ts @@ -10,6 +10,7 @@ export const ROUTE_NAMES = { COMPLIANCE_SUBMIT: "compliance-submit", REGISTER_NOTIFICATIONS_COMPLETE: "register-notifications-complete", REVIEW_SITE: "review-site", + STATUS_BY_ID: "status-by-id", } as const; export type RouteName = (typeof ROUTE_NAMES)[keyof typeof ROUTE_NAMES]; diff --git a/ts/rmo/route/use.ts b/ts/rmo/route/use.ts index 937b42a8..689e4800 100644 --- a/ts/rmo/route/use.ts +++ b/ts/rmo/route/use.ts @@ -41,6 +41,14 @@ export function useRoutes() { }, }; }; + const StatusByID = (publicID: string): RouteLocationRaw => { + return { + name: ROUTE_NAMES.STATUS_BY_ID, + params: { + public_id: publicID, + }, + }; + }; return { ComplianceAddress, ComplianceComplete, @@ -52,5 +60,6 @@ export function useRoutes() { ComplianceProcess, ComplianceSubmit, RegisterNotificationsComplete, + StatusByID, }; } diff --git a/ts/rmo/view/RegisterNotificationsComplete.vue b/ts/rmo/view/RegisterNotificationsComplete.vue index 4be10d61..9185e685 100644 --- a/ts/rmo/view/RegisterNotificationsComplete.vue +++ b/ts/rmo/view/RegisterNotificationsComplete.vue @@ -144,8 +144,8 @@
@@ -171,9 +171,11 @@ diff --git a/ts/rmo/view/ReportSubmitted.vue b/ts/rmo/view/ReportSubmitted.vue index e157154b..8bd00db6 100644 --- a/ts/rmo/view/ReportSubmitted.vue +++ b/ts/rmo/view/ReportSubmitted.vue @@ -222,7 +222,10 @@ You can check the status of your report at any time using your Report ID. -