adamc@1025:
adamc@1025: end
adamc@1025:
adamc@1022: val linksForPc =
adamc@1022: let
adamc@1023: fun yourBids () =
adamc@1023: me <- getPcLogin;
adamc@1023: ps <- queryX (SELECT paper.Id, paper.{{M.paper}}, bid.Interest
adamc@1023: FROM paper LEFT JOIN bid ON bid.Paper = paper.Id
adamc@1023: AND bid.User = {[me.Id]})
adamc@1025: (fn r =>
adamc@1025:
{useMore (summarizePaper (r.Paper -- #Id))}
adamc@1025:
adamc@1025:
adamc@1025:
adamc@1025:
);
adamc@1023: return
adamc@1023:
Bid on papers
adamc@1023:
adamc@1023:
adamc@1023:
adamc@1023:
adamc@1023: and changeBids r =
adamc@1023: me <- getPcLogin;
adamc@1023: List.app (fn {Paper = p, Bid = b} =>
adamc@1023: case b of
adamc@1023: "" => return ()
adamc@1023: | _ => let
adamc@1023: val p = readError p
adamc@1023: in
adamc@1023: (dml (DELETE FROM bid WHERE Paper = {[p]} AND User = {[me.Id]});
adamc@1023: dml (INSERT INTO bid (Paper, User, Interest)
adamc@1023: VALUES ({[p]}, {[me.Id]}, {[String.sub b 0]})))
adamc@1023: end) r.Papers;
adamc@1023: yourBids ()
adamc@1022: in
adamc@1022:
adamc@1023: