N6FG4EW6QU7V6QV7UHHYRA3EDKPGVCAEAT7IS3QI45N3GRRV2V7AC 4GOBY5NQYPISPYKVN74SM7JYWV7PALUDWWGVXWRHW2J2CPPMC42QC NJNMO72S7VIUV22JXB4IFPZMHWTJAOTP6EC6Z4QSKYIROSXT52MQC T2DN23M7W53UMRV46SKDP6UDMCZB7VG2J772LXKMAJNL6NA62MKAC ANDJ6GEY2IRDNKPVXESYEZKU24BAXFB5PPSZFIJRMBGL57A622FQC EA5BFM5GMM7KNMDLTVOSUKVKMSIDD72TAFVHDVGEOUY5VELECU3QC NAFJ6RB3KYDBSTSNB3WQSVUQEPUGG2RZCBWRF4XNT2UKSOXDNMDQC OUR4PAOTXXKXQPMAR5TIYX7MBRRJS2WVTZS7SN4SOGML7SPJIJGQC QU5FW67RGCWOWT2YFM4NYMJFFHWIRPQANQBBAHBKZUY7UYMCSIMQC QMEYU4MWLTSWPWEEOFRLK2IKE64BY3V5X73323WPLCGPP3TPDYGAC SAESJLLYCQJUIHKFYFV53AWHFOSGI5SKLVS7DPTQO6BKGITPYPUQC QH4UB73NUR2XPHZQ2RGJBKKUBN43RKC7ZJBCFPP4ESUIIEDDR5XQC AAALU5A2FQQTNV7ZVAFCU2JTRUONEUWWZKENDUUXDOFUGWHM3KZQC <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script><script src="./index.js"></script>
HH.form_[ HH.div[ P.classes (ClassName <$> ["form-group"]) ][ HH.label[ P.for "billableName", P.classes (ClassName <$> ["font-weight-bold", "mb-1"] )][ HH.text "Bill Name:" ], HH.input[ P.type_ P.InputText, P.classes (ClassName <$> [ "form-control-sm" ]), P.id_ "billableName", P.placeholder "A name for the product or service you want to bill for", P.required true, P.autofocus true, E.onValueInput (Just <<< SetName)], HH.label[ P.for "billableDesc", P.classes (ClassName <$> ["font-weight-bold", "mb-1"] )][ HH.text "Bill Description:" ], HH.input[ P.type_ P.InputText, P.classes (ClassName <$> [ "form-control-sm" ]), P.id_ "billableDesc", P.placeholder "Description of the product or service", P.required true, P.autofocus true, E.onValueInput (Just <<< SetDesc)], HH.label[ P.for "billableMsg", P.classes (ClassName <$> ["font-weight-bold", "mb-1"] )][ HH.text "Message to be included with bill:" ], HH.input
Modals.modal "createBillable" "Create Billable" SaveBillable[ HH.form_[ HH.div[ P.classes (ClassName <$> ["form-group"]) ][ HH.label[ P.for "billableName", P.classes (ClassName <$> ["font-weight-bold", "mb-1"] )][ HH.text "Bill Name:" ], HH.input
, HH.label[ P.for "billableDesc", P.classes (ClassName <$> ["font-weight-bold", "mb-1"] )][ HH.text "Bill Description:" ], HH.input[ P.type_ P.InputText, P.classes (ClassName <$> [ "form-control-sm" ]), P.id_ "billableDesc", P.placeholder "Description of the product or service", P.required true, P.autofocus true, E.onValueInput (Just <<< SetDesc)], HH.label[ P.for "billableMsg", P.classes (ClassName <$> ["font-weight-bold", "mb-1"] )][ HH.text "Message to be included with bill:" ], HH.input[ P.type_ P.InputText, P.classes (ClassName <$> [ "form-control-sm" ]), P.id_ "billableMsg", P.placeholder "Description of the product or service", P.required true, P.autofocus true, E.onValueInput (Just <<< SetDesc)]]
, Modals.modal "createBillable" "Create Billable"[ HH.slot_createBillableunit(Create.component system caps.createBillable)(unwrap p).projectId(Just <<< BillableCreated)]
, system.portal_createBillableunit(Create.component system caps.createBillable)(unwrap p).projectIdNothing(Just <<< BillableCreated)
exports.toggleModalInternal = modalId => toggle => () => {$('#' + modalId).modal(toggle)}
module Aftok.Modals.ModalFFI( toggleModal, Toggle(..)) whereimport Prelude (Unit)import Effect (Effect)data Toggle= ShowModal| ToggleModal| HideModaltoggleModal :: String -> Toggle -> Effect UnittoggleModal modalId t =let toggleStr = case t ofShowModal -> "show"ToggleModal -> "toggle"HideModal -> "hide"in toggleModalInternal modalId toggleStrforeign import toggleModalInternal :: String -> String -> Effect Unit
modal :: forall w i. String -> String -> Array (HH.HTML w i) -> HH.HTML w imodal modalId title contents =
modal ::forall action slots m.String ->String ->action ->Array (H.ComponentHTML action slots m) ->H.ComponentHTML action slots mmodal modalId title submit contents =
, portal ::forall query action input output slots label slot _1.Row.Cons label (H.Slot query output slot) _1 slots =>IsSymbol label =>Ord slot =>Monad m =>SProxy label ->slot ->H.Component HH.HTML query input output m ->input ->Maybe HTMLElement ->(output -> Maybe action) ->H.ComponentHTML action slots m, toggleModal :: String -> ModalFFI.Toggle -> m Unit