Bug #551
ESS Overtime validasi untuk backdate maksimal 30 hari kebelakang
0%
Description
dear tim developer, mohon support nya untuk membuat validasi pada ess overtime dimana pada saat mengisi start date , maksimal 30 hari kebelakang.
rohto production
remote.minovais.com: 61121
Files
Updated by M Azid Wahyudi about 3 years ago
- File validasi backdate.txt validasi backdate.txt added
- Status changed from Assigned to QA Test
- Assignee changed from M Azid Wahyudi to Muhammad Bintar
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
Updated by M Azid Wahyudi about 3 years ago
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 : IDN
Message : Overtime tidak bisa di lakukan 30 hari sebelum hari ini