Fix getting calendarId in general view

This commit is contained in:
Raimund Schlüßler 2018-11-18 08:32:32 +01:00
parent 56cd2d5438
commit 22886ce2fa
No known key found for this signature in database
GPG key ID: 036FA7EB1A599178

View file

@ -48,7 +48,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
:task="task" />
<!-- ng-repeat="task in filtered = filteredTasks() | filter:hasNoParent(task) | filter:filterTasks(task,calendar.uri) | filter:filterTasks(task,route.collectionID) | orderBy:getSortOrder():settingsmodel.getById('various').sortDirection"> -->
</ol>
<loadCompletedButton v-if="collectionId == 'completed'" :calendar="calendar" />
<loadCompletedButton v-if="collectionId === 'completed'" :calendar="calendar" />
</div>
</div>
</div>
@ -66,16 +66,6 @@ export default {
'sortorderDropdown': SortorderDropdown,
'loadCompletedButton': LoadCompletedButton
},
props: {
collectionId: {
type: String,
default: ''
},
taskId: {
type: String,
default: ''
}
},
data() {
return {
newTaskName: '',
@ -96,10 +86,14 @@ export default {
*/
filteredCalendars: function() {
return this.calendars.filter(calendar => {
return this.calendarCount(calendar.id, this.$route.params.collectionId)
return this.calendarCount(calendar.id, this.collectionId)
})
},
collectionId: function() {
return this.$route.params.collectionId
},
inputString: function() {
switch (this.collectionId) {
case 'starred':