aboutsummaryrefslogtreecommitdiff
path: root/server/src/View/Mail
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/View/Mail')
-rw-r--r--server/src/View/Mail/SignIn.hs12
-rw-r--r--server/src/View/Mail/WeeklyReport.hs41
2 files changed, 27 insertions, 26 deletions
diff --git a/server/src/View/Mail/SignIn.hs b/server/src/View/Mail/SignIn.hs
index 1daca1e..d542fd8 100644
--- a/server/src/View/Mail/SignIn.hs
+++ b/server/src/View/Mail/SignIn.hs
@@ -4,15 +4,15 @@ module View.Mail.SignIn
( mail
) where
-import Data.Text (Text)
+import Data.Text (Text)
-import qualified Common.Message as Message
+import qualified Common.Message as Message
import qualified Common.Message.Key as Key
-import Common.Model (User(..))
+import Common.Model (User (..))
-import Conf (Conf)
-import qualified Conf as Conf
-import qualified Model.Mail as M
+import Conf (Conf)
+import qualified Conf as Conf
+import qualified Model.Mail as M
mail :: Conf -> User -> Text -> [Text] -> M.Mail
mail conf user url to =
diff --git a/server/src/View/Mail/WeeklyReport.hs b/server/src/View/Mail/WeeklyReport.hs
index b5f2b67..c0e89d5 100644
--- a/server/src/View/Mail/WeeklyReport.hs
+++ b/server/src/View/Mail/WeeklyReport.hs
@@ -4,28 +4,29 @@ module View.Mail.WeeklyReport
( mail
) where
-import Data.List (sortOn)
-import Data.Map (Map)
-import Data.Maybe (catMaybes, fromMaybe)
-import Data.Monoid ((<>))
-import Data.Text (Text)
-import Data.Time.Clock (UTCTime)
-import qualified Data.Map as M
-import qualified Data.Text as T
+import Data.List (sortOn)
+import Data.Map (Map)
+import qualified Data.Map as M
+import Data.Maybe (catMaybes, fromMaybe)
+import Data.Monoid ((<>))
+import Data.Text (Text)
+import qualified Data.Text as T
+import Data.Time.Clock (UTCTime)
-import qualified Common.Message as Message
+import qualified Common.Message as Message
import qualified Common.Message.Key as Key
-import Common.Model (Payment(..), User(..), UserId, Income(..))
-import qualified Common.Model as CM
+import Common.Model (Income (..), Payment (..), User (..),
+ UserId)
+import qualified Common.Model as CM
import qualified Common.View.Format as Format
-import Model.Mail (Mail(Mail))
-import Model.Payment ()
-import qualified Model.Income ()
-import qualified Model.Mail as M
-import Resource (Status(..), groupByStatus, statuses)
-import Conf (Conf)
-import qualified Conf as Conf
+import Conf (Conf)
+import qualified Conf as Conf
+import qualified Model.Income ()
+import Model.Mail (Mail (Mail))
+import qualified Model.Mail as M
+import Model.Payment ()
+import Resource (Status (..), groupByStatus, statuses)
mail :: Conf -> [User] -> [Payment] -> [Income] -> UTCTime -> UTCTime -> Mail
mail conf users payments incomes start end =
@@ -65,7 +66,7 @@ payedFor :: Status -> Conf -> [User] -> Payment -> Text
payedFor status conf users payment =
case status of
Deleted -> Message.get (Key.WeeklyReport_PayedForNot name amount for at)
- _ -> Message.get (Key.WeeklyReport_PayedFor name amount for at)
+ _ -> Message.get (Key.WeeklyReport_PayedFor name amount for at)
where name = formatUserName (_payment_user payment) users
amount = Format.price (Conf.currency conf) . _payment_cost $ payment
for = _payment_name payment
@@ -85,7 +86,7 @@ isPayedFrom :: Status -> Conf -> [User] -> Income -> Text
isPayedFrom status conf users income =
case status of
Deleted -> Message.get (Key.WeeklyReport_PayedFromNot name amount for)
- _ -> Message.get (Key.WeeklyReport_PayedFrom name amount for)
+ _ -> Message.get (Key.WeeklyReport_PayedFrom name amount for)
where name = formatUserName (_income_userId income) users
amount = Format.price (Conf.currency conf) . _income_amount $ income
for = Format.longDay $ _income_date income