Skip to content
This repository has been archived by the owner on Feb 28, 2018. It is now read-only.

Commit

Permalink
Fix issues updating value and with url mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogerio Chaves committed Jan 19, 2017
1 parent b906280 commit b523542
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions jarbas/frontend/elm/Reimbursement/Fields.elm
Expand Up @@ -51,14 +51,14 @@ type Label

searchableLabels : List ( Label, String )
searchableLabels =
[ ( ApplicantId, "ApplicantId" )
, ( CnpjCpf, "CnpjCpf" )
, ( DocumentId, "DocumentId" )
, ( IssueDateEnd, "IssueDateEnd" )
, ( IssueDateStart, "IssueDateStart" )
, ( Month, "Month" )
, ( SubquotaId, "SubquotaId" )
, ( Year, "Year" )
[ ( ApplicantId, "applicantId" )
, ( CnpjCpf, "cnpjCpf" )
, ( DocumentId, "documentId" )
, ( IssueDateEnd, "issueDateEnd" )
, ( IssueDateStart, "issueDateStart" )
, ( Month, "month" )
, ( SubquotaId, "subquotaId" )
, ( Year, "year" )
]


Expand Down
4 changes: 2 additions & 2 deletions jarbas/frontend/elm/Reimbursement/Search/Update.elm
Expand Up @@ -53,7 +53,7 @@ updateField model label value =
fieldMatches field =
Fields.getLabel field == label

formatValue value =
formattedValue =
if Fields.isNumeric label then
String.filter (\c -> Char.isDigit c || c == ' ') value
else if label == State then
Expand All @@ -64,7 +64,7 @@ updateField model label value =
String.trim value

formatField (Field label value) =
Field label (formatValue value)
Field label formattedValue
in
model
|> updateIf fieldMatches formatField
Expand Down

0 comments on commit b523542

Please sign in to comment.