forked from vikunja/frontend
konrad
7d2bd192ab
Use fancy checkbox for archiving namespace Show is archived badge for namespaces Fix is archived badge in navigation bar Add check to filter out archived lists or namespaces Show if a list is archived in menu Hide edit task if the list is archived Hide marking tasks as done if the list is archived Show is archived message on list Add archiving a list Add archiving a namespace Co-authored-by: kolaente <k@knt.li> Reviewed-on: vikunja/frontend#73
32 lines
623 B
JavaScript
32 lines
623 B
JavaScript
import AbstractModel from './abstractModel'
|
|
import ListModel from './list'
|
|
import UserModel from './user'
|
|
|
|
export default class NamespaceModel extends AbstractModel {
|
|
constructor(data) {
|
|
super(data)
|
|
|
|
this.lists = this.lists.map(l => {
|
|
return new ListModel(l)
|
|
})
|
|
this.owner = new UserModel(this.owner)
|
|
|
|
this.created = new Date(this.created)
|
|
this.updated = new Date(this.updated)
|
|
}
|
|
|
|
// Default attributes that define the 'empty' state.
|
|
defaults() {
|
|
return {
|
|
id: 0,
|
|
name: '',
|
|
description: '',
|
|
owner: UserModel,
|
|
lists: [],
|
|
is_archived: false,
|
|
|
|
created: null,
|
|
updated: null,
|
|
}
|
|
}
|
|
} |