require(['config'], function() {
	require([
		'jquery'
	], function($) {

	});
});

var itp_fn_BIZPOP_BATCH_ERROR_info = function(param) {
	fn_ajax_call('/api/batch/hist-batch-run', param, itp_fn_BIZPOP_BATCH_ERROR_info_callback, 'GET');
};

var itp_fn_BIZPOP_BATCH_ERROR_info_callback = function(result) {
	
	$('#ITP_FORM_BIZPOP_BATCH_ERROR .fnBatchNm').html(result.batchNm);
	$('#ITP_FORM_BIZPOP_BATCH_ERROR .fnRunDt').html(result.runDt);
	$('#ITP_FORM_BIZPOP_BATCH_ERROR .fnRunTpNm').html(result.runTpNm);
	$('#ITP_FORM_BIZPOP_BATCH_ERROR .fnResultDesc').html(result.resultDesc.replace(/(\n|\r\n)/g, '<br>'));
};

function itp_fn_BIZPOP_BATCH_ERROR(parentPopFn, args, returnType) {
	
	itp_fn_BIZPOP_BATCH_ERROR_info(args);
	
	$('#ITP_BIZPOP_BATCH_ERROR').one('shown.bs.modal', function(e) {		
		itp_fn_fire_window_resize();
	}).one('hidden.bs.modal', function(e) {
		$('#ITP_BIZPOP_BATCH_ERROR').remove();
	}).modal('show');
	
};

