
setIsEntryErrorToTrue: function(_item){
    showMask();
    $.post('/api/ticket/setIsEntryErrorToTrue', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    });
},

setIsEntryErrorToFalse: function(_item){
    showMask();
    $.post('/api/ticket/setIsEntryErrorToFalse', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    })
},

signAsAssignedPro: function(_item){
    showMask();
    $.post('/api/ticket/signAsAssignedPro', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    })
},

undoSignAsAssignedPro: function(_item){
    showMask();
    $.post('/api/ticket/undoSignAsAssignedPro', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    })
},

signAsManagerPro: function(_item){
    showMask();
    $.post('/api/ticket/signAsManagerPro', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    })
},

undoSignAsManagerPro: function(_item){
    showMask();
    $.post('/api/ticket/undoSignAsManagerPro', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    })
},

signAsInitiatingPro: function(_item){
    showMask();
    $.post('/api/ticket/signAsInitiatingPro', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    })
},

undoSignAsInitiatingPro: function(_item){
    showMask();
    $.post('/api/ticket/undoSignAsInitiatingPro', {
        uid:_item.uid
    }, function(_data){
        fastReload();
    })
},

hasError: function(_data) {     // check and report error if exists via toastr
    let msg = 'Unknown error!';
    if(_data) {
        if(_data.success) return false;
        else if(_data.message) msg = _data.message;
    }
    toastr.error(msg);
    return true;
}
