version bumps

This commit is contained in:
Galen Wolfe-Pauly 2015-08-21 15:55:16 -07:00
parent 008b48ae05
commit 4fc72d524a
3 changed files with 21 additions and 9 deletions

View File

@ -25,12 +25,17 @@ module.exports =
set = {}
key = key.split('_').join '-'
set[key] = val
version += 1
Persistence.put old:{id,version,dif:{set}}
ownItem: ({id,version},own) ->
Persistence.put old:{id,version,own:own}
o = {}
o[own] = null
version += 1
Persistence.put old:{id,version,dif:own:o}
addItem: ({id,version},val) ->
version += 1
Persistence.put old:{id,version,dif:add:comment:val}
setFilter: (key,val) ->

View File

@ -93,11 +93,11 @@ module.exports = recl
_changeStatus: (e) ->
return if @props.item.status is 'released'
if @props.item.status is 'accepted' and
@props.item.owner.slice(1) isnt window.urb.ship
@formatOwner(@props.item.owner) isnt window.urb.ship
return
own = "claim" if @props.item.status is "announced"
own = "announce" if @props.item.status is "accepted"
WorkActions.ownItem @props.item,'own',own
WorkActions.ownItem @props.item,own
_submitComment: (e) ->
$t = $(e.target).closest('.item')
@ -133,7 +133,7 @@ module.exports = recl
action = ""
if @props.item.status is 'announced'
action = "claim"
if @props.item.status is 'accepted' and @props.item.owner.slice(1) is window.urb.ship
if @props.item.status is 'accepted' and @formatOwner(@props.item.owner) is window.urb.ship
action = "release"
(div {

View File

@ -41,6 +41,7 @@ module.exports = {
set = {};
key = key.split('_').join('-');
set[key] = val;
version += 1;
return Persistence.put({
old: {
id: id,
@ -52,19 +53,25 @@ module.exports = {
});
},
ownItem: function(arg, own) {
var id, version;
var id, o, version;
id = arg.id, version = arg.version;
o = {};
o[own] = null;
version += 1;
return Persistence.put({
old: {
id: id,
version: version,
own: own
dif: {
own: o
}
}
});
},
addItem: function(arg, val) {
var id, version;
id = arg.id, version = arg.version;
version += 1;
return Persistence.put({
old: {
id: id,
@ -360,7 +367,7 @@ module.exports = recl({
if (this.props.item.status === 'released') {
return;
}
if (this.props.item.status === 'accepted' && this.props.item.owner.slice(1) !== window.urb.ship) {
if (this.props.item.status === 'accepted' && this.formatOwner(this.props.item.owner) !== window.urb.ship) {
return;
}
if (this.props.item.status === "announced") {
@ -369,7 +376,7 @@ module.exports = recl({
if (this.props.item.status === "accepted") {
own = "announce";
}
return WorkActions.ownItem(this.props.item, 'own', own);
return WorkActions.ownItem(this.props.item, own);
},
_submitComment: function(e) {
var $t, val;
@ -429,7 +436,7 @@ module.exports = recl({
if (this.props.item.status === 'announced') {
action = "claim";
}
if (this.props.item.status === 'accepted' && this.props.item.owner.slice(1) === window.urb.ship) {
if (this.props.item.status === 'accepted' && this.formatOwner(this.props.item.owner) === window.urb.ship) {
action = "release";
}
return div({