Project

General

Profile

Bug #551 » validasi backdate.txt

M Azid Wahyudi, 11/11/2021 02:54 PM

 
1
penambahan :
2

    
3
init overtime penambahan :
4

    
5
'field[name=DateFrom]': {
6
    change: function () {
7
        setEndPlan();
8
        getDayType();
9
        validasiDateFrom(); // penambahan 
10
    }
11
},
12

    
13

    
14
method overtime penambahan function :
15

    
16
function validasiDateFrom() {
17
    var now = Ext.Date.format(new Date(), 'Ymd');
18
    var body = MinovaUtil.WORKFLOW.getViewBodyWorkflow();
19
    var StartDate = body.down('field[name=DateFrom]').getValue();
20
    var startDateOvt = (StartDate - now);
21
    console.log(startDateOvt);
22
    if (startDateOvt <= '-100') {
23
        MinovaMessageInfo("Information", "WFOTCEKDATEFROM", "", "");
24
        body.down('[name=DateFrom]').setValue('');
25
    }
26
};
27

    
28

    
29
nambah data di SMESSAGECATALOG :
30

    
31
MessageId : WFOTCEKDATEFROM	
32
LangId : EN	
33
Message : Overtime cannot be done 30 days before today
34

    
35
MessageId : WFOTCEKDATEFROM	
36
LangId : EN	
37
Message : Overtime tidak bisa di lakukan 30 hari sebelum hari ini		
(2-2/2)