PPW6ROC5U7FZCJCH2RX7UJ3PJYNPUMNEZ6KKO3375VFRUM4VT3VQC
Z5KNL332YCRMHKU3NG7YWNLUCNHKSLXBZ3O22FSS47MNVXU2FDLAC
NJNMO72S7VIUV22JXB4IFPZMHWTJAOTP6EC6Z4QSKYIROSXT52MQC
WRPIYG3EUHZR6N6T74ZXZDXATRMIRLXAQ24UNUNSVTVYGMT2VDSQC
QH4UB73NUR2XPHZQ2RGJBKKUBN43RKC7ZJBCFPP4ESUIIEDDR5XQC
JXG3FCXYBDKMUD77DOM7RCIJYKB7BILC43OHHDZBE7YQRGAMUCCAC
QMEYU4MWLTSWPWEEOFRLK2IKE64BY3V5X73323WPLCGPP3TPDYGAC
NAFJ6RB3KYDBSTSNB3WQSVUQEPUGG2RZCBWRF4XNT2UKSOXDNMDQC
QAC2QJ32ZLAK25KJ7SWT27WOZKD2MMDE7OZPHIRRFP2W2QZW7PBAC
B4MTB6UOH5VPZQ7KDQ23TZSR3CIFGVGVBEFL26LMFAQ5RL7CXPRQC
OUR4PAOTXXKXQPMAR5TIYX7MBRRJS2WVTZS7SN4SOGML7SPJIJGQC
IR75ZMX32SFFMDNV2I2L22X5JTWCOC4UUBCSPU7S6VHR6HFV6ADQC
J6S23MDGHVSCVVIRB6XRNSY3EGTDNWFJHV7RYLIEHBUK5KU63CFQC
RSF6UAJKG7CEKILSVXI6C4YZXY7PIYZM2EMA2IXKQ7SADKNVSH7QC
ZIG57EE6RB22JGB3CT33EN2HVYCHCXBT5GROBTBMBLEMDTGQOOBQC
QU5FW67RGCWOWT2YFM4NYMJFFHWIRPQANQBBAHBKZUY7UYMCSIMQC
-- import Data.Date (Date, year, month, day)
-- import Data.DateTime as DT
-- import Data.DateTime (DateTime(..), date)
import Data.Enum (toEnum)
import Data.Date (canonicalDate)
-- import Data.Date.Component (Year(..), Month(..), Day(..))
import Data.List as L
import Data.DateTime (DateTime(..), date)
, projectDetail: Nothing
, projectDetail: case input of
Nothing -> Nothing
Just p -> Just $ ProjectDetail'
{ project: p
, depreciation: LinearDepreciation { undep: Days 30.0, dep: Days 300.0 }
, contributors: M.singleton (unwrap p).initiator $ ProjectUserData'
{ userName: "Joe"
, joinedOn: DateTime (fromMaybe bottom $ canonicalDate <$> (toEnum 2021) <*> (toEnum 1) <*> (toEnum 26)) bottom
, totalContribution: Hours 100.0
, currentPayoutRatio: 55 R.% 100
}
}
, HH.section
[ P.id_ "contributors" ]
([ HH.div
-- header
[ P.classes (ClassName <$> ["row", "pt-3", "font-weight-bold" ]) ]
[ colmd2 (Just "Contributor")
, colmd2 (Just "Joined")
, colmd2 (Just "Contributed Hours")
, colmd2 (Just "Current Revenue Share")
]
] <>
(contributorCols <$> (L.toUnfoldable $ M.values detail.contributors))
)
[ colmd2 (Just $ show obj.undep <> " days")
, colmd2 (Just $ show obj.dep <> " days")
[ colmd2 (Just $ show (unwrap obj.undep) <> " days")
, colmd2 (Just $ show (unwrap obj.dep) <> " days")
]
contributorCols :: ProjectUserData -> H.ComponentHTML OverviewAction Slots m
contributorCols (ProjectUserData' pud) =
let pct = maybe "N/A" (\f -> F.toString (f * F.fromInt 100)) (F.fromNumber (R.toNumber pud.currentPayoutRatio) :: Maybe (F.Fixed F.P10000))
in HH.div
[ P.classes (ClassName <$> ["row", "pt-3", "pb-2" ]) ]
[ colmd2 (Just pud.userName)
, colmd2 (Just $ dateStr (date pud.joinedOn))
, colmd2 (Just $ show (unwrap pud.totalContribution))
, colmd2 (Just $ pct <> "%")
-- <section id="associates">
-- <div class="row pt-3 font-weight-bold">
-- <div class="col-md-2">
-- </div>
-- <div class="col-md-2">
-- Associate
-- </div>
-- <div class="col-md-2">
-- Joined
-- </div>
-- <div class="col-md-2">
-- Hrs / %
-- </div>
-- <div class="col-md-2">
-- </div>
-- </div>
--
-- <div class="row pt-3 pb-2 stripe">
-- <div class="col-md-2">
-- </div>
-- <div class="col-md-2">
-- Freuline Fred
-- </div>
-- <div class="col-md-2">
-- Oct 2020
-- </div>
-- <div class="col-md-2">
-- 24hrs / 2.4%
-- </div>
-- <div class="col-md-2">
-- </div>
-- </div>
-- <div class="row pt-3 pb-2 stripe">
-- <div class="col-md-2">
-- </div>
-- <div class="col-md-2">
-- Goobie Works A Lot
-- </div>
-- <div class="col-md-2">
-- Jan 2020
-- </div>
-- <div class="col-md-2">
-- 500 / 50%
-- </div>
-- <div class="col-md-2">
-- </div>
-- </div>
-- <div class="row pt-3 pb-2 stripe">
-- <div class="col-md-2">
-- </div>
-- <div class="col-md-2">
-- Average Fella
-- </div>
-- <div class="col-md-2">
-- May 2020
-- </div>
-- <div class="col-md-2">
-- 250 hrs / 25%
-- </div>
-- <div class="col-md-2">
-- </div>
-- </div>
-- <div class="row pt-3 pb-2 stripe">
-- <div class="col-md-2">
-- </div>
-- <div class="col-md-2">
-- Cool Kid
-- </div>
-- <div class="col-md-2">
-- April 2020
-- </div>
-- <div class="col-md-2">
-- 226 hrs 22.6%
-- </div>
-- <div class="col-md-2">
-- </div>
-- </div>