From 3f71ff80538a76c948126ec97bbac05c5f5b12c5 Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Fri, 21 Aug 2026 16:51:17 -0400 Subject: [PATCH] Add blue envelope office-copies question, full-screen order-request confirmation KCI wants to know if a jurisdiction needs extra office copies when ordering blue AV envelopes, and the old flash-message confirmation after submitting a jurisdiction number was easy to miss (auto-dismissed in a few seconds). Co-Authored-By: Claude Sonnet 5 --- app/controllers/RequestOrderController.asp | 14 ++++++- app/models/OrderDetailsAnswersMapper.asp | 4 ++ app/models/OrderDetailsRepository.asp | 16 ++++---- app/models/OrderMailer.asp | 2 + app/models/POBO_OrderDetails.asp | 40 ++++++++++++++++++- app/views/Order/continue.asp | 17 ++++++++ app/views/RequestOrder/sent.asp | 17 ++++++++ ...21164041_add_blue_office_copies_fields.asp | 38 ++++++++++++++++++ public/Default.asp | 1 + 9 files changed, 138 insertions(+), 11 deletions(-) create mode 100644 app/views/RequestOrder/sent.asp create mode 100644 db/migrations/20260821164041_add_blue_office_copies_fields.asp diff --git a/app/controllers/RequestOrderController.asp b/app/controllers/RequestOrderController.asp index 53ca498..6cb2194 100644 --- a/app/controllers/RequestOrderController.asp +++ b/app/controllers/RequestOrderController.asp @@ -92,8 +92,18 @@ Class RequestOrderController_Class Dim token : token = OrdersRepository().CreateOrder(email, jurisdictionNumber) OrderMailer().SendContinuationEmail email, token - Flash().Success = "Check your email for a link to continue your order." - Response.Redirect Routes().AppURL + Response.Redirect Routes().AppURL & "request-order/sent" + End Sub + + '------------------------------------------------------------------------------------------------------------------- + ' GET: full-screen confirmation shown after a successful /request-order submission - replaces + ' the old auto-dismissing flash message, which was easy to miss. + '------------------------------------------------------------------------------------------------------------------- + Public Sub Sent() + m_title = "Check Your Email" + %> + + <% End Sub End Class diff --git a/app/models/OrderDetailsAnswersMapper.asp b/app/models/OrderDetailsAnswersMapper.asp index ef83de7..75fefd4 100644 --- a/app/models/OrderDetailsAnswersMapper.asp +++ b/app/models/OrderDetailsAnswersMapper.asp @@ -20,6 +20,7 @@ Function ValidateOrderDetailsAnswers(answers) RequireEnum errors, answers, "PurpleColorCodingBy", Array("Precinct", "Election") RequireEnum errors, answers, "BluePermitOwnership", Array("KCIPermit", "OwnPermit") RequireEnum errors, answers, "BlueHasNonprofitStatus", Array("Yes", "No", "Unsure") + RequireEnum errors, answers, "BlueWantsOfficeCopies", Array("Yes", "No") RequireEnum errors, answers, "MailingPostageOption", Array("FirstClass", "NonprofitRate", "PresortStandard", "No") RequireEnum errors, answers, "MailingHasNonprofitStatus", Array("Yes", "No", "NotSure") @@ -34,6 +35,7 @@ Function ValidateOrderDetailsAnswers(answers) RequireNonNegativeInteger errors, answers, "PurplePermanentBallotListCount" RequireNonNegativeInteger errors, answers, "PurplePrecinctCount" RequireNonNegativeInteger errors, answers, "PurpleExtraEnvelopeQty" + RequireNonNegativeInteger errors, answers, "BlueOfficeCopiesQty" RequireNonNegativeInteger errors, answers, "MailingEstimatedQuantity" RequireNonNegativeInteger errors, answers, "SecrecySleevesQty" RequireNonNegativeInteger errors, answers, "IVotedStickerRolls" @@ -68,6 +70,8 @@ Sub MapOrderDetailsAnswers(ByRef model, answers) ' Blue envelope model.BlueWantsQuote = DictValue(answers, "BlueWantsQuote") + model.BlueWantsOfficeCopies = DictValue(answers, "BlueWantsOfficeCopies") + model.BlueOfficeCopiesQty = DictValue(answers, "BlueOfficeCopiesQty") model.PurpleBlueProvider = DictValue(answers, "PurpleBlueProvider") model.PurpleBlueProviderOther = DictValue(answers, "PurpleBlueProviderOther") model.BluePrintPermit = DictValue(answers, "BluePrintPermit") diff --git a/app/models/OrderDetailsRepository.asp b/app/models/OrderDetailsRepository.asp index 31e9b95..eed89d6 100644 --- a/app/models/OrderDetailsRepository.asp +++ b/app/models/OrderDetailsRepository.asp @@ -13,7 +13,7 @@ Class OrderDetailsRepository_Class Public Function FindByID(id) - Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails] WHERE [OrderDetailID] = ?" + Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BlueOfficeCopiesQty], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsOfficeCopies], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails] WHERE [OrderDetailID] = ?" Dim rs : Set rs = DAL.Query(sql, Array(id)) If rs.EOF Then Err.Raise 1, "OrderDetailsRepository_Class", RecordNotFoundException("OrderDetailID", id) @@ -28,7 +28,7 @@ Class OrderDetailsRepository_Class End Function Public Function Find(where_kvarray, order_string_or_array) - Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails]" + Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BlueOfficeCopiesQty], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsOfficeCopies], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails]" Dim where_keys, where_values, i If Not IsEmpty(where_kvarray) Then KVUnzip where_kvarray, where_keys, where_values @@ -52,7 +52,7 @@ Class OrderDetailsRepository_Class End Function Public Function FindPaged(where_kvarray, order_string_or_array, per_page, page_num, ByRef page_count, ByRef record_count) - Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails]" + Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BlueOfficeCopiesQty], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsOfficeCopies], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails]" Dim where_keys, where_values, i If Not IsEmpty(where_kvarray) Then KVUnzip where_kvarray, where_keys, where_values @@ -77,7 +77,7 @@ Class OrderDetailsRepository_Class End Function Public Function SearchTablePaged(columns_array, search_value, order_string_or_array, per_page, page_num, ByRef page_count, ByRef record_count) - Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails]" + Dim sql : sql = "Select [BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BlueOfficeCopiesQty], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsOfficeCopies], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderDetailID], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt] FROM [OrderDetails]" Dim i, params() If IsArray(columns_array) And UBound(columns_array) >= 0 Then sql = sql & " WHERE " @@ -112,8 +112,8 @@ Class OrderDetailsRepository_Class End Function Public Sub AddNew(ByRef model) - Dim sql : sql = "INSERT INTO [OrderDetails] ([BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" - DAL.Execute sql, Array(model.BlueDeliveryDate, model.BlueEnvelopeProvider, model.BlueHasNonprofitStatus, model.BlueNonprofitAuthCode, model.BluePermitCity, model.BluePermitClass, model.BluePermitNumber, model.BluePermitOwnership, model.BluePrintPermit, model.BluePrintReturnAddress, model.BlueWantsQuote, model.ContactName, model.FutureVoterStickerRolls, model.IVotedStickerRolls, model.MailingEstimatedQuantity, model.MailingHasNonprofitStatus, model.MailingNonprofitAuthCode, model.MailingNonprofitAuthCodeUnknown, model.MailingPickupDate, model.MailingPostageOption, model.MailingWantsService, model.MailingWantsSorting, model.Municipality, model.OrderID, model.Phone, model.PurpleBlueProvider, model.PurpleBlueProviderOther, model.PurpleColorCodingBy, model.PurpleColorNames, model.PurpleDeliveryDate, model.PurpleEnvelopeProvider, model.PurpleEnvelopeStock, model.PurpleExtraEnvelopeQty, model.PurplePermanentBallotListCount, model.PurplePrecinctCount, model.PurplePrintOption, model.PurplePrintStyle, model.PurpleTrackMIBallot, model.PurpleWantsBlueEnvelopes, model.PurpleWantsQuote, model.SecrecySleevesQty, model.SpecialRequests, model.SubmittedAt) + Dim sql : sql = "INSERT INTO [OrderDetails] ([BlueDeliveryDate], [BlueEnvelopeProvider], [BlueHasNonprofitStatus], [BlueNonprofitAuthCode], [BlueOfficeCopiesQty], [BluePermitCity], [BluePermitClass], [BluePermitNumber], [BluePermitOwnership], [BluePrintPermit], [BluePrintReturnAddress], [BlueWantsOfficeCopies], [BlueWantsQuote], [ContactName], [FutureVoterStickerRolls], [IVotedStickerRolls], [MailingEstimatedQuantity], [MailingHasNonprofitStatus], [MailingNonprofitAuthCode], [MailingNonprofitAuthCodeUnknown], [MailingPickupDate], [MailingPostageOption], [MailingWantsService], [MailingWantsSorting], [Municipality], [OrderID], [Phone], [PurpleBlueProvider], [PurpleBlueProviderOther], [PurpleColorCodingBy], [PurpleColorNames], [PurpleDeliveryDate], [PurpleEnvelopeProvider], [PurpleEnvelopeStock], [PurpleExtraEnvelopeQty], [PurplePermanentBallotListCount], [PurplePrecinctCount], [PurplePrintOption], [PurplePrintStyle], [PurpleTrackMIBallot], [PurpleWantsBlueEnvelopes], [PurpleWantsQuote], [SecrecySleevesQty], [SpecialRequests], [SubmittedAt]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + DAL.Execute sql, Array(model.BlueDeliveryDate, model.BlueEnvelopeProvider, model.BlueHasNonprofitStatus, model.BlueNonprofitAuthCode, model.BlueOfficeCopiesQty, model.BluePermitCity, model.BluePermitClass, model.BluePermitNumber, model.BluePermitOwnership, model.BluePrintPermit, model.BluePrintReturnAddress, model.BlueWantsOfficeCopies, model.BlueWantsQuote, model.ContactName, model.FutureVoterStickerRolls, model.IVotedStickerRolls, model.MailingEstimatedQuantity, model.MailingHasNonprofitStatus, model.MailingNonprofitAuthCode, model.MailingNonprofitAuthCodeUnknown, model.MailingPickupDate, model.MailingPostageOption, model.MailingWantsService, model.MailingWantsSorting, model.Municipality, model.OrderID, model.Phone, model.PurpleBlueProvider, model.PurpleBlueProviderOther, model.PurpleColorCodingBy, model.PurpleColorNames, model.PurpleDeliveryDate, model.PurpleEnvelopeProvider, model.PurpleEnvelopeStock, model.PurpleExtraEnvelopeQty, model.PurplePermanentBallotListCount, model.PurplePrecinctCount, model.PurplePrintOption, model.PurplePrintStyle, model.PurpleTrackMIBallot, model.PurpleWantsBlueEnvelopes, model.PurpleWantsQuote, model.SecrecySleevesQty, model.SpecialRequests, model.SubmittedAt) ' Retrieve the newly inserted ID On Error Resume Next @@ -132,8 +132,8 @@ Class OrderDetailsRepository_Class End Sub Public Sub Update(model) - Dim sql : sql = "UPDATE [OrderDetails] SET [BlueDeliveryDate] = ?, [BlueEnvelopeProvider] = ?, [BlueHasNonprofitStatus] = ?, [BlueNonprofitAuthCode] = ?, [BluePermitCity] = ?, [BluePermitClass] = ?, [BluePermitNumber] = ?, [BluePermitOwnership] = ?, [BluePrintPermit] = ?, [BluePrintReturnAddress] = ?, [BlueWantsQuote] = ?, [ContactName] = ?, [FutureVoterStickerRolls] = ?, [IVotedStickerRolls] = ?, [MailingEstimatedQuantity] = ?, [MailingHasNonprofitStatus] = ?, [MailingNonprofitAuthCode] = ?, [MailingNonprofitAuthCodeUnknown] = ?, [MailingPickupDate] = ?, [MailingPostageOption] = ?, [MailingWantsService] = ?, [MailingWantsSorting] = ?, [Municipality] = ?, [OrderID] = ?, [Phone] = ?, [PurpleBlueProvider] = ?, [PurpleBlueProviderOther] = ?, [PurpleColorCodingBy] = ?, [PurpleColorNames] = ?, [PurpleDeliveryDate] = ?, [PurpleEnvelopeProvider] = ?, [PurpleEnvelopeStock] = ?, [PurpleExtraEnvelopeQty] = ?, [PurplePermanentBallotListCount] = ?, [PurplePrecinctCount] = ?, [PurplePrintOption] = ?, [PurplePrintStyle] = ?, [PurpleTrackMIBallot] = ?, [PurpleWantsBlueEnvelopes] = ?, [PurpleWantsQuote] = ?, [SecrecySleevesQty] = ?, [SpecialRequests] = ?, [SubmittedAt] = ? WHERE [OrderDetailID] = ?" - DAL.Execute sql, Array(model.BlueDeliveryDate, model.BlueEnvelopeProvider, model.BlueHasNonprofitStatus, model.BlueNonprofitAuthCode, model.BluePermitCity, model.BluePermitClass, model.BluePermitNumber, model.BluePermitOwnership, model.BluePrintPermit, model.BluePrintReturnAddress, model.BlueWantsQuote, model.ContactName, model.FutureVoterStickerRolls, model.IVotedStickerRolls, model.MailingEstimatedQuantity, model.MailingHasNonprofitStatus, model.MailingNonprofitAuthCode, model.MailingNonprofitAuthCodeUnknown, model.MailingPickupDate, model.MailingPostageOption, model.MailingWantsService, model.MailingWantsSorting, model.Municipality, model.OrderID, model.Phone, model.PurpleBlueProvider, model.PurpleBlueProviderOther, model.PurpleColorCodingBy, model.PurpleColorNames, model.PurpleDeliveryDate, model.PurpleEnvelopeProvider, model.PurpleEnvelopeStock, model.PurpleExtraEnvelopeQty, model.PurplePermanentBallotListCount, model.PurplePrecinctCount, model.PurplePrintOption, model.PurplePrintStyle, model.PurpleTrackMIBallot, model.PurpleWantsBlueEnvelopes, model.PurpleWantsQuote, model.SecrecySleevesQty, model.SpecialRequests, model.SubmittedAt, model.OrderDetailID) + Dim sql : sql = "UPDATE [OrderDetails] SET [BlueDeliveryDate] = ?, [BlueEnvelopeProvider] = ?, [BlueHasNonprofitStatus] = ?, [BlueNonprofitAuthCode] = ?, [BlueOfficeCopiesQty] = ?, [BluePermitCity] = ?, [BluePermitClass] = ?, [BluePermitNumber] = ?, [BluePermitOwnership] = ?, [BluePrintPermit] = ?, [BluePrintReturnAddress] = ?, [BlueWantsOfficeCopies] = ?, [BlueWantsQuote] = ?, [ContactName] = ?, [FutureVoterStickerRolls] = ?, [IVotedStickerRolls] = ?, [MailingEstimatedQuantity] = ?, [MailingHasNonprofitStatus] = ?, [MailingNonprofitAuthCode] = ?, [MailingNonprofitAuthCodeUnknown] = ?, [MailingPickupDate] = ?, [MailingPostageOption] = ?, [MailingWantsService] = ?, [MailingWantsSorting] = ?, [Municipality] = ?, [OrderID] = ?, [Phone] = ?, [PurpleBlueProvider] = ?, [PurpleBlueProviderOther] = ?, [PurpleColorCodingBy] = ?, [PurpleColorNames] = ?, [PurpleDeliveryDate] = ?, [PurpleEnvelopeProvider] = ?, [PurpleEnvelopeStock] = ?, [PurpleExtraEnvelopeQty] = ?, [PurplePermanentBallotListCount] = ?, [PurplePrecinctCount] = ?, [PurplePrintOption] = ?, [PurplePrintStyle] = ?, [PurpleTrackMIBallot] = ?, [PurpleWantsBlueEnvelopes] = ?, [PurpleWantsQuote] = ?, [SecrecySleevesQty] = ?, [SpecialRequests] = ?, [SubmittedAt] = ? WHERE [OrderDetailID] = ?" + DAL.Execute sql, Array(model.BlueDeliveryDate, model.BlueEnvelopeProvider, model.BlueHasNonprofitStatus, model.BlueNonprofitAuthCode, model.BlueOfficeCopiesQty, model.BluePermitCity, model.BluePermitClass, model.BluePermitNumber, model.BluePermitOwnership, model.BluePrintPermit, model.BluePrintReturnAddress, model.BlueWantsOfficeCopies, model.BlueWantsQuote, model.ContactName, model.FutureVoterStickerRolls, model.IVotedStickerRolls, model.MailingEstimatedQuantity, model.MailingHasNonprofitStatus, model.MailingNonprofitAuthCode, model.MailingNonprofitAuthCodeUnknown, model.MailingPickupDate, model.MailingPostageOption, model.MailingWantsService, model.MailingWantsSorting, model.Municipality, model.OrderID, model.Phone, model.PurpleBlueProvider, model.PurpleBlueProviderOther, model.PurpleColorCodingBy, model.PurpleColorNames, model.PurpleDeliveryDate, model.PurpleEnvelopeProvider, model.PurpleEnvelopeStock, model.PurpleExtraEnvelopeQty, model.PurplePermanentBallotListCount, model.PurplePrecinctCount, model.PurplePrintOption, model.PurplePrintStyle, model.PurpleTrackMIBallot, model.PurpleWantsBlueEnvelopes, model.PurpleWantsQuote, model.SecrecySleevesQty, model.SpecialRequests, model.SubmittedAt, model.OrderDetailID) End Sub Public Sub Delete(id) diff --git a/app/models/OrderMailer.asp b/app/models/OrderMailer.asp index c94b8bd..cd4178f 100644 --- a/app/models/OrderMailer.asp +++ b/app/models/OrderMailer.asp @@ -102,6 +102,8 @@ Class OrderMailer_Class html = html & EmailSection("Blue AV Envelopes", _ EmailRow("Purchasing blue envelopes from KCI", EmailYesNo(model.BlueWantsQuote)) & _ + EmailRow("Additional office copies", model.BlueWantsOfficeCopies) & _ + EmailRow("Additional office copies requested", model.BlueOfficeCopiesQty) & _ EmailRow("Blue envelope provider", blueProviderLine) & _ EmailRow("Print permit", EmailYesNo(model.BluePrintPermit)) & _ EmailRow("Permit ownership", LabelPermitOwnership(model.BluePermitOwnership)) & _ diff --git a/app/models/POBO_OrderDetails.asp b/app/models/POBO_OrderDetails.asp index 80500b7..a25ada9 100644 --- a/app/models/POBO_OrderDetails.asp +++ b/app/models/POBO_OrderDetails.asp @@ -14,12 +14,14 @@ Class POBO_OrderDetails Private pBlueEnvelopeProvider Private pBlueHasNonprofitStatus Private pBlueNonprofitAuthCode + Private pBlueOfficeCopiesQty Private pBluePermitCity Private pBluePermitClass Private pBluePermitNumber Private pBluePermitOwnership Private pBluePrintPermit Private pBluePrintReturnAddress + Private pBlueWantsOfficeCopies Private pBlueWantsQuote Private pContactName Private pFutureVoterStickerRolls @@ -60,12 +62,14 @@ Class POBO_OrderDetails pBlueEnvelopeProvider = Null pBlueHasNonprofitStatus = Null pBlueNonprofitAuthCode = Null + pBlueOfficeCopiesQty = 0 pBluePermitCity = Null pBluePermitClass = Null pBluePermitNumber = Null pBluePermitOwnership = Null pBluePrintPermit = False pBluePrintReturnAddress = False + pBlueWantsOfficeCopies = Null pBlueWantsQuote = False pContactName = Null pFutureVoterStickerRolls = 0 @@ -100,7 +104,7 @@ Class POBO_OrderDetails pSecrecySleevesQty = 0 pSpecialRequests = Null pSubmittedAt = #1/1/1970# - Properties = Array("BlueDeliveryDate","BlueEnvelopeProvider","BlueHasNonprofitStatus","BlueNonprofitAuthCode","BluePermitCity","BluePermitClass","BluePermitNumber","BluePermitOwnership","BluePrintPermit","BluePrintReturnAddress","BlueWantsQuote","ContactName","FutureVoterStickerRolls","IVotedStickerRolls","MailingEstimatedQuantity","MailingHasNonprofitStatus","MailingNonprofitAuthCode","MailingNonprofitAuthCodeUnknown","MailingPickupDate","MailingPostageOption","MailingWantsService","MailingWantsSorting","Municipality","OrderDetailID","OrderID","Phone","PurpleBlueProvider","PurpleBlueProviderOther","PurpleColorCodingBy","PurpleColorNames","PurpleDeliveryDate","PurpleEnvelopeProvider","PurpleEnvelopeStock","PurpleExtraEnvelopeQty","PurplePermanentBallotListCount","PurplePrecinctCount","PurplePrintOption","PurplePrintStyle","PurpleTrackMIBallot","PurpleWantsBlueEnvelopes","PurpleWantsQuote","SecrecySleevesQty","SpecialRequests","SubmittedAt") + Properties = Array("BlueDeliveryDate","BlueEnvelopeProvider","BlueHasNonprofitStatus","BlueNonprofitAuthCode","BlueOfficeCopiesQty","BluePermitCity","BluePermitClass","BluePermitNumber","BluePermitOwnership","BluePrintPermit","BluePrintReturnAddress","BlueWantsOfficeCopies","BlueWantsQuote","ContactName","FutureVoterStickerRolls","IVotedStickerRolls","MailingEstimatedQuantity","MailingHasNonprofitStatus","MailingNonprofitAuthCode","MailingNonprofitAuthCodeUnknown","MailingPickupDate","MailingPostageOption","MailingWantsService","MailingWantsSorting","Municipality","OrderDetailID","OrderID","Phone","PurpleBlueProvider","PurpleBlueProviderOther","PurpleColorCodingBy","PurpleColorNames","PurpleDeliveryDate","PurpleEnvelopeProvider","PurpleEnvelopeStock","PurpleExtraEnvelopeQty","PurplePermanentBallotListCount","PurplePrecinctCount","PurplePrintOption","PurplePrintStyle","PurpleTrackMIBallot","PurpleWantsBlueEnvelopes","PurpleWantsQuote","SecrecySleevesQty","SpecialRequests","SubmittedAt") End Sub Public Property Get PrimaryKey() @@ -175,6 +179,23 @@ Class POBO_OrderDetails On Error GoTo 0 End Property + Public Property Get BlueOfficeCopiesQty() + BlueOfficeCopiesQty = pBlueOfficeCopiesQty + End Property + + Public Property Let BlueOfficeCopiesQty(val) + On Error Resume Next + If IsNumeric(val) Then + pBlueOfficeCopiesQty = CDbl(val) + Else + pBlueOfficeCopiesQty = val + End If + If Err.Number <> 0 Then + Err.Raise Err.Number, "POBO_OrderDetails.BlueOfficeCopiesQty", "Invalid value for BlueOfficeCopiesQty: " & Err.Description + End If + On Error GoTo 0 + End Property + Public Property Get BluePermitCity() BluePermitCity = pBluePermitCity End Property @@ -273,6 +294,23 @@ Class POBO_OrderDetails On Error GoTo 0 End Property + Public Property Get BlueWantsOfficeCopies() + BlueWantsOfficeCopies = pBlueWantsOfficeCopies + End Property + + Public Property Let BlueWantsOfficeCopies(val) + On Error Resume Next + If IsNumeric(val) Then + pBlueWantsOfficeCopies = CDbl(val) + Else + pBlueWantsOfficeCopies = val + End If + If Err.Number <> 0 Then + Err.Raise Err.Number, "POBO_OrderDetails.BlueWantsOfficeCopies", "Invalid value for BlueWantsOfficeCopies: " & Err.Description + End If + On Error GoTo 0 + End Property + Public Property Get BlueWantsQuote() BlueWantsQuote = pBlueWantsQuote End Property diff --git a/app/views/Order/continue.asp b/app/views/Order/continue.asp index 370ae42..7bbd7e9 100644 --- a/app/views/Order/continue.asp +++ b/app/views/Order/continue.asp @@ -191,6 +191,23 @@ title: "Would you like to purchase blue AV envelopes from KCI?", isRequired: true }, + { + type: "radiogroup", name: "BlueWantsOfficeCopies", + title: "Would you like additional office copies when ordering KCI envelopes?", + visibleIf: "{BlueWantsQuote} = true", + isRequired: true, + choices: [ + { value: "Yes", text: "Yes" }, + { value: "No", text: "No" } + ] + }, + { + type: "text", name: "BlueOfficeCopiesQty", + title: "How many additional office copies would you like?", + inputType: "number", min: 0, + visibleIf: "{BlueWantsOfficeCopies} = 'Yes'", + isRequired: true + }, { type: "radiogroup", name: "PurpleBlueProvider", title: "Who is your blue envelope provider?", diff --git a/app/views/RequestOrder/sent.asp b/app/views/RequestOrder/sent.asp new file mode 100644 index 0000000..5037b89 --- /dev/null +++ b/app/views/RequestOrder/sent.asp @@ -0,0 +1,17 @@ +
+
+
+ Order request received +

Check your email

+

+ An email has been sent to complete your order. If you do not see an email in your + inbox please check your spam folder. +

+

+ If you do not see the email in either location, please email Ericka at + ErickaW@kentcommunications.com + or call (616) 957-2120. +

+
+
+
diff --git a/db/migrations/20260821164041_add_blue_office_copies_fields.asp b/db/migrations/20260821164041_add_blue_office_copies_fields.asp new file mode 100644 index 0000000..6fce86a --- /dev/null +++ b/db/migrations/20260821164041_add_blue_office_copies_fields.asp @@ -0,0 +1,38 @@ +<% +'======================================================================================================================= +' MIGRATION: add_blue_office_copies_fields +'======================================================================================================================= +' This migration was auto-generated. Add your migration logic below. +' +' The migration object provides these helper methods: +' - migration.ExecuteSQL(sql) - Execute raw SQL +' - migration.CreateTable(name, columns) - Create a table +' - migration.DropTable(name) - Drop a table +' - migration.AddColumn(table, column, type) - Add a column +' - migration.DropColumn(table, column) - Drop a column +' - migration.CreateIndex(name, table, columns) - Create an index +' - migration.DropIndex(name, table) - Drop an index +' +' For complex operations, use migration.DB to access the database directly: +' migration.DB.Execute "INSERT INTO users (name) VALUES (?)", Array("John") +' + +'----------------------------------------------------------------------------------------------------------------------- +' UP - Apply the migration +'----------------------------------------------------------------------------------------------------------------------- +Sub Migration_Up(migration) + ' Blue AV Envelope section - "would you like additional office copies when ordering + ' KCI envelopes?" Only asked when BlueWantsQuote = true, so it must tolerate NULL like + ' BlueHasNonprofitStatus does - kept as VARCHAR rather than YESNO, which can't store NULL. + migration.AddColumn "OrderDetails", "BlueWantsOfficeCopies", "VARCHAR(10)" + migration.AddColumn "OrderDetails", "BlueOfficeCopiesQty", "INTEGER" +End Sub + +'----------------------------------------------------------------------------------------------------------------------- +' DOWN - Rollback the migration +'----------------------------------------------------------------------------------------------------------------------- +Sub Migration_Down(migration) + migration.DropColumn "OrderDetails", "BlueOfficeCopiesQty" + migration.DropColumn "OrderDetails", "BlueWantsOfficeCopies" +End Sub +%> diff --git a/public/Default.asp b/public/Default.asp index 133daf0..297bb01 100644 --- a/public/Default.asp +++ b/public/Default.asp @@ -9,6 +9,7 @@ router.AddRoute "GET", "/request-order", "RequestOrderController", "Index" router.AddRoute "POST", "/request-order", "RequestOrderController", "Create" + router.AddRoute "GET", "/request-order/sent", "RequestOrderController", "Sent" router.AddRoute "GET", "/order/continue", "OrderController", "Continue" router.AddRoute "POST", "/order/submit", "OrderApiController", "SubmitOrderDetails"