Neal Wilson hace 11 años
padre
commit
1971dcaf37
Se han modificado 2 ficheros con 10 adiciones y 6 borrados
  1. 1
    1
      config/Windows/navigation.xml
  2. 9
    5
      config/Windows/newsamplebatch.xml

+ 1
- 1
config/Windows/navigation.xml Ver fichero

@@ -248,7 +248,7 @@ type="push" />
248 248
 			var query = new QSqlQuery;
249 249
 			query.exec("CREATE OR REPLACE FUNCTION log_use() RETURNS trigger AS $$ DECLARE i integer := array_lower(NEW.unroasted_id, 1); u integer := array_upper(NEW.unroasted_id, 1); BEGIN IF NEW.transaction_type = 'ROAST' THEN WHILE i <= u LOOP INSERT INTO use VALUES(NEW.time, NEW.unroasted_id[i], NEW.unroasted_quantity[i]); i := i + 1; END LOOP; END IF; RETURN NEW; END; $$ LANGUAGE plpgsql");
250 250
 			query.exec("CREATE TABLE IF NOT EXISTS item_attributes (id bigint PRIMARY KEY NOT NULL, name text NOT NULL)");
251
-			query.exec("CREATE TABLE IF NOT EXISTS coffee_sample_items(arrival timestamp without time zone, vendor text, attribute_ids bigint[], attribute_values text[]. item_id bigint) INHERITS (items)");
251
+			query.exec("CREATE TABLE IF NOT EXISTS coffee_sample_items(arrival timestamp without time zone, vendor text, attribute_ids bigint[], attribute_values text[], item_id bigint) INHERITS (items)");
252 252
 			query.exec("INSERT INTO TypicaFeatures VALUES('sample-roasting', TRUE, 1)");
253 253
 			query = query.invalidate();
254 254
 		};

+ 9
- 5
config/Windows/newsamplebatch.xml Ver fichero

@@ -60,6 +60,10 @@
60 60
 					<column><label>Time:</label></column>
61 61
 					<column><line id="time" writable="false" /></column>
62 62
 				</row>
63
+				<row>
64
+					<column><label>Duration:</label></column>
65
+					<column><line id="duration" writable="false" /></column>
66
+				</row>
63 67
 			</layout>
64 68
 			<label>Notes:</label>
65 69
 			<textarea id="annotation" />
@@ -171,11 +175,11 @@
171 175
 			var roastButton = findChildObject(this, 'load');
172 176
 			var profileName = findChildObject(this, 'profile');
173 177
 			var greenName = findChildObject(this, 'name');
178
+			var stop = findChildObject(navigationwindow.loggingWindow, 'stopbutton');
179
+			stop.clicked.connect(function() {
180
+				submit.setEnabled(true);
181
+			});
174 182
 			roastButton.clicked.connect(function() {
175
-				var stop = findChildObject(navigationwindow.loggingWindow, 'stopbutton');
176
-				stop.clicked.connect(function() {
177
-					submit.setEnabled(true);
178
-				});
179 183
 				var lc = 1;
180 184
 				currentBatchInfo = batch;
181 185
 				query = new QSqlQuery();
@@ -244,7 +248,7 @@
244 248
 			var target = findChildObject(this, 'target');
245 249
 			submit.clicked.connect(function() {
246 250
 				query = new QSqlQuery();
247
-				query.prepare("INSERT INTO files VALUES(default, :name, 'profile', NULL, :data) RETURNING id");
251
+				query.prepare("INSERT INTO files VALUES(DEFAULT, :name, 'profile', NULL, :data) RETURNING id");
248 252
 				query.bind(":name", timefield.text + " " + name.text + " " + profileName.currentText);
249 253
 				query.bindFileData(":data", batch.tempData);
250 254
 				query.exec();

Loading…
Cancelar
Guardar