From 265c5cdfa8d2643cc8e342d54b72e7d36e75a23e Mon Sep 17 00:00:00 2001 From: Hacene SI HADJ MOHAND Date: Thu, 13 Feb 2020 16:45:38 +0100 Subject: [PATCH] ok --- js/app/models/TimeTable.js | 10 ++++++++++ 1 file changed, 10 insertions(+), 0 deletions(-) diff --git a/js/app/models/TimeTable.js b/js/app/models/TimeTable.js index 00cc30a..a693eda 100644 --- a/js/app/models/TimeTable.js +++ b/js/app/models/TimeTable.js @@ -46,6 +46,16 @@ Ext.define('amdaModel.Interval', { return value; } }, + { + name: 'durationDay', + type: 'float', + convert: function(value, rec){ + if (rec.get('stop') && rec.get('start') && (rec.get('stop')-rec.get('start'))>=0) { + return (rec.get('stop') - rec.get('start'))/3600000.0/24.0; + } + }, + persist: false + }, { name: 'durationHour', type: 'float', -- libgit2 0.21.2