<commit_before>/*
*author: @duku
*/

'use strict';

var statusOption = {
	0: 'Inactivo', 
	1: 'Activo'
}

function showDepartmentsCatalog () {
	$('#departmentCatalog').jtable({
        title: ' ', 
        actions: {
            listAction: 	'/services/catalogs?action=department_list',
            createAction: 	'/services/catalogs?action=department_create',
            updateAction: 	'/services/catalogs?action=department_update',
            deleteAction: 	'/services/catalogs?action=department_delete'
        }, fields: {
            id: {
                key: true,
                list: false
            }, name: {
                title: 'Nombre departamento'
            }, status: {
                title: 'Estado', 
                options: statusOption
            }, created_at: {
                create: false, 
                edit: false, 
                title: 'Creación'
            }, updated_at: {
                create: false, 
                edit: false, 
                title: 'Actualización' 
            }
        }
    });
    $('#departmentCatalog').jtable('load');
}
function showTownsCatalog () {
	$('#townCatalog').jtable({
        title: ' ', 
        sorting: true,
        defaultSorting: 'departmentName ASC', //Set default sorting
        actions: {
            listAction: 	'/services/catalogs?action=town_list',
            createAction: 	'/services/catalogs?action=town_create',
            updateAction: 	'/services/catalogs?action=town_update',
            deleteAction: 	'/services/catalogs?action=town_delete'
        }, fields: {
            id: {
                key: true,
                list: false
            }, townName: {
                title: 'Nombre Municipio'
            }, departmentId: {
                title: 'Departamento', 
                options: departmentsOption
            }, status: {
                title: 'Estado', 
                options: statusOption
            }, created_at: {
                create: false, 
                edit: false, 
                title: 'Creación'
            }, updated_at: {
                create: false, 
                edit: false, 
                title: 'Actualización' 
            }
        }
    });
    $('#townCatalog').jtable('load');
}
//function showDepartmentsCatalog () {}
//function showDepartmentsCatalog () {}<commit_msg>Cambio de sorting<commit_after>/*
*author: @duku
*/

'use strict';

var statusOption = {
	0: 'Inactivo', 
	1: 'Activo'
}

function showDepartmentsCatalog () {
	$('#departmentCatalog').jtable({
        title: ' ', 
        actions: {
            listAction: 	'/services/catalogs?action=department_list',
            createAction: 	'/services/catalogs?action=department_create',
            updateAction: 	'/services/catalogs?action=department_update',
            deleteAction: 	'/services/catalogs?action=department_delete'
        }, fields: {
            id: {
                key: true,
                list: false
            }, name: {
                title: 'Nombre departamento'
            }, status: {
                title: 'Estado', 
                sorting: false,
                options: statusOption
            }, created_at: {
                create: false, 
                edit: false, 
                sorting: false,
                title: 'Creación'
            }, updated_at: {
                create: false, 
                edit: false, 
                sorting: false,
                title: 'Actualización' 
            }
        }
    });
    $('#departmentCatalog').jtable('load');
}
function showTownsCatalog () {
	$('#townCatalog').jtable({
        title: ' ', 
        sorting: true,
        defaultSorting: 'departmentName ASC', //Set default sorting
        actions: {
            listAction: 	'/services/catalogs?action=town_list',
            createAction: 	'/services/catalogs?action=town_create',
            updateAction: 	'/services/catalogs?action=town_update',
            deleteAction: 	'/services/catalogs?action=town_delete'
        }, fields: {
            id: {
                key: true,
                list: false
            }, townName: {
                title: 'Nombre Municipio'
            }, departmentId: {
                title: 'Departamento', 
                options: departmentsOption
            }, status: {
                title: 'Estado', 
                sorting: false,
                options: statusOption
            }, created_at: {
                create: false, 
                edit: false, 
                sorting: false,
                title: 'Creación'
            }, updated_at: {
                create: false, 
                edit: false, 
                sorting: false,
                title: 'Actualización' 
            }
        }
    });
    $('#townCatalog').jtable('load');
}
//function showDepartmentsCatalog () {}
//function showDepartmentsCatalog () {}
{'fraction_non_alphanumeric': 0.11678236014699878, 'fraction_numerical': 0.0008166598611678236, 'mean_word_length': 1.4264487369985142, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4505468', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1276, 'n_words': 242}