penambahan :
init overtime penambahan :
'field[name=DateFrom]': {
change: function () {
setEndPlan();
getDayType();
validasiDateFrom(); // penambahan
}
},
method overtime penambahan function :
function validasiDateFrom() {
var now = Ext.Date.format(new Date(), 'Ymd');
var body = MinovaUtil.WORKFLOW.getViewBodyWorkflow();
var StartDate = body.down('field[name=DateFrom]').getValue();
var startDateOvt = (StartDate - now);
console.log(startDateOvt);
if (startDateOvt <= '-100') {
MinovaMessageInfo("Information", "WFOTCEKDATEFROM", "", "");
body.down('[name=DateFrom]').setValue('');
}
};
nambah data di SMESSAGECATALOG :
MessageId : WFOTCEKDATEFROM
LangId : EN
Message : Overtime cannot be done 30 days before today
MessageId : WFOTCEKDATEFROM
LangId : EN
Message : Overtime tidak bisa di lakukan 30 hari sebelum hari ini