vikunja-frontend/src/models/userSettings.ts

30 lines
812 B
TypeScript
Raw Normal View History

import AbstractModel, { type IAbstract } from './abstractModel'
2022-07-21 00:42:36 +02:00
import type { IList } from './list'
export interface IUserSettings extends IAbstract {
2022-06-23 03:22:21 +02:00
name: string
emailRemindersEnabled: boolean
discoverableByName: boolean
discoverableByEmail: boolean
overdueTasksRemindersEnabled: boolean
2022-07-21 00:42:36 +02:00
defaultListId: undefined | IList['id']
2022-06-23 03:22:21 +02:00
weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6
timezone: string
2022-07-21 00:42:36 +02:00
}
export default class UserSettingsModel extends AbstractModel implements IUserSettings {
name = ''
emailRemindersEnabled = true
discoverableByName = false
discoverableByEmail = false
overdueTasksRemindersEnabled = true
defaultListId: undefined | IList['id'] = undefined
weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6 = 0
timezone = ''
2022-06-23 03:22:21 +02:00
constructor(data: Partial<IUserSettings>) {
super()
this.assignData(data)
}
}