Commit 325bf743 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Order 2 Only

parent c94e72eb
...@@ -113,7 +113,7 @@ updateGraphCpt = here.component "updateGraph" cpt where ...@@ -113,7 +113,7 @@ updateGraphCpt = here.component "updateGraph" cpt where
, dispatch: callback , dispatch: callback
, mError: Nothing } , mError: Nothing }
[ H.text "Show subjects with Order1 or concepts with Order2 ?" [ H.text "Show subjects with Order1 or concepts with Order2 ?"
, Tools.formChoiceSafe { items: [Order1, Order2_A, Order2_B] , Tools.formChoiceSafe { items: [Order1, Order2]
, default: methodGraphMetric' , default: methodGraphMetric'
, callback: \val -> T.write_ val methodGraphMetric , callback: \val -> T.write_ val methodGraphMetric
, print: show } [] , print: show } []
......
...@@ -64,15 +64,13 @@ instance Read Method where ...@@ -64,15 +64,13 @@ instance Read Method where
read _ = Nothing read _ = Nothing
---------------------------------------------------------------------- ----------------------------------------------------------------------
data GraphMetric = Order1 | Order2 | Order2_A | Order2_B data GraphMetric = Order1 | Order2
derive instance Generic GraphMetric _ derive instance Generic GraphMetric _
derive instance Eq GraphMetric derive instance Eq GraphMetric
instance Show GraphMetric where show = genericShow instance Show GraphMetric where show = genericShow
instance Read GraphMetric where instance Read GraphMetric where
read "Order1" = Just Order1 read "Order1" = Just Order1
read "Order2" = Just Order2_B read "Order2" = Just Order2
read "Order2_A" = Just Order2_A
read "Order2_B" = Just Order2_B
read _ = Nothing read _ = Nothing
instance JSON.ReadForeign GraphMetric where readImpl = JSONG.enumSumRep instance JSON.ReadForeign GraphMetric where readImpl = JSONG.enumSumRep
instance JSON.WriteForeign GraphMetric where writeImpl = JSON.writeImpl <<< show instance JSON.WriteForeign GraphMetric where writeImpl = JSON.writeImpl <<< show
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment