yesod-mangopay 1.11.5 → 1.12
raw patch · 3 files changed
+15/−14 lines, 3 filesdep ~http-typesdep ~mangopaydep ~time
Dependency ranges changed: http-types, mangopay, time, wai, warp
Files
- app/Handler/User.hs +4/−4
- src/Yesod/MangoPay/Util.hs +5/−4
- yesod-mangopay.cabal +6/−6
app/Handler/User.hs view
@@ -129,10 +129,10 @@ <*> areq textField (localizedFS MsgUserFirst) (uFirstName <$> muser) <*> areq textField (localizedFS MsgUserLast) (uLastName <$> muser) <*> aopt textField (localizedFS MsgUserAddress) (uAddress <$> muser)- <*> (day2Posix <$> areq (jqueryDayField def+ <*> (dayToMpTime <$> areq (jqueryDayField def { jdsChangeYear = True -- give a year dropdown , jdsYearRange = "1900:-5" -- 1900 till five years ago- }) (localizedFS MsgUserBirthday) (posix2Day <$> uBirthday <$> muser))+ }) (localizedFS MsgUserBirthday) (mpTimeToDay <$> uBirthday <$> muser)) <*> areq countryField (localizedFS MsgUserNationality) (uNationality <$> muser) <*> areq countryField (localizedFS MsgUserCountry) (uCountryOfResidence <$> muser) <*> aopt textField (localizedFS MsgUserOccupation) (uOccupation <$> muser)@@ -155,10 +155,10 @@ <*> areq textField (localizedFS MsgUserRepLast) (lLegalRepresentativeLastName <$> muser) <*> aopt textField (localizedFS MsgUserRepAddress) (lLegalRepresentativeAddress <$> muser) <*> aopt textField (localizedFS MsgUserRepEmail) (lLegalRepresentativeEmail <$> muser)- <*> (day2Posix <$> areq (jqueryDayField def+ <*> (dayToMpTime <$> areq (jqueryDayField def { jdsChangeYear = True -- give a year dropdown , jdsYearRange = "1900:-5" -- 1900 till five years ago- }) (localizedFS MsgUserRepBirthday) (posix2Day <$> lLegalRepresentativeBirthday <$> muser))+ }) (localizedFS MsgUserRepBirthday) (mpTimeToDay <$> lLegalRepresentativeBirthday <$> muser)) <*> areq countryField (localizedFS MsgUserRepNationality) (lLegalRepresentativeNationality <$> muser) <*> areq countryField (localizedFS MsgUserRepCountry) (lLegalRepresentativeCountryOfResidence <$> muser) <*> pure Nothing -- value comes from Documents uploaded (I think)
src/Yesod/MangoPay/Util.hs view
@@ -4,11 +4,12 @@ import Data.Time.Clock.POSIX import Data.Time.Clock import Data.Time.Calendar+import Web.MangoPay (MpTime(..)) -- | day to posix time-day2Posix :: Day -> POSIXTime-day2Posix d=utcTimeToPOSIXSeconds $ UTCTime d 0+dayToMpTime :: Day -> MpTime+dayToMpTime = MpTime . utcTimeToPOSIXSeconds . flip UTCTime 0 -- | posix time to Day-posix2Day :: POSIXTime -> Day-posix2Day =utctDay . posixSecondsToUTCTime+mpTimeToDay :: MpTime -> Day+mpTimeToDay = utctDay . posixSecondsToUTCTime . unMpTime
yesod-mangopay.cabal view
@@ -1,5 +1,5 @@ name: yesod-mangopay-version: 1.11.5+version: 1.12 cabal-version: >= 1.8 build-type: Simple author: JP Moresmau <jpmoresmau@gmail.com>@@ -34,13 +34,13 @@ hs-source-dirs: src build-depends: base >= 4 && < 5- , mangopay == 1.11.*+ , mangopay == 1.12.* , containers >= 0.5 && < 0.6 , http-conduit >= 2.0 && < 2.2- , http-types >= 0.8.2 && < 0.9+ , http-types >= 0.8.2 && < 0.10 , lifted-base >= 0.2.1 && < 0.3 , text >= 0.11.3- , time >= 1.4.0 && < 1.6+ , time >= 1.4.0 && < 1.7 , yesod == 1.4.* , yesod-core == 1.4.* , persistent-template >= 2.1 && < 3@@ -110,10 +110,10 @@ , resourcet , shakespeare >= 2.0 , template-haskell- , wai >= 2.1 && < 3.1+ , wai >= 2.1 && < 3.3 , wai-extra , wai-logger >= 2.1 && < 2.3- , warp >= 2.1 && < 3.2+ , warp >= 2.1 && < 3.3 , yaml >= 0.8 && < 0.9 , yesod-auth , yesod-form