chore(print-center): work on dbtable contd

This commit is contained in:
Sarah Vaupel 2022-07-14 18:03:48 +02:00
parent 9fa12dc758
commit a398580b3f

View File

@ -172,7 +172,7 @@ pjTableQuery (printJob `E.LeftOuterJoin` recipient
E.on $ printJob E.^. PrintJobQualification E.==. quali E.?. QualificationId
return (printJob, recipient, sender, course, quali)
mkPJTable :: DB (FormResult (PJTableAction, Set PrintJobId), Widget)
mkPJTable :: DB (FormResult (PJTableActionData, Set PrintJobId), Widget)
mkPJTable = do
now <- liftIO getCurrentTime
currentRoute <- fromMaybe (error "mkPJTable called from 404-handler") <$> liftHandler getCurrentRoute -- albeit we do know the route here
@ -233,8 +233,8 @@ mkPJTable = do
, dbParamsFormResult = id
, dbParamsFormIdent = def
}
postprocess :: FormResult (First PJTableAction, DBFormResult PrintJobId Bool PJTableData)
-> FormResult ( PJTableAction, Set PrintJobId)
postprocess :: FormResult (First PJTableActionData, DBFormResult PrintJobId Bool PJTableData)
-> FormResult ( PJTableActionData, Set PrintJobId)
postprocess inp = do
(First (Just act), jobMap) <- inp
let jobSet = Map.keysSet . Map.filter id $ getDBFormResult (const False) jobMap