Split out ComplianceDistrict view for creating new compliance reports
The idea here is that we'll make compliance reports two different ways, The first is if the user navigates to /district/:slug/compliance, the second if they open a QR code from a mailer. In both cases we create the report then feed them into a flow for updating the data on that report.
This commit is contained in:
parent
8eae73eefb
commit
f927b0a911
7 changed files with 154 additions and 241 deletions
|
|
@ -43,6 +43,7 @@ type publicreportComplianceForm struct {
|
|||
GateCode omit.Val[string] `schema:"gate_code" json:"gate_code"`
|
||||
HasDog omitnull.Val[bool] `schema:"has_dog" json:"has_dog"`
|
||||
Location omit.Val[types.Location] `schema:"location" json:"location"`
|
||||
MailerID omit.Val[string] `schema:"mailer_id" json:"mailer_id"`
|
||||
PermissionType omit.Val[enums.Permissionaccesstype] `schema:"permission_type" json:"permission_type"`
|
||||
Reporter omit.Val[types.Contact] `schema:"reporter" json:"reporter"`
|
||||
ReportPhoneCanSMS omitnull.Val[bool] `schema:"report_phone_can_text" json:"report_phone_can_text"`
|
||||
|
|
@ -89,7 +90,7 @@ func (res *complianceR) Create(ctx context.Context, r *http.Request, n publicrep
|
|||
Location: omitnull.FromPtr[string](nil),
|
||||
MapZoom: omit.From(float32(0.0)),
|
||||
//OrganizationID: omit.From[int32](int32(*district_id)),
|
||||
//PublicID: omit.From(public_id),
|
||||
PublicID: n.MailerID,
|
||||
ReporterEmail: omit.From(""),
|
||||
ReporterName: omit.From(""),
|
||||
ReporterPhone: omit.From(""),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue