chore(print-center): work on dbtable contd
This commit is contained in:
parent
9fa12dc758
commit
a398580b3f
@ -172,7 +172,7 @@ pjTableQuery (printJob `E.LeftOuterJoin` recipient
|
|||||||
E.on $ printJob E.^. PrintJobQualification E.==. quali E.?. QualificationId
|
E.on $ printJob E.^. PrintJobQualification E.==. quali E.?. QualificationId
|
||||||
return (printJob, recipient, sender, course, quali)
|
return (printJob, recipient, sender, course, quali)
|
||||||
|
|
||||||
mkPJTable :: DB (FormResult (PJTableAction, Set PrintJobId), Widget)
|
mkPJTable :: DB (FormResult (PJTableActionData, Set PrintJobId), Widget)
|
||||||
mkPJTable = do
|
mkPJTable = do
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
currentRoute <- fromMaybe (error "mkPJTable called from 404-handler") <$> liftHandler getCurrentRoute -- albeit we do know the route here
|
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
|
, dbParamsFormResult = id
|
||||||
, dbParamsFormIdent = def
|
, dbParamsFormIdent = def
|
||||||
}
|
}
|
||||||
postprocess :: FormResult (First PJTableAction, DBFormResult PrintJobId Bool PJTableData)
|
postprocess :: FormResult (First PJTableActionData, DBFormResult PrintJobId Bool PJTableData)
|
||||||
-> FormResult ( PJTableAction, Set PrintJobId)
|
-> FormResult ( PJTableActionData, Set PrintJobId)
|
||||||
postprocess inp = do
|
postprocess inp = do
|
||||||
(First (Just act), jobMap) <- inp
|
(First (Just act), jobMap) <- inp
|
||||||
let jobSet = Map.keysSet . Map.filter id $ getDBFormResult (const False) jobMap
|
let jobSet = Map.keysSet . Map.filter id $ getDBFormResult (const False) jobMap
|
||||||
|
|||||||
Reference in New Issue
Block a user