|
@@ -2,6 +2,9 @@ module LinkedIn.UI.Basic.Types where
|
|
|
|
|
|
|
|
import Prelude
|
|
import Prelude
|
|
|
|
|
|
|
|
|
|
+import Data.Argonaut.Encode (class EncodeJson)
|
|
|
|
|
+import Data.Argonaut.Encode.Encoders (encodeString)
|
|
|
|
|
+import Data.Argonaut.Encode.Generic (genericEncodeJson)
|
|
|
import Data.Date (Month, Year)
|
|
import Data.Date (Month, Year)
|
|
|
import Data.Generic.Rep (class Generic)
|
|
import Data.Generic.Rep (class Generic)
|
|
|
import Data.Int64 (Int64)
|
|
import Data.Int64 (Int64)
|
|
@@ -20,6 +23,8 @@ derive instance Eq MonthYear
|
|
|
derive instance Generic MonthYear _
|
|
derive instance Generic MonthYear _
|
|
|
instance Show MonthYear where
|
|
instance Show MonthYear where
|
|
|
show = genericShow
|
|
show = genericShow
|
|
|
|
|
+instance EncodeJson MonthYear where
|
|
|
|
|
+ encodeJson a = encodeString "monthyear" -- TODO
|
|
|
|
|
|
|
|
data TimeSpan =
|
|
data TimeSpan =
|
|
|
TimeSpanBounded MonthYear MonthYear
|
|
TimeSpanBounded MonthYear MonthYear
|
|
@@ -29,6 +34,8 @@ derive instance Eq TimeSpan
|
|
|
derive instance Generic TimeSpan _
|
|
derive instance Generic TimeSpan _
|
|
|
instance Show TimeSpan where
|
|
instance Show TimeSpan where
|
|
|
show = genericShow
|
|
show = genericShow
|
|
|
|
|
+instance EncodeJson TimeSpan where
|
|
|
|
|
+ encodeJson a = genericEncodeJson a
|
|
|
|
|
|
|
|
data MonthYearOrToday = MY MonthYear | Today
|
|
data MonthYearOrToday = MY MonthYear | Today
|
|
|
|
|
|
|
@@ -41,6 +48,8 @@ derive instance Eq Duration
|
|
|
derive instance Generic Duration _
|
|
derive instance Generic Duration _
|
|
|
instance Show Duration where
|
|
instance Show Duration where
|
|
|
show = genericShow
|
|
show = genericShow
|
|
|
|
|
+instance EncodeJson Duration where
|
|
|
|
|
+ encodeJson a = encodeString "duration" -- TODO
|
|
|
|
|
|
|
|
data JobFlexibility = JobFlexHybrid | JobFlexOnSite | JobFlexFullRemote
|
|
data JobFlexibility = JobFlexHybrid | JobFlexOnSite | JobFlexFullRemote
|
|
|
|
|
|
|
@@ -48,3 +57,5 @@ derive instance Eq JobFlexibility
|
|
|
derive instance Generic JobFlexibility _
|
|
derive instance Generic JobFlexibility _
|
|
|
instance Show JobFlexibility where
|
|
instance Show JobFlexibility where
|
|
|
show = genericShow
|
|
show = genericShow
|
|
|
|
|
+instance EncodeJson JobFlexibility where
|
|
|
|
|
+ encodeJson a = genericEncodeJson a
|