flop audience and task in %new

This commit is contained in:
Anton Dyudin 2015-08-20 13:50:06 -07:00
parent bfac46849e
commit 8113b70814
7 changed files with 20 additions and 23 deletions

View File

@ -121,21 +121,21 @@
^- [mos=(list move) con=_+>.$]
?- -.action
%create :: XX should verify ownership
=+ existing-task=(~(get by tasks) id.p.action)
=+ existing-task=(~(get by tasks) id.tax.action)
~? ?& ?=(^ existing-task)
!=(p.action task.u.existing-task)
!=(tax.action task.u.existing-task)
==
:* %new-task-with-old-id
her=her
from=from
new-task=p.action
new-task=tax.action
existing-task=u.existing-task
==
=. tasks
%^ ~(put by tasks) id.p.action p.action
%^ ~(put by tasks) id.tax.action tax.action
?~ existing-task from
(~(uni in audience.u.existing-task) from)
=. sort ?~(existing-task sort [id.p.action sort])
=. sort ?~(existing-task sort [id.tax.action sort])
[~ +>.$]
::
%claim
@ -222,7 +222,7 @@
initialize
=^ mof +>.$
?- -.cod
%new abet:create:(at +.cod)
%new abet:create:(at [+ -]:+.cod)
%old abet:(process-update:(at (~(got by tasks) id.cod)) dif.cod)
%sort ~|(%not-implemented !!)
==

View File

@ -49,10 +49,10 @@
==
++ id (ci (slat %uv) so)
++ ship (su fed:ag)
++ coma (of new/new old/(ot id/id dif/uppd ~) sort/(ar id) ~)
++ new (ot task/task audience/audi ~)
++ coma (of new/task old/(ot id/id dif/uppd ~) sort/(ar id) ~)
++ task
%- ot :~
audience/audi
id/id date-created/di
version/ni date-modified/di
owner/ship status/(ci (soft status) so)
@ -60,7 +60,8 @@
done/(mu di) title/so
description/so discussion/(ar (ot date/di ship/ship body/so ~))
==
++ audi (as (ot ship/ship span/so ~))
++ audi (as stan)
++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab))
++ uppd
%- of :~
own/(of announce/ul claim/ul ~)

View File

@ -17,8 +17,8 @@ module.exports =
title:''
description:''
discussion:[]
station = window.util.talk.mainStationPath window.urb.ship
Persistence.put "new": task:item, audience:[station]
audience:[window.util.talk.mainStationPath window.urb.ship]
Persistence.put "new":item
Dispatcher.handleViewAction {type:'newItem', index, item}
setFilter: (key,val) ->

View File

@ -9,7 +9,7 @@ Persistence.get('test', console.log.bind(console));
module.exports = {
newItem: function(index, list) {
var item, station;
var item;
item = {
id: window.util.uuid32(),
version: 0,
@ -22,14 +22,11 @@ module.exports = {
tags: [],
title: '',
description: '',
discussion: []
discussion: [],
audience: [window.util.talk.mainStationPath(window.urb.ship)]
};
station = window.util.talk.mainStationPath(window.urb.ship);
Persistence.put({
"new": {
task: item,
audience: [station]
}
"new": item
});
return Dispatcher.handleViewAction({
type: 'newItem',
@ -1201,8 +1198,7 @@ WorkStore = assign({}, EventEmitter.prototype, {
var _item, index, item;
index = arg.index, item = arg.item;
_item = _.extend({
sort: index,
audience: []
sort: index
}, item);
_item["date-created"] = new Date(item["date-created"]);
_item["date-modified"] = new Date(item["date-modified"]);

View File

@ -100,7 +100,7 @@ WorkStore = assign {},EventEmitter.prototype,{
_sorts[key] = val
newItem: ({index,item}) ->
_item = _.extend {sort:index,audience:[]}, item
_item = _.extend {sort:index}, item
_item["date-created"]=new Date item["date-created"]
_item["date-modified"]=new Date item["date-modified"]
_list.splice index,0,_item

View File

@ -81,7 +81,7 @@
++ work-stuff ::
|% ::
++ duty ::
$% [%create p=task] :: create new task
$% [%create tax=task] :: create new task
[%claim id=@uvH] :: claim task
$: %update :: operate on task
id=@uvH :: which task

View File

@ -29,7 +29,7 @@
==
++ status ?(%announced %released %accepted)
++ command
$% [%new task audience=(set station:talk)]
$% [%new audience=(set station:talk) task]
[%old id=@uvH dif=update]
[%sort p=(list ,@uvH)]
==