Implement set_value_action_for_date

This commit is contained in:
2018-08-09 18:28:13 +02:00
parent c35960f087
commit 1df55571b1
6 changed files with 59 additions and 2 deletions
@@ -1,5 +1,6 @@
import Ember from 'ember'
import DS from 'ember-data'
import { modelAction } from 'ember-custom-actions'
import add_business_day_computations from 'ember-panda/utils/business-day-computations'
export value_type_options = ['boolean', 'date', 'number', 'select', 'string', 'text', 'timestamp']
@@ -40,6 +41,8 @@ Model =
absolute_position: Ember.computed 'workflow_group.position', 'position', ->
(@get('workflow_group.position') || 99) * 100 + (@get('position') || 99 )
set_value_on_non_final_till_date: modelAction('set_value_on_non_final_till_date', pushToStore: false)
#drag_identifier: Ember.computed 'id', 'workflow_group.id', 'position', ->
# "#{@get('id')}-#{@get('workflow_group.id')}-#{@get('position')}"
#smart_position: Ember.computed 'done', 'position', ->
@@ -5,6 +5,10 @@ import Ember from 'ember';
import DS from 'ember-data';
import {
modelAction
} from 'ember-custom-actions';
import add_business_day_computations from 'ember-panda/utils/business-day-computations';
export var value_type_options = ['boolean', 'date', 'number', 'select', 'string', 'text', 'timestamp'];
@@ -77,6 +81,9 @@ Model = {
}),
absolute_position: Ember.computed('workflow_group.position', 'position', function() {
return (this.get('workflow_group.position') || 99) * 100 + (this.get('position') || 99);
}),
set_value_on_non_final_till_date: modelAction('set_value_on_non_final_till_date', {
pushToStore: false
})
};