Resized tasks, filter completed, add cron for non yesterdailies

This commit is contained in:
Keith Holliday
2017-06-16 09:01:23 -06:00
parent a52bd66871
commit 7a8857010e
3 changed files with 26 additions and 3 deletions

View File

@@ -24,13 +24,16 @@ habitrpg.controller('NotificationCtrl',
var yesterDailies = [];
dailys.forEach(function (task) {
if (task && task.group.approval && task.group.approval.requested) return;
if (task.completed) return;
var shouldDo = Shared.shouldDo(yesterDay, task);
if (task.yesterDaily && shouldDo) yesterDailies.push(task);
});
if (yesterDailies.length === 0) return;
if (yesterDailies.length === 0) {
User.runCron();
return;
};
var modalScope = $rootScope.$new();
modalScope.obj = User.user;

View File

@@ -0,0 +1,20 @@
<template lang="pug">
div
button.btn.btn-primary(b-btn, @click="$root.$emit('show::modal','new-party-modal')") {{ $t('viewMembers') }}
b-modal#new-party-modal(:title="$t('createGuild')", size='lg')
.header-wrap(slot="modal-header")
.row
.col-6
h1(v-once) {{$t('members')}}
.col-6
button(type="button" aria-label="Close" class="close")
span(aria-hidden="true") ×
.row
.form-group.col-6
input.form-control.search(type="text", :placeholder="$t('search')", v-model='searchTerm')
.col-4.offset-2
span.dropdown-label {{ $t('sortBy') }}
b-dropdown(:text="$t('sort')", right=true)
b-dropdown-item(v-for='sortOption in sortOptions', @click='sort(sortOption.value)', :key='sortOption.value') {{sortOption.text}}
</template>

View File

@@ -4,7 +4,7 @@ script(type='text/ng-template', id='modals/yesterDailies.html')
.modal-body
.container-fluid
.row
.col-md-6.col-md-offset-3
.col-md-8.col-md-offset-2
.task-column.dailys
task-list
.modal-footer