chore(company): attempt to debug missing companies in lms/qualification view
This commit is contained in:
parent
297b408e9c
commit
68038f3c71
@ -556,8 +556,7 @@ postLmsR sid qsh = do
|
|||||||
let icnSuper = text2markup " " <> icon IconSupervisor
|
let icnSuper = text2markup " " <> icon IconSupervisor
|
||||||
cs = [ (cmpName, cmpSpr)
|
cs = [ (cmpName, cmpSpr)
|
||||||
| Entity _ UserCompany{userCompanyCompany=cmpId, userCompanySupervisor=cmpSpr} <- cmps
|
| Entity _ UserCompany{userCompanyCompany=cmpId, userCompanySupervisor=cmpSpr} <- cmps
|
||||||
, let cmpEnt = Map.lookup cmpId cmpMap
|
, let cmpName = maybe cmpId companyName $ Map.lookup cmpId cmpMap
|
||||||
, Just Company{companyName = cmpName} <- [cmpEnt]
|
|
||||||
]
|
]
|
||||||
companies = intercalate (text2markup ", ") $
|
companies = intercalate (text2markup ", ") $
|
||||||
(\(cmpName, cmpSpr) -> text2markup (CI.original cmpName) <> bool mempty icnSuper cmpSpr) <$> cs
|
(\(cmpName, cmpSpr) -> text2markup (CI.original cmpName) <> bool mempty icnSuper cmpSpr) <$> cs
|
||||||
|
|||||||
@ -489,7 +489,7 @@ postQualificationR sid qsh = do
|
|||||||
[ singletonMap QualificationActUnblock $ pure QualificationActUnblockData -- Admin-only actions
|
[ singletonMap QualificationActUnblock $ pure QualificationActUnblockData -- Admin-only actions
|
||||||
, singletonMap QualificationActBlock $ QualificationActBlockData
|
, singletonMap QualificationActBlock $ QualificationActBlockData
|
||||||
<$> apreq textField (fslI MsgQualificationBlockReason) Nothing
|
<$> apreq textField (fslI MsgQualificationBlockReason) Nothing
|
||||||
<*> apreq (boolField . Just $ SomeMessage MsgBoolIrrelevant) (fslI MsgQualificationBlockNotify) (Just False)
|
<*> areq (boolField . Just $ SomeMessage MsgBoolIrrelevant) (fslI MsgQualificationBlockNotify) (Just False)
|
||||||
, singletonMap QualificationActRenew $ pure QualificationActRenewData
|
, singletonMap QualificationActRenew $ pure QualificationActRenewData
|
||||||
, singletonMap QualificationActGrant
|
, singletonMap QualificationActGrant
|
||||||
(QualificationActGrantData <$> apopt dayField (fslI MsgLmsQualificationValidUntil) dayExpiry)
|
(QualificationActGrantData <$> apopt dayField (fslI MsgLmsQualificationValidUntil) dayExpiry)
|
||||||
@ -505,8 +505,7 @@ postQualificationR sid qsh = do
|
|||||||
let icnSuper = text2markup " " <> icon IconSupervisor
|
let icnSuper = text2markup " " <> icon IconSupervisor
|
||||||
cs = [ (cmpName, cmpSpr)
|
cs = [ (cmpName, cmpSpr)
|
||||||
| Entity _ UserCompany{userCompanyCompany=cmpId, userCompanySupervisor=cmpSpr} <- cmps
|
| Entity _ UserCompany{userCompanyCompany=cmpId, userCompanySupervisor=cmpSpr} <- cmps
|
||||||
, let cmpEnt = Map.lookup cmpId cmpMap
|
, let cmpName = maybe cmpId companyName $ Map.lookup cmpId cmpMap
|
||||||
, Just Company{companyName = cmpName} <- [cmpEnt]
|
|
||||||
]
|
]
|
||||||
companies = intercalate (text2markup ", ") $
|
companies = intercalate (text2markup ", ") $
|
||||||
(\(cmpName, cmpSpr) -> text2markup (CI.original cmpName) <> bool mempty icnSuper cmpSpr) <$> cs
|
(\(cmpName, cmpSpr) -> text2markup (CI.original cmpName) <> bool mempty icnSuper cmpSpr) <$> cs
|
||||||
|
|||||||
Reference in New Issue
Block a user