From cd3b2c8b6bfeaa883a6b74b9b451e0262c98b5de Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 20 Aug 2015 15:49:21 -0700 Subject: [PATCH] mar/work-report --- ape/work.hoon | 6 ++--- mar/work/report.hoon | 52 ++++++++++++++++++++++++++++++++++++++++++++ mar/work/task.hoon | 16 -------------- 3 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 mar/work/report.hoon diff --git a/ape/work.hoon b/ape/work.hoon index 86674fc00..a80952bee 100644 --- a/ape/work.hoon +++ b/ape/work.hoon @@ -228,10 +228,10 @@ %+ murn (~(tap by sup)) |= [ust=bone her=ship pax=path] ^- (unit move) - ?: ?=([%sole *] pax) - ~ - `[ust %diff %work-report tasks sort] + ?:(?=([%repo *] pax) ~ `[ust full-report]) :: +++ full-report [%diff %work-report tasks sort] +++ peer-repo |=(path [[ost full-report]~ +>.$]) ++ coup |= [way=wire saw=(unit tang)] ^- [(list move) _+>.$] diff --git a/mar/work/report.hoon b/mar/work/report.hoon new file mode 100644 index 000000000..c1940b89b --- /dev/null +++ b/mar/work/report.hoon @@ -0,0 +1,52 @@ +:: +:::: /hoon/report/work/mar + :: +/- *work +!: +:::: + :: +|_ client +++ grow +|% ++ json + =+ jope=|=(a=ship [%s (rsh 3 1 (scot %p a))]) + %- jobe :~ + sort/[%a (turn sort |=(a=@uv [%s (scot %uv a)]))] + =< tasks/(jobe (turn (~(tap by tasks)) .)) + |= [@ client-task] + =+ task + :- (scot %uv id) + %- jobe :~ id/[%s (scot %uv id)] + tags/[%a (turn (~(tap in tags)) |=(a=cord s/a))] + owner/(jope owner) + title/[%s title] + status/[%s status] + version/[%s (scot %ud version)] + claiming/[%b claiming] + =< audience/[%a (turn (~(tap in audience)) .)] + |=(a=station:talk [%s (crip "{}/{(trip q.a)}")]) + date-created/(jode date-created) + date-modified/(jode date-modified) + description/[%s description] + =< discussion/[%a (turn discussion .)] + |=(comment (jobe date/(jode date) ship/(jope ship) body/[%s body] ~)) + date-due/?~(date-due ~ (jode u.date-due)) + done/?~(done ~ (jode u.done)) + == + == +-- -- +:: {id}_{date-created} {version}{date-modified}{|(" {date-due}" ~)} +:: {tag1} +:: {tag2} +:: ... +:: {title} +:: {owner}.{status} +:: {description} +:: {more description} +:: {ship1} {date} +:: {comment} +:: {more comment} +:: {more comment} +:: {ship2} {date} +:: {comment} +:: {more comment} +:: {more comment} diff --git a/mar/work/task.hoon b/mar/work/task.hoon index eff8ecb8a..376e423e9 100644 --- a/mar/work/task.hoon +++ b/mar/work/task.hoon @@ -82,22 +82,6 @@ %+ turn discussion |= comment ^- wain [(rend p/ship ' ' da/date ~) (indent (lore body))] - ++ json - =+ taz - %- jobe :~ id/(jape ) - tags/[%a (turn (~(tap in tags)) |=(a=cord s/a))] - owner/(jape ) - status/(jape ) - title/[%s title] - version/(jape ) - date-created/(jode date-created) - date-modified/(jode date-modified) - description/[%s description] - =< discussion/[%a (turn discussion .)] - |=(comment (jobe date/(jode date) ship/(jape ) body/[%s body] ~)) - date-due/?~(date-due ~ (jode u.date-due)) - done/?~(done ~ (jode u.done)) - == -- ++ grad %txt --