dustin@1012: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz raimund@548: * Software engineering by Intevation GmbH raimund@548: * raimund@548: * This file is Free Software under the GNU GPL (v>=3) raimund@548: * and comes with ABSOLUTELY NO WARRANTY! Check out raimund@548: * the documentation coming with IMIS-Labordaten-Application for details. raimund@548: */ raimund@548: raimund@548: /** raimund@548: * Model class for Messungen raimund@548: */ raimund@548: Ext.define('Lada.model.Messung', { raimund@548: extend: 'Ext.data.Model', raimund@548: raimund@548: fields: [{ raimund@548: name: 'id' raimund@548: }, { dustin@691: name: 'owner', dustin@691: type: 'boolean' dustin@691: }, { dustin@693: name: 'readonly', dustin@702: type: 'boolean', dustin@702: persist: false dustin@693: }, { dustin@965: name: 'statusEdit', dustin@965: type: 'boolean', dustin@965: persist: false dustin@965: }, { raimund@548: name: 'probeId' raimund@548: }, { raimund@548: name: 'mmtId' raimund@548: }, { raimund@548: name: 'nebenprobenNr' raimund@548: }, { raimund@548: name: 'messdauer' raimund@548: }, { raimund@548: name: 'messzeitpunkt', raimund@548: convert: function(v) { raimund@548: if (!v) { raimund@1399: return ''; raimund@548: } dustin@563: return new Date(v); dustin@970: } raimund@548: }, { dustin@965: name: 'status' dustin@945: }, { raimund@548: name: 'fertig', raimund@548: type: 'boolean' raimund@548: }, { raimund@548: name: 'letzteAenderung', raimund@548: type: 'date', raimund@548: convert: function(v) { raimund@548: if (!v) { raimund@584: return new Date(); raimund@548: } dustin@563: return new Date(v); dustin@970: } raimund@548: }, { raimund@548: name: 'geplant', raimund@548: type: 'boolean' raimund@548: }, { tom@1217: name: 'idAlt' raimund@689: }, { raimund@711: name: 'treeModified', raimund@711: serialize: function(value) { raimund@711: if (value === '') { raimund@711: return null; raimund@711: } raimund@711: return value; raimund@711: } raimund@711: }, { raimund@711: name: 'parentModified', raimund@711: serialize: function(value) { raimund@711: if (value === '') { raimund@711: return null; raimund@711: } raimund@711: return value; raimund@711: } raimund@1032: }, { raimund@1032: name: 'statusWert', raimund@1032: persist: false raimund@1032: }, { raimund@1062: name: 'statusStufe', raimund@1062: persist: false raimund@1062: }, { raimund@1032: name: 'messwerteCount', raimund@1032: persist: false raimund@1032: }, { raimund@1032: name: 'kommentarCount', raimund@1032: persist: false raimund@548: }], raimund@548: raimund@548: idProperty: 'id', raimund@548: raimund@548: proxy: { raimund@548: type: 'rest', dustin@1012: url: 'lada-server/rest/messung/', raimund@548: reader: { raimund@548: type: 'json', raimund@548: root: 'data' raimund@548: } raimund@548: } raimund@548: });