feat: unify savedFilter logic in service (#2491)
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/2491 Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de> Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:

committed by
konrad

parent
9ded3d0cd6
commit
9807858436
@ -31,17 +31,4 @@ export default class SavedFilterModel extends AbstractModel<ISavedFilter> implem
|
||||
this.created = new Date(this.created)
|
||||
this.updated = new Date(this.updated)
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the corresponding list id to this saved filter.
|
||||
* This function matches the one in the api.
|
||||
* @returns {number}
|
||||
*/
|
||||
getListId() {
|
||||
let listId = this.id * -1 - 1
|
||||
if (listId > 0) {
|
||||
listId = 0
|
||||
}
|
||||
return listId
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user