Mercurial > lada > lada-client
comparison app/model/Probe.js @ 970:f4eb53ba63fc
Setting Timestamps the correct way. Before this commit the times of the instatiation of the model were used as default values, which led to wrong dates.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Mon, 16 Nov 2015 11:48:15 +0100 |
parents | a1783726d43e |
children | f73ca04d73a7 |
comparison
equal
deleted
inserted
replaced
969:d4603049cd42 | 970:f4eb53ba63fc |
---|---|
60 convert: function(v) { | 60 convert: function(v) { |
61 if (!v) { | 61 if (!v) { |
62 return v; | 62 return v; |
63 } | 63 } |
64 return new Date(v); | 64 return new Date(v); |
65 }, | 65 } |
66 defaultValue: new Date() | |
67 }, { | 66 }, { |
68 name: 'probeentnahmeEnde', | 67 name: 'probeentnahmeEnde', |
69 type: 'date', | 68 type: 'date', |
70 convert: function(v) { | 69 convert: function(v) { |
71 if (!v) { | 70 if (!v) { |
72 return v; | 71 return v; |
73 } | 72 } |
74 return new Date(v); | 73 return new Date(v); |
75 }, | 74 } |
76 defaultValue: new Date() | |
77 }, { | 75 }, { |
78 name: 'mittelungsdauer' | 76 name: 'mittelungsdauer' |
79 }, { | 77 }, { |
80 name: 'letzteAenderung', | 78 name: 'letzteAenderung', |
81 type: 'date', | 79 type: 'date', |
82 convert: function(v) { | 80 convert: function(v) { |
83 if (!v) { | 81 if (!v) { |
84 return v; | 82 return v; |
85 } | 83 } |
86 return new Date(v); | 84 return new Date(v); |
87 }, | 85 } |
88 defaultValue: new Date() | |
89 }, { | 86 }, { |
90 name: 'erzeugerId' | 87 name: 'erzeugerId' |
91 }, { | 88 }, { |
92 name: 'probeNehmerId' | 89 name: 'probeNehmerId' |
93 }, { | 90 }, { |