mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
29 lines
681 B
Plaintext
29 lines
681 B
Plaintext
|
:: +desk-requests: count pending requests for a desk
|
||
|
::
|
||
|
:- %say
|
||
|
|= $: [now=@da eny=@uvJ bec=beak]
|
||
|
[=desk ~]
|
||
|
~
|
||
|
==
|
||
|
:- %tang
|
||
|
^- tang
|
||
|
=/ cul=(list [@p rave:clay])
|
||
|
%~ tap in
|
||
|
.^ (set [@p rave:clay])
|
||
|
/cx/(scot %p p.bec)//(scot %da now)/cult/[desk]
|
||
|
==
|
||
|
::
|
||
|
=/ [loc=_cul inc=_cul]
|
||
|
(skid cul |=([=@p rave:clay] =(p p.bec)))
|
||
|
=/ syc=_cul
|
||
|
=/ nex=@ud
|
||
|
+(ud:.^(cass:clay %cw /(scot %p p.bec)/[desk]/(scot %da now)))
|
||
|
(skim inc |=([@p =rave:clay] =([%sing %w ud+nex /] rave)))
|
||
|
::
|
||
|
%- flop
|
||
|
:~ leaf+"total: {<(lent cul)>}"
|
||
|
leaf+"- local: {<(lent loc)>}"
|
||
|
leaf+"- incoming: {<(lent inc)>}"
|
||
|
leaf+" - for next: {<(lent syc)>}"
|
||
|
==
|