Fix errors with project ID persistence.

[?]
Feb 8, 2021, 5:37 AM
AKM2VYBLAGDWVBPBF2RXKBU3LQCLD7BTVFKCN5UE45ZUGQWE4ADAC

Dependencies

  • [2] ZHV75AEN basic cleanup
  • [3] DAPLYXHY Successfully rendering QR codes sometimes.
  • [4] YBLHJFCN Implement billing modal.
  • [5] 4GOBY5NQ WIP on modals.
  • [6] U7YAT2ZK Add error reporting to signup form.
  • [7] ANDJ6GEY Add billing component skeleton.
  • [8] KET5QGQP Add billable list (in-progress)
  • [9] N6FG4EW6 Working bootstrap modal! Only a little FFI.
  • [10] QH4UB73N Format with purty.
  • [11] KKJSBWO6 Add createPaymentRequestHandler
  • [12] T2DN23M7 Factor out billing create component.
  • [13] V54JCKJX Payment request creation.
  • [14] VTZT2ILU Wire up billing navigation.
  • [*] QAC2QJ32 Add project overview page to client.

Change contents

  • edit in client/src/Aftok/Billing/Create.purs at line 65
    [4.1755][4.1755:1780]()
    data Query a
    = Tell a
  • replacement in client/src/Aftok/Billing/Create.purs at line 83
    [4.2049][4.2049:2076]()
    = H.Slot Query Output id
    [4.2049]
    [4.2076]
    = forall query. H.Slot query Output id
  • replacement in client/src/Aftok/Billing/Create.purs at line 90
    [4.2213][4.2213:2225]()
    forall m.
    [4.2213]
    [4.2225]
    forall query m.
  • replacement in client/src/Aftok/Billing/Create.purs at line 94
    [4.2270][4.2270:2313]()
    H.Component HH.HTML Query Input Output m
    [4.2270]
    [4.2313]
    H.Component HH.HTML query Input Output m
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 8
    [4.1103][4.3554:3584]()
    import Data.Maybe (Maybe(..))
    [4.1103]
    [4.3584]
    import Data.Maybe (Maybe(..), fromMaybe)
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 10
    [4.3614][3.474:513]()
    -- import Data.Traversable (traverse_)
    [4.3614]
    [3.513]
    import Data.Traversable (traverse_)
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 47
    [4.2702][4.3957:4037]()
    type Input =
    { projectId :: ProjectId
    , billableId :: Maybe BillableId
    }
    [4.2702]
    [4.2726]
    type Input = ProjectId
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 49
    [4.2727][4.4038:4083]()
    data Query a =
    SetBillableId BillableId a
    [4.2727]
    [4.2750]
    data Query a
    = SetProjectId ProjectId a
    | SetBillableId BillableId a
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 56
    [4.2804][4.4114:4133]()
    = SetName String
    [4.2804]
    [4.2852]
    = ProjectChanged ProjectId
    | SetName String
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 90
    [4.4444]
    [4.3572]
    , receive = Just <<< ProjectChanged
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 96
    [4.3659][4.4445:4513]()
    { projectId: input.projectId
    , billableId: input.billableId
    [4.3659]
    [4.3682]
    { projectId: input
    , billableId: Nothing
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 117
    [4.4869]
    [4.4466]
    , P.value (fromMaybe "" st.name)
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 131
    [4.5155]
    [4.5155]
    , P.value (fromMaybe "" st.description)
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 156
    [4.5788]
    [4.5788]
    SetProjectId pid a -> do
    H.modify_ (_ { projectId = pid, billableId = Nothing, name = Nothing, description = Nothing })
    pure (Just a)
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 166
    [4.5999]
    [4.5999]
    ProjectChanged pid ->
    H.modify_ (_ { projectId = pid, billableId = Nothing, name = Nothing, description = Nothing })
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 186
    [4.6747][4.6747:6798]()
    lift $ system.log "Request created."
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 187
    [4.6828]
    [4.6828]
    H.modify_ (_ { billableId = Nothing, name = Nothing, description = Nothing, fieldErrors = [] })
  • edit in client/src/Aftok/Billing/PaymentRequest.purs at line 214
    [4.7201]
    [4.7201]
    | QrClose
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 246
    [4.7879][4.7879:7933]()
    Modals.modalWithClose qrModalId "Payment Request"
    [4.7879]
    [4.7933]
    Modals.modalWithClose qrModalId "Payment Request" QrClose
  • replacement in client/src/Aftok/Billing/PaymentRequest.purs at line 259
    [4.8304][3.957:986]()
    handleAction _ = pure unit
    [4.8304]
    [4.14504]
    handleAction = case _ of
    QrInit -> do
    req <- H.gets (_.req)
    lift $ traverse_ renderQR req
    QrClose ->
    H.modify_ (_ { req = Nothing, dataUrl = Nothing })
  • edit in client/src/Aftok/Billing.purs at line 50
    [4.3822][4.8715:8758]()
    , selectedBillable :: Maybe BillableId
  • edit in client/src/Aftok/Billing.purs at line 105
    [4.5066][4.5066:5098]()
    , selectedBillable: Nothing
  • replacement in client/src/Aftok/Billing.purs at line 147
    [4.9228][4.9228:9319]()
    { projectId: (unwrap p).projectId, billableId: st.selectedBillable }
    [4.9228]
    [4.2433]
    (unwrap p).projectId
  • edit in client/src/Aftok/Billing.purs at line 222
    [4.9929][4.9929:9983]()
    H.modify_ (_ { selectedBillable = Just bid })
  • replacement in client/src/Aftok/Modals.purs at line 80
    [4.13657][4.13657:13671]()
    forall i w.
    [4.13657]
    [4.13671]
    forall action slots m.
  • replacement in client/src/Aftok/Modals.purs at line 83
    [4.13695][4.13695:13774]()
    Array (HH.HTML i w) ->
    HH.HTML i w
    modalWithClose modalId title contents =
    [4.13695]
    [4.13774]
    action ->
    Array (H.ComponentHTML action slots m) ->
    H.ComponentHTML action slots m
    modalWithClose modalId title action contents =
  • edit in client/src/Aftok/Modals.purs at line 119
    [4.14751]
    [4.14751]
    , E.onClick (\_ -> Just action)
  • replacement in client/src/Aftok/Overview.purs at line 102
    [4.3810][2.4:56]()
    [ HH.text "Project Overview - New!" ]
    [4.3810]
    [4.3855]
    [ HH.text "Project Overview" ]