[Lada-commits] [PATCH] Printing: calcualte NWG < sign in the client
Wald Commits
scm-commit at wald.intevation.org
Mon Dec 19 14:23:48 CET 2016
# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1482153784 -3600
# Node ID 208254152ac07991abe68f27a3cf2322b5ac1ee5
# Parent 43f394c10866080c35126cc3b8098249c515b832
Printing: calcualte NWG < sign in the client.
Also: removed ToDos from printing
diff -r 43f394c10866 -r 208254152ac0 app/controller/grid/ProbeList.js
--- a/app/controller/grid/ProbeList.js Mon Dec 19 10:52:50 2016 +0100
+++ b/app/controller/grid/ProbeList.js Mon Dec 19 14:23:04 2016 +0100
@@ -209,6 +209,7 @@
messstelle = probe.messstelle;
labormessstelle = probe.labormessstelle;
ortszuordnung = probe.ortszuordnung;
+ zusatzwerte = probe.zusatzwerte;
if (messstelle != null) {
prep[i].messstelle = [];
@@ -237,7 +238,18 @@
prep[i].deskriptoren[0] = emptyDeskriptor;
}
- debugger;
+ // See: app/view/grid/Probenzusatzwert.js
+ // Calculate NWG < symbol , as this is NOT done by the server
+ for (z in zusatzwerte){
+ var nwg = zusatzwerte[z]['nwgZuMesswert'];
+ var mw = zusatzwerte[z]['messwertPzs'];
+ if ( mw < nwg) {
+ prep[i].zusatzwerte[z]['messwertNwg'] = '<';
+ }
+ else {
+ prep[i].zusatzwerte[z]['messwertNwg'] = null;
+ }
+ }
// Flatten the Ortszuodnung Array
for (var o in ortszuordnung) {
@@ -345,8 +357,6 @@
failure: function(response) {
console.log('failure');
// Error handling
- // TODO
- console.log(response.responseText)
button.enable();
button.setLoading(false);
if (response.responseText) {
@@ -511,8 +521,6 @@
var i18n = Lada.getApplication().bundle;
console.log('failure');
// Error handling
- // TODO
- //console.log(response.responseText)
button.enable();
button.setLoading(false);
if (response.responseText) {
More information about the Lada-commits
mailing list