Fix lint errors
This commit is contained in:
parent
c10beda805
commit
28bdeb1912
2 changed files with 9 additions and 7 deletions
|
@ -32,6 +32,7 @@ export default class Task {
|
||||||
*
|
*
|
||||||
* @param {string} vcalendar the vcalendar data as string with proper new lines
|
* @param {string} vcalendar the vcalendar data as string with proper new lines
|
||||||
* @param {object} calendar the calendar which the task belongs to
|
* @param {object} calendar the calendar which the task belongs to
|
||||||
|
* @param {object} raw the raw vcalendar data
|
||||||
* @memberof Task
|
* @memberof Task
|
||||||
*/
|
*/
|
||||||
constructor(vcalendar, calendar, raw) {
|
constructor(vcalendar, calendar, raw) {
|
||||||
|
@ -141,7 +142,7 @@ export default class Task {
|
||||||
*/
|
*/
|
||||||
get summary() {
|
get summary() {
|
||||||
var vtodo = this.vCalendar.getFirstSubcomponent('vtodo')
|
var vtodo = this.vCalendar.getFirstSubcomponent('vtodo')
|
||||||
return vtodo.getFirstPropertyValue('summary');
|
return vtodo.getFirstPropertyValue('summary')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,18 +177,18 @@ export default class Task {
|
||||||
/**
|
/**
|
||||||
* Set the categories
|
* Set the categories
|
||||||
*
|
*
|
||||||
* @param {string} categories the categories
|
* @param {string} newCategories the categories
|
||||||
* @memberof Task
|
* @memberof Task
|
||||||
*/
|
*/
|
||||||
set categories(cats) {
|
set categories(newCategories) {
|
||||||
var vtodo = this.vCalendar.getFirstSubcomponent('vtodo')
|
var vtodo = this.vCalendar.getFirstSubcomponent('vtodo')
|
||||||
var categories = vtodo.getFirstProperty('categories')
|
var categories = vtodo.getFirstProperty('categories')
|
||||||
if (cats.length > 0) {
|
if (newCategories.length > 0) {
|
||||||
if (categories) {
|
if (categories) {
|
||||||
categories.setValues(cats)
|
categories.setValues(newCategories)
|
||||||
} else {
|
} else {
|
||||||
var prop = new ICAL.Property('categories')
|
var prop = new ICAL.Property('categories')
|
||||||
prop.setValues(cats)
|
prop.setValues(newCategories)
|
||||||
categories = vtodo.addProperty(prop)
|
categories = vtodo.addProperty(prop)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import ICAL from 'ical.js'
|
import ICAL from 'ical.js'
|
||||||
|
import parseIcs from '../services/parseIcs'
|
||||||
import client from '../services/cdav'
|
import client from '../services/cdav'
|
||||||
import Task from '../models/task'
|
import Task from '../models/task'
|
||||||
import pLimit from 'p-limit'
|
import pLimit from 'p-limit'
|
||||||
|
|
Loading…
Reference in a new issue