<commit_before><script type="text/javascript">
	
	var manageRegistrations = new kendo.Router({
		
	});
	
	// Show màn hình thông báo chi tiết
	manageRegistrations.route("/", function(id){
		
		//show registration detail
		$('#registration-detail-wrapper').show();
		$('#registration-jasper-wrapper').hide();
	});
	
	manageRegistrations.route("/jasper", function(id){
		
		//show jasper
		$('#registration-jasper-wrapper').show();
		$('#registration-detail-wrapper').hide();
	});

	manageRegistrations.start();
</script>


<script>
console.log(">>>>>>>>>>>>>>>>>>>>>>>DOM");
var viewRegistrationModel;
document.addEventListener("DOMContentLoaded", function(event) {
console.log(">>>>>>>>>>>>>>>>>>>>>>>DOMContentLoaded");
$(function(){
	console.log(">>>>>>>>>>>>>>>>>>>>>>>document ready");
	$('#registration-jasper-wrapper').hide();
	
	viewRegistrationModel = kendo.observable({

		// co quan dang ky

		govAgency_dataSource : new kendo.data.DataSource({
	
			transport: {
				read: function(options) {
				
					$.ajax({
						url: "${api.server}/dictcollections/GOVERNMENT_AGENCY/dictitems",
						dataType: "json",
						type: 'GET',
						headers: {
							"groupId": ${groupId}
						},
						success: function(result) {
							result["data"] = result.total==0 ? []: result["data"];
							options.success(result);
						},
						error: function(xhr, textStatus, errorThrown) {
							options.success({total:0, data:[]});
						}
					});
				}
			},
			schema: {
				data: "data",
				total: "total"
			}
		}),
		govAgency_value: "default",
		govAgency_change : function(e){
			e.preventDefault();
			e.stopPropagation();
			e.stopImmediatePropagation();
			console.log("onchange co quan dk");
		},
		show: "false",
		updateDossierBusiness : function (e) {
			e.preventDefault();
			e.stopPropagation();
			e.stopImmediatePropagation();
			viewRegistrationModel.addNewRegistration("");
		
		},
		
		registrationsListView_dataSource : new kendo.data.DataSource({
		
			transport :{
				read : function(options){
					
					$.ajax({
						url : "${api.server}/registrations/",
						dataType : "json",
						type : "GET",
						headers : {"groupId": ${groupId}},
						data : {
							owner: true
						},
						success : function(result){
							result["data"] = result.total == 0?[]: result["data"];
							
							if ( result.total==0 ){
								
								viewRegistrationModel.addNewRegistration("");
							
							} else {
								
								viewRegistrationModel.registrationModelMap(result.data[0]);
								options.success(result);
							}
							<commit_msg>registration: init screen create add new registration <commit_after><script type="text/javascript">
	
	var manageRegistrations = new kendo.Router({
		
	});
	
	// Show màn hình thông báo chi tiết
	manageRegistrations.route("/", function(id){
		
		//show registration detail
		$('#registration-detail-wrapper').show();
		$('#registration-jasper-wrapper').hide();
	});
	
	manageRegistrations.route("/jasper", function(id){
		
		//show jasper
		$('#registration-jasper-wrapper').show();
		$('#registration-detail-wrapper').hide();
	});

	manageRegistrations.start();
</script>


<script>
console.log(">>>>>>>>>>>>>>>>>>>>>>>DOM");
var viewRegistrationModel;
document.addEventListener("DOMContentLoaded", function(event) {
console.log(">>>>>>>>>>>>>>>>>>>>>>>DOMContentLoaded");
$(function(){
	console.log(">>>>>>>>>>>>>>>>>>>>>>>document ready");
	$('#registration-jasper-wrapper').hide();
	
	viewRegistrationModel = kendo.observable({

		// co quan dang ky

		govAgency_dataSource : new kendo.data.DataSource({
	
			transport: {
				read: function(options) {
				
					$.ajax({
						url: "${api.server}/dictcollections/GOVERNMENT_AGENCY/dictitems",
						dataType: "json",
						type: 'GET',
						headers: {
							"groupId": ${groupId}
						},
						success: function(result) {
							result["data"] = result.total==0 ? []: result["data"];
							options.success(result);
						},
						error: function(xhr, textStatus, errorThrown) {
							options.success({total:0, data:[]});
						}
					});
				}
			},
			schema: {
				data: "data",
				total: "total"
			}
		}),
		govAgency_value: "default",
		govAgency_change : function(e){
			e.preventDefault();
			e.stopPropagation();
			e.stopImmediatePropagation();
			console.log("onchange co quan dk");
		},
		show: "false",
		updateDossierBusiness : function (e) {
			e.preventDefault();
			e.stopPropagation();
			e.stopImmediatePropagation();
			viewRegistrationModel.addNewRegistration("");
		
		},
		
		registrationsListView_dataSource : new kendo.data.DataSource({
		
			transport :{
				read : function(options){
					
					$.ajax({
						url : "${api.server}/registrations/",
						dataType : "json",
						type : "GET",
						headers : {"groupId": ${groupId}},
						data : {
							owner: true
						},
						success : function(result){
							result["data"] = result.total == 0?[]: result["data"];
							options.success(result);
							
							if ( result.total==0 ){
								
								viewRegistrationModel.addNewRegistration("");
							
							} else {
								
								viewRegistrationModel.registrationModelMap(result.data[0]);
							}
							
{'fraction_non_alphanumeric': 0.1859073359073359, 'fraction_numerical': 0.0019305019305019305, 'mean_word_length': 3.0956521739130434, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 147, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3406636', 'n_tokens_mistral': 2192, 'n_tokens_neox': 1558, 'n_words': 265}