Commit d278c023 authored by Jérome Perrin's avatar Jérome Perrin

repair outputs now that we no longer have extraPropertyDict

parent 9b8d9c16
...@@ -303,6 +303,7 @@ ...@@ -303,6 +303,7 @@
"Priority", "Priority",
"Material", "Material",
"Entrance Time", "Entrance Time",
"Processing Time",
"Station ID", "Station ID",
"Step No." "Step No."
] ]
...@@ -381,26 +382,36 @@ ...@@ -381,26 +382,36 @@
} }
if (obj._class === 'Dream.Job') { if (obj._class === 'Dream.Job') {
var property_dict = obj.extraPropertyDict; // find the corresponding input
var data = that.getData(),
input_job;
$.each(data.spreadsheet, function(i, line){
if (line[1] == obj['id']) {
input_job = line;
}
});
var duration = 0; var duration = 0;
gantt_data.data.push({ gantt_data.data.push({
id: obj['id'], id: obj['id'],
text: property_dict['name'], text: input_job[1],
start_date: start_date, start_date: start_date,
duration: obj['results'].completionTime, duration: obj['results'].completionTime,
project: 1, project: 1,
open: false, open: false,
parent: "by_job" parent: "by_job"
}); });
$.each(obj['results']['schedule'], function (i, schedule) { $.each(obj['results']['schedule'], function (i, schedule) {
spreadsheet_data.push([ spreadsheet_data.push([
property_dict['name'], input_job[0],
obj['id'], obj['id'],
property_dict['order_date'], input_job[2], // orderDate
property_dict['due_date'], input_job[3], // dueDate
property_dict['priority'], input_job[4], // priority
property_dict['material'], input_job[5], // material
schedule['entranceTime'], schedule['entranceTime'],
input_job[7].split('-')[schedule['stepNumber']] || 0, // processing time
schedule['stationId'], schedule['stationId'],
schedule['stepNumber'] schedule['stepNumber']
]); ]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment