<script type="text/javascript">
$(document).ready(function(){
	console.log('tab pcb consideration loaded');
});

function btnEmpEditPCB(elem) {
	var b64 = $(elem).data('content');
	var json = JSON.parse(atob(b64));

	console.log(json);
	$('#emp_pcb_id').val(json.id);
	$('#employee_pcb_name').val(json.family_id);
	$('#employee_pcb_status').val(json.status);
}

function btnSpouseEditPCB(elem) {
	var b64 = $(elem).data('content');
	var json = JSON.parse(atob(b64));

	console.log(json);
	$('#spouse_pcb_id').val(json.id);
	$('#spouse_pcb_name').val(json.family_id);
	$('#spouse_pcb_status').val(json.status);
}

function btnRemovePCB(id){
	toastConfirm('Are you sure you want to remove this record', function () {
		_removePCB(id);
	});
}

function _removePCB(id) {
	ajxRequest('<?php echo base_url('/hr/staffProfile/removePCB/'); ?>','POST',{id:id},'<?php echo base_url('/hr/staffProfile/staffDetail/'.$staff_id)?>');
}
</script>