module fb { export class BevakningDO extends BevakningDOGen { //constructor(data: any) { // super(data, false, BevakningDO.$rootName); //} InteBeraeknadSenSparning: boolean; getPrimaryKey(): any { return this.OenskemaalId ? this.OenskemaalId.value : null; } preInit(initData) { if (initData.Objekttyp === null || angular.isUndefined(initData.Objekttyp)) { initData.Objekttyp = []; } if (initData.Nyckelord === null || angular.isUndefined(initData.Nyckelord)) { initData.Nyckelord = []; } } postInit() { this.InteBeraeknadSenSparning = !!this.SenastBeraeknad && !!this.SenastAendrad && (moment(this.SenastBeraeknad.value) < moment(this.SenastAendrad.value).add(-1000) || this.SenastBeraeknad.value === null); } } }