mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
challenges: add challenge.id to task so we can get the icon-bullhorn
This commit is contained in:
parent
ae8a283d0e
commit
0a291bf892
2 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,12 @@ module.exports.app = (appExports, model) ->
|
|||
|
||||
activeFilters = _.reduce user.get('filters'), ((memo,v,k) -> memo[k]=v if v;memo), {}
|
||||
newTask = {id: model.id(), type: type, text: text, notes: '', value: 0, tags: activeFilters}
|
||||
|
||||
isChallenge = e.at().path().indexOf('_challenge.new') != -1
|
||||
if isChallenge
|
||||
activeFilters = {}
|
||||
newTask.challenge = model.get '_challenge.new.id'
|
||||
|
||||
switch type
|
||||
when 'habit'
|
||||
newTask = _.defaults {up: true, down: true}, newTask
|
||||
|
|
|
|||
|
|
@ -174,6 +174,8 @@
|
|||
<app:filters:applied-filters />
|
||||
<!-- edit -->
|
||||
<a x-bind=click:toggleTaskEdit data-hide-id="{{:task.id}}-chart" data-toggle-id="{{:task.id}}-edit" rel=tooltip title="Edit"><i class="icon-pencil"></i></a>
|
||||
<!-- challenges -->
|
||||
{{#if :task.challenge}}<i class='icon-bullhorn' rel=tooltip title="Challenge Task"></i>{{/}}
|
||||
<!-- delete -->
|
||||
<a x-bind=click:del rel=tooltip title="Delete"><i class="icon-trash"></i></a>
|
||||
<!-- chart -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue