Commit 6b83be28 authored by Project Open's avatar Project Open

- WIP

parent 007c22fd
......@@ -166,7 +166,22 @@ function launchTimesheetWeeklyLogging(){
if ("number" == typeof(hoursFloat)) return Math.round(700.0 * hoursFloat) / 100.0;
return "";
},
summaryType: sumType, summaryRenderer: sumRenderer
summaryType: function(hourArray, dataIndex) {
var sum = 0;
for (var i = 0; i < hourArray.length; i++) {
var vString = hourArray[i].get("hours");
var vFloat = parseFloat(vString);
if (!!vFloat) sum = sum + vFloat;
}
return sum;
},
summaryRenderer: function(value, summaryData, dataIndex) {
var type = typeof(value);
if ("number" == type) {
return Math.round(7.0 * value * 100) / 100;
}
return value;
}
}
// { text: "Note", flex: 1, dataIndex: 'note', editor: { allowBlank: true }}
]
......@@ -210,7 +225,8 @@ function launchTimesheetWeeklyLogging(){
name: 'from_date',
value: new Date(),
maxValue: new Date(),
format: "Y-W"
format: "Y-W",
startDay: 1
}
]
});
......@@ -585,7 +601,7 @@ Ext.onReady(function() {
});
// Load stores that need parameters
hourStore.getProxy().extraParams = { query: "user_id = @current_user_id@ and day > '2021-03-10'", format: 'json' };
hourStore.getProxy().extraParams = { query: "user_id = @current_user_id@ and day > '2021-03-10'", format: 'json', deref_p: 1 };
hourStore.load({
callback: function() {
console.log('PO.store.timesheet.HourStore: loaded');
......
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